How mahenderreddyp/dental_xray_anamoly_detection works
Project Type and Purpose
• This is a research-oriented machine-learning pipeline (not a web app).
• Purpose: ingest panoramic X-rays, isolate the jaw, segment teeth, detect anomalies, and produce metrics & visualizations.
Main Components
A. Data Layer
• Raw Panoramic X-Ray Images (TUFTS-project folder)
• Expert & Student Annotation Stores (JSON, mask folders under TUFTS-project/Expert and TUFTS-project/Student)
• Generated Labels & Aggregated Data (labelGeneration.py, data_aggregation.py)
B. Preprocessing & Label Generation
• data_aggregation.py: merges image paths & label formats into YOLO-compatible datasets
C. Model Training & Experiment Tracking
• modelTraining.py
• medical_segmentation/exp_augmented{1…9}/args.yaml (hyperparameters)
• TensorBoard logs (events.out.tfevents.*)
• results.csv, best.pt & last.pt model weights
• YOLOv8 base weights (yolo11n.pt) and YOLOv8-seg template (yolov8n-seg.pt)
D. Inference Pipeline (Sequential Processing Steps)
1. Maxillomandibular Region Detection
– overlay_img.py + YOLO model → crops ROI
2. Tooth Segmentation
– YOLOv8-seg → outputs tooth masks
3. Anomaly Detection
– YOLOv8 detection & mask segmentation → identifies anomalies within tooth regions
E. Visualization & Evaluation
• OpenCV / Matplotlib scripts generate overlays (overlay_maxillomandibular.jpg, overlay_teeth.jpg, overlay_anomalies.jpg)
• Metrics computation: Precision/Recall/F1 curves, confusion matrices (images under exp_augmented9)
• README served as documentation
Relationships & Data Flows
• Raw Images & Annotations → Preprocessing Modules (data_aggregation.py, labelGeneration.py)
• Preprocessed Data → Training Module (modelTraining.py) → Experiment Folders (weights, logs, results)
• Trained Weights → Inference Pipeline (ROI Detection → Segmentation → Anomaly Detection)
• Inference Outputs → Visualization & Evaluation → Reports
Architectural Patterns & Design Principles
• Modular Pipeline: distinct modules for data prep, training, inference, and evaluation
• File-based “datastore” pattern: experiments isolated by folder, weights & logs co-located
• Sequential ML pipeline (not microservices) with clear stage separation