OpenAOI / anodet

Anomaly detection on images using features from pretrained neural networks.
MIT License
70 stars 22 forks source link

Train fron scratch? #31

Open danielsoy opened 1 year ago

danielsoy commented 1 year ago

Hey ppl!

Is it possible to train the model from scratch ?

How? Thanks!

antonemanuel commented 1 year ago

Hi!

Both padim and patchcore uses a pretrained backbone (e.g. resnet). You could use whatever backbone you want. For example you could train a resnet on your own data for some other task, like detection. But I'm not sure this would generate better results than using the pretrained nets in PyTorch (but it's possible).

The model fitting in this package however aims at generating a representation of the features to be classified from such a pretrained net. In the case of padim it creates a multivariate normal distribution of the features. And in patchcore it generates a core set of features.

danielsoy commented 1 year ago

Thanks for the explanation related to the differences between patchcore and padim.

I just tried padim, will train with patchcore to see if the performance improves .