Search code examples
deep-learningannotationsobject-detectionyolofalse-positive

Training out false positives in object detection


This is my first foray into the world of object recognition. I have successfully trained a model on yolo with images that I have found on Google and annotated myself in CVAT.

My questions are as follows.

a) How do I train the model to ignore some special variant that I am specifically NOT interested in detecting? Say I am getting false positives because something looks similar to one of my objects, and I want to train so that these are not detected. Does it simply work to include images that contain the unwanted object into the training set, but don't annotate the unwanted object?

b) If so, am I right in assuming that if I train on annotated images that have somehow missed occasional instances of desired objects, is that effectively telling the training engine that I'm not interested in that object? In other words, is it therefore BAD if images don't have every single instance of desired objects annotated?

c) If I happen to include an image in my training set with an empty annotation file, and there are desired objects in that image, that effectively disincentivizes the training engine to find those in future?

Thanks for any thoughts.


Solution

  • a) This is true. The model will consider space inside bounding boxes as positive for a certain class during training, and space outside the boxes for the class negative for that class.

    b) See a, this is indeed the case.

    c) Empty annotation files will be used during training, but the model will train on that image as a 'background' class, so these are negatives too.

    So, in short, annotate all instances of objects of a certain class and maybe add 'background images' as negative examples to disincentivize those.