manu02/LAnA-Arxiv

Model

0

stars

13

commits

1

repos using this model

1

linked in READMEs

Apr 14, 2026

updated

arxiv
chest-xray
custom_code
feature-extraction
image-to-text
lana_arxiv
legacy-model
medical-ai
radiology
report-generation
transformers
Browse cluster: Medical AI and Chest X-Ray Analysis

README

LAnA-Arxiv

Legacy report-generation model created for the arXiv paper

Best current model in this collection: manu02/LAnA-Arxiv

ArXiv LinkedIn GitHub Profile Portfolio GitHub Repo Hugging Face

Layer-Wise Anatomical Attention

Overview

LAnA-Arxiv is the model from the Layer-Wise Anatomical Attention paper on arXiv.

Intended Use

  • Input: a chest X-ray image resized to 512x512 and normalized with ImageNet mean/std.
  • Output: a generated radiology report.
  • Best fit: research comparison against the legacy model used in the arXiv paper.

How to Run

New users should prefer the standard Hugging Face flow below. This artifact can be loaded either from its future repo id or from a local folder before upload.

Implementation 1: Standard Hugging Face loading

import torch
from PIL import Image
from transformers import AutoModel, AutoProcessor

repo_id = "manu02/LAnA-Arxiv"
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

processor = AutoProcessor.from_pretrained(repo_id, trust_remote_code=True)
model = AutoModel.from_pretrained(repo_id, trust_remote_code=True)
model.move_non_quantized_modules(device)
model.eval()

image = Image.open("example.png").convert("RGB")
inputs = processor(images=image, return_tensors="pt")
inputs = {name: tensor.to(device) for name, tensor in inputs.items()}

with torch.inference_mode():
    generated = model.generate(**inputs, max_new_tokens=100)

report = processor.batch_decode(generated, skip_special_tokens=True)[0]
print(report)

Batched inference uses the same path:

batch = processor(images=[image_a, image_b], return_tensors="pt")
batch = {name: tensor.to(device) for name, tensor in batch.items()}
generated = model.generate(**batch, max_new_tokens=100)
reports = processor.batch_decode(generated, skip_special_tokens=True)

Licensing and Redistribution Notice

This checkpoint bundles or derives from Meta DINOv3 model materials. Redistribution of those components must follow the DINOv3 license terms included in this repository. The project code remains available under the repository's own license, but the full packaged checkpoint should not be treated as MIT-only.

Research and Safety Disclaimer

This model is intended for research and educational use only. It is not a medical device, has not been validated for clinical deployment, and should not be used as a substitute for professional radiology review.

MIMIC Test Results

These comparison tables are refreshed across the full LAnA collection whenever any collection model is evaluated.

Cross-Model Comparison: All Frontal Test Studies (3041 studies)

MetricLAnA-MIMIC-CHEXPERTLAnA-MIMICLAnALAnA-v2LAnA-v3LAnA-v4LAnA-v5LAnA-Arxiv
ROUGE-L0.15130.16530.16860.16700.17450.16750.1702``
BLEU-10.17070.19160.20910.21740.23460.22440.2726``
BLEU-40.03570.03860.04170.04170.04840.04410.0503``
METEOR0.20790.22020.22980.20630.21290.20020.2607``
RadGraph F10.09180.09210.10240.10570.09390.07940.0853``
RadGraph entity F10.13990.14590.15870.15690.14410.14370.1481``
RadGraph relation F10.12460.13220.14430.14740.12800.12930.1308``
CheXpert F1 14-micro0.18290.15650.21160.14010.31160.21960.3552``
CheXpert F1 5-micro0.21830.15300.25120.25060.24860.05380.3777``
CheXpert F1 14-macro0.10950.07130.10950.04010.13630.07240.1790``
CheXpert F1 5-macro0.16340.10070.16440.10040.16860.03330.2647``

Cross-Model Comparison: Findings-Only Frontal Test Studies (2210 studies)

MetricLAnA-MIMIC-CHEXPERTLAnA-MIMICLAnALAnA-v2LAnA-v3LAnA-v4LAnA-v5LAnA-Arxiv
ROUGE-L0.15760.17200.17710.17710.18480.17530.1781``
BLEU-10.17540.20030.21770.22630.24800.23370.2774``
BLEU-40.04050.04490.04840.04870.05730.05090.0575``
METEOR0.22070.23470.24660.22400.23100.21370.2760``
RadGraph F10.10100.10000.11190.11810.10460.09060.09380.1831
RadGraph entity F10.15170.15770.17130.17390.15840.15660.15800.1831
RadGraph relation F10.13470.14130.15490.16280.14050.14100.13950.1596
CheXpert F1 14-micro0.16510.14420.19070.13650.29210.22050.31730.3228
CheXpert F1 5-micro0.21520.17160.24150.24550.23940.05550.33720.3745
CheXpert F1 14-macro0.10470.07000.10390.03810.13260.07140.16320.2190
CheXpert F1 5-macro0.16110.11120.15780.09520.16360.03420.23430.3354

