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

No module named config_reader

Open jerpint opened this issue 7 years ago • 11 comments

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?

jerpint avatar Apr 23 '18 10:04 jerpint

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.

abinjoabraham avatar Apr 23 '18 11:04 abinjoabraham

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 avatar Apr 25 '18 01:04 murrayLuke

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.

murrayLuke avatar Apr 25 '18 01:04 murrayLuke

@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

jerpint avatar May 01 '18 03:05 jerpint

You can pip install ConfigObj.

murrayLuke avatar May 01 '18 04:05 murrayLuke

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.

murrayLuke avatar May 01 '18 15:05 murrayLuke

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

anatolix avatar May 04 '18 14:05 anatolix

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 avatar May 07 '18 12:05 jerpint

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 avatar May 07 '18 12:05 jerpint

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

jerpint avatar May 07 '18 12:05 jerpint

@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.

murrayLuke avatar May 12 '18 17:05 murrayLuke