aim-uofa / AdelaiDet

AdelaiDet is an open source toolbox for multiple instance-level detection and recognition tasks.
https://git.io/AdelaiDet
Other
3.34k stars 644 forks source link

Training with negative samples #582

Open suahelen opened 1 year ago

suahelen commented 1 year ago

Hi all,

I was trying to train a SoloV2 network on a dataset of mine with very nice results for foreground objects. However the network seemed to struggle with the background and marked a lot of false positives. To remedy it tried to use negative samples with no objects. However that did not work as the 'loss' or 'get_ground_truth_single' function crash when an empty annotation is given. (soloV2 modeling)

This might also be an issue for the other models. (I have not checked that)

Here the same issue from detectron2 issues.

Is it an option to incorporate this feature into your models, otherwise the models are not really usable with this config: cfg.DATALOADER.FILTER_EMPTY_ANNOTATIONS=False