Skip to main content

MD.ai Python Client Library

The python client library is designed to work with the datasets and annotations generated by the MD.ai Medical AI platform.

You can download datasets consisting of images and annotations (i.e., JSON file), create train/validation/test datasets, integrate with various machine learing libraries (e.g., TensorFlow/Keras, Fast.ai) for developing machine learning algorithms.

To get started, check out the examples in the notebooks section, or our intro to deep learning for medical imaging lessons.

Installation

Requires Python 3.9+. Install and update using pip:

pip install --upgrade mdai

Documentation

Documentation is available at: https://docs.md.ai/annotator/python/installation/

MD.ai Annotator

The MD.ai annotator is a powerful web based application, to store and view anonymized medical images (e.g, DICOM) on the cloud, create annotations collaboratively, in real-time, and export annotations, images and labels for training. The MD.ai python client library can be used to download images and annotations, prepare the datasets, and then used to train and evaluate deep learning models.

MD.ai Annotation JSON Format

More detailed information regarding the annotation JSON export format, see: https://docs.md.ai/annotator/data/json/

Example Notebooks

Introductory lessons to Deep Learning for medical imaging by MD.ai

The following are several Jupyter notebooks covering the basics of downloading and parsing annotation data, and training and evaluating different deep learning models for classification, semantic and instance segmentation and object detection problems in the medical imaging domain. The notebooks can be run on Google's colab with GPU (see instruction below).

  • Lesson 1. Classification of chest vs. adominal X-rays using TensorFlow/Keras Github | Annotator
  • Lesson 2. Lung X-Rays Semantic Segmentation using UNets. Github | Annotator
  • Lesson 3. RSNA Pneumonia detection using Kaggle data format Github | Annotator
  • Lesson 3. RSNA Pneumonia detection using MD.ai python client library Github | Annotator

Contributing

See contributing guidelines to set up a development environemnt and how to make contributions to mdai.

Running Jupyter notebooks Colab

It’s easy to run a Jupyter notebook on Google's Colab with free GPU use (time limited). For example, you can add the Github jupyter notebook path to https://colab.research.google.com/notebook: Select the "GITHUB" tab, and add the Lesson 1 URL: https://github.com/mdai/ml-lessons/blob/master/lesson1-xray-images-classification.ipynb

To use the GPU, in the notebook menu, go to Runtime -> Change runtime type -> switch to Python 3, and turn on GPU. See more colab tips.


© 2025 MD.ai, Inc.

Metadata

Release files for mdai 0.16.2

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

Source distribution (sdist)

Source distribution for mdai 0.16.2
File Size Uploaded Provenance Actions
mdai-0.16.2.tar.gz 279.6 kB Without provenance Details for mdai-0.16.2.tar.gz

Built distribution (wheel)

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

Total release size: 560.1 kB

Release files / mdai-0.16.2.tar.gz

Download URL mdai-0.16.2.tar.gz
Size 279.6 kB
Tags Source
SHA-256 checksum
How to use checksums
501b28daa6f87b5d95f07e81ad8a3cb793a1b3bfd7316deb0c58a79cd051a7c3
BLAKE2b-256 checksum
How to use checksums
123f793cac61525523bd8403feed1cecb1be076f954874225d73ebcba88d363d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.9.22 Linux/7.0.0-1016-aws

Release files / mdai-0.16.2-py3-none-any.whl

Download URL mdai-0.16.2-py3-none-any.whl
Size 280.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9b7f4efdac571af6b6eee925d2b3487af75b4c1a2ce9dd678769f7b33d11280
BLAKE2b-256 checksum
How to use checksums
4509d18198a85f8db9565d84b8ae0c078512f142e67596ced9d7226708196056
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.9.22 Linux/7.0.0-1016-aws

Security for mdai 0.16.2

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.

Release history Release notifications | RSS feed

This release

0.16.2 This release

2 release files No provenance

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