RadGraph-IT 🇮🇹
RadGraph graph inference for Italian radiology reports, with output in the canonical RadGraph-XL format.
radgraphit takes one or more Italian radiology reports, runs the Italian DyGIE v2 model
(PyTorch: shared encoder, span extractor, NER head, and relation head), and returns the graph of
entities and relations as the RadGraph-XL-compatible dictionary.
- Package / import / CLI name:
radgraphit· Python:>= 3.10· Device: CPU or CUDA - Model: downloaded automatically from pinned Hugging Face revisions on first use (~445 MB / 424 MiB plus small tokenizer/config files, then cached)
Installation
pip install radgraphit
Usage — Python API
from radgraphit import RadGraphIT
predictor = RadGraphIT()
annotations = predictor.predict(
"Non si evidenziano segni di pneumotorace dopo la rimozione del drenaggio toracico."
)
predict accepts a string or a sequence of strings and preserves order.
predictor(report) is an alias for predictor.predict(report):
annotations = predictor(["referto 1", "referto 2"]) # batch, order preserved
Usage — CLI
# report as an argument
radgraphit predict "Non si evidenzia pneumotorace."
# from a file (one report per line), or from stdin
radgraphit predict --input-file reports.txt
echo "Nessuna evidenza di pneumotorace." | radgraphit predict
The result is written as JSON to stdout.
Output
For the input ["Non si evidenzia pneumotorace ..."] the output has this shape (top-level keys
"0", "1", … in input order):
{
"0": {
"text": "<normalized tokens, space-separated>",
"entities": {
"1": {
"tokens": "<span tokens>",
"label": "Observation::definitely absent",
"start_ix": 3,
"end_ix": 3,
"relations": [["located_at", "2"]],
}
},
"data_source": None,
"data_split": "inference",
},
"1": {"...": "..."},
}
- The indices (
start_ix,end_ix) are token-level, zero-based, and inclusive. - Relations are directed source → target lists
[label, target_entity_id]. - The output is deterministic: entities and relations are stably ordered.
Citation
The output format and the serializer derive from the official RadGraph / RadGraph-XL package
(see Third-Party). If you use this package, please cite
both this work and the RadGraph-XL paper:
@software{radgraphit,
author = "Daniel Rabottini and Edoardo Avenia and Rocco Angelella",
title = "{RadGraph-IT}: {RadGraph} graph inference for {Italian} radiology reports",
year = "2026",
version = "1.0.0",
url = "https://github.com/therabo/RadGraph-IT",
}
@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",
booktitle = "Findings of the Association for Computational Linguistics ACL 2024",
year = "2024",
url = "https://aclanthology.org/2024.findings-acl.765",
pages = "12902--12915",
}
License
See the MIT License and Third-Party notices.
Not a medical device. The output is an automatic extraction of entities and relations from text and does not constitute a diagnosis, a report, or a clinical opinion.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file radgraph_it-1.0.0.tar.gz.
File metadata
- Download URL: radgraph_it-1.0.0.tar.gz
- Upload date:
- Size: 36.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26e131fbe7e722dd4a14c4fb6714d46bf70b63563a45c375ee9a52927afeb3b9
|
|
| MD5 |
66a30e50960fe22477474387073526d3
|
|
| BLAKE2b-256 |
b8ed4137b9c4e7bcd5b11280dbe5d67049e6063e3cf093fac955f354dd35146e
|
Provenance
The following attestation bundles were made for radgraph_it-1.0.0.tar.gz:
Publisher:
workflow.yml on therabo/RadGraph-IT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
radgraph_it-1.0.0.tar.gz -
Subject digest:
26e131fbe7e722dd4a14c4fb6714d46bf70b63563a45c375ee9a52927afeb3b9 - Sigstore transparency entry: 2269924771
- Sigstore integration time:
-
Permalink:
therabo/RadGraph-IT@63976282b5fe37cccdc8a2a67b3791a613dadfc4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/therabo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@63976282b5fe37cccdc8a2a67b3791a613dadfc4 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file radgraph_it-1.0.0-py3-none-any.whl.
File metadata
- Download URL: radgraph_it-1.0.0-py3-none-any.whl
- Upload date:
- Size: 47.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95e2a6c9b2164508ca83d2daa2ec50b211ebe0579b4298cb17875572e5e26a12
|
|
| MD5 |
99532b80bc29e13c58fb060219c5ad72
|
|
| BLAKE2b-256 |
dcd4a022457feb0dbe4a57b69875178a7ec1ae4305484aa95a6f99416a9b1d1b
|
Provenance
The following attestation bundles were made for radgraph_it-1.0.0-py3-none-any.whl:
Publisher:
workflow.yml on therabo/RadGraph-IT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
radgraph_it-1.0.0-py3-none-any.whl -
Subject digest:
95e2a6c9b2164508ca83d2daa2ec50b211ebe0579b4298cb17875572e5e26a12 - Sigstore transparency entry: 2269925248
- Sigstore integration time:
-
Permalink:
therabo/RadGraph-IT@63976282b5fe37cccdc8a2a67b3791a613dadfc4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/therabo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@63976282b5fe37cccdc8a2a67b3791a613dadfc4 -
Trigger Event:
workflow_dispatch
-
Statement type: