facebookresearch / detectron2

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.
https://detectron2.readthedocs.io/en/latest/
Apache License 2.0
30.05k stars 7.42k forks source link

AttributeError: 'PolygonMasks' object has no attribute 'tensor' #4916

Closed qierlym closed 1 year ago

qierlym commented 1 year ago

Hello,I am new in detectron2,and when I excute this below command: python tools/train_net.py --config-file configs/SOLOv2/R50_3x.yaml --num-gpus 1 OUTPUT_DIR training_dir/SOLOv2_R50_3x

There is an error: AttributeError: 'PolygonMasks' object has no attribute 'tensor'

Seems like the error comes from /detectron2/AdelaiDet/adet/modeling/solov2/solov2.py", line 174: gt_masks_raw = gt_instances[img_idx].gt_masks.tensor

but in line 172: gt_bboxes_raw = gt_instances[img_idx].gt_boxes.tensor

This line of code can be executed successfully,I am really confused,and looking forward to receiving answers,thank you.

github-actions[bot] commented 1 year ago

You've chosen to report an unexpected problem or bug. Unless you already know the root cause of it, please include details about it by filling the issue template. The following information is missing: "Instructions To Reproduce the Issue and Full Logs"; "Your Environment";

github-actions[bot] commented 1 year ago

Requested information was not provided in 7 days, so we're closing this issue.

Please open new issue if information becomes available. Otherwise, use github discussions for free-form discussions.