grade-demo-mvtec
student demo packages for industrial defect detection on MVTec AD
2 min readupdated
This repository contains unsupervised trained models for industrial defect detection tasks, based on the GRADE method from a master's thesis. The packages allow you to evaluate product images (such as bottles, capsules, nuts, and screws) without calling heavy VLM (Vision-Language Models) or memory lookup, outputting an anomaly score and a defect map. The model targets developers and engineers in computer vision and manufacturing quality control.
Key features
- Works without annotations (zero-annotation) based on pre-trained weights.
- High AUROC metrics on test datasets (ranging from 97% to 100%).
- Fast processing for each image without using VLM.
- Includes ready-to-use examples and scripts for running locally or in Google Colab.
What you can do
- Run an interactive demo version in Google Colab to test on various products.
- Test the package locally using the
grade-adlibrary and the Gradio interface. - Test defect detection quality on your own images formatted in the MVTec AD dataset style.
- Use pre-trained weights for non-commercial industrial quality control tasks.
Example
pip install "grade-ad @ git+[https://github.com/MSherbinii/grade@v1.0.1](https://github.com/MSherbinii/grade@v1.0.1)" gradio matplotlib huggingface_hub
python -c "from huggingface_hub import snapshot_download; print(snapshot_download('MSherbinii/grade-demo-mvtec'))"
# затем: cd <папка с моделью> && python app.pyRead more
DetailsBenchmarks: image AUROC on tests reaches from 97.13% (capsule) to 100.00% (hazelnut, zipper).
License: non-commercial use (CC BY-NC-SA 4.0 for images and weights, application code is MIT).
Training features: models are trained transductively on MVTec AD test images.










Comments