Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

should I label and train on all objects that exist in the training set (yolo darknet)

(yolo - object detection)

if there are two dogs in the image and I trained on only one of them in all images that exist in the training set, is the other dogs in the training set that I didn't label and train on them will affect on the process and will cause to consider them part of background? I am asking especially about yolo darknet object detection.

it seems so, because after 3000 batches it didn't detect anything. so the question, should I train on all objects (like all dogs in all training set) or it doesn't matter because the yolo will take the features only from the labeled ones and ignore the background?

like image 682
anas.khayata Avatar asked Aug 31 '16 12:08

anas.khayata


People also ask

How many images per class are sufficient for training Yolo?

To achieve a robust YOLOv5 model, it is recommended to train with over 1500 images per class, and more then 10,000 instances per class. It is also recommended to add up to 10% background images, to reduce false-positives errors.

How many objects can be detected by Yolo?

You only look once (YOLO) is a system for detecting objects on the Pascal VOC 2012 dataset. It can detect the 20 Pascal object classes: person. bird, cat, cow, dog, horse, sheep.


1 Answers

Yes, it is important that all the objects that you want to find - are marked on image from training dataset. You teach to find objects where they are, and not to find objects where none exist.

CNN Yolo try to solve 3 problems:

  • to mark by rectangle the objects for which Yolo trained - positive error on last layer
  • don't mark one object as another object - negative error on last layer
  • don't mark any objects at background - negative error on last layer

I.e. Yolo looking for differences, why the first dog is considered to be an object, and the second considered the background. If you want to find any dogs, but you label only some of them, and labeled dogs are not statistically different from not labeled dogs, then it will be extremely low accuracy of detection. Because abs(positive_error) ~= abs(negative_error) and result of training sum(positive_errors) + sum(negative_errors) ~= 0. It is a contradictory task - you want at the same time: and find a dog, and don't find the dog.

But if labeled dogs are statistically different from not labeled dogs, for example if labeled bulldogs and not labeled labradors, then Yolo-network will been trained to distinguish one from another.

it seems so, because after 3000 batches it didn't detect anything.

It is not enough, Yolo requires 10000 - 40000 iterations.

like image 114
Alex Avatar answered Sep 19 '22 08:09

Alex