Replies: 1 comment
-
As I commented earlier, #1909 (comment) has details on how this feature can be implemented. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Some of the datasets (VisDrone is one of them) have 'ignored region' class. It means if the model detects an object that falls into the 'ignored region', it is not included in the loss calculation. Let's say that the model detected a car in the given image. If the car's region labeled as 'ignored region' I do not want the model to learn anything here. However, current detectron2 pretends like it was an 'ignored region' not a car for an example case. In some frameworks, you label ignored region as -1 and proceed with the training.
As an example:
(This image was taken from VisDrone-2019 dataset!: http://2019.aiskyeye.com/)
This is an example case. There are many cars in the 'ignored region', but I do not care whether the model detects them or not since these cars are really small. So, I do not want them to affect my loss. Another undesired thing is that the model tries to learn 'ignored region' which leads to very poor results.
What I tried:
detectron2/detectron2/structures/boxes.py
Line 348 in 31eed14
In pairwise_iou(), it generates IoU between the GT's and Anchors. I modified it as it also takes GT class id as a parameter, then I find the rows of iou matrix that corresponds to ignored_region class id (which is 0 in VisDrone). I omit the rows and columns that have an intersection region between ignored_region and anchors. However, I got lots of incompatible shapes errors. I need some modification more professional.
Could someone help me out? We can work together on this feature.
Beta Was this translation helpful? Give feedback.
All reactions