Explainable multimodal breast cancer screening decision-support platform for low-resource clinical settings — FastAPI app combining a fine-tuned MobileNetV2 (mammogram images, Grad-CAM) and an MLP (clinical features, SHAP) with role-based auth, radiologist review, and audit trail. CSCD602 Advanced Software Engineering exam project.
# MammaCare AI — CSCD602 Exam Project
Explainable breast cancer screening decision-support platform, built on the
pretrained models from the author's MSc thesis (fine-tuned MobileNetV2 for
mammogram images, MLP for WBCD clinical features).
## Local setup (Windows / VS Code)
Open this folder in VS Code, open a terminal, then:
```powershell
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
```
If you hit a Windows long-path error during install, enable long path support
once (as Administrator, then restart):
```powershell
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
```
## Seed demo accounts (run once)
```powershell
python -m app.seed
```
Creates:
| Role | Email | Password |
|---|---|---|
| Clinician | clinician@mammacare.demo | Demo1234! |
| Radiologist | radiologist@mammacare.demo | Demo1234! |
| Admin | admin@mammacare.demo | Demo1234! |
## Run
```powershell
uvicorn app.main:app --reload
```
Then open
127.0.0.1
## Run the automated test suite
```powershell
python -m tests.run_functional_tests
```
Runs 23 in-process functional tests covering auth, RBAC, both ML assessment
pipelines, validation, review workflow, audit trail, and admin functions.
Results are also written to tests/test_results.json.
## What's in this package
- `app/` — the FastAPI application (routers, services, templates, models)
- `models/` — pretrained model artifacts from the thesis (finetuned_model.h5,
tabular_only_model.h5, scaler.pkl, breast_cancer_model.tflite)
- `tests/` — automated functional test suite + latest results
- `documentation/` — Testing_Report.docx
- `requirements.txt`, `README.md` — this file
## Architecture notes
- Single FastAPI service — auth, patient/case management, both independent
ML assessment branches (image + Grad-CAM, tabular + SHAP), radiologist
review, audit trail, admin dashboard.
- Patient references are auto-generat …