Sergei
Sergei

Reputation: 11

Yolo makes one box for intersecting objects

Such a problem, I teach YOLO 4 for my son's cars, 1 car it finds easily, but if we start 2 and they drive next to each other and cross, for some reason it makes 1 big detection for 2 cars. Could the problem be wrong annotation? or what else could be the problem?

Already a lot of annotations have been done but the effect is 0, still for some reason detected by 1 bbox.

Upvotes: 1

Views: 129

Answers (1)

Stéphane
Stéphane

Reputation: 20380

You tagged the question YOLOv4 -- I hope you're using the new repo, not the old one? The new repo is: https://github.com/hank-ai/darknet#table-of-contents See here for details: https://www.ccoderun.ca/programming/yolo_faq/#which_repos_to_use_and_avoid

For your question, there are several things I can think you need to investigate.

  1. Do you have training images with multiple cars? You definitely should have some annotated images that match what you are trying to find. Remember that training images need to match what you want Darknet/YOLO to return as results. So if you have any training images with multiple cars annotated as a single car, that could definitely be the cause.

  2. Do you have negative samples with no cars? That will also be important. See: https://www.ccoderun.ca/programming/yolo_faq/#negative_samples

  3. Which configuration did you use? From your description, you should be using YOLOv4-tiny. See: https://www.ccoderun.ca/programming/yolo_faq/#configuration_template

  4. Did you size your network correctly? See: https://www.ccoderun.ca/programming/yolo_faq/#optimal_network_size

  5. What are you using for NMS? The default for non-maximum suppression I believe is around 0.45. This is what determines if/when overlapping bounding boxes are merged, but my guess is you're new to this, and the default is probably fine. More likely the other items above are the cause of your problems.

Lastly, it would have been nice if you had posted your chart.png from training. You are training with -map, right? If not, see here: https://www.ccoderun.ca/programming/yolo_faq/#training_command

Upvotes: 1

Related Questions