$npx skillfedfor your agent

torchxrayvision

TorchXRayVision: A library of chest X-ray datasets and models

Worth itPyPI Medical Science Apps.Released Jun 202678.7K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — torchxrayvision-1.5.2-py3-none-any.whl
v1.5.2 · released 2026-06-28 · Python >=3.6 · 9 runtime deps: torch, torchvision, scikit-image, tqdm, numpy, pandas, requests, pillow

Yes. The package is actively maintained, has low install friction, carries permissive licensing, and directly solves a real problem in medical imaging research—standardizing access to multiple chest X-ray datasets and providing production-ready pre-trained models. It is well-suited for researchers and practitioners working with chest radiographs who want to avoid redundant model training and dataset engineering.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction install via wheel distribution.
  • Active maintenance with recent release (47 days ago) and steady repository activity.
  • Depends on torch, torchvision, and standard scientific Python stack (numpy, pandas, scikit-image, pillow, imageio), all widely available.

License · maintenance · safety

permissive license (permissive) — Permissive Apache license allows commercial and private use without restriction, making it suitable for both research and production medical imaging applications.

last release 2026-06-28 (47 days) · last repo commit 2026-08-01 · 1,183 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 78,708 downloads/mo, #14,417 on PyPI

Verify before relying

pip install torchxrayvision

import torchxrayvision as xrv
import torch, torchvision, skimage.io

img = skimage.io.imread("xray.jpg")
img = xrv.datasets.normalize(img, 255)
img = img.mean(2)[None, ...]
transform = torchvision.transforms.Compose([xrv.datasets.XRayCenterCrop(), xrv.datasets.XRayResizer(224)])
img = transform(img)
img = torch.from_numpy(img)

model = xrv.models.DenseNet(weights="densenet121-res224-all")
outputs = model(img[None,...])
  • Whether pre-trained model weights are automatically downloaded on first use or require manual setup
  • Memory and compute requirements for inference on typical hardware
  • Performance benchmarks against other medical imaging frameworks
Same gist for agents: .md · .json

What it is and what it does

TorchXRayVision is a PyTorch-based library for working with chest X-ray datasets and pre-trained deep learning models. It addresses two core problems in medical imaging research: avoiding redundant model training by providing models trained on large clinical cohorts, and standardizing dataset access so researchers can swap between multiple public chest X-ray datasets with a single line of code. The library includes DenseNet and ResNet models trained on datasets like NIH ChestX-ray8, CheXpert, MIMIC-CXR, and others, capable of detecting pathologies such as pneumonia, atelectasis, consolidation, and fractures.

The package wraps torch, torchvision, scikit-image, and image I/O libraries to provide dataset loaders, image preprocessing (normalization, cropping, resizing), and model inference. It also includes autoencoders for representation learning and segmentation models for anatomical landmark detection. Researchers can use pre-trained weights as baselines for rapid analysis or as feature extractors for few-shot learning tasks.

Use it for

  • Rapidly screen large cohorts of chest X-rays for pathology detection using pre-trained models without training from scratch
  • Extract learned features from X-ray images for downstream machine learning tasks or few-shot learning scenarios
  • Evaluate and compare new algorithms across multiple public chest X-ray datasets in a standardized way
  • Build anatomical segmentation pipelines to identify specific chest structures for clinical analysis
  • Prototype medical imaging research without managing dataset preprocessing and model weight distribution

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained, has low install friction, carries permissive licensing, and directly solves a real problem in medical imaging research—standardizing access to multiple chest X-ray datasets and providing production-ready pre-trained models. It is well-suited for researchers and practitioners working with chest radiographs who want to avoid redundant model training and dataset engineering.

Install

torchxrayvision on PyPI

Before you install

Low friction install via wheel distribution. Active maintenance with recent release (47 days ago) and steady repository activity. Depends on torch, torchvision, and standard scientific Python stack (numpy, pandas, scikit-image, pillow, imageio), all widely available.

