How murali0127/thermal-runaway-detection-unet works
This repository is a U-Net thermal-runaway segmentation project. Its main workflow prepares paired thermal images and masks, trains and evaluates a segmentation model, then runs batch or live inference to produce hotspot masks and metrics. Separate scripts provide prediction plots and Grad-CAM/attention explanations. The README also describes MOSFET-based cooling and isolation, but no implementation is present in the sampled source or tree; that capability is shown as an unverified documented integration. Inference internals are only partially excerpted.
Main entry points: train.py Training pipeline · inference.py Inference engine · model.py U-Net segmentation · utils.py Dataset path loading
Components 16
Data preparation
- Thermal images
dataset/images - Ground-truth masks
dataset/images/dataset/masks - Dataset path loading
src/utils.py - Batch preprocessing
src/utils.py
Model training
- Training pipeline
src/train.py - U-Net segmentation
src/model.py - Loss and metrics
src/utils.py
Inference
- Inference engine
src/inference.py - TFLite and live inference
src/inference.py - MOSFET cooling and isolation
README.md
Evaluation and explanation
- Prediction visualizations
Result/Predictions/prediction.py - Grad-CAM explanations
Result/Predictions/grad-CAM_activation.py - Attention maps
Result/Predictions/attention_map.py - Metric reports
Result/Metrices/metrices.py - Saved model and results
Result
Other components
- Engineer or operator
Connections 19
- Training pipeline → Dataset path loading: loads paths
src/train.py - Dataset path loading → Thermal images: finds images
src/utils.py - Dataset path loading → Ground-truth masks: finds masks
src/utils.py - Training pipeline → Batch preprocessing: builds batches
src/train.py - Training pipeline → U-Net segmentation: builds model
src/train.py - Training pipeline → Loss and metrics: compiles with
src/train.py - Training pipeline → Saved model and results: saves model
src/train.py - Training pipeline → Prediction visualizations: requests plots
src/train.py - Training pipeline → Metric reports: writes report
src/train.py - Engineer or operator → Training pipeline: starts training
README.md - Engineer or operator → Inference engine: starts inference
README.md - Thermal images → Inference engine: provides images
- Inference engine → Loss and metrics: uses metrics
src/inference.py - Inference engine → TFLite and live inference: supports conversion
src/inference.py - Inference engine → Saved model and results: saves predictions
- U-Net segmentation → Grad-CAM explanations: explains activations
Result/Predictions/grad-CAM_activation.py - U-Net segmentation → Attention maps: extracts features
Result/Predictions/attention_map.py - U-Net segmentation → Prediction visualizations: visualizes masks
Result/Predictions/prediction.py - Inference engine → MOSFET cooling and isolation: triggers mitigation
README.md