Implementing Agentic AI for Medical Image Analysis in Multi-Cancer Diagnosis
MSc Dissertation Project — Computing and Digital Technologies
An end-to-end Agentic AI system that analyses medical images for multi-cancer diagnosis using a Vision Transformer routing model and a four-agent LLM pipeline. The system autonomously identifies cancer type, provides clinical interpretation, generates evidence-based recommendations, and produces a structured clinical decision-support report.
This project is part of an MSc dissertation investigating the implementation of agentic AI in medical image analysis — an emerging field where 91.9% of published research appeared only in 2024–2025 (Abbasian et al., 2025).
| Domain | Architecture | Classes |
|---|---|---|
| Skin | DenseNet201 | Melanoma, Benign, Nevus |
| Oral | EfficientNetB0 | OSCC, Normal |
| Lung | EfficientNetB0 | ACA, Benign, SCC |
| Leukemia | EfficientNetB0 | ALL, Normal |
| Kidney | EfficientNetB0 | Tumour, Cyst, Normal, Stone |
| Brain | EfficientNetB2 | Glioma, Meningioma, Pituitary, Normal |
Python 3.12
TensorFlow 2.13# Clone the repository
git clone https://github.com/yourusername/cancer-detection-agentic.git
cd cancer-detection-agentic
# Create virtual environment
python -m venv venv
venv\Scripts\activate # Windows
source venv/bin/activate # Mac/Linux
# Install dependencies
pip install -r requirements.txtCreate a .env file in the root directory:
ANTHROPIC_API_KEY=your_claude_api_key_here
Download the ViT router model from Hugging Face:
from huggingface_hub import snapshot_download
snapshot_download(
repo_id='ErnestBeckham/MulticancerViT',
local_dir='models/weights/router/MulticancerViT'
)# Web interface
python app.py
# Open http://localhost:5000
# Command line
python main.py --image path/to/image.jpg --name "Patient Name" --age 45The system implements sequential multi-agent orchestration where each agent receives the full context of all previous agents:
| Agent | Role | Input | Output |
|---|---|---|---|
| Router Agent | Validates ViT prediction | Model output | Confidence assessment + routing decision |
| Analysis Agent | Clinical interpretation | Model + Agent 1 | Cancer description + uncertainty flags |
| Recommendation Agent | Next steps | Model + Agents 1–2 | Investigations + referrals |
| Report Agent | Synthesises all outputs | All prior outputs | Structured clinical report |
This system is an AI-powered decision-support tool developed for academic research purposes. It does not constitute a clinical diagnosis. All outputs must be reviewed and validated by a qualified clinician before any clinical action is taken.
- Abbasian et al. (2025). Agentic AI is the future of cancer detection. ScienceDirect
- Qiu et al. (2024). LLM-based agentic systems in medicine. Nature Machine Intelligence
- Shamshad et al. (2023). Transformers in medical imaging. Medical Image Analysis
- Dosovitskiy et al. (2021). An Image is Worth 16x16 Words. arXiv
Muhammad Haris MSc Computing and Digital Technologies (Northumbria University London)
This project is licensed under the MIT License — see LICENSE for details.