License in practice

Permissive Apache license allows commercial and private use without restriction, making it suitable for both research and production medical imaging applications.

Quickstart

pip install torchxrayvision

import torchxrayvision as xrv
import torch, torchvision, skimage.io

img = skimage.io.imread("xray.jpg")
img = xrv.datasets.normalize(img, 255)
img = img.mean(2)[None, ...]
transform = torchvision.transforms.Compose([xrv.datasets.XRayCenterCrop(), xrv.datasets.XRayResizer(224)])
img = transform(img)
img = torch.from_numpy(img)

model = xrv.models.DenseNet(weights="densenet121-res224-all")
outputs = model(img[None,...])

Verify before relying

  • Whether pre-trained model weights are automatically downloaded on first use or require manual setup
  • Memory and compute requirements for inference on typical hardware
  • Performance benchmarks against other medical imaging frameworks

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.6
Install frictionLow. Pure-Python wheel
Runtime dependencies
9 packages
torchtorchvisionscikit-imagetqdmnumpypandasrequestspillowimageio
MaintenanceActively maintained 47 days since the last release
Last repo commit
First released
Downloads78,708 / month, #14,417 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Scientific/Engineering :: Medical Science Apps.

Evidence: torchxrayvision-1.5.2-py3-none-any.whl

Tags

Capabilities
chest x-ray deep learningmedical image classification pytorchpretrained radiology modelsx-ray dataset loaderchest pathology detectionmedical imaging feature extractionradiograph analysis models
Topics
medical-imagingdeep-learningradiology

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “chest x-ray deep learning”

Give your agent the search over MCP, or paste the wish link into any chat.

More Medical Science Apps. packages

firecrawl-py Worth it
PyPI · Software Development · released Aug 2026

Client library for the Firecrawl API that scrapes, crawls, and searches the web, returning clean Markdown or structured data; also indexes research papers from PubMed, bioRxiv, medRxiv, and arXiv.

MITpure Python · 3.8+
7.3Mdownloads / mo
pydicom Worth it
PyPI · Libraries · released Mar 2026

Pydicom reads, modifies, and writes DICOM medical imaging files in pure Python, with optional NumPy support for pixel data as arrays.

Install it if you work with medical imaging data, DICOM files, or healthcare IT systems.

MITpure Python · 3.10+
5.5Mdownloads / mo
PubChemPy Worth it
PyPI · Scientific/Engineering · released Sep 2025

PubChemPy is a Python wrapper around the PubChem REST API that lets you search for chemical compounds by name, substructure, or similarity, retrieve their properties, and convert between chemical file formats.

Install it if you need programmatic access to PubChem data.

MITpure Python · 3.10+aging
5.4Mdownloads / mo
vtk With conditions
PyPI · Libraries · released May 2026

VTK is a 3D graphics, image processing, and visualization toolkit that provides algorithms for surface reconstruction, volume rendering, and advanced rendering techniques.

BSD-3-Clausecompiled wheel
3.1Mdownloads / mo
pyhmmer Worth it
PyPI · Bio-Informatics · released Aug 2026

PyHMMER provides Python bindings to HMMER3, a biological sequence analysis tool that uses profile hidden Markov models to search for sequence homologs in protein or DNA databases.

MIT AND BSD-3-Clause AND BSD-2-Clausecompiled wheel · 3.7+
1.6Mdownloads / mo
firecrawl Worth it
PyPI · Software Development · released Aug 2026

A Python SDK for web scraping, crawling, searching, and extracting structured data from websites and research papers via the Firecrawl API, returning results as clean Markdown, HTML, or typed objects.

MITpure Python · 3.8+
1.5Mdownloads / mo

See also torchgeo · torchvision · efficientnet-pytorch · timm · pytorchcv · segmentation-models-pytorch · TotalSegmentator · monai · torchtext · hl7