RangiLyu / nanodet

NanoDet-Plusāš”Super fast and lightweight anchor-free object detection model. šŸ”„Only 980 KB(int8) / 1.8MB (fp16) and run 97FPS on cellphonešŸ”„
Apache License 2.0
5.78k stars 1.04k forks source link

Question about coco dataset #433

Closed John-Yao closed 2 years ago

John-Yao commented 2 years ago

In nanodet/data/dataset/coco.py:

if ann.get("iscrowd", False): gt_bboxes_ignore.append(bbox) else: gt_bboxes.append(bbox) gt_labels.append(self.cat2label[ann["category_id"]]) if self.use_instance_mask: gt_masks.append(self.coco_api.annToMask(ann)) if self.use_keypoint: gt_keypoints.append(ann["keypoints"])

As I know "iscrowd" mean bbox should be ignored.

I think if ann.get("iscrowd", False): should change into if ann.get("iscrowd", True):