Skip to main content

Composite metrics for chest X-ray report (CXR) generation.

Project description

rad-metric

Composite metrics for chest X-ray report (CXR) generation.

Supported metrics:

  • BLEU
  • BertScore
  • SembScore
  • CheXbert
  • RadGraph
  • RaTEScore

Setup

Run the following script to setup environment:

conda create -n rad python=3.12
conda activate rad
pip3 install -r requirements.txt

Usage

We use ray to initialize the evaluation workers, CPU for BLEU and GPU for the rest. By default, it will use all the available GPU devices in the current machine. If you want to run this metric software on multi-node cluster, initialize ray yourself and add more nodes as you need.

Refer to example.py for example usages.

Reference

Please prioritize to cite the original contributors of each metric.

BLEU:

@inproceedings{bleu02,
  year = {2002},
  url = {https://doi.org/10.3115/1073083.1073135},
  author = {Papineni, Kishore and Roukos, Salim and Ward, Todd and Zhu, Wei-Jing},
  booktitle = {Annual Meeting of the Association for Computational Linguistics (ACL)},
  title = {{{BLEU}}: A Method for Automatic Evaluation of Machine Translation}
}

RadGraph

@inproceedings{jainRadGraphExtractingClinical2021,
  year = {2021},
  url = {https://doi.org/10.48550/arXiv.2106.14463},
  author = {Jain, Saahil and Agrawal, Ashwin and Saporta, Adriel and Truong, Steven QH and Duong, Du Nguyen and Bui, Tan and Chambon, Pierre and Zhang, Yuhao and Lungren, Matthew P. and Ng, Andrew Y. and Langlotz, Curtis P. and Rajpurkar, Pranav},
  booktitle = {Conference on Neural Information Processing Systems (NeurIPS)},
  title = {{{RadGraph}}: {{Extracting Clinical Entities}} and {{Relations}} from {{Radiology Reports}}}
}

SembScore and F1CheXbert

@inproceedings{smitCheXbertCombiningAutomatic2020,
  year = {2020},
  url = {https://doi.org/10.48550/arXiv.2004.09167},
  author = {Smit, Akshay and Jain, Saahil and Rajpurkar, Pranav and Pareek, Anuj and Ng, Andrew Y. and Lungren, Matthew P.},
  booktitle = {Conference on Empirical Methods in Natural Language Processing (EMNLP)},
  title = {{{CheXbert}}: {{Combining Automatic Labelers}} and {{Expert Annotations}} for {{Accurate Radiology Report Labeling Using BERT}}}
}

RaTEScore

@inproceedings{zhaoRaTEScoreMetricRadiology2024,
  year = {2024},
  url = {https://doi.org/10.18653/v1/2024.emnlp-main.836},
  author = {Zhao, Weike and Wu, Chaoyi and Zhang, Xiaoman and Zhang, Ya and Wang, Yanfeng and Xie, Weidi},
  booktitle = {Conference on Empirical Methods in Natural Language Processing (EMNLP)},
  title = {{{RaTEScore}}: {{A Metric}} for {{Radiology Report Generation}}}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rad_metric-0.1.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rad_metric-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file rad_metric-0.1.0.tar.gz.

File metadata

  • Download URL: rad_metric-0.1.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for rad_metric-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a3537b97d3d035e215019806e9b5cf406c5f03289b4582596d7681d33ef113d6
MD5 524c66022d7d85b725d48b081181c873
BLAKE2b-256 8bd663869f0fb29498285d7f8145c64e834b98320221899024df9a50ba3c697d

See more details on using hashes here.

File details

Details for the file rad_metric-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rad_metric-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for rad_metric-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff72256e17f7fa66de1c015a0a0d28961ebebfb7a2ea8865f8c9412df968d6e8
MD5 ba357f355897f7bada7af2431674913a
BLAKE2b-256 4b5722c122c695432e65f88c2414ae014af5d00c01ab4a3b46b68568d0749be2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page