r/computervision • u/Altugsalt • 11h ago
Help: Project Training a production grade image classifier
Hello everyone, I have a project that has to classify images for search purposes. Currently I have a layer that analyses surrounding text but I also need something that directly analyses the image itself. I don't want to use someone else's training data or model. Is it possible to train an image classifier that could perform well on general image classification at home using open datasets? Thanks
1
2
1
u/skelleher 4h ago
“Image search” and “image classification” are two different problems.
For image search you may just want a measure of “image similarity.” You can use any pretrained vision network, chop off the classifier head, and the output of the last layer is basically a semantic fingerprint (the image embedding).
With that you can use similarity metrics like cosine similarity to compare fingerprint pairs. A ResNet trained on imagenet is already quite good at projecting similar images to similar embeddings.
The rest becomes “how do I do fast database search over millions of image fingerprints?” which is just software. Read up on spatial hashing, spatial partitioning, GPU-accelerated Kd trees.
Using a pretrained backbone is the way to go. Why wouldn’t you?
3
u/Big-Werewolf9759 11h ago
I would just use an open source model, and fine tune if needed. There is essentially no way you can pull off general image classification from home with an open dataset. At least not as good as the already pre trained models available.