A Candy for Medical Image Processing
Project description
MIP Candy: A Candy for Medical Image Processing
MIP Candy is Project Neura's next-generation infrastructure framework for medical image processing. It defines a handful of common network architectures with their corresponding training, inference, and evaluation pipelines that are out-of-the-box ready to use. Additionally, it also provides integrations with popular frontend dashboards such as Notion, WandB, and TensorBoard.
We provide a flexible and extensible framework for medical image processing researchers to quickly prototype their ideas. MIP Candy takes care of all the rest, so you can focus on only the key experiment designs.
:link: Home
:link: Docs
Key Features
Why MIP Candy? :thinking:
Easy adaptation to fit your needs
We provide tons of easy-to-use techniques for training that seamlessly support your customized experiments.- Sliding window
- ROI inspection
- ROI cropping to align dataset shape (100% or 33% foreground)
- Automatic padding
- ...
You only need to override one method to create a trainer for your network architecture.
from typing import override
from torch import nn
from mipcandy import SegmentationTrainer
class MyTrainer(SegmentationTrainer):
@override
def build_network(self, example_shape: tuple[int, ...]) -> nn.Module:
...
Satisfying command-line UI design
Built-in 2D and 3D visualization for intuitive understanding
High availability with interruption tolerance
Interrupted experiments can be resumed with ease.Support of various frontend platforms for remote monitoring
MIP Candy Supports Notion, WandB, and TensorBoard.
Installation
Note that MIP Candy requires Python >= 3.12.
pip install "mipcandy[standard]"
Quick Start
Below is a simple example of a nnU-Net style training. The batch size is set to 1 due to the varying shape of the
dataset, although you can use a ROIDataset to align the shapes.
from typing import override
import torch
from mipcandy_bundles.unet import UNetTrainer
from torch.utils.data import DataLoader
from mipcandy import download_dataset, NNUNetDataset
class PH2(NNUNetDataset):
@override
def load(self, idx: int) -> tuple[torch.Tensor, torch.Tensor]:
image, label = super().load(idx)
return image.squeeze(0).permute(2, 0, 1), label
download_dataset("nnunet_datasets/PH2", "tutorial/datasets/PH2")
dataset, val_dataset = PH2("tutorial/datasets/PH2", device="cuda").fold()
dataloader = DataLoader(dataset, 1, shuffle=True)
val_dataloader = DataLoader(val_dataset, 1, shuffle=False)
trainer = UNetTrainer("tutorial", dataloader, val_dataloader, device="cuda")
trainer.train(1000, note="a nnU-Net style example")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mipcandy-1.1.0b3.tar.gz.
File metadata
- Download URL: mipcandy-1.1.0b3.tar.gz
- Upload date:
- Size: 34.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69bfeaeb941d4c8ce3455a2feb52efb43bf738bd740866b188b1964cf9ad2d8a
|
|
| MD5 |
2e06fc991d16af0cc3676782c2a20a2a
|
|
| BLAKE2b-256 |
fe5d94f4478f6b225e2a8006616c11049fb8b7387e9ba530886d5609633be5a9
|
Provenance
The following attestation bundles were made for mipcandy-1.1.0b3.tar.gz:
Publisher:
python-publish.yml on ProjectNeura/MIPCandy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mipcandy-1.1.0b3.tar.gz -
Subject digest:
69bfeaeb941d4c8ce3455a2feb52efb43bf738bd740866b188b1964cf9ad2d8a - Sigstore transparency entry: 768288009
- Sigstore integration time:
-
Permalink:
ProjectNeura/MIPCandy@3c62c582442a2a975b3f6f52a9c6c892f7cc027f -
Branch / Tag:
refs/tags/1.1.0-beta.3 - Owner: https://github.com/ProjectNeura
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@3c62c582442a2a975b3f6f52a9c6c892f7cc027f -
Trigger Event:
release
-
Statement type:
File details
Details for the file mipcandy-1.1.0b3-py3-none-any.whl.
File metadata
- Download URL: mipcandy-1.1.0b3-py3-none-any.whl
- Upload date:
- Size: 47.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79d155497f4378c9bbf5405d97de9ae2a0e62a1de8673e3e5c26b3d2650744f6
|
|
| MD5 |
0eb2203c08e9416aeb67948b8c7c1ddc
|
|
| BLAKE2b-256 |
3d45164f7198ea264c99783b8b34b2eb8ff0a5d3ac6b037949fafb89738274b5
|
Provenance
The following attestation bundles were made for mipcandy-1.1.0b3-py3-none-any.whl:
Publisher:
python-publish.yml on ProjectNeura/MIPCandy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mipcandy-1.1.0b3-py3-none-any.whl -
Subject digest:
79d155497f4378c9bbf5405d97de9ae2a0e62a1de8673e3e5c26b3d2650744f6 - Sigstore transparency entry: 768288018
- Sigstore integration time:
-
Permalink:
ProjectNeura/MIPCandy@3c62c582442a2a975b3f6f52a9c6c892f7cc027f -
Branch / Tag:
refs/tags/1.1.0-beta.3 - Owner: https://github.com/ProjectNeura
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@3c62c582442a2a975b3f6f52a9c6c892f7cc027f -
Trigger Event:
release
-
Statement type: