Skip to content

Repository files navigation

DICOM Structured Report Demo, FOR DEMONSTRATION PUROOSES ONLY, USE ONLY ON PUBLIC DATASETS!

This project demonstrates a streamlined workflow for generating DICOM Structured Reports (SR) from voice dictation. It integrates:

  • NVIDIA Parakeet-CTC-1.1b (Speech-to-Text)
  • Mistral 7B (LLM-based Report Formatting)
  • DICOM Integration (pydicom, highdicom)

Setup & Distribution

1. Requirements

This project uses Python 3.12 and requires the dependencies listed in requirements.txt.

pip install -r requirements.txt

2. Downloading Models

Due to their size and license terms, models are downloaded on demand or baked into the Docker container.

NVIDIA Parakeet-CTC-1.1b

  • License: CC-BY-4.0
  • Source: Hugging Face
  • Instructions: The application will automatically attempt to download this model to ./models/nvidia/parakeet-ctc-1.1b on first run if not present.

Mistral 7B (via Ollama) - Recommended for Report Formatting

  • License: Apache 2.0
  • Source: Mistral AI / Ollama
  • Why Mistral 7B?: In our testing, Mistral 7B produces significantly better structured radiology reports compared to smaller models like Phi.
  • Instructions:
    1. Install Ollama: brew install ollama (macOS) or curl -fsSL https://ollama.com/install.sh | sh (Linux).
    2. Pull the model: ollama pull mistral

3. Public DICOM Data Sources

Note: This repository does NOT contain patient data. You must provide your own DICOM files.

Unfortunately, I do not know a good public source of DICOM datasets. I have entered Kaggle competitions for medical image analysis. The Kaggle datasets come the closest to containg DICOM files and folder organization that is commonly seen in PACS systems. The Kaggle datasets are properly anonymized, but images and metadata are occasionaly altered, and folder structure is not always preserved. Folder names are usually shortened. The program code I have developed using AI makes assumptions about folder organization similiar to true PACS tranfered data, but also assumes shortening of folder names (clinical files often use full UIDS for naming folders).

Kaggle Datasets: If you have access to Kaggle competitions (e.g., RSNA Lumbar Spine), you can use that data locally, but DO NOT REDISTRIBUTE it.

Docker Usage

Build the container (this includes the models, so the build may take time):

docker build -t dicom-sr-demo .

Run the container, mounting your local DICOM folder:

# Mount your local DICOM data to /app/DICOM directory in the container
docker run -v /path/to/my/local/dicoms:/app/DICOM dicom-sr-demo

About

Demonstration of structured report usage

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages