felixchenfy / Realtime-Action-Recognition

Apply ML to the skeletons from OpenPose; 9 actions; multiple people. (WARNING: I'm sorry that this is only good for course demo, not for real world applications !!! Those ary very difficult !!!)
MIT License
875 stars 256 forks source link

Training 2 actions #64

Closed GyungBin closed 3 years ago

GyungBin commented 3 years ago

Hello! Thank you for sharing your work! There was an error when running s5_test.py via webcam after training its own dataset with two actions.

File "C:\Realtime-Action-Recognition-master\utils\lib_classifier.py", line 185, in smooth_scores
    score_sums += score
ValueError: operands could not be broadcast together with shapes (9,) (2,) (9,) 

I think it's related to the matrix, could you help me that?

Amyhds commented 3 years ago

Hi! I have the same problem. how did you solve it?

qkdkralsgh commented 3 years ago

@Amyhds Hi! maybe you need to set window_size & classses

vpeopleonatank commented 3 years ago

I also faced this issue because I use the original model which is trained for 9 classes, but my new dataset has 6 classes. When run training script at step 4, my model was not saved because the qt error occured before saving model. You should check classes in config.yaml file or trained model file.

Amyhds commented 3 years ago
#classes: ['stand', 'walk', 'run', 'jump', 'sit', 'squat', 'kick', 'punch', 'wave']
classes: ['lying', 'other', 'sitting', 'standing']

I changed classes like that in config.yaml but why should I change window_size? Could you tell me why? what else do I have to change?

qkdkralsgh commented 3 years ago

@Amyhds If you changed window_size, you need to set window_size. When training the model, the pca, window_size, and classes must be set well.

Amyhds commented 2 years ago

Thanks for the answer!!!