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
, andjax
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
š 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.
- 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.
- 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.