CoolFace
Modelpublic

anassaifi8912/chestxray-blip-report-generator

sourceHugging Faceapache-2.0updated 8mo agoView on Hugging Face
0likes20downloads
Model Card

🩻 ChestXray-BLIP Report Generator

AI-powered Chest X-ray β†’ Radiology Report Generation

πŸš€ Overview

ChestXray-BLIP Report Generator is a Vision–Language deep learning model fine-tuned to automatically generate radiology-style chest X-ray reports from medical images.

The model is trained on the large-scale NIH ChestX-ray14 dataset (~45GB) and designed for medical AI research, education, and experimentation. It is also integrated into an end-to-end medical application with an AI chatbot interface.

⚠️ Disclaimer: This model is not clinically approved and must not be used for real-world diagnosis.

🌟 Key Features

  • β€”πŸ©Ί Automated chest X-ray report generation
  • β€”πŸ§  Vision–Language architecture (BLIP-based)
  • β€”πŸ–ΌοΈ Image β†’ Text medical understanding
  • β€”πŸ’¬ Compatible with AI medical chatbots (Qwen-based systems)
  • β€”βš‘ FP16 / mixed-precision support
  • β€”Trained on kagggle 2 T4 GPUs

🧠 Model Details

AttributeDescription
TaskChest X-ray β†’ Radiology Report Generation
Model TypeVision-Language Model
Base ArchitectureBLIP (Bootstrapped Language-Image Pretraining)
FrameworkPyTorch + Hugging Face Transformers
Vision EncoderViT (BLIP)
Text DecoderTransformer-based
Training DatasetNIH ChestX-ray14 (~45GB)
Training Epochs3
PrecisionFP16 supported
LanguageEnglish

🧬 Architecture Overview

Chest X-ray Image ↓ Vision Encoder (ViT / BLIP) ↓ Cross-Modal Attention ↓ Text Decoder ↓ Radiology-Style Report


πŸ“¦ Model Files

bestmodel/ β”œβ”€β”€ config.json β”œβ”€β”€ model.safetensors β”œβ”€β”€ generationconfig.json β”œβ”€β”€ preprocessorconfig.json β”œβ”€β”€ tokenizer.json β”œβ”€β”€ tokenizerconfig.json β”œβ”€β”€ vocab.txt └── specialtokensmap.json


πŸ“₯ Usage

πŸ”§ Load the Model

python
from transformers import BlipProcessor, BlipForConditionalGeneration

processor = BlipProcessor.from_pretrained(
    "anassaifi8912/chestxray-blip-report-generator"
)

model = BlipForConditionalGeneration.from_pretrained(
    "anassaifi8912/chestxray-blip-report-generator"
)

πŸ–ΌοΈ Generate a Report
inputs = processor(image, return_tensors="pt")
outputs = model.generate(**inputs, max_length=128)

report = processor.decode(outputs[0], skip_special_tokens=True)
print(report)

πŸ“Š Evaluation Metrics

Evaluated on unseen test data only.

Metric	Score
BLEU-1	0.1019
BLEU-2	0.0692
BLEU-3	0.0341
BLEU-4	0.0189
METEOR	0.1692
ROUGE-L	0.1803
πŸ₯ Clinical Accuracy	0.3159

πŸ§ͺ Intended Use

βœ… Medical AI research
βœ… Academic & educational projects
βœ… Prototyping healthcare applications

❌ Not for clinical diagnosis or treatment

⚠️ Limitations

Generated reports may be synthetic or incomplete

No disease localization or bounding boxes

Single-image input only

Performance varies across disease categories

Requires expert human verification

πŸ” Ethical Considerations

Outputs are AI-generated

May contain hallucinations or inaccuracies

Trained on publicly available medical data

Not evaluated for demographic or clinical bias

πŸ₯ Medical Disclaimer

This model is not a medical device and is not FDA-approved.
It must not be used for real-world clinical diagnosis, treatment, or medical decision-making.

πŸ“š Dataset

NIH ChestX-ray14 Dataset

Publicly available via NIH & Kaggle

Over 112,000 chest X-ray images

14 disease labels

πŸ‘€ Author

Anas Saifi

AI / Data Scientist

πŸ”— GitHub: https://github.com/anassaifi775

πŸ”— Hugging Face: https://huggingface.co/anassaifi8912

πŸ”— LinkedIn : https://www.linkedin.com/in/mohd-anas-6570a6290/

⭐ Acknowledgements

NIH Clinical Center

Kaggle

Hugging Face πŸ€—

PyTorch Community

⭐ If you find this model useful, please give it a star on Hugging Face