How gundatharuntej2006-hue/cv_proj works
This repository is a prototype for explainable TB screening from chest X-rays. Its documented user-to-result workflow accepts DICOM/PNG images, rejects unsuitable or out-of-distribution inputs, crops lung regions, classifies TB and detects lesions, then calibrates and triages cases for a dashboard worklist and PDF export. Supporting branches provide explainability, structured logs, and statistical evaluation, including external and challenge assessments. The sampled triage orchestrator shows direct component calls; broader product connections are based on the README, since several implementation modules were not sampled.
Main entry points: triage_orchestrator.py Pipeline orchestrator · conformal_triage.py Conformal triage · quality_gate.py Quality and OOD gate · tables.py Evaluation tables
Components 19
Input and quality
- Quality and OOD gate
src/p2_gate/quality_gate.py - View check
src/p1_viewhead/orientation_checker.py
Image analysis
- Lung preprocessing
src/p1_data/preprocessing.py - TB classifier
src/p2_cls/classifier.py - Lesion detector
src/p3_det/dfine_detector.py - Grad-CAM
src/p3_xai/gradcam.py
Triage and output
- Temperature scaling
src/p4_stats/calibration.py - Conformal triage
src/p4_pipeline/conformal_triage.py - Pipeline orchestrator
src/p4_pipeline/triage_orchestrator.py - Pipeline API
src/p4_pipeline/api.py - Dashboard worklist
src/p1_app/dashboard.py - Case PDF export
src/p3_ops/pdf_generator.py - Prediction logs
src/p3_ops/logging.py
Evaluation
- Evaluation tables
src/p4_eval/tables.py - External and challenge evaluation
src/p4_eval - Metrics and confidence intervals
src/p4_stats
Shared contracts
- Result schemas
src/tbcore/schemas.py - Validation and versioning
src/tbcore/validators.py
Other components
- Chest X-ray
Connections 19
- Chest X-ray → Quality and OOD gate: submits image
README.md - Pipeline orchestrator → Quality and OOD gate: evaluates
src/p4_pipeline/triage_orchestrator.py - Pipeline orchestrator → View check: predicts view
src/p4_pipeline/triage_orchestrator.py - Pipeline orchestrator → Lung preprocessing: segments and crops
src/p4_pipeline/triage_orchestrator.py - Pipeline orchestrator → TB classifier: predicts TB
src/p4_pipeline/triage_orchestrator.py - Pipeline orchestrator → Lesion detector: detects lesions
src/p4_pipeline/triage_orchestrator.py - Pipeline orchestrator → Grad-CAM: generates attribution
src/p4_pipeline/triage_orchestrator.py - Pipeline orchestrator → Temperature scaling: calibrates probability
src/p4_pipeline/triage_orchestrator.py - Pipeline orchestrator → Conformal triage: assigns category
src/p4_pipeline/triage_orchestrator.py - Pipeline API → Pipeline orchestrator: exposes pipeline
src/p4_pipeline/api.py - Quality and OOD gate → Pipeline orchestrator: rejects early
README.md - Conformal triage → Dashboard worklist: feeds worklist
README.md - Conformal triage → Case PDF export: feeds case report
README.md - Conformal triage → Prediction logs: records prediction
README.md - Evaluation tables → Metrics and confidence intervals: computes metrics
src/p4_eval/tables.py - External and challenge evaluation → Metrics and confidence intervals: uses metrics
src/p4_eval/external.py - Pipeline orchestrator → Result schemas: returns structured result
src/p4_pipeline/triage_orchestrator.py - Evaluation tables → Validation and versioning: checks evaluation gate
- Pipeline orchestrator → Validation and versioning: stamps versions