WongKinYiu / yolov7

Implementation of paper - YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors
GNU General Public License v3.0
13.18k stars 4.17k forks source link

Is there a way to train on a fixed scale? #1010

Open GuilhermeAmaral871 opened 1 year ago

GuilhermeAmaral871 commented 1 year ago

Hi there,

I'm working on a project where I need to detect objects where the size of them is important. I'll make a counter to check if I have the right amount of washers, screws and other little things, but the problem is I need to differentiate how much of each size are there.

For example: I need three 5mm washers and two 4mm washers. I tried training it on a fixed camera distance, but Yolo recognizes it as being both the classes (5mm and 6mm). I also tried using other object detection methods like template matching, but either they are rotation sensitive, or if I use rotation invariant ones they are extremely slow and can't be run in real time.

Is it possible to limit the training to only one layer, so it uses a fixed scale, then I'll be able to differentiate a 4mm washer from a 5mm washer, M5 screw from M6 one etc? If it's possible, how do I do it?

yulin010101 commented 1 year ago

If you have a fixed camera distance. I don't think you need deep learning just simple image processing methods to achieve what you want.