# PatchCore Defect Detection — Metal Nut ## Model Description This is an anomaly detection model trained on the MVTec AD metal nut category. It detects surface defects in manufactured components including scratches, bends, colour contamination, and orientation errors — without ever being trained on defective examples. ## Performance | Metric | Score | |--------|-------| | Image AUROC | 0.9976 | | Pixel AUROC | 0.9868 | ## Training Data Trained on 220 defect-free images from the [MVTec AD dataset](https://www.mvtec.com/company/research/datasets/mvtec-ad) metal nut category. ## Algorithm PatchCore (Roth et al., CVPR 2022) using WideResNet50 backbone with: - Feature layers: layer2, layer3 - Coreset sampling ratio: 0.1 - Number of neighbours: 9 - Calibrated threshold: 0.577 ## Threshold Calibration Threshold calibrated at 99th percentile of good part scores: - Good part pass rate: 95% (21/22) - Defect detection rate: 96% (89/93) ## Usage This model is deployed as a Streamlit web application. See the associated Space for the live demo. ## Citation Roth, K., Pemula, L., Zepeda, J., Scholkopf, B., Brox, T., & Gehler, P. (2022). Towards Total Recall in Industrial Anomaly Detection. CVPR 2022.