metadata
title: EL Defect Detection System
emoji: π¬
colorFrom: blue
colorTo: red
sdk: docker
pinned: false
π¬ EL Defect Detection System
Production-grade electroluminescence (EL) defect detection for solar PV modules.
Features
- Upload any EL image (full module, single cell, any brightness/size)
- Automatic grid detection segments modules into individual cells
- Deep learning (U-Net with ResNet encoder) detects defects per cell
- Quantitative analysis: crack length (mm), dark area (%), severity classification
- PASS/FAIL decision with configurable quality thresholds
- Visual overlays: color-coded defect masks on original images
- Downloadable reports (JSON + overlay images)
Defect Types Detected
| Color | Defect | Description |
|---|---|---|
| π΄ Red | Dark/Inactive | Area disconnected from cell circuit |
| π΅ Blue | Crack | Micro-crack in silicon |
| π· Cyan | Cross Crack | Crack at ribbon edge (high importance) |
| π’ Green | Busbar | Metal busbar connection (feature) |
Architecture
input image β preprocessing (CLAHE) β grid detection β cell extraction
β U-Net inference β mask cleaning β crack/dark analysis β PASS/FAIL
Technical Details
- Model: U-Net with ResNet34 encoder (segmentation_models_pytorch)
- Loss: 0.5 Γ Dice + 0.5 Γ Weighted CrossEntropy
- Dataset: E-SCDD (snt-ubix/e-scdd) β 30 classes remapped to 5
- Preprocessing: CLAHE, percentile normalization, adaptive denoising
- Grid Detection: Projection profiles + FFT periodicity + peak detection
- Crack Analysis: Skeletonization + distance transform + false positive filtering
- Dark Detection: Adaptive threshold (0.6 Γ mean intensity)
Running Locally
pip install -r requirements.txt
streamlit run src/app/app.py
Training
python src/train.py --encoder resnet34 --epochs 100 --batch_size 8