How lalbee/structural-damage-recognition works
This repository is a structural-image damage classifier, with a Gradio upload demo and a command-line prediction tool. Its main workflow prepares and balances image data, trains and evaluates transfer-learning models, then classifies images as Damaged or Undamaged with confidence scores. The README documents model comparison and evaluation artifacts. Training details come from a partial source excerpt, so the graph does not infer unshown internal training calls.
Main entry points: train.py Transfer-learning trainer · app.py Gradio demo · predict.py CLI prediction · prepare_data.py Array preparation
Components 13
Data preparation
- Array preparation
src/prepare_data.py - Balanced subset
src/create_subset.py - Prepared arrays
Model training
- Transfer-learning trainer
src/train.py - Model checkpoints
- Test evaluation
src/train.py - Metrics and errors
results
Prediction interfaces
- CLI prediction
src/predict.py - Gradio demo
app.py
Other components
- PEER image data
- CLI user
- Demo user
- Google Drive
Connections 14
- PEER image data → Array preparation: loads arrays
src/prepare_data.py - Array preparation → Prepared arrays: writes arrays
src/prepare_data.py - Prepared arrays → Balanced subset: loads training data
src/create_subset.py - Balanced subset → Prepared arrays: writes subset
src/create_subset.py - Prepared arrays → Transfer-learning trainer: trains on
README.md - Transfer-learning trainer → Model checkpoints: saves checkpoint
README.md - Transfer-learning trainer → Test evaluation: evaluates model
README.md - Test evaluation → Metrics and errors: writes metrics
README.md - CLI user → CLI prediction: requests prediction
README.md - Model checkpoints → CLI prediction: loads checkpoint
src/predict.py - CLI prediction → CLI user: returns class and confidence
src/predict.py - Demo user → Gradio demo: uploads image
app.py - Gradio demo → Google Drive: downloads checkpoint
app.py - Gradio demo → Demo user: displays prediction
app.py