# mlmed/torchxrayvision

TorchXRayVision: A library of chest X-ray datasets and models. Classifiers, segmentation, and autoencoders.

Repository: https://github.com/mlmed/torchxrayvision
Canonical: https://ross.abutalabs.com/products/torchxrayvision
Homepage: https://mlmed.org/torchxrayvision
Language: Jupyter Notebook
License: NOASSERTION
License Family: other
Topics: medical-imaging, medical-ai, deep-learning, machine-learning, transfer-learning, dataset, image-classification, medical-image-processing, medical-application, medical, medical-image-analysis, chest-xray, chest-radiographs, cxr, cxr-images, chest-xray-images, pytorch, torchxrayvision, foundation-models
Last push: 2026-08-24T20:09:34+00:00

## Health v2 (maintenance only)
Score: 91/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 75, longevity 100
- inputs: {"age_days": 2373, "days_push": 9, "days_rel": 9, "gap_med": 92.0, "n_releases_24m": 7}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1183, forks 256 (observed 2026-08-28T04:03:54.557225+00:00)

## What it is
TorchXRayVision is an open-source PyTorch library providing pre-trained deep learning models and a unified interface for publicly available chest X-ray datasets. It bundles classifiers for pathology detection, segmentation models, autoencoders, and feature extractors with consistent preprocessing so models and datasets can be swapped with minimal code changes.

## Use cases
- classify chest X-rays for pathologies like pneumonia, cardiomegaly, and pneumothorax without training from scratch
- extract feature vectors from chest radiographs for few-shot or transfer learning
- load and preprocess multiple public chest X-ray datasets through one uniform interface
- evaluate model robustness across external datasets and distributional shifts
- use pre-trained models as baselines for new medical imaging research
- segment anatomical structures in chest radiographs
- run inference on DICOM or JPEG X-ray images in a Python pipeline

## When to choose
- you need pre-trained chest X-ray models for research, prototyping, or feature extraction
- you want to benchmark across many public CXR datasets with consistent preprocessing
- you are building a PyTorch pipeline and want differentiable models that integrate seamlessly
- you need rapid analysis of large radiograph cohorts without training from scratch

## When to avoid
- you need a clinically validated diagnostic tool - the library is explicitly not for medical or clinical decision making
- you work with imaging modalities other than chest X-rays
- you need a non-PyTorch framework like TensorFlow or ONNX-only deployment
- you require guaranteed trained outputs for every pathology label - some model heads may be untrained

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, deep-learning, image-processing, computer-vision, sdk
- domain: healthcare, machine-learning, deep-learning
- platform: python, cross-platform
- tags: chest-xray, medical-imaging, pytorch, pretrained-models, transfer-learning, feature-extraction, radiology, dataset-loading, pathology-classification, segmentation, autoencoder, research-tool, not-for-clinical-use, research, gpu

## Member repositories
- mlmed/torchxrayvision (main) score 91

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:54.557225+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:24:37.004136+00:00, confidence not recorded.
  - readme: https://github.com/mlmed/torchxrayvision (fetched 2026-08-28T04:03:54.557225+00:00, sha 548f31e5f867)
  - homepage: https://mlmed.org/torchxrayvision (fetched 2026-08-29T12:31:50.608179+00:00, sha 291ae7185d21)
  - registry_pypi: https://pypi.org/pypi/torchxrayvision/json (fetched 2026-08-29T12:31:50.622847+00:00, sha ac651fc75c6b)
  - site_page: https://mlmed.org/torchxrayvision/models.html (fetched 2026-08-29T12:31:50.618015+00:00, sha cf337a0d8db5)
  - site_page: https://mlmed.org/torchxrayvision/faq.html (fetched 2026-08-29T12:31:50.620986+00:00, sha 219451ac9d3b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
