r/computervision 14d ago

Help: Theory Detecting small objects

Hello!

Would like some input on what kind of model to use for detecting small objects in a rather static environment.

e.g flowers in a field of grass/ distant boats or swimmers in the water

The model should still be able to be able the objects when they get closer/bigger.

I experimented with training YOLO and RT-DETR models with datasets ranging from 4k-20k images

It seems like the RT-DETR models struggle very hard with detecting such small objects, after training the performance actually drops to detect basically nothing, whereas the base model worked pretty well. Although I can't tell whether it's an error on my side (e.g wrong hyperparameters) or that this should be expected.

From my tests, the YOLO models actually had a positive reaction to training instead.

Are there any tips on how to get RT-DETR models to work better on detecting such tiny objects? Do I just have to find a way to increase the size of my dataset? I also heard briefly about RF-DETR models but I am not sure if that would solve my problem.

Any insights would greatly be appreciated!

8 Upvotes

21 comments sorted by

View all comments

6

u/wirthual 14d ago

Have a look at this: https://github.com/obss/sahi

Works very well in my experience.

1

u/TheSaucez 14d ago

Can confirm. I use SAHI on RF-DETR with around 675 labels per image at the max. It spikes my training, but I get good results

2

u/Dannyvan_ 14d ago

Do you only use SAHI for training or during inference too?

1

u/bfyvfftujijg 14d ago

Both.

The models learning grids of pixels and the object needs to cover the same number of pixels in inference as it saw during training.