Closed italosalgado14 closed 3 years ago
Hi @italosalgado14 , the problem happens when sorting the images by the filename. In line 18:
_images.sort(key=lambda x: int(x.split('/')[-1].split('.')[0].split('_')[sort_index]))
Firstly, the image file path will be split two times by '/' and '.' to get the filename, like _final000, and then take the index part by splitting '_'. In my function, I use the variable sort_index to control where we take the number part, if the filename is _final000, then it should be 1, or if the filename is _final_video000, this variable should be 2.
This variable can be modified in this line. You can check it.
Thank you very much for the reply. That was exactly the problem and now everything works great!
Hi there. Thanks for the code. I am trying to test it on videos that I have recorded, but I run into the following problem reading the output of openpose. I use:
But my output is: (env) laila@laila:~/Nexar/MotioNet$ python evaluate.py -r ./checkpoints/wild_gt_tcc.pth -i /home/laila/Nexar/openpose/out_openpose/ -o /home/laila/Nexar/MotioNet/output/testvid Building the network Traceback (most recent call last): File "/home/laila/Nexar/MotioNet/evaluate.py", line 148, in
main(config, args, output_folder)
File "/home/laila/Nexar/MotioNet/evaluate.py", line 124, in main
export(args.input)
File "/home/laila/Nexar/MotioNet/evaluate.py", line 78, in export
files = util.make_dataset([pose_folder], phase='json', data_split=1, sort=True, sort_index=1)
File "/home/laila/Nexar/MotioNet/utils/util.py", line 28, in make_dataset
images.sort(key=lambda x: int(x.split('/')[-1].split('.')[0].split('')[sort_index]))
File "/home/laila/Nexar/MotioNet/utils/util.py", line 28, in
images.sort(key=lambda x: int(x.split('/')[-1].split('.')[0].split('')[sort_index]))
ValueError: invalid literal for int() with base 10: 'final'
In advance thanks for the help! =)