akanazawa/hmr

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

Closed this issue · 1 comments

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

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’]]).