anatolix / keras_Realtime_Multi-Person_Pose_Estimation

Keras version of Realtime Multi-Person Pose Estimation project
Other
118 stars 47 forks source link

No module named config_reader #30

Open jerpint opened 6 years ago

jerpint commented 6 years ago

I just cloned your repo, tried running on a test image -

python demo_image.py --image sample_images/ski.jpg --model training/weights.best.h5

and get

  File "demo_image.py", line 7, in <module>
    from config_reader import config_reader
ImportError: No module named 'config_reader'

Am I missing something, or is config_reader simply not present?

abinjoabraham commented 6 years ago

Exactly. I am also was stuck with this. I tried taking the config_reader python file from the michalfaber initial fork and I guess it worked well. Correct me if I am wrong.

murrayLuke commented 6 years ago

I'm also trying this, I tried taking the config_reader from the michalfarber fork and I have an issue

param, model_params = config_reader()

KeyError: 'param'

murrayLuke commented 6 years ago

so i solved this by doing the following

copy the following file from michalfarber into the top directory

https://github.com/michalfaber/keras_Realtime_Multi-Person_Pose_Estimation/blob/master/config

also copy the following file from michalfarber into the top directory

https://github.com/michalfaber/keras_Realtime_Multi-Person_Pose_Estimation/blob/master/config_reader.py

then you should be good to go.

jerpint commented 6 years ago

@murrayLuke now I can't seem to find the configobj module so i cant run

from configobj import ConfigObj which is imported in config_reader

murrayLuke commented 6 years ago

You can pip install ConfigObj.

murrayLuke commented 6 years ago

i have finished training and it didn't exactly work out. I ended up with a lot of NaN's and inf after it seemed to be running succesfully for almost 48 hours. Not sure if it is due to the config issue, or due to my need to decrease the batch size from 10 to 5 since my GPU only has 4gb of memory.

anatolix commented 6 years ago

I ended up with a lot of NaN's and inf that is strange, keras should stop on first NaN

jerpint commented 6 years ago

I dont seem to have a config file in my repo, where can I find it? It appears as though configobj depends on config files otherwise returns an empty dict and breaks

jerpint commented 6 years ago

Turns out you have to change line 6 in config_reader.py from

config = ConfigObj('config') to config = ConfigObj('config.py')

** Edit: This doesn't work :( Doesn't seem like config.py was the right file either

jerpint commented 6 years ago

After revisiting @murrayLuke's comment, i realized i forgot to copy the proper config file he had linked to, it was in his comment all along

murrayLuke commented 6 years ago

@anatolix the NaN's and inf were in the validation. Not sure if Keras will stop there, I did see the callback for training, maybe the callback should also exist in validation but not sure. I ran into that issue when training on the original dataset. However I also ran into the issue when training a different dataset. In my second dataset there is no need for a mask so I had mistakenly set the mask to all zeros. Making it all ones so that nothing is masked out seems to fix the issue on my own dataset. I haven't had time to go back and debug the COCO dataset. @anatolix are there plans to get the config stuff fixed for this repo? I can send a pull request but I assume you have the correct files if you ran it yourself.