npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

chest-xray-diagnosis

v1.0.1

Published

AI-powered chest X-ray diagnostic assistant — auto-installs the Python backend and launches the API server via npx.

Readme

chest-xray-diagnosis (NPM)

An AI-powered medical diagnostic system for chest X-ray analysis, designed to be launched instantly via NPM.

This is a Node.js wrapper around the Python chest-xray-diagnosis package. It gives front-end and Node developers zero-config access to a powerful PyTorch X-ray diagnostic backend.


🚀 Quick Start (Zero Config)

Run the API server instantly:

npx chest-xray-diagnosis serve --port 8000

What happens under the hood?

  1. Detects if you have Python 3.9+ installed.
  2. Automatically creates an isolated virtual environment at ~/.chexray-diagnosis/venv/.
  3. Installs the core Python machine learning libraries (PyTorch, FastAPI, etc.).
  4. Downloads the pre-trained X-ray model weights (~230 MB) from HuggingFace Hub.
  5. Launches the REST API server!

📋 Prerequisites

  • Node.js 16+
  • Python 3.9+ installed on your system
  • (Optional) API Keys:

Note: The core ML analysis (disease detection & heatmaps) works 100% locally without any API keys!


💻 CLI Commands

You can use npx to run any of the underlying CLI commands:

Start the API Server

npx chest-xray-diagnosis serve --port 8000

Configure API Keys (Interactive Wizard)

npx chest-xray-diagnosis setup

Securely saves your API keys so the local server can use Gemini and Geoapify.

Pre-Download Models

npx chest-xray-diagnosis download-models

Manually downloads the PyTorch model weights to your local cache.

Analyze a Single Image from Terminal

npx chest-xray-diagnosis analyze path/to/xray.png

🧠 What it does

When an image is sent to the server, it runs through a powerful 4-stage pipeline:

  1. Binary Pipeline: Validates the image (is it garbage? is it a chest?).
  2. CheXNet (DenseNet-121): Detects 14 different lung pathologies (Pneumonia, Mass, Effusion, etc.).
  3. Grad-CAM++: Generates a visual heatmap (returned as base64) highlighting the diseased areas of the lung.
  4. Gemini AI: Generates a patient-friendly clinical explanation of the findings.

License & Disclaimer

MIT License.

Medical Disclaimer: For research and educational use only. Not a substitute for professional medical diagnosis. Always consult a qualified healthcare provider.