torchmil: A PyTorch-based library for deep Multiple Instance Learning

Francisco M. Castro-Macías, Francisco J. Sáez-Maldonado, Pablo Morales-Álvarez, Rafael Molina
9/9/2025
cs.LG

No official code found. Best implementation: Franblueee/torchmil (86 stars, Apache-2.0, PyTorch, last commit 2026-03-03).

Abstract

Multiple Instance Learning (MIL) is a powerful framework for weakly supervised learning, particularly useful when fine-grained annotations are unavailable. Despite growing interest in deep MIL methods, the field lacks standardized tools for model development, evaluation, and comparison, which hinders reproducibility and accessibility. To address this, we present torchmil, an open-source Python library built on PyTorch. torchmil offers a unified, modular, and extensible framework, featuring basic building blocks for MIL models, a standardized data format, and a curated collection of benchmark datasets and models. The library includes comprehensive documentation and tutorials to support both practitioners and researchers. torchmil aims to accelerate progress in MIL and lower the entry barrier for new users. Available at https://torchmil.readthedocs.io.

View on arXivView PDF

Code Implementations(1)

PyTorchApache-2.0

Deep Multiple Instance Learning library for Pytorch

866PythonJan 13, 20257 months agoApache-2.0
ct-scandeep-learningmachine-learningmedical-imagingmultiple-instance-learning+3 more

Similar Papers

Cite this paper

@article{castromacas2025torchmil,
  title  = {torchmil: A PyTorch-based library for deep Multiple Instance Learning},
  author = {Francisco M. Castro-Macías and Francisco J. Sáez-Maldonado and Pablo Morales-Álvarez and Rafael Molina},
  year   = {2025},
  eprint = {2509.08129},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.08129v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.08129.svg)](https://codeofpaper.com/paper/2509.08129)

Discussion