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

  1. Create and activate a virtual environment:

    python -m venv venv
    # On Windows:
    .\venv\Scripts\activate
    # On Linux/macOS:
    source venv/bin/activate
    
  2. Install dependencies:

    pip install -r requirements.txt
    

Workflow

  1. Exploration: Run notebooks/01_dataset_exploration.ipynb to analyze defect types and ground truth masks.
  2. Validation: Run python src/data_validation.py to check dataset integrity.
  3. Classification & Localization: Train and infer using modules under src/.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support