Skip to main content

Chest X-Ray Anatomy Segmentation

Installation

The project is available in PyPI. To install run:

pip install cxas

Models (weights download on first use from https://huggingface.co/cmseibold/cxas-models and https://huggingface.co/cmseibold/cxr-landmarks, MIT licence):

  • UNet_ResNet50_default: the original CXAS model, 159 structures (default of CXAS()).

  • M2F_anatomy_v2 (new in 0.1): Mask2Former anatomy models, one per view (frontal: 187 structures, lateral: 177), at native image resolution; the view is read from DICOM or detected.

  • Named landmarks (new in 0.1): 132 clinically curated landmark definitions, 311 view-specific structure-landmark pairs (cxas.landmarks.LandmarkDetector).

DICOM in, DICOM SEG + SR out (new in 0.1)

cxas_idc -i {DICOM file or directory} -o {output directory}

Per radiograph: one multi-segment DICOM SEG, a TID 1500 Structured Report with the landmarks, and a result.json. Uses the GPU when available (-g auto). Docker images: cseibold/cxas:0.1.0-cu128 (GPU or CPU) and cseibold/cxas:0.1.0-cpu.

Running Segmentation from terminal

Segment the anatomy of X-Ray images (.jpg,.png,.dcm) and store the results (npy,json,jpg,png,dicom-seg):

` cxas_segment -i {desired input directory or file} -o {desired output directory} `

Running Feature Extraction from terminal

Extract anatomical features from X-Ray images (.jpg,.png,.dcm) and store the results (.csv):

cxas_feat_extract -i {desired input directory or file} -o {desired output directory} -f {desired features to extract}

Running either from terminal

Extract anatomical features from X-Ray images (.jpg,.png,.dcm) and store the results (.csv):

cxas -i {desired input directory or file} -o {desired output directory} -mode {"segment" or "exract"} -f {required if mode == 'extract'}

Citation

If you use this work or dataset, please cite:

@inproceedings{Seibold_2022_BMVC,
    author    = {Constantin Marc Seibold and Simon Reiß and M. Saquib Sarfraz and Matthias A. Fink and Victoria Mayer and Jan Sellner and Moon Sung Kim and Klaus H. Maier-Hein and Jens Kleesiek and Rainer Stiefelhagen},
    title     = {Detailed Annotations of Chest X-Rays via CT Projection for Report Understanding},
    booktitle = {33rd British Machine Vision Conference 2022, {BMVC} 2022, London, UK, November 21-24, 2022},
    publisher = {{BMVA} Press},
    year      = {2022},
    url       = {https://bmvc2022.mpi-inf.mpg.de/0058.pdf}
}
@inproceedings{Seibold_2023_CXAS,
    author    = {Constantin Seibold, Alexander Jaus, Matthias Fink,
    Moon Kim, Simon Reiß, Jens Kleesiek*, Rainer Stiefelhagen*},
    title     = {Accurate Fine-Grained Segmentation of Human Anatomy in Radiographs via Volumetric Pseudo-Labeling},
    year      = {2023},
}

Metadata

Release files for cxas 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cxas 0.1.0
File Size Uploaded Provenance Actions
cxas-0.1.0.tar.gz 155.0 kB Without provenance Details for cxas-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cxas 0.1.0
File Interpreter ABI Platform Actions
cxas-0.1.0-py3-none-any.whl Python 3 none any Details for cxas-0.1.0-py3-none-any.whl

Total release size: 318.0 kB

Release files / cxas-0.1.0.tar.gz

Download URL cxas-0.1.0.tar.gz
Size 155.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3ed1b05672e7e3572aa35ab70ed39ea8581040b1c48e54768b14b6d2ebe58326
BLAKE2b-256 checksum
How to use checksums
19ccb9e03812e98b849547d2bfa0f0af99bf66251087910c7b737c54c3ca1016
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release files / cxas-0.1.0-py3-none-any.whl

Download URL cxas-0.1.0-py3-none-any.whl
Size 163.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2cc69f25be4e5e899fbc5ef924759bd3bf84bdbaaec761028af276d147ab9ea4
BLAKE2b-256 checksum
How to use checksums
a63a67df5d20c307aeb56507b28576b16e9ef82cc5f0366db5caf89fcbe2553f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Security for cxas 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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