keras_Realtime_Multi-Person_Pose_Estimation icon indicating copy to clipboard operation
keras_Realtime_Multi-Person_Pose_Estimation copied to clipboard

issue with reducing the number of stages

Open M-E-Williams opened this issue 7 years ago • 5 comments

Hi,

If I truncate the number of stages I get the following error (included at the bottom of the post) I have altered the number of losses to reflect the number of stages. Notably the number of numpy arrays expected is always 2* the number of stages, whereas 12 numpy arrays are always presented. There are no pretrained weights for the stage blocks

Traceback (most recent call last): File "train_pose_ownmod.py", line 172, in initial_epoch=last_epoch File "/usr/local/lib/python3.5/dist-packages/keras/legacy/interfaces.py", line 87, in wrapper return func(*args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/keras/engine/training.py", line 2114, in fit_generator class_weight=class_weight) File "/usr/local/lib/python3.5/dist-packages/keras/engine/training.py", line 1826, in train_on_batch check_batch_axis=True) File "/usr/local/lib/python3.5/dist-packages/keras/engine/training.py", line 1411, in _standardize_user_data exception_prefix='target') File "/usr/local/lib/python3.5/dist-packages/keras/engine/training.py", line 88, in _standardize_input_data '...') ValueError: Error when checking model target: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 6 array(s), but instead got the following list of 12 arrays: [array([[[[ 0. , 0. , 0. , ..., 0. , 0. , 0. ], [ 0. , 0. , 0. , ..., 0. , 0. , 0. ...

M-E-Williams avatar Nov 29 '17 16:11 M-E-Williams

Data generator supply ground truth to each stage to get loss on each stage. Reduce number of ground truths (and masks too) in input params and generator.

anatolix avatar Nov 30 '17 13:11 anatolix

@anatolix how to reduce the input params and generator? i'm sorry for asking it cause i don't find the solution.

Yukicuc avatar May 05 '18 09:05 Yukicuc

oh!, i find it!!

Yukicuc avatar May 05 '18 10:05 Yukicuc

@Yukicuc Could you explain the solution? I met similar problem and didn't resolve it so far.

xiaofeiwu avatar May 14 '18 12:05 xiaofeiwu

OK. Now I found the related code in ds_generator_client.py. The groundtruth should be revised following the number of stages.

xiaofeiwu avatar May 15 '18 02:05 xiaofeiwu