Data

  • Full project datasets: CheXpert and MIMIC-CXR.
  • Intended project scope: train on curated chest X-ray/report data from both datasets and evaluate on MIMIC-CXR test studies.
  • Current released checkpoint datasets: MIMIC-CXR (findings-only) for training and MIMIC-CXR (findings-only) for validation.
  • Current published evaluation: MIMIC-CXR test split, frontal-only (PA/AP) studies.

Evaluation

  • Medical report metrics implemented in the repository include RadGraph F1 and CheXpert F1 (14-micro, 5-micro, 14-macro, 5-macro).

Experiment Model Descriptions

  • LAnA-MIMIC-CHEXPERT: This variant was trained on a combined dataset of CheXpert and MIMIC-CXR using LoRA fine-tuning with the AdamW optimizer.
  • LAnA-MIMIC: This model was trained on the MIMIC-CXR (findings-only) dataset using LoRA fine-tuning with the AdamW optimizer.
  • LAnA: This model was trained on the MIMIC-CXR (findings-only) dataset using full-model optimization with AdamW instead of LoRA.
  • LAnA-v2: This version keeps the same training setup as LAnA, but increases the effective global batch size from 16 to 128.
  • LAnA-v3: This version keeps the same training setup as LAnA, including the effective global batch size of 16, but changes how EOS is handled so training and generation follow the same behavior. The model no longer uses the EOS token during training, and generation remained greedy without stopping when an EOS token was produced. In the previous setup, decoding was also greedy, stopped at EOS, and used a maximum of 128 new tokens.
  • LAnA-v4: This version keeps the same decoding behavior as LAnA-v3, but increases the effective global batch size from 16 to 128.
  • LAnA-v5: This version uses the training recipe from the original LAnA paper, while switching to the legacy CXR-Findings-AI generation behavior.
  • LAnA-Arxiv: This model is the report-generation model created in the arXiv paper, packaged locally with its original legacy generation code.

Training Snapshot

  • Run: LAnA-Arxiv
  • Model identity: model_best7 family
  • Shipped weight: arxiv_paper_model.pth
  • This artifact packages the model created in the arXiv paper.
  • Vision encoder: facebook/dinov3-vits16-pretrain-lvd1689m
  • Text decoder: gpt2
  • Segmentation encoder: facebook/dinov3-convnext-small-pretrain-lvd1689m
  • Image size: 512
  • Example generation max new tokens: 100

Status

  • Project status: Legacy paper model packaged locally
  • Release status: Ready for later upload
  • Current checkpoint status: Report generator only

Contributors

manu02

13 commits

manu02/LAnA-Arxiv

Model

0

stars

13

commits

1

repos using this model

1

linked in READMEs

Apr 14, 2026

updated

arxiv
chest-xray
custom_code
feature-extraction
image-to-text
lana_arxiv
legacy-model
medical-ai
radiology
report-generation
transformers
Browse cluster: Medical AI and Chest X-Ray Analysis

README

LAnA-Arxiv

Legacy report-generation model created for the arXiv paper

Best current model in this collection: manu02/LAnA-Arxiv

ArXiv LinkedIn GitHub Profile Portfolio GitHub Repo Hugging Face

Layer-Wise Anatomical Attention

Overview

LAnA-Arxiv is the model from the Layer-Wise Anatomical Attention paper on arXiv.

Intended Use

  • Input: a chest X-ray image resized to 512x512 and normalized with ImageNet mean/std.
  • Output: a generated radiology report.
  • Best fit: research comparison against the legacy model used in the arXiv paper.

How to Run

New users should prefer the standard Hugging Face flow below. This artifact can be loaded either from its future repo id or from a local folder before upload.

Implementation 1: Standard Hugging Face loading

import torch
from PIL import Image
from transformers import AutoModel, AutoProcessor

repo_id = "manu02/LAnA-Arxiv"
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

processor = AutoProcessor.from_pretrained(repo_id, trust_remote_code=True)
model = AutoModel.from_pretrained(repo_id, trust_remote_code=True)
model.move_non_quantized_modules(device)
model.eval()

image = Image.open("example.png").convert("RGB")
inputs = processor(images=image, return_tensors="pt")
inputs = {name: tensor.to(device) for name, tensor in inputs.items()}

with torch.inference_mode():
    generated = model.generate(**inputs, max_new_tokens=100)

report = processor.batch_decode(generated, skip_special_tokens=True)[0]
print(report)

Batched inference uses the same path:

batch = processor(images=[image_a, image_b], return_tensors="pt")
batch = {name: tensor.to(device) for name, tensor in batch.items()}
generated = model.generate(**batch, max_new_tokens=100)
reports = processor.batch_decode(generated, skip_special_tokens=True)

Licensing and Redistribution Notice

This checkpoint bundles or derives from Meta DINOv3 model materials. Redistribution of those components must follow the DINOv3 license terms included in this repository. The project code remains available under the repository's own license, but the full packaged checkpoint should not be treated as MIT-only.

Research and Safety Disclaimer

This model is intended for research and educational use only. It is not a medical device, has not been validated for clinical deployment, and should not be used as a substitute for professional radiology review.

