2

I have tried this model (" https://github.com/LZQthePlane/Online-Realtime-Action-Recognition-based-on-OpenPose ")for my own data set (i have given sit action video and converted to csv file ). Csv file contains 1000 records. Now in action_enum.py I have only sit action . In train.py file i have changed the

encoder_Y = [0]*744 + [1]*722 + [2]*815 + [3]*1008

to encoder_Y = [0]*1000 ( only for sit action ). After changing in train.py file, I got this error.

enter image description here

Malathi K
  • 71
  • 12

1 Answers1

0

Since you have only one class, you should change your model to only output one value.

In Action/training/train.py:

# build keras model
model = Sequential()
model.add(Dense(units=128, activation='relu'))
model.add(BatchNormalization())
model.add(Dense(units=64, activation='relu'))
model.add(BatchNormalization())
model.add(Dense(units=16, activation='relu'))
model.add(BatchNormalization())
# change 4 to 1
model.add(Dense(units=1, activation='softmax'))
keineahnung2345
  • 2,635
  • 4
  • 13
  • 28