ARIVE / README.md
akinaHCT's picture
Upload folder using huggingface_hub
bb4cb83 verified
|
Raw History Blame Contribute Delete
2.9 kB
---
license: apache-2.0
base_model: Qwen/Qwen3-VL-4B-Instruct
pipeline_tag: image-text-to-text
tags:
- arive
- medical
- chest-x-ray
- report-generation
---
# ARIVE
ARIVE adapts [Qwen3-VL-4B-Instruct](https://huggingface.co/Qwen/Qwen3-VL-4B-Instruct)
for grounded chest X-ray report generation. The model identifies anatomical
regions, produces bounding boxes, and uses a local vision branch to inspect
image crops before continuing generation.
This repository contains the final trained checkpoint in BF16: the decoder,
global vision branch, and local vision branch. It was fine-tuned using SFT and
GRPO on MIMIC-CXR-derived data. Training and inference prompts use `Indication`;
additional clinical fields are used during data construction.
## Inference
Inference requires the accompanying ARIVE code repository and its dependencies.
The local vision branch and iterative crop observations require the project's
custom inference entry point.
Download this model repository to a local directory named `ARIVE` and obtain
the Qwen3-VL-4B-Instruct base model separately. From the ARIVE code repository
root, configure the model paths and export the decoder weights for vLLM:
```bash
export QWENVL_INFER_BASE_MODEL=/path/to/Qwen3-VL-4B-Instruct
export QWENVL_INFER_VISION_CHECKPOINT=/path/to/ARIVE
export QWENVL_INFER_VLLM_CHECKPOINT=/path/to/ARIVE-vllm
python tools/export_vllm_checkpoint.py \
--src "$QWENVL_INFER_VISION_CHECKPOINT" \
--dst "$QWENVL_INFER_VLLM_CHECKPOINT"
```
The exporter first creates an `ARIVE-safe` intermediate directory that retains
both vision branches, then creates `ARIVE-vllm` for decoding. Both output
directories must be absent or empty. Keep the tokenizer, processor, and
`chat_template.jinja` files with the checkpoint; the exporter copies them.
Configure the evaluation reports, reference reports, clinical context, and
image paths as described in the code repository's README, then run:
```bash
CUDA_VISIBLE_DEVICES=0 python inference/infer_mcot.py
```
## Intended use and limitations
ARIVE is intended for research on chest X-ray report generation and visual
grounding. It is not intended for clinical diagnosis or patient care. Generated
findings and bounding boxes may be inaccurate and require independent review.
## License and data
The model checkpoint is released under [Apache-2.0](LICENSE). See [NOTICE](NOTICE)
for the base model attribution and a description of the modifications.
MIMIC-CXR images, reports, and patient-level training annotations are not
included. Access to and use of the source data remain subject to the applicable
[PhysioNet license and data use agreement](https://physionet.org/content/mimic-cxr/).
The model license does not grant access to or permission to redistribute those
datasets. The intended-use statement above describes the model's intended
application and does not add restrictions to Apache-2.0.