EasyMocap
EasyMocap copied to clipboard
json.decoder error (Mediapipe)
Hello.. thanks for this amazing development.. I was trying to use mediapipe for MV1P and i followed these steps 1 - python apps/preprocess/extract_image.py 0_input\project 2 - python apps/preprocess/extract_keypoints.py 0_input\project --mode mp-pose and 3 - python apps/demo/mv1p.py 0_input/project --out 1_output/project --vis_det --vis_repro --sub_vis 1 2 3 4 --vis_smpl
but when i run 3rd steps (mv1p.py), getting this error
Traceback (most recent call last):
File "apps/demo/mv1p.py", line 117, in
Please correct me if I am doing any wrong steps thank you ...!!!
Hello, you can print the filename when the error occurs.
thanks for your response..!! am i following the right steps..? 1 - python apps/preprocess/extract_image.py 2 - python apps/preprocess/extract_keypoints.py 3 - python apps/demo/mv1p.py
"Actully i don't know lot of things about coading,
can you please direct me what is the main reason of this error"
thanks a lot..!!
Seems the file is corrupted. You can remove the annots
folder and generate again.
thanks... i did this step around 4 times delete and regenerate the annots. but nothing happened. but i found little difference in mediapipe's annots in openpose annots - "filename": "images\1\000000.jpg", in mediapipe annots - "filename": "1\000000.jpg", can it cause the Json.decoder error..?
No. This won't cause the decode error.
Ok thanks for your reply..!!! I will try
The Problem is in the JSON files there should be two \ in the filename but there is only one
run this command for each camera
import os
os.chdir(r'path\to\json\folder')
for fp in os.listdir('.'):
if fp.endswith('.json'):
f = open(fp, 'r+')
content = f.read()
f.seek(0)
f.truncate()
f.write(content[:26] + r"\\" + content[27:])
f.close()
Thanks @NishilVani . Maybe it's a bug in windows? I didn't test the code on Windows now.
Thank you very much @NishilVani your code successfully convert .json file for each cameras, but easymocap giving same jsondecoder error. BTW thanks again for your help you are very kind, really appreciate 🙏🙏
Probably related to #198
Thank you very much @ferhatsb exactly..👌you have solved the problem..👏👏❤️