Skip to content

MedicAI

Medic-AI is a Keras based library designed for medical image analysis using machine learning techniques. Its core strengths include:

  • Backend Agnostic: Compatible with tensorflow, torch, and jax backends.
  • User-Friendly API: High-level interface for transformations and model creation.
  • Scalable Execution: Supports training and inference on single/multi-GPU and TPU-VM setups.
  • Essential Components: Includes standard metrics and losses, such as Dice.
  • Optimized 3D Inference: Offers an efficient sliding-window method and callback for volumetric data

šŸ“‹ Table of Contents

  1. Installation
  2. Features
  3. Guides
  4. Documentation
  5. Acknowledgements
  6. Citation

šŸ›  Installation

PyPI version:

!pip install medicai

Installing from source GitHub:

!pip install git+https://github.com/innat/medic-ai.git

šŸ“Š Features

Available Models : The following table lists the currently supported models along with their supported input modalities, primary tasks, and underlying architecture type. The model inputs can be either 3D (depth Ɨ height Ɨ width Ɨ channel) or 2D (height Ɨ width Ɨ channel).

Model Supported Modalities Primary Task Architecture Type
DenseNet121 2D, 3D Classification CNN
DenseNet169 2D, 3D Classification CNN
DenseNet201 2D, 3D Classification CNN
ViT 2D, 3D Classification Transformer
Swin Transformer 2D, 3D Classification Transformer
DenseUNet121 2D, 3D Segmentation CNN
DenseUNet169 2D, 3D Segmentation CNN
DenseUNet201 2D, 3D Segmentation CNN
UNETR 2D, 3D Segmentation Transformer
SwinUNETR 2D, 3D Segmentation Transformer
TransUNet 2D, 3D Segmentation Transformer
SegFormer 2D, 3D Segmentation Transformer

Available Transformation: The following preprocessing and transformation methods are supported for volumetric data. The following layers are implemented with TensorFlow operations. It can be used in the tf.data API or a Python data generator and is fully compatible with multiple backends, tf, torch, jax in training and inference, supporting both GPUs and TPUs.

CropForeground
NormalizeIntensity
Orientation
RandCropByPosNegLabel
RandFlip
RandRotate90
RandShiftIntensity
RandSpatialCrop
Resize
ScaleIntensityRange
Spacing

šŸ’” Guides

Segmentation: Available guides for 3D segmentation task.

Task GitHub Kaggle View
Covid-19
BTCV n/a
BraTS n/a
Spleen

Classification: Available guides for 3D classification task.

Task (Classification) GitHub Kaggle
Covid-19

šŸ“š Documentation

To learn more about model, transformation, and training, please visit official documentation: medicai/docs

šŸ¤ Contributing

Please refer to the current roadmap for an overview of the project. Feel free to explore anything that interests you. If you have suggestions or ideas, I’d appreciate it if you could open a GitHub issue so we can discuss them further.

  1. Install medicai from soruce:
!git clone https://github.com/innat/medic-ai
%cd medic-ai
!pip install keras -qU
!pip install -e .
%cd ..

Add your contribution and implement relevant test code.

  1. Run test code as:
python -m pytest test/

# or, only one your new_method
python -m pytest -k new_method

šŸ™ Acknowledgements

This project is greatly inspired by MONAI.

šŸ“ Citation

If you use medicai in your research or educational purposes, please cite it using the metadata from our CITATION.cff file.