Skip to main content
Other

YOLO-MammoDraft: Application for Explainable Mammographic Lesion Detection, Segmentation, and Report Generation

Iqra Iqbal KhanDepartment of Computer Science, Bahauddin Zakariya University, Multan 60800, PakistanSyed Taimoor Hussain ShahPolytechnic University of TurinSajid IqbalDepartment of Computer Science, Bahauddin Zakariya University, Multan 60800, Pakistan;Syed Adil Hussain ShahPolitoBIOMed Lab, Department of Mechanical and Aerospace Engineering, Politecnico di Torino, Turin 10129, ItalySyed Baqir Hussain ShahPolitoBIOMed Lab, Department of Mechanical and Aerospace Engineering, Politecnico di Torino, Turin 10129, ItalyGohar Bano ZaidiKainat QayyumDepartment of Computer Science, COMSATS University Islamabad (CUI), Wah Campus, Wah 47000, PakistanShahzad Ahmad QureshiSchool of Artificial Intelligence, Tianjin Polytechnic University, Tianjin 300387, ChinaMarco Agostino DeriuPakistan Institute of Engineering and Applied SciencesDeriu, Marco AgostinoPolitoBIOMed Lab, Department of Mechanical and Aerospace Engineering, Politecnico di Torino, Turin 10129, Italy
ABI

Abstract

