Industrial Surface Defect Inspection
An end-to-end computer vision pipeline for automated surface defect detection and localization on industrial components (MVTec AD metal_nut dataset).
Directory Structure
industrial-surface-defect-inspection/
β
βββ data/
β βββ metal_nut/ # Downloaded dataset
β βββ train/
β β βββ good/
β βββ test/
β β βββ good/
β β βββ ...
β βββ ground_truth/
β βββ ...
β
βββ notebooks/
β βββ 01_dataset_exploration.ipynb
β
βββ src/
β βββ __init__.py
β βββ data_validation.py
β βββ preprocessing.py
β βββ classification.py
β βββ localization.py
β
βββ outputs/
βββ requirements.txt
βββ README.md
Setup & Installation
Create and activate a virtual environment:
python -m venv venv # On Windows: .\venv\Scripts\activate # On Linux/macOS: source venv/bin/activateInstall dependencies:
pip install -r requirements.txt
Workflow
- Exploration: Run
notebooks/01_dataset_exploration.ipynbto analyze defect types and ground truth masks. - Validation: Run
python src/data_validation.pyto check dataset integrity. - Classification & Localization: Train and infer using modules under
src/.
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support