Skip to main content

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.

  • PyPI distribution: RadGraph-IT · Import / CLI: 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 RadGraph-IT

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.1",
    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

radgraph_it-1.0.1.tar.gz (36.4 kB view details)

Uploaded Source

Built Distribution

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

radgraph_it-1.0.1-py3-none-any.whl (47.3 kB view details)

Uploaded Python 3

File details

Details for the file radgraph_it-1.0.1.tar.gz.

File metadata

  • Download URL: radgraph_it-1.0.1.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for radgraph_it-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2f78c2150b0534679f0fc76775e2acef5e4604b55cf7fca801a0657ee1eac7cb
MD5 d6fba7b8f0b630ee328c684353901510
BLAKE2b-256 0de5e7ad1f36758738d90c8214aa4dc03a1995857dc76952deb0ffcbe2697017

See more details on using hashes here.

Provenance

The following attestation bundles were made for radgraph_it-1.0.1.tar.gz:

Publisher: workflow.yml on therabo/RadGraph-IT

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file radgraph_it-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: radgraph_it-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 47.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for radgraph_it-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c79c9c87c83ac85c9a4ac3c844285070c8d1cc99f61a83631aedd47585f69528
MD5 dfb320202fa5419334db879437857939
BLAKE2b-256 aacaf63263d10d0cbff26345c77a4bedcc3d9e7c6b29521120b9a4f41d5d7795

See more details on using hashes here.

Provenance

The following attestation bundles were made for radgraph_it-1.0.1-py3-none-any.whl:

Publisher: workflow.yml on therabo/RadGraph-IT

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page