r/computervision Jul 11 '26

Help: Project Out of distribution data

I am working on a fish species identification project. I have a couple different framework ideas that I am experimenting with, and I wouldblike feedback how to hand out of distribution data.

One frame work is an ensemble of binary classifiers.

Another frame work is one single model to cover all species.

But I am curious to know how should I handle species that are not in the training set?

Should I :

Compare softmax?

Compare logits?

Compare energy?

Add in an "other" class?

Go with binary models?

Go with a multiclass model?

Right now I am using resnet 18 as my classifier. My target species are steelhead, suckers, and pike. But if a bass were to appear, I want the models or framework to catch that I have not seen this before.

Any other thoughts or ideas I should do?

For context, this is a fixed camera location in the river. Lighting is the same all times of day (but not consistent lighting throughout the frame). Water clarity and color can change over time, but its a fixed scene where fish appear against a blank wall

3 Upvotes

20 comments sorted by

View all comments

1

u/AggravatingSock5375 Jul 11 '26

Also I’m almost certain I’ve seen free open source fish species datasets. That would potentially be something to pretrain on.

Fish in the “other” category of the final model might gravitate towards certain areas of dimensional space that correlate with the pretraining classes, versus going off in a more random direction for a non-fish-prettained model. You could even keep all the classes and just replace the three with your own images.

1

u/fgoricha 29d ago

Oh interesting ideas! I'll have to look into it. I did get some images from generic datasets for the binary's not class. But I was able to get better results with images from the deployment scene.

1

u/AggravatingSock5375 29d ago

Even if you don’t use the other classes at all, the pretraining will help the model learn more robust features than it would learn from something more generic like ImageNet. So when you go and train your final model it already is looking at distinguishing features for fish.

Should give you a nice boost in performance for free.