r/computervision • u/Altruistic-Front1745 • 17d ago
Help: Project How to monitor an image classification model?
I'm studying to be a machine learning engineer and I need an end-to-end project for my portfolio. The model classifies X-ray images into two classes, so the idea is to detect when it starts to degrade and create a pipeline to automatically retrain it. I searched a lot and found Evidently AI, but I didn't find much about image-based models. I only found that you have to compare the data you trained the model with and the data the user provides in production. So, to detect drift, what comparisons should I make? Brightness and contrast? Embeddings? I don't know how to tell if my model has drift; I'm completely lost. Help, please!
3
u/bfyvfftujijg 17d ago
I like to monitor embedding from a 3rd party model like DINO or CLIP. Take your original training dataset and embed it, then break it into clusters. Measure the average distance of your training images to the centroid of the cluster they belong to and store that average.
For monitoring you just measure the distance of embeddings of your new images from the original cluster centroids. If they exceed the original average distance, you can say that they’ve drifted.
The clustering is how you accommodate a wider range of training images.
1
u/hellobutno 17d ago
It won't degrade unless you are moving out of distribution.