How deeptanu100/bone-fracture-crack-detection works
This repository develops and deploys a local radiograph fracture classifier. The user workflow is to submit an X-ray through the Gradio app or CLI, run ONNX inference, and receive a threshold-based fracture, normal, or human-review result with an overlay. The training lifecycle loads BoneFract data, trains a compact model, evaluates it on locked and C17 subtype benchmarks, and exports FP32/INT8 ONNX artifacts. Runtime and training paths are documented or visible in excerpts; some subsystem details are represented at the directory level because their source was not sampled.
Main entry points: train.py Training loop · evaluate.py Test evaluation · model.py Fracture classifier · infer.py Inference and overlays
Components 14
Local diagnosis
- Gradio application
app.py - Inference and overlays
src/infer.py - INT8 ONNX model
models/bone_fracture_detector_int8.onnx
Model development
- BoneFract loader
src/dataset.py - C17 subtype loader
src/dataset.py - Radiograph transforms
src/dataset.py - Training loop
src/train.py - Fracture classifier
src/model.py - Grad-CAM hooks
src/model.py - Pipeline configuration
configs/config.yaml
Validation and export
- Test evaluation
src/evaluate.py - ONNX export and quantization
src/export_onnx.py
Other components
- Image submitter
- CLI inference user
Connections 15
- Image submitter → Gradio application: submits image
README.md - Gradio application → Inference and overlays: calls prediction
app.py - CLI inference user → Inference and overlays: runs inference
README.md - Inference and overlays → INT8 ONNX model: loads model
src/infer.py - Training loop → BoneFract loader: loads training data
src/train.py - Training loop → Radiograph transforms: uses transforms
src/train.py - Training loop → Fracture classifier: trains model
src/train.py - Training loop → Pipeline configuration: reads settings
src/train.py - Test evaluation → BoneFract loader: loads test data
src/evaluate.py - Test evaluation → C17 subtype loader: benchmarks subtypes
README.md - Test evaluation → Fracture classifier: evaluates model
src/evaluate.py - Test evaluation → Pipeline configuration: reads settings
src/evaluate.py - ONNX export and quantization → Fracture classifier: exports model
src/export_onnx.py - ONNX export and quantization → INT8 ONNX model: writes quantized model
src/export_onnx.py - Fracture classifier → Grad-CAM hooks: registers hooks
src/model.py