Skip to content

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GIV-CXR

Research code, notebooks, and small utilities for the paper:

GIV-CXR: Densely Grounded, Visually Interpretable Chest X-ray Question Answering Dataset

This repo is intentionally pretty simple. I want it to look like an actual student research repo, not a polished package.

Main things in here:

  • small dataset loaders for local GIV-CXR artifacts
  • exact-match and bbox-IoU evaluation code
  • paper baseline config files
  • a few notebooks I used while working on the project
  • some optional analysis scripts that were useful during experiments

Start Here

If you are opening this repo for the first time:

  1. read this file
  2. open qwen25vl_giv_cxr_bbox_input_finetuning.ipynb or qwen25vl_giv_cxr_bbox_output_finetuning.ipynb if you care about the Qwen fine-tuning runs
  3. open notebooks/giv_cxr_dataset_sanity_checks.ipynb for a quick local data sanity notebook

Quick Setup

python3.11 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -e ".[dev]"

If you want the heavier analysis stack too:

pip install -e ".[analysis]"

If you mostly want the notebook pile and do not want to think too hard about which one needs what, use:

pip install -e ".[notebooks]"

If you only want the Qwen / Llama fine-tuning notebooks, use:

pip install -e ".[train]"

That train extra is the closest match for:

The eval / metrics notebooks such as chexagent_mimic_vqa_eval.ipynb and medgemma_giv_cxr_inference.ipynb are a bit more mixed, which is why .[notebooks] exists now.

Small caveat: the model notebooks were clearly written around GPU-heavy environments, so .[train] and .[notebooks] mirror the Python package stack, but you may still need a machine-specific PyTorch/CUDA setup depending on where you run them.

Repo Map

  • notebooks/: quick exploration notebooks
  • scripts/: tiny entry points for inspection and eval
  • configs/: baseline config files used for the paper variants
  • src/giv_cxr/: loaders and metrics
  • qwen25vl_giv_cxr_bbox_input_finetuning.ipynb: Qwen 2.5-VL bbox-input fine-tuning notebook
  • qwen25vl_giv_cxr_bbox_output_finetuning.ipynb: Qwen 2.5-VL bbox-output fine-tuning notebook
  • qwen25vl_mimic_vqa_bbox_output.ipynb: Qwen 2.5-VL bbox-output experiments on MIMIC-VQA
  • llama32_11b_vision_giv_cxr.ipynb: Llama 3.2 11B Vision experiments on GIV-CXR
  • llama32_11b_vision_mimic_vqa.ipynb: Llama 3.2 11B Vision experiments on MIMIC-VQA
  • medgemma_giv_cxr_inference.ipynb: MedGemma inference notebook on GIV-CXR
  • chexagent_mimic_vqa_eval.ipynb: CheXagent MIMIC-VQA evaluation notebook

There are also some optional scripts under scripts/analysis/. They are still research-style utilities, not a polished API.

For the fine-tuning notebooks specifically, the expected local data layout is still notebook-style rather than package-style. In practice they expect local folders like:

  • giv_cxr_train_dataset/
  • giv_cxr_val_dataset/
  • processed_images_224/

A Few Useful Commands

Inspect a local dataset artifact:

python scripts/inspect_dataset.py --path path/to/giv_cxr_train_dataset --limit 3

Run the tiny example eval:

python scripts/evaluate.py --predictions tests/fixtures/sample_predictions.jsonl

Print one of the public baseline configs:

python scripts/train.py --config configs/qwen_bbox_output.yaml

About The Data

The full benchmark described in the paper spans 355,293 QA pairs across 20,534 chest radiographs.

The paper experiments use:

  • train: 150,000 QA pairs
  • test: 7,500 QA pairs
  • validation: 7,500 QA pairs, supplementary only

I am not putting restricted MIMIC-CXR / Chest ImaGenome-derived images or private artifact dumps directly in this repo. If you are rerunning anything locally, just make your own artifacts/ folder and keep the actual data there.

Notes

  • notebooks/README.md
  • the model notebooks are still notebook-first and a bit messy, which is intentional for now
  • scripts/analysis/ contains extra experiment utilities if you want to dig deeper

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages