radgraph


Nameradgraph JSON
Version 0.1.13 PyPI version JSON
download
home_pagehttps://github.com/Stanford-AIMI/radgraph
SummaryNone
upload_time2024-12-10 23:59:47
maintainerNone
docs_urlNone
authorJean-Benoit Delbrouck
requires_python<3.11,>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            RadGraph
=========
Requirements:

python_requires='>=3.8,<3.11

```
'torch==2.3'
'transformers==4.39.0'
"appdirs"
'jsonpickle'
'filelock'
'h5py'
'spacy'
'nltk'
'pytest'
```
Testing:
```python
pytest
```

Official package as per:

```bibtex
@inproceedings{delbrouck-etal-2024-radgraph,
    title = "{R}ad{G}raph-{XL}: A Large-Scale Expert-Annotated Dataset for Entity and Relation Extraction from Radiology Reports",
    author = "Delbrouck, Jean-Benoit  and
      Chambon, Pierre  and
      Chen, Zhihong  and
      Varma, Maya  and
      Johnston, Andrew  and
      Blankemeier, Louis  and
      Van Veen, Dave  and
      Bui, Tan  and
      Truong, Steven  and
      Langlotz, Curtis",
    editor = "Ku, Lun-Wei  and
      Martins, Andre  and
      Srikumar, Vivek",
    booktitle = "Findings of the Association for Computational Linguistics ACL 2024",
    month = aug,
    year = "2024",
    address = "Bangkok, Thailand and virtual meeting",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2024.findings-acl.765",
    pages = "12902--12915",
    }
```

Usage:
```python
from radgraph import RadGraph, F1RadGraph
radgraph = RadGraph()
annotations = radgraph(["no evidence of acute cardiopulmonary process moderate hiatal hernia"])
```

F1RadGraph as per:

```bibtex
@inproceedings{delbrouck-etal-2022-improving,
    title = "Improving the Factual Correctness of Radiology Report Generation with Semantic Rewards",
    author = "Delbrouck, Jean-Benoit  and
      Chambon, Pierre  and
      Bluethgen, Christian  and
      Tsai, Emily  and
      Almusa, Omar  and
      Langlotz, Curtis",
    booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2022",
    month = dec,
    year = "2022",
    address = "Abu Dhabi, United Arab Emirates",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.findings-emnlp.319",
    pages = "4348--4360",
    abstract = "Neural image-to-text radiology report generation systems offer the potential to improve radiology reporting by reducing the repetitive process of report drafting and identifying possible medical errors. These systems have achieved promising performance as measured by widely used NLG metrics such as BLEU and CIDEr. However, the current systems face important limitations. First, they present an increased complexity in architecture that offers only marginal improvements on NLG metrics. Secondly, these systems that achieve high performance on these metrics are not always factually complete or consistent due to both inadequate training and evaluation. Recent studies have shown the systems can be substantially improved by using new methods encouraging 1) the generation of domain entities consistent with the reference and 2) describing these entities in inferentially consistent ways. So far, these methods rely on weakly-supervised approaches (rule-based) and named entity recognition systems that are not specific to the chest X-ray domain. To overcome this limitation, we propose a new method, the RadGraph reward, to further improve the factual completeness and correctness of generated radiology reports. More precisely, we leverage the RadGraph dataset containing annotated chest X-ray reports with entities and relations between entities. On two open radiology report datasets, our system substantially improves the scores up to 14.2{\%} and 25.3{\%} on metrics evaluating the factual correctness and completeness of reports.",
}
```
Usage:
```python
from radgraph import F1RadGraph
refs = ["no acute cardiopulmonary abnormality",
        "et tube terminates 2 cm above the carina retraction by several centimeters is recommended for more optimal placement bibasilar consolidations better assessed on concurrent chest ct"
]

hyps = ["no acute cardiopulmonary abnormality",
        "endotracheal tube terminates 2 5 cm above the carina bibasilar opacities likely represent atelectasis or aspiration",
]
f1radgraph = F1RadGraph(reward_level="all")
mean_reward, reward_list, hypothesis_annotation_lists, reference_annotation_lists = f1radgraph(hyps=hyps, refs=refs)

```


