facebookresearch / Detectron

FAIR's research platform for object detection research, implementing popular algorithms like Mask R-CNN and RetinaNet.
Apache License 2.0
26.21k stars 5.45k forks source link

TypeError: 'NoneType' object has no attribute '__getitem__' #1006

Open Neo-YH opened 3 years ago

Neo-YH commented 3 years ago

Greetings! Could you give me some advice on how to solve the problem

File "tools/infer_simple.py", line 139, in main kp_thresh=2 File "/mnt/md0/yihan/densepose/detectron/utils/vis.py", line 381, in vis_one_image IUV_fields = body_uv[1] TypeError: 'NoneType' object has no attribute 'getitem'

image Thank you sincerely!

Neo-YH commented 3 years ago

image

Neo-YH commented 3 years ago

It seems cfg.MODEL.BODY_UV_ON = False or boxes.shape[0] <= 0 After test,the reason is cfg.MODEL.BODY_UV_ON = False image image

Neo-YH commented 3 years ago

image

Neo-YH commented 3 years ago

image

Neo-YH commented 3 years ago

Set MODEL.BODY_UV_ON = True this error can be fixed but there is error generated before this part image