MIMIC Test Results

These comparison tables are refreshed across the full LAnA collection whenever any collection model is evaluated.

Cross-Model Comparison: All Frontal Test Studies (3041 studies)

MetricLAnA-MIMIC-CHEXPERTLAnA-MIMICLAnALAnA-v2LAnA-v3LAnA-v4LAnA-v5LAnA-Arxiv
ROUGE-L0.15130.16530.16860.16700.17450.16750.1702``
BLEU-10.17070.19160.20910.21740.23460.22440.2726``
BLEU-40.03570.03860.04170.04170.04840.04410.0503``
METEOR0.20790.22020.22980.20630.21290.20020.2607``
RadGraph F10.09180.09210.10240.10570.09390.07940.0853``
RadGraph entity F10.13990.14590.15870.15690.14410.14370.1481``
RadGraph relation F10.12460.13220.14430.14740.12800.12930.1308``
CheXpert F1 14-micro0.18290.15650.21160.14010.31160.21960.3552``
CheXpert F1 5-micro0.21830.15300.25120.25060.24860.05380.3777``
CheXpert F1 14-macro0.10950.07130.10950.04010.13630.07240.1790``
CheXpert F1 5-macro0.16340.10070.16440.10040.16860.03330.2647``

Cross-Model Comparison: Findings-Only Frontal Test Studies (2210 studies)

MetricLAnA-MIMIC-CHEXPERTLAnA-MIMICLAnALAnA-v2LAnA-v3LAnA-v4LAnA-v5LAnA-Arxiv
ROUGE-L0.15760.17200.17710.17710.18480.17530.1781``
BLEU-10.17540.20030.21770.22630.24800.23370.2774``
BLEU-40.04050.04490.04840.04870.05730.05090.0575``
METEOR0.22070.23470.24660.22400.23100.21370.2760``
RadGraph F10.10100.10000.11190.11810.10460.09060.09380.1831
RadGraph entity F10.15170.15770.17130.17390.15840.15660.15800.1831
RadGraph relation F10.13470.14130.15490.16280.14050.14100.13950.1596
CheXpert F1 14-micro0.16510.14420.19070.13650.29210.22050.31730.3228
CheXpert F1 5-micro0.21520.17160.24150.24550.23940.05550.33720.3745
CheXpert F1 14-macro0.10470.07000.10390.03810.13260.07140.16320.2190
CheXpert F1 5-macro0.16110.11120.15780.09520.16360.03420.23430.3354

Data

  • Full project datasets: CheXpert and MIMIC-CXR.
  • Intended project scope: train on curated chest X-ray/report data from both datasets and evaluate on MIMIC-CXR test studies.
  • Current released checkpoint datasets: MIMIC-CXR (findings-only) for training and MIMIC-CXR (findings-only) for validation.
  • Current published evaluation: MIMIC-CXR test split, frontal-only (PA/AP) studies.

Evaluation

  • Medical report metrics implemented in the repository include RadGraph F1 and CheXpert F1 (14-micro, 5-micro, 14-macro, 5-macro).

Experiment Model Descriptions

  • LAnA-MIMIC-CHEXPERT: This variant was trained on a combined dataset of CheXpert and MIMIC-CXR using LoRA fine-tuning with the AdamW optimizer.
  • LAnA-MIMIC: This model was trained on the MIMIC-CXR (findings-only) dataset using LoRA fine-tuning with the AdamW optimizer.
  • LAnA: This model was trained on the MIMIC-CXR (findings-only) dataset using full-model optimization with AdamW instead of LoRA.
  • LAnA-v2: This version keeps the same training setup as LAnA, but increases the effective global batch size from 16 to 128.
  • LAnA-v3: This version keeps the same training setup as LAnA, including the effective global batch size of 16, but changes how EOS is handled so training and generation follow the same behavior. The model no longer uses the EOS token during training, and generation remained greedy without stopping when an EOS token was produced. In the previous setup, decoding was also greedy, stopped at EOS, and used a maximum of 128 new tokens.
  • LAnA-v4: This version keeps the same decoding behavior as LAnA-v3, but increases the effective global batch size from 16 to 128.
  • LAnA-v5: This version uses the training recipe from the original LAnA paper, while switching to the legacy CXR-Findings-AI generation behavior.
  • LAnA-Arxiv: This model is the report-generation model created in the arXiv paper, packaged locally with its original legacy generation code.

Training Snapshot

  • Run: LAnA-Arxiv
  • Model identity: model_best7 family
  • Shipped weight: arxiv_paper_model.pth
  • This artifact packages the model created in the arXiv paper.
  • Vision encoder: facebook/dinov3-vits16-pretrain-lvd1689m
  • Text decoder: gpt2
  • Segmentation encoder: facebook/dinov3-convnext-small-pretrain-lvd1689m
  • Image size: 512
  • Example generation max new tokens: 100

Status

  • Project status: Legacy paper model packaged locally
  • Release status: Ready for later upload
  • Current checkpoint status: Report generator only

Contributors

manu02

13 commits