For info, radgraph v1 is:

```bibtex
@inproceedings{NEURIPS DATASETS AND BENCHMARKS2021_c8ffe9a5,
 author = {Jain, Saahil and Agrawal, Ashwin and Saporta, Adriel and Truong, Steven and Duong, Du Nguyen Duong Nguyen and Bui, Tan and Chambon, Pierre and Zhang, Yuhao and Lungren, Matthew and Ng, Andrew and Langlotz, Curtis and Rajpurkar, Pranav and Rajpurkar, Pranav},
 booktitle = {Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks},
 editor = {J. Vanschoren and S. Yeung},
 pages = {},
 publisher = {Curran},
 title = {RadGraph: Extracting Clinical Entities and Relations from Radiology Reports},
 url = {https://datasets-benchmarks-proceedings.neurips.cc/paper_files/paper/2021/file/c8ffe9a587b126f152ed3d89a146b445-Paper-round1.pdf},
 volume = {1},
 year = {2021}
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Stanford-AIMI/radgraph",
    "name": "radgraph",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.11,>=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Jean-Benoit Delbrouck",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/9a/8a/89de2e2742ba06f228bd92dc94955d884f88af3fec8529ef4f833ade0568/radgraph-0.1.13.tar.gz",
    "platform": null,
    "description": "RadGraph\n=========\nRequirements:\n\npython_requires='>=3.8,<3.11\n\n```\n'torch==2.3'\n'transformers==4.39.0'\n\"appdirs\"\n'jsonpickle'\n'filelock'\n'h5py'\n'spacy'\n'nltk'\n'pytest'\n```\nTesting:\n```python\npytest\n```\n\nOfficial package as per:\n\n```bibtex\n@inproceedings{delbrouck-etal-2024-radgraph,\n    title = \"{R}ad{G}raph-{XL}: A Large-Scale Expert-Annotated Dataset for Entity and Relation Extraction from Radiology Reports\",\n    author = \"Delbrouck, Jean-Benoit  and\n      Chambon, Pierre  and\n      Chen, Zhihong  and\n      Varma, Maya  and\n      Johnston, Andrew  and\n      Blankemeier, Louis  and\n      Van Veen, Dave  and\n      Bui, Tan  and\n      Truong, Steven  and\n      Langlotz, Curtis\",\n    editor = \"Ku, Lun-Wei  and\n      Martins, Andre  and\n      Srikumar, Vivek\",\n    booktitle = \"Findings of the Association for Computational Linguistics ACL 2024\",\n    month = aug,\n    year = \"2024\",\n    address = \"Bangkok, Thailand and virtual meeting\",\n    publisher = \"Association for Computational Linguistics\",\n    url = \"https://aclanthology.org/2024.findings-acl.765\",\n    pages = \"12902--12915\",\n    }\n```\n\nUsage:\n```python\nfrom radgraph import RadGraph, F1RadGraph\nradgraph = RadGraph()\nannotations = radgraph([\"no evidence of acute cardiopulmonary process moderate hiatal hernia\"])\n```\n\nF1RadGraph as per:\n\n```bibtex\n@inproceedings{delbrouck-etal-2022-improving,\n    title = \"Improving the Factual Correctness of Radiology Report Generation with Semantic Rewards\",\n    author = \"Delbrouck, Jean-Benoit  and\n      Chambon, Pierre  and\n      Bluethgen, Christian  and\n      Tsai, Emily  and\n      Almusa, Omar  and\n      Langlotz, Curtis\",\n    booktitle = \"Findings of the Association for Computational Linguistics: EMNLP 2022\",\n    month = dec,\n    year = \"2022\",\n    address = \"Abu Dhabi, United Arab Emirates\",\n    publisher = \"Association for Computational Linguistics\",\n    url = \"https://aclanthology.org/2022.findings-emnlp.319\",\n    pages = \"4348--4360\",\n    abstract = \"Neural image-to-text radiology report generation systems offer the potential to improve radiology reporting by reducing the repetitive process of report drafting and identifying possible medical errors. These systems have achieved promising performance as measured by widely used NLG metrics such as BLEU and CIDEr. However, the current systems face important limitations. First, they present an increased complexity in architecture that offers only marginal improvements on NLG metrics. Secondly, these systems that achieve high performance on these metrics are not always factually complete or consistent due to both inadequate training and evaluation. Recent studies have shown the systems can be substantially improved by using new methods encouraging 1) the generation of domain entities consistent with the reference and 2) describing these entities in inferentially consistent ways. So far, these methods rely on weakly-supervised approaches (rule-based) and named entity recognition systems that are not specific to the chest X-ray domain. To overcome this limitation, we propose a new method, the RadGraph reward, to further improve the factual completeness and correctness of generated radiology reports. More precisely, we leverage the RadGraph dataset containing annotated chest X-ray reports with entities and relations between entities. On two open radiology report datasets, our system substantially improves the scores up to 14.2{\\%} and 25.3{\\%} on metrics evaluating the factual correctness and completeness of reports.\",\n}\n```\nUsage:\n```python\nfrom radgraph import F1RadGraph\nrefs = [\"no acute cardiopulmonary abnormality\",\n        \"et tube terminates 2 cm above the carina retraction by several centimeters is recommended for more optimal placement bibasilar consolidations better assessed on concurrent chest ct\"\n]\n\nhyps = [\"no acute cardiopulmonary abnormality\",\n        \"endotracheal tube terminates 2 5 cm above the carina bibasilar opacities likely represent atelectasis or aspiration\",\n]\nf1radgraph = F1RadGraph(reward_level=\"all\")\nmean_reward, reward_list, hypothesis_annotation_lists, reference_annotation_lists = f1radgraph(hyps=hyps, refs=refs)\n\n```\n\n\nFor info, radgraph v1 is:\n\n```bibtex\n@inproceedings{NEURIPS DATASETS AND BENCHMARKS2021_c8ffe9a5,\n author = {Jain, Saahil and Agrawal, Ashwin and Saporta, Adriel and Truong, Steven and Duong, Du Nguyen Duong Nguyen and Bui, Tan and Chambon, Pierre and Zhang, Yuhao and Lungren, Matthew and Ng, Andrew and Langlotz, Curtis and Rajpurkar, Pranav and Rajpurkar, Pranav},\n booktitle = {Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks},\n editor = {J. Vanschoren and S. Yeung},\n pages = {},\n publisher = {Curran},\n title = {RadGraph: Extracting Clinical Entities and Relations from Radiology Reports},\n url = {https://datasets-benchmarks-proceedings.neurips.cc/paper_files/paper/2021/file/c8ffe9a587b126f152ed3d89a146b445-Paper-round1.pdf},\n volume = {1},\n year = {2021}\n}\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": null,
    "version": "0.1.13",
    "project_urls": {
        "Homepage": "https://github.com/Stanford-AIMI/radgraph"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9a8a89de2e2742ba06f228bd92dc94955d884f88af3fec8529ef4f833ade0568",
                "md5": "bf5eeebd9b99a239b35925dd2256e6b2",
                "sha256": "b9ebe33e32c30076491ec4e48ad50d2efdc27ae679edb5b2f1b1a148e959bf5c"
            },
            "downloads": -1,
            "filename": "radgraph-0.1.13.tar.gz",
            "has_sig": false,
            "md5_digest": "bf5eeebd9b99a239b35925dd2256e6b2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.11,>=3.8",
            "size": 595237,
            "upload_time": "2024-12-10T23:59:47",
            "upload_time_iso_8601": "2024-12-10T23:59:47.229222Z",
            "url": "https://files.pythonhosted.org/packages/9a/8a/89de2e2742ba06f228bd92dc94955d884f88af3fec8529ef4f833ade0568/radgraph-0.1.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-10 23:59:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Stanford-AIMI",
    "github_project": "radgraph",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "radgraph"
}
        
Elapsed time: 0.49016s