smellslikeml / ActionAI

Real-Time Spatio-Temporally Localized Activity Detection by Tracking Body Keypoints

Home Page:https://www.hackster.io/actionai/actionai-custom-tracking-multiperson-activity-recognition-fa5cb5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: 'dict' object is not callable while running train_legday.py

EtainLove opened this issue · comments

Thanks for the wonderful code.

I have got this error while running yogai on Linux PC, not on Raspberry PI.

  • Ubuntu 18.04.3

What I did:

  • cd examples/yogai
  • ./install.sh (changed the tensorflow part to pip3 install tensorflow==1.11)
  • python3 train_legday.py
Traceback (most recent call last):
  File "train_legday.py", line 61, in <module>
    X_train, X_test, y_train, y_test = load_data(args.data)
  File "train_legday.py", line 32, in load_data
    y_train = keras.utils.to_categorical(list(map(lbl_dict, y_train)), num_class)
TypeError: 'dict' object is not callable

I searched a little bit, I couldn't find any solution. The error is due to this part:

list(map(lbl_dict, y_train))

Any suggestion?

Hi there,
Thanks for opening an issue! Fixed train_legday.py and it should train correctly now.
Cheers!