mks0601 / TF-SimpleHumanPose

TensorFlow implementation of "Simple Baselines for Human Pose Estimation and Tracking", ECCV 2018
336 stars 90 forks source link

tmp pickle file not found - used offered human detection file and model #60

Closed Vhunon closed 4 years ago

Vhunon commented 4 years ago

Hello,

I used your 'human_detection.json' file from here and your model for the 140th epoch from here. The model was saved in the model-dump folder and the human detection file in ..data/COCO/dets/

However, I was not able to reproduce your code.

The error message:

02-10 22:54:38 Generating testing graph on 1 GPUs ... 02-10 22:54:40 Initialized model weights from /home/myName/TF-SimpleHumanPose/main/../output/model_dump/COCO/snapshot_140.ckpt ... 02-10 22:54:41 Current epoch is 140. Process Worker-1: Traceback (most recent call last): File "/home/myName/anaconda3/envs/tf1/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/home/myName/TF-SimpleHumanPose/main/../lib/tfflat/mp_utils.py", line 34, in run msg = self._func(self.id, *self.args, **self.kwargs) File "test.py", line 225, in func range = [ranges[gpu_id], ranges[gpu_id + 1]] IndexError: list index out of range Traceback (most recent call last): File "test.py", line 256, in test(int(args.test_epoch)) File "test.py", line 229, in test result = MultiGPUFunc.work() File "/home/myName/TF-SimpleHumanPose/main/../lib/tfflat/mp_utils.py", line 82, in work id, msg = load_pkl( 'tmpresult{}'.format(self._proc_ids[i]) ) File "/home/myName/TF-SimpleHumanPose/main/../lib/tfflat/serialize.py", line 68, in load_pkl with open('{}.pkl'.format(name), 'rb') as f: FileNotFoundError: [Errno 2] No such file or directory: 'tmp_result_0.pkl'

Which human_detection file is used?

mks0601 commented 4 years ago

Please also check dataset and testset in main/config.py

mks0601 commented 4 years ago

As described in README, tmp_result_0.pkl is temporal file and most of the reason of that error is wrong path or config.

Vhunon commented 4 years ago

Yes, dataset set to COCO and testset set to val

mks0601 commented 4 years ago

What I mean is could you check your human detection file is for validation set? Also, could you check the path of the human detection file is the same with human_det_path of data/COCO/dataset.py?

Vhunon commented 4 years ago

the human_det_path is set to human_det_path = osp.join('..', 'data', dataset_name, 'dets', 'human_detection.json') # human detection result. For COCO I have data/COCO/dets/human_detection.json and this human_detection.json is yours provided in here

mks0601 commented 4 years ago

Did you change the human detection name? because the original one has _val or _test_dev.jaon Also, other paths such as annotations and images

Vhunon commented 4 years ago

Yes I changed it. So how do I test it then?

mks0601 commented 4 years ago

python test.py --gpu 0 --test_epoch 140

Vhunon commented 4 years ago

What do you mean with

Also, other paths such as annotations and images

Is there anything else that has to be changed?

mks0601 commented 4 years ago

No just wanted to check you made soft links at data/COCO/.

Vhunon commented 4 years ago

Well any idea what is the issue then?

mks0601 commented 4 years ago

Did you set GPU ids properly?

Vhunon commented 4 years ago

Yes of course

python test.py --gpu 0 --test_epoch 140

mks0601 commented 4 years ago

I'm not sure... could you debug it by yourself? I have no problem when running this code

Vhunon commented 4 years ago

The human_detection.json file must be placed in data/COCO/dets/human_detection.json and the model being used is the snapshot model from your gdrive. As for the configuration file, dataset and testset variable needs to be set COCO and val right? Is there any other changes needed?

mks0601 commented 4 years ago

I guess no. Most of this error comes from wrong path configuration or wrong human detection file. You can debug it by checking the human detection is loaded well or something

Vhunon commented 4 years ago

Since I am running this on one GPU, do I need to change the num of gpus in the config file?

mks0601 commented 4 years ago

Hmm that maybe the reason.. I haven't run my code in single gpu environment. I remember some guys had similar problem in single gpu environment

Vhunon commented 4 years ago

Thank you I managed to get it run however I have a question. How do I generate my own human_detection.json file?

mks0601 commented 4 years ago

I used https://github.com/facebookresearch/detectron2