Generalize Object Detection

Tornike: <p>Hi, How do i generalize object detection. i have tested Faster RCNN on new images of car and  it detects the car but it also detects other parts of the car.</p>
<p>How do i generalize? How to make model detect only whole car and not its parts.<br>
Would Image augmentation during training help me ?</p>
<p><img src="https://discuss.pytorch.org/uploads/default/original/3X/8/b/8bae2fa64ade631e4c10150d03f38acb68d80053.png" alt="download" data-base62-sha1="jVFyKoFwAXWbEuV4o7mwy2KN2nx" width="372" height="252"></p>

Pcamellon: <p>Hi! Which data are you training on?</p>

Tornike: <p>Hi, Thank you for your reply.</p>
<p>Data I am using is from <a href="https://www.kaggle.com/sshikamaru/car-object-detection" rel="noopener nofollow ugc">Kaggle</a>.</p>
<p>in my case non-maximum suppression helped me a lot.</p>

Pcamellon: <p>I looked some images from the dataset. Are there images of tires or any other parts of cars? Or just images of cars and empty roads?</p>

Tornike: <p>I don’t think so. I checked some of the images of dataset (not all of them) and there were only car images. there is not empty roads. all the images have at least 1 car in the image.</p>
<p>That might be another solution, adding empty road images without cars. That may reduce false positives of object detection of which Faster R-CNN is tend to.</p>

Pcamellon: <p>I started very recently in the DL. Specifically in object detection I am starting my first projects so I have almost no experience.<br>
I think the model takes into account the tires, the mirrors, etc. to identify the cars, and it is not very far from what we are looking for. If you could increase the set of images (it is the first thing I would try), then regulation techniques. I don’t think you can add new images since you are using a DB from Kaggle. Are you on a Kaggle competition or just downloading and using the images on your PC?</p>

Tornike: <p>You can add same images but without bounding boxes maybe.<br>
Yes, model takes into account other small parts of the car and that was a problem.<br>
but <a href="https://learnopencv.com/non-maximum-suppression-theory-and-implementation-in-pytorch/#:~:text=Non%20Maximum%20Suppression%20(NMS)%20is,arrive%20at%20the%20desired%20results." rel="noopener nofollow ugc">non-maximum suppression</a> is the solution for that.<br>
No, i’m not on competition. Just downloading.</p>

Pcamellon: <aside class="quote no-group" data-username="Tornike" data-post="7" data-topic="137375">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/tornike/48/36047_2.png" class="avatar"> Tornike:</div>
<blockquote>
<p>without bounding boxes maybe</p>
</blockquote>
</aside>
<p>You can use some tools like <a href="https://github.com/opencv/cvat" rel="noopener nofollow ugc">CVAT</a>, <a href="https://www.makesense.ai/" rel="noopener nofollow ugc">makesense.ai</a> or <a href="https://labelbox.com/" rel="noopener nofollow ugc">Labelbox</a> for YOLO. It depends on your models.</p>
<p>Check: <a href="https://github.com/ultralytics/yolov5" class="inline-onebox" rel="noopener nofollow ugc">GitHub - ultralytics/yolov5: YOLOv5 🚀 in PyTorch &gt; ONNX &gt; CoreML &gt; TFLite</a></p>

Pcamellon: <aside class="quote no-group" data-username="Tornike" data-post="7" data-topic="137375">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/tornike/48/36047_2.png" class="avatar"> Tornike:</div>
<blockquote>
<p>but <a href="https://learnopencv.com/non-maximum-suppression-theory-and-implementation-in-pytorch/#:~:text=Non%20Maximum%20Suppression%20(NMS)%20is,arrive%20at%20the%20desired%20results." rel="noopener nofollow ugc">non-maximum suppression</a> is the solution for that</p>
</blockquote>
</aside>
<p>Thanks. I’ll check it!</p>

Tornike: <p>Thanks. Yes, there are many tools for that.</p>