Skip to main content

GEMA-Score: structured evaluation of candidate vs reference radiology reports.

Project description

gemascore

Evaluate a candidate radiology report against a reference report using a Hugging Face hosted (or locally cached) GEMA-Score distilled model.

Install

pip install gemascore

Python usage

from gemascore import evaluate_report

candidate = "no pneumothorax. mediastinal contours normal. patchy right nodular mid lung zone opacity."
reference = "no pneumothorax. mediastinum upper limits of normal in size. patchy bilateral ground-glass opacities, consolidation, or edema."

text = evaluate_report(
    candidate_report=candidate,
    reference_report=reference,
    model="ct-qwen",  # ct-qwen / ct-llama / xray-qwen / xray-llama
    cache_dir="/data/hf_cache",  # user path like model_path="/data/models/GEMA-Score-distilled-CT-Qwen"
)
print(text)

CLI usage

gemascore \
  --candidate "no pneumothorax..." \
  --reference "no pneumothorax..." \
  --cache-dir /data/hf_cache # user path

Notes

First run may download several GB of model weights. If you already have a local checkpoint folder containing model.safetensors, pass --model-path instead.

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

gemascore-0.1.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

gemascore-0.1.1-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file gemascore-0.1.1.tar.gz.

File metadata

  • Download URL: gemascore-0.1.1.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.21

File hashes

Hashes for gemascore-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fea5abb783c2c367fcb2b38a636828e9206e677c77e531e5d460b425705c8a32
MD5 2e789b4591f6d37e00c0b8f76d3b1b02
BLAKE2b-256 9e9f230c7e1cb75703c6eae09bdfdf7504440847685464df58aea4e482e2f44a

See more details on using hashes here.

File details

Details for the file gemascore-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gemascore-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.21

File hashes

Hashes for gemascore-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 165dcea493ba7000aa0ef8035d802fc729ce92908d9481956e25dca626e917b8
MD5 67eed77f87a71ec2131a05d2f6096bad
BLAKE2b-256 6617b17b2715163d19bc9a8c3e7d1b12086a994bcead621f347c97ea341bc2b4

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