nithishbasireddy/el-defect-detection
0
๐ฌ 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
Architecture
input image โ preprocessing (CLAHE) โ grid detection โ cell extraction
โ U-Net inference โ mask cleaning โ crack/dark analysis โ PASS/FAILTechnical Details
- Model: U-Net with ResNet34 encoder (segmentationmodelspytorch)
- 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.pyTraining
python src/train.py --encoder resnet34 --epochs 100 --batch_size 8