Open wangchust opened 5 months ago
In the configurations, authors might use different orders of class names for COCO categories and LIS categories. This discrepancy arises from the different numbering of classes in the datasets. Therefore, the order is adjusted to ensure consistency. You can verify this by checking.
Maybe I did not make myself clear. Let's take config mask_rcnn_r50_fpn_caffe_AWD_SCB_DSL_SynCOCO2LIS.py for example.
test_lod_coco = dict(
classes=('bicycle', 'car', 'motorbike', 'bus',
'bottle', 'chair', 'diningtable', 'tvmonitor'),
type='CocoDataset',
...
)
coco = dict(
classes=('bicycle', 'chair', 'dining table', 'bottle', 'motorcycle', 'car', 'tv', 'bus'),
type='CocoDataset',
...
)
In this config, coco class "chair" is mapped to gt_label 1 in training. However, in testing, prediction with predicted label 1 will be re-mapped to "car" class in test_lod_coco, so as other class except bicycle. I am not sure if this is a bug or a feature. Please correct me if I am wrong.
I recall that the selected COCO categories are ordered by their ID numbers in COCO rather than the order in the list🤔, you can test it and correct me if I am wrong.
The id mapping code in coco.py is https://github.com/Linwei-Chen/LIS/blob/36877b7297e7c563f74ce9b2af39269c856e9a6f/mmdetection/mmdet/datasets/coco.py#L52-L56 I didn't find any sort function in this file.
By the way, did you observe any abnormal AP result of specified categories. I use d2, and find that if I change the classname order, some categories obtain nearly 0 AP results.
It seems the category in annotations has typos. You see, below I visualize lis data with their corresponding category id. 1 is labelled as car but mapped as chair in annotations.
"categories": [{"id": 0, "name": "bicycle", "color": [67, 159, 36], "supercategory": ""}, {"id": 1, "name": "chair", "color": [204, 43, 41], "supercategory": ""}, {"id": 2, "name": "diningtable", "color": [145, 104, 190], "supercategory": ""}, {"id": 3, "name": "bottle", "color": [135, 86, 75], "supercategory": ""}, {"id": 4, "name": "motorbike", "color": [245, 128, 6], "supercategory": ""}, {"id": 5, "name": "car", "color": [53, 119, 181], "supercategory": ""}, {"id": 6, "name": "tvmonitor", "color": [219, 120, 195], "supercategory": ""}, {"id": 7, "name": "bus", "color": [127, 127, 127], "supercategory": ""}]
In configs, I see the authors use different orders of classnames for coco categories and lis categories, respectively. Are there any classname issues in LIS?