akanazawa / hmr

Project page for End-to-end Recovery of Human Shape and Pose
Other
1.54k stars 395 forks source link

TypeError: Scalar value for argument 'color' is not numeric #126

Closed immkapoor closed 4 years ago

immkapoor commented 4 years ago

While running the code, I encountered with a TypeError . The traceback is given below:

Traceback (most recent call last): File "/home/mk/anaconda3/envs/tensorflow_env/lib/python3.5/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/home/mk/anaconda3/envs/tensorflow_env/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/mk/Documents/3D Pose/hmr-master/demo.py", line 147, in main(config.img_path, config.json_path) File "/home/mk/Documents/3D Pose/hmr-master/demo.py", line 134, in main visualize(img, proc_param, joints[0], verts[0], cams[0]) File "/home/mk/Documents/3D Pose/hmr-master/demo.py", line 49, in visualize skel_img = vis_util.draw_skeleton(img, joints_orig) File "/home/mk/Documents/3D Pose/hmr-master/src/util/renderer.py", line 403, in draw_skeleton cv2.circle(image, (point[0], point[1]), radius, colors['white'],-1) TypeError: Scalar value for argument 'color' is not numeric

bdseal commented 4 years ago

If you print color[‘white’], the results would be [255,255,255]. But cv.circles needs a tuple (255,255,255). Change color[‘white’] to tuple([int(x) for x in color[‘white’]]).