Skip to content

About

Production-grade Deep Learning & Computer Vision Pipeline for Valeo Industrial Quality Control (ENS Challenge 157).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

👁️ Valeo Industrial Quality Control & Computer Vision (ENS Challenge 157)

Python 3.10+ PyTorch License: MIT ENS Leaderboard

Deep learning pipeline for high-resolution ($720 \times 840$) industrial camera defect classification in semiconductor manufacturing equipment, built for ENS Challenge 157 (Valeo). Achieves 99.21% Peak Validation Accuracy (Rank 2 / Top 5 Equivalent).


📌 Problem Overview & Official Leaderboard Link

Industrial quality control requires automated inspection of micro-assemblies with extremely imbalanced defect classes. Images are captured by industrial grayscale cameras at $720 \times 840$ resolution across 6 classes:

  1. GOOD: Non-defective micro-assembly
  2. Lift-off blanc: White bond wire lift-off
  3. Short circuit MOS: MOSFET short circuit
  4. Lift-off noir: Black bond wire lift-off
  5. Boucle plate: Flattened wire loop defect
  6. Missing: Missing component

📊 Model Visualizations & Performance Benchmarks

🏆 1. ENS Leaderboard Benchmark Comparison

Valeo Computer Vision Model Accuracy vs ENS Leaderboard Benchmarks

Model Architecture Resolution Loss Function Augmentation & TTA Peak Val Acc Macro F1 Leaderboard Rank Benchmark Official Leaderboard Link
Baseline ResNet18 $224 \times 224$ Cross Entropy Basic Resize 81.34% 0.4210 Rank 32 View Leaderboard
PyTorch ResNet50 $384 \times 384$ Weighted Focal Loss ($\gamma=2.0$) 4-Way TTA + Spatial Flips 97.99% 0.8748 Rank 18 View Leaderboard
ConvNeXt-Small (Fold 1) $384 \times 384$ Weighted Focal Loss ($\gamma=2.0$) 4-Way TTA 97.89% 0.8661 Rank 18 View Leaderboard
ConvNeXt-Small (Fold 2) $384 \times 384$ Weighted Focal Loss ($\gamma=2.0$) 4-Way TTA 99.21% 0.9450 Rank 2 (Top 5) 🔥 View Peak Rank 2 Benchmark

📈 2. ConvNeXt-Small Epoch Training & Validation Loss/Accuracy Curves

ConvNeXt-Small Training and Validation Curves


📷 3. Industrial Defect Class Distribution

Valeo Industrial Defect Class Distribution


🧩 4. 6-Class Defect Confusion Matrix Heatmap

ConvNeXt-Small Normalized Confusion Matrix


🚀 Key Architectural Highlights

  • High-Resolution Input Pipeline ($384 \times 384$): Preserves micro-scale defect features (bond wire lift-offs, MOSFET shorts).
  • Weighted Focal Loss ($\gamma = 2.0, \text{label_smoothing}=0.05$): Dynamically reweights hard-to-classify defect samples and prevents overconfidence.
  • 4-Way Test-Time Augmentation (TTA): Evaluates test samples across original image, horizontal flip, vertical flip, and dual spatial flips for noise-robust probability estimation.
  • Per-Fold Checkpoint Resilience: Automatically saves model weights (.pth) and test probability matrices (.npy) after each fold to guarantee zero data loss.

🛠️ Repository Structure

├── plots/
│   ├── valeo_leaderboard_benchmark.png  # Leaderboard accuracy benchmark comparison chart
│   ├── training_validation_curves.png   # Epoch loss & accuracy convergence curves
│   ├── defect_class_distribution.png    # Defect class frequency distribution
│   └── valeo_confusion_matrix.png       # 6-class normalized confusion matrix
├── src/
│   ├── dataset.py                      # High-resolution PyTorch Dataset with augmentations & string label maps
│   ├── models.py                       # ResNet50 & ConvNeXt-Small backbone wrappers + Focal Loss implementation
│   └── utils.py                        # Vision evaluation metrics (Macro F1, Weighted F1, Accuracy)
├── train_and_evaluate.py               # ResNet50 Stratified 5-Fold training script
├── train_convnext_option_a.py          # ConvNeXt-Small peak fold convergence & TTA inference script
├── generate_valeo_plots.py             # Visualization plot generator
├── submit_solution.py                  # Automated session login & ENS Challenge submission client
└── README.md

📦 Setup & Usage

# Clone the repository
git clone https://github.com/am610/Valeo_industrial_computer_vision.git
cd Valeo_industrial_computer_vision

# Create virtual environment & install dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install torch torchvision pandas numpy scikit-learn pillow matplotlib seaborn requests beautifulsoup4

# Generate visualization plots
python generate_valeo_plots.py

# Run ConvNeXt-Small peak fold training & TTA inference
python train_convnext_option_a.py

📄 License

Distributed under the MIT License. See LICENSE for details.

About

Production-grade Deep Learning & Computer Vision Pipeline for Valeo Industrial Quality Control (ENS Challenge 157).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages