CoolFace
Apppublic

nithishbasireddy/el-defect-detection

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
App README

๐Ÿ”ฌ 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

ColorDefectDescription
๐Ÿ”ด RedDark/InactiveArea disconnected from cell circuit
๐Ÿ”ต BlueCrackMicro-crack in silicon
๐Ÿ”ท CyanCross CrackCrack at ribbon edge (high importance)
๐ŸŸข GreenBusbarMetal 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 (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

bash
pip install -r requirements.txt
streamlit run src/app/app.py

Training

bash
python src/train.py --encoder resnet34 --epochs 100 --batch_size 8