Instructions to use thaiphonghuan/BLIP-finetuned-chest-xray-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thaiphonghuan/BLIP-finetuned-chest-xray-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="thaiphonghuan/BLIP-finetuned-chest-xray-v1")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("thaiphonghuan/BLIP-finetuned-chest-xray-v1") model = AutoModelForImageTextToText.from_pretrained("thaiphonghuan/BLIP-finetuned-chest-xray-v1") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use thaiphonghuan/BLIP-finetuned-chest-xray-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thaiphonghuan/BLIP-finetuned-chest-xray-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thaiphonghuan/BLIP-finetuned-chest-xray-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/thaiphonghuan/BLIP-finetuned-chest-xray-v1
- SGLang
How to use thaiphonghuan/BLIP-finetuned-chest-xray-v1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "thaiphonghuan/BLIP-finetuned-chest-xray-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thaiphonghuan/BLIP-finetuned-chest-xray-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "thaiphonghuan/BLIP-finetuned-chest-xray-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thaiphonghuan/BLIP-finetuned-chest-xray-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use thaiphonghuan/BLIP-finetuned-chest-xray-v1 with Docker Model Runner:
docker model run hf.co/thaiphonghuan/BLIP-finetuned-chest-xray-v1
license: apache-2.0
tags:
- vision-language
- image-captioning
- medical-imaging
- chest-xray
- blip
- finetuned
library_name: transformers
Fine-tuned BLIP on Chest X-rays (Indiana University)
This repository contains a fine-tuned BLIP (Bootstrapped Language-Image Pretraining) model trained on the Chest X-rays (Indiana University) dataset.
The model is adapted for vision–language tasks in the medical imaging domain, particularly chest X-ray understanding.
🧠 Model Description
- Base model: BLIP (Bootstrapped Language-Image Pretraining)
- Fine-tuning domain: Medical imaging
- Modality: Vision–Language (Image + Text)
- Target data: Chest X-ray images (frontal & lateral views)
The goal of fine-tuning is to adapt BLIP to better capture radiological visual patterns and associated semantic information from chest X-ray images.
📊 Dataset Information
The model is fine-tuned using the Chest X-rays (Indiana University) dataset.
Dataset Source
Image Preprocessing Pipeline
Original images were provided in raw DICOM format. Each image was converted to PNG with the following preprocessing steps:
Outlier clipping
- The top and bottom 0.5% of DICOM pixel values were clipped
- Purpose: eliminate extremely dark or bright pixel outliers
Intensity normalization
- DICOM pixel values were linearly scaled to the 0–255 range
Resizing
- Images were resized so that the shorter side is 2048 pixels
- This was done to comply with Kaggle dataset size limits
View classification
- Each image was manually classified into:
- Frontal chest X-ray
- Lateral chest X-ray
- Each image was manually classified into: