Medical image processing demands specialized software that handles high-dimensional volumetric data, heterogeneous file formats, and domain-specific training procedures. Existing frameworks either provide low-level components that require substantial integration effort or impose rigid, monolithic pipelines that resist modification. We present MIP Candy (MIPCandy), a freely available, PyTorch-based framework designed specifically for medical image processing. MIPCandy provides a complete, modular pipeline spanning data loading, training, inference, and evaluation, allowing researchers to obtain a fully functional process workflow by implementing a single method, $\texttt{build_network}$, while retaining fine-grained control over every component. Central to the design is $\texttt{LayerT}$, a deferred configuration mechanism that enables runtime substitution of convolution, normalization, and activation modules without subclassing. The framework further offers built-in $k$-fold cross-validation, dataset inspection with automatic region-of-interest detection, deep supervision, exponential moving average, multi-frontend experiment tracking (Weights & Biases, Notion, MLflow), training state recovery, and validation score prediction via quotient regression. An extensible bundle ecosystem provides pre-built model implementations that follow a consistent trainer--predictor pattern and integrate with the core framework without modification. MIPCandy is open-source under the Apache-2.0 license and requires Python~3.12 or later. Source code and documentation are available at https://github.com/ProjectNeura/MIPCandy.
翻译:医学图像处理需要能够处理高维体数据、异构文件格式及领域特定训练流程的专用软件。现有框架要么提供需要大量集成工作的底层组件,要么采用僵化、难以修改的整体式流程。我们提出MIP Candy(MIPCandy),这是一个基于PyTorch、专为医学图像处理设计的免费开源框架。MIPCandy提供涵盖数据加载、训练、推理和评估的完整模块化流程,研究人员仅需实现$\texttt{build_network}$方法即可获得全功能的工作流,同时保留对每个组件的细粒度控制。其设计核心是$\texttt{LayerT}$——一种延迟配置机制,支持在运行时无需子类化即可替换卷积、归一化和激活模块。该框架还内置了$k$折交叉验证、带自动感兴趣区域检测的数据集检查、深度监督、指数移动平均、多前端实验跟踪(Weights & Biases、Notion、MLflow)、训练状态恢复以及通过商回归进行验证分数预测等功能。可扩展的组件生态系统提供了遵循统一训练器-预测器模式、无需修改即可与核心框架集成的预建模型实现。MIPCandy基于Apache-2.0许可证开源,要求Python~3.12或更高版本。源代码及文档详见https://github.com/ProjectNeura/MIPCandy。