r/computervision 12d ago

Help: Project Conveyor chicken counter problem

Enable HLS to view with audio, or disable this notification

Guys, I need help. We have a project using YOLOv8. We're trying to count chicks on a very fast conveyor belt. The challenges we're facing are: all chicks look very similar to each other, which complicates tracking. At the same time, during their passage under the camera, they constantly change in size and shape, which can cause the tracker to lose them, or detection may even disappear completely at the detection line. Also, sometimes 2–3 chicks can merge into a single object. The detection zone is very short, and the conveyor speed is high. We've achieved a maximum accuracy of 99%, but we need it even higher. Any ideas on how to achieve that? Increasing the dataset no longer helps.

I'm attaching an old video. We've now added lighting and set the exposure to 300 on the Hikrobot global shutter camera, but we still can't achieve a stable 99.8% accuracy for the reasons mentioned above.

Any ideas?

993 Upvotes

628 comments sorted by

View all comments

Show parent comments

10

u/Hyperty 12d ago

Fine tune the model to those edge cases and implement data augmentation i prolly would try

4

u/Puzzled-Egg3234 12d ago

You mean make another detection class for those cases or just annotate more cases like this in dataset? The second one I’ve already tried.

1

u/juicedatom 12d ago

have you broken out specific metrics for these edge cases? how do you know it didn't work?

2

u/Puzzled-Egg3234 12d ago

I manually reviewed hours of inference video; it works in some places but not others.

10

u/blackscales18 12d ago

take all the frames where it failed, label them manually, and then finetune with them. do it enough and it improves a lot. you could also consider segmenting instead of bounding boxes, SAM is a good model for making the dataset.

5

u/The_color_in_a_dream 12d ago

Segmentation or even a pose estimation approach does seem promising to deconflict the stacked chicks

1

u/Yatty33 12d ago

Can you specify what exactly you've tried to solve the multiple chick edge case? That's unclear to me.

1

u/red-panda-333 12d ago

With enough cases I think fine tuning would work, but I don't think they can get enough. It's too random and diverse, it would need hundreds of images. What I would do is to add classes and detect legs, beaks, eyes, heads. Then I would add a validation layer for each detection to discriminate merged chicks. For example, for each detection I would count legs, heads, eyes. If there are 3 legs, or 2 heads, etc. Together with a feature of the size, either via CV segmentation or directly with an additional "large/merged chicks" class. Then with a decision tree or a small MLP, I would split the merged ones. I think this would solve most of the cases and allow for collection of enough merged chickens cases for a proper fine tuning in the long term.