mks0601/TF-SimpleHumanPose

The code about test does not run successfully..........

YHDang opened this issue · 7 comments

Hi. I downloaded the human_detection.json, and ran the test.py by python test.py --gpu 0-1 --test_epoch 140. But the code couldn't run successfully. The errors are as follows.
Traceback (most recent call last):
File "test.py", line 256, in
test(int(args.test_epoch))
File "test.py", line 232, in test
d.evaluation(result, annot, cfg.result_dir, cfg.testset)

File "/home/dyh/Sources/python/algorithm/TF-SimpleHumanPose-master/main/../data/MPII/dataset.py", line 90, in evaluation
savemat(result_path, mdict=result)
File "/home/dyh/anaconda3/envs/tensorflow/lib/python3.6/site-packages/scipy/io/matlab/mio.py", line 219, in savemat
MW.put_variables(mdict)
File "/home/dyh/anaconda3/envs/tensorflow/lib/python3.6/site-packages/scipy/io/matlab/mio5.py", line 834, in put_variables
for name, var in mdict.items():
AttributeError: 'list' object has no attribute 'items'

How can I address this problem? I don't know if I downloaded the human_detection.json by mistakes. Could you provide the specific version?
Thank you~

The error comes from savemat from ../data/MPII/dataset.py. It seems the savemat only accept a dict, not a list. However, in the test.py, test_net function returns list. It seems you should convert the list to dict format. I think this is not very hard, so you can try? I'll fix this problem soon. Thanks for reporting!

Yeah! Thanks for your reply. I can do it

Sorry, I only tested this code on PoseTrack and MSCOCO dataset, which are the most widely used datasets.

OK, thanks. By the way, can I use the trained model to evaluate my own video ( I only need the visualization)?

Of course. You can find the download link at README.
Here is the link.
https://drive.google.com/drive/folders/1DAyOVI-8q-gh1ooe6cMx6RA16GJ03Efn?usp=sharing

I did not implement the tracking part.