YOLO-MammoDraft: An Explainable AI Pipeline for Mammographic Lesion Detection, Segmentation Support, and Structured Report Drafting Authors and Affiliations Iqra Iqbal Khan¹˒²˒†, Syed Taimoor Hussain Shah³˒†˒, Sajid Iqbal¹, Syed Adil Hussain Shah³˒⁴, Karim Kassem³˒⁵, Silvia Godio³, Syed Baqir Hussain Shah⁶, Kainat Qayyum⁷, Shahzad Ahmad Qureshi⁸, and Marco Agostino Deriu³˒ ¹ Department of Computer Science, Bahauddin Zakariya University, Multan 60800, Pakistan; [email protected]² Department of Computing and Emerging Technologies, Emerson University Multan, Multan 60000, Pakistan; [email protected]³ PolitoBIOMed Lab, Department of Mechanical and Aerospace Engineering, Politecnico di Torino, Turin 10129, Italy; [email protected]; [email protected]; [email protected]; [email protected]⁴ Department of Research and Development (R&D), GPI SpA, Trento 38123, Italy; [email protected]⁵ Centro Medico Santagostino, Milan, Italy⁶ Department of Computer Science, COMSATS University Islamabad (CUI), Wah Campus, Wah 47000, Pakistan; [email protected]⁷ School of Artificial Intelligence, Tianjin Polytechnic University, Tianjin 300387, China; [email protected]⁸ Department of Computer and Information Sciences, Pakistan Institute of Engineering and Applied Sciences, Islamabad 45650, Pakistan; [email protected] † Equal contributions: [email protected]; [email protected] Correspondence: [email protected]; [email protected] Description / Abstract YOLO-MammoDraft is a web-based explainable artificial intelligence pipeline for mammographic image analysis. The system supports paired left and right breast image upload, automated lesion detection and localization using a trained YOLO-based model, prediction visualization, explainable AI heatmap generation, lesion size estimation using user-defined pixel spacing, and AI-assisted radiology report generation. The platform is designed as an end-to-end prototype for research, educational, and demonstration purposes. It integrates computer vision inference, visual explanation, structured prediction summaries, and report drafting into a single workflow. The web interface presents model predictions for each breast separately, bounding-box localization, SHAP-style evidence maps, AI concern scores, lesion size estimates in millimeters, and a draft radiology report with clinical decision-support language. The report output is intentionally framed as an AI-assisted draft. It does not provide a final diagnosis and does not replace review by a qualified radiologist or clinician. BI-RADS-style assessment language is included only as decision-support guidance, and final interpretation remains the responsibility of the interpreting specialist. Pipeline Name YOLO-MammoDraft Main Features Left and right breast image upload through a web interface Mammographic lesion detection and localization using a trained YOLO model Visual prediction overlays with color-coded bounding boxes Box color scaling based on detected-region size SHAP-style explainable AI heatmap visualization Pixel-to-millimeter lesion size estimation using configurable pixel spacing AI concern score display with clinician-facing explanatory text AI-assisted breast imaging draft report generation PDF export of prediction outputs, explainability maps, measurements, and report text Clinical-use disclaimer emphasizing decision support only Keywords Breast cancer; Mammography; Artificial intelligence; Deep learning; YOLO; Lesion detection; Lesion segmentation; Explainable AI; XAI; Medical imaging; Radiology report generation; BI-RADS; Clinical decision support; Flask web application Software / Technical Summary The application is implemented as a Flask-based web application. The image-analysis backend uses a trained YOLO model for lesion detection and localization. OpenCV and NumPy are used for image processing, annotation, and visual overlays, while ReportLab is used for PDF report generation. The system also includes an optional local LLM-based report drafting step through Ollama. The application accepts left and right breast images, runs inference independently on each image, generates prediction overlays and SHAP-style heatmaps, estimates lesion size using the configured pixel spacing, and returns a structured AI-assisted draft report. Directory / File Tree Recommended Zenodo release structure: breast_ai_project/|-- app.py|-- best.pt|-- evaluate_miniddsm_holdout.py|-- requirements.txt|-- setup.bat|-- README.md|-- ZENODO_TEXT.md|-- model/| `-- best.pt|-- templates/| |-- index.html| `-- result.html|-- static/| |-- style.css| |-- script.js| |-- output_left.jpg| |-- reports/| | `-- report.pdf| |-- uploads/| | `-- generated uploaded images| `-- results/| `-- generated prediction and XAI images|-- input samples/| |-- 20586934_6c613a14b80a8591_MG_L_CC_ANON.png| `-- 20587054_b6a4f750c6df4f90_MG_R_CC_ANON.png|-- reports/| `-- generated PDF reports The local virtual environment, cache folders, temporary runtime files, and log files are not required for the Zenodo software release and may be excluded from the uploaded archive. Intended Use This release is intended for research, demonstration, teaching, and prototype evaluation of AI-assisted mammographic image analysis workflows. It is not intended for direct clinical diagnosis, autonomous clinical decision-making, or patient management. Clinical Disclaimer This tool is intended for clinical decision support and research use only. It does not make a diagnosis, does not replace clinician or radiologist judgment, and must not be used as the sole basis for patient management. AI confidence or concern scores are model outputs and should not be interpreted as calibrated probabilities of malignancy. AI-generated measurements, visual explanations, and report text must be reviewed and verified by qualified clinical personnel using appropriate calibrated imaging systems and full clinical context. Limitations System performance depends on the quality, format, and calibration of the uploaded images Pixel-to-millimeter conversion requires the correct pixel spacing value AI concern scores should not be interpreted as malignancy probabilities The generated report is a draft and must be reviewed by a qualified radiologist or clinician BI-RADS-style language is included only for decision-support purposes The workflow does not replace full diagnostic mammographic interpretation, ultrasound correlation, MRI interpretation, pathology correlation, or prior imaging comparison Suggested Citation If you use this application, please cite: Iqra Iqbal Khan, Syed Taimoor Hussain Shah, Sajid Iqbal, Syed Adil Hussain Shah, Syed Baqir Hussain Shah, Gohar Bano Zaidi, Kainat Qayyum, Shahzad Ahmad Qureshi, and Marco Agostino Deriu. YOLO-MammoDraft: An Explainable AI Pipeline for Mammographic Lesion Detection, Segmentation, and Report Generation. Zenodo. https://doi.org/10.5281/zenodo.19980953 Related Publication YOLO-MammoDraft: An Explainable AI Pipeline for Mammographic Lesion Detection, Segmentation, and Report Generation License Please specify the license selected for this release on Zenodo. If no license has been chosen yet, it is recommended to add one before publication. Repository / Code Availability Source code, model files, and supporting resources are included in this Zenodo release or linked through the associated project repository, depending on the final upload configuration. Data Availability No patient-identifiable data should be included in this release. Any example images must be de-identified and shared only when redistribution is permitted by the original dataset license terms and relevant ethics or usage approvals.

Identifiers

Citations and references

Cited by 00 references