Spaces:
Sleeping
Sleeping
title: Phronesis Medical Report Generator | |
emoji: π§ | |
colorFrom: green | |
colorTo: gray | |
sdk: gradio | |
app_file: app.py | |
pinned: false | |
short_description: 'REPORT GEN AND CLASSIFICATION MODEL ' | |
# π§ Phronesis: Medical Image Diagnosis & Report Generator | |
**Phronesis** is a multimodal AI tool that classifies medical CT scan images (DICOM or standard formats) and generates diagnostic reports using a combination of video classification and medical language generation. | |
--- | |
## π Demo | |
Upload a set of DICOM (`.dcm`, `.ima`) or image (`.png`, `.jpg`) files representing slices of a CT scan. The model will: | |
- π·οΈ Predict a class: **acute**, **normal**, **chronic**, or **lacunar** | |
- π Generate a short **radiology report** | |
[Live App β](https://huggingface.co/spaces/baliddeki/phronesis-ml-endpoint) | |
--- | |
## ποΈ Model Architecture | |
- **Vision Backbone**: `3D ResNet-18` pretrained on Kinetics-400 | |
- **Language Head**: `BioBART v2` (pretrained biomedical seq2seq model) | |
- **Bridge Module**: Custom `ImageToTextProjector` to align visual features with the language model | |
- **CombinedModel**: Unified architecture for classification + report generation | |
--- | |
## π§ͺ Tasks | |
- **Image Classification**: Categorizes brain CT scans into one of four classes. | |
- **Report Generation**: Produces diagnostic text conditioned on image features. | |
--- | |
## πΌοΈ Input Format | |
- Minimum 1, maximum ~30 image slices per scan. | |
- Acceptable file formats: | |
- DICOM (`.dcm`, `.ima`) | |
- PNG, JPEG | |
The model will sample or pad the series to 16 frames for temporal context. | |
--- | |
## π¦ Dependencies | |
This app uses: | |
- `torch` | |
- `transformers` | |
- `torchvision` | |
- `huggingface_hub` | |
- `pydicom` | |
- `gradio` | |
- `PIL`, `numpy` | |
--- | |
## π Notes | |
- This demo loads a private model from the Hugging Face Hub. Set your `HF_TOKEN` as a secret for the space if needed. | |
- Do **not use for real clinical decisions** β intended for research/demo only. | |
--- | |
## πββοΈ Credits | |
Developed by [@baliddeki](https://huggingface.co/baliddeki) | |
Model weights: [`baliddeki/phronesis-ml`](https://huggingface.co/baliddeki/phronesis-ml) | |
Language model: [`GanjinZero/biobart-v2-base`](https://huggingface.co/GanjinZero/biobart-v2-base) | |
--- | |
## π License | |
MIT or Apache 2.0 (add yours here) | |