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.1

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.1
File Size Uploaded Provenance Actions
mdai-0.16.1.tar.gz 279.4 kB Without provenance Details for mdai-0.16.1.tar.gz

Built distribution (wheel)

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

Total release size: 559.9 kB

Release files / mdai-0.16.1.tar.gz

Download URL mdai-0.16.1.tar.gz
Size 279.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bb28c7e8d3bf9cdd1df9585405e5c7df5fc0ae8f1dcae321cde3eaa360b47c42
BLAKE2b-256 checksum
How to use checksums
ee1b8757ad1ea703ec6b045a1716f82507e5dbd08b0feb65aadd2927a916d22a
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.1-py3-none-any.whl

Download URL mdai-0.16.1-py3-none-any.whl
Size 280.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5f3bdfe2c943b4ed6a80e0b123206242e4c4aefe3b36e6cc1e9fd623fe9e16f
BLAKE2b-256 checksum
How to use checksums
eec51c0255999b2dbf23cb772ad4d4a69c6622aae689427c9614399167b0331c
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.1

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.1 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