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 Annotator Documentation and Videos: https://docs.md.ai/annotator/
- MD.ai Annotator Example Project: https://public.md.ai/annotator/project/aGq4k6NW/workspace
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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mdai-0.16.0.tar.gz | 278.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mdai-0.16.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 558.1 kB
Release files / mdai-0.16.0.tar.gz
| Download URL | mdai-0.16.0.tar.gz |
|---|---|
| Size | 278.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dcf62c53ef36b2dcfa89da5a43e779fdd88b20ba4e0cb468570adccc39f63438
|
|
BLAKE2b-256 checksum How to use checksums |
8d1010c609839105d1dc947da1d6af70653089bee641db7e4cc1ca4831448184
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.9.22 Linux/6.8.0-1031-aws
|
Release files / mdai-0.16.0-py3-none-any.whl
| Download URL | mdai-0.16.0-py3-none-any.whl |
|---|---|
| Size | 279.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8df85849a888060e71b895b1e0736b8969ee909d54d7671691ac5ca7ae3a0c40
|
|
BLAKE2b-256 checksum How to use checksums |
359d6fc5a121ce6b47545649924f0a77037fb45ab4ec213482caffda30a052f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.9.22 Linux/6.8.0-1031-aws
|