$npx skillfedfor your agent

batchgenerators

Data augmentation toolkit

Worth itPyPI Artificial IntelligenceReleased Jun 2026149.4K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — batchgenerators-0.25.3-py3-none-any.whl
v0.25.3 · released 2026-06-16 · 9 runtime deps: pillow, numpy, scipy, scikit-image, scikit-learn, future, pandas, unittest2

Yes. batchgenerators is actively maintained, has no known vulnerabilities, and installs with low friction. It is well-suited for medical image analysis and deep learning projects that need 2D/3D augmentation with per-sample control and multithreaded execution. The Apache 2.0 license is permissive. Use it if you need specialized augmentation for medical or scientific imaging.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Windows requires guarding code with `if __name__ == '__main__'` and calling `multiprocessing.freeze_support()` due to multiprocessing differences; Linux has no such requirement.
  • Low install friction with a pure Python wheel and stable maintenance.
  • Last release 59 days ago, active repository with 1172 stars, and no known vulnerabilities.

License · maintenance · safety

permissive license (permissive) — Apache License 2.0 is permissive; you may use, modify, and distribute batchgenerators freely in commercial and private projects, provided you include the license and attribute the original authors.

last release 2026-06-16 (59 days) · last repo commit 2026-06-16 · 1,172 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 149,364 downloads/mo, #10,994 on PyPI

Verify before relying

pip install batchgenerators

from batchgenerators.transforms.color_transforms import ContrastAugmentationTransform
from batchgenerators.dataloading.multi_threaded_augmenter import MultiThreadedAugmenter

# Stack transforms and pass to MultiThreadedAugmenter for multithreaded augmentation
  • Whether anatomy-informed and misalignment augmentations (added in 0.23.1 and 0.23.2) are production-ready or still experimental.
  • Specific Python version compatibility (requires_python is unspecified in metadata).
  • Performance characteristics and memory overhead when processing large 3D datasets.
Same gist for agents: .md · .json

What it is and what it does

batchgenerators is a data augmentation framework developed by the Medical Image Computing division at DKFZ for preparing training data in deep learning pipelines. It specializes in augmentations that work uniformly on both 2D and 3D image data—a capability the documentation notes was missing in most competing frameworks. The package provides spatial transforms (mirroring, elastic deformation, rotation, scaling, resampling), color adjustments (brightness, contrast, gamma), noise injection (Gaussian, Rician), and cropping operations, plus specialized augmentations for medical imaging such as anatomy-informed deformations and multi-modal misalignment simulation.

The typical workflow involves subclassing a DataLoaderBase, implementing a generate_train_batch method to stack transforms using the Compose utility, and then feeding the result into MultiThreadedAugmenter for parallel augmentation across multiple processes. Data flows through the pipeline as a simple Python dictionary with required 'data' and optional 'seg' keys; spatial transforms automatically apply to segmentation masks when present. The package depends on numpy, scipy, scikit-image, scikit-learn, pillow, and pandas for its core operations.

Use it for

  • Augment 3D medical imaging datasets for segmentation tasks while ensuring spatial transforms apply to both images and segmentation masks.
  • Build training pipelines that apply per-sample augmentation decisions with configurable probabilities rather than batch-wide decisions.
  • Preprocess multi-modal medical images with controlled misalignments between channels to improve model robustness.
  • Combine spatial and color augmentations in a composable pipeline and execute them in parallel across multiple worker processes.
  • Simulate soft-tissue deformations in medical imaging workflows using anatomy-informed augmentation for realistic training data.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

batchgenerators is actively maintained, has no known vulnerabilities, and installs with low friction. It is well-suited for medical image analysis and deep learning projects that need 2D/3D augmentation with per-sample control and multithreaded execution. The Apache 2.0 license is permissive. Use it if you need specialized augmentation for medical or scientific imaging.

Install

batchgenerators on PyPI

Before you install

Low install friction with a pure Python wheel and stable maintenance. Last release 59 days ago, active repository with 1172 stars, and no known vulnerabilities.

Windows requires guarding code with `if __name__ == '__main__'` and calling `multiprocessing.freeze_support()` due to multiprocessing differences; Linux has no such requirement.

License in practice

Apache License 2.0 is permissive; you may use, modify, and distribute batchgenerators freely in commercial and private projects, provided you include the license and attribute the original authors.

Quickstart

pip install batchgenerators

from batchgenerators.transforms.color_transforms import ContrastAugmentationTransform
from batchgenerators.dataloading.multi_threaded_augmenter import MultiThreadedAugmenter

# Stack transforms and pass to MultiThreadedAugmenter for multithreaded augmentation

Verify before relying

  • Whether anatomy-informed and misalignment augmentations (added in 0.23.1 and 0.23.2) are production-ready or still experimental.
  • Specific Python version compatibility (requires_python is unspecified in metadata).
  • Performance characteristics and memory overhead when processing large 3D datasets.

Package facts

Licensepermissive license permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
9 packages
pillownumpyscipyscikit-imagescikit-learnfuturepandasunittest2threadpoolctl
MaintenanceActively maintained 59 days since the last release
Last repo commit
First released
Downloads149,364 / month, #10,994 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: batchgenerators-0.25.3-py3-none-any.whl

Tags

Capabilities
data augmentation medical images2D 3D image transformselastic deformation rotation scalingbatch augmentation deep learningimage segmentation augmentationspatial color noise augmentation
Topics
medical-imagingdata-augmentation3d-support
PyPI keywords
data augmentationdeep learningimage segmentationimage classificationmedical image analysismedical image segmentation

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “data augmentation medical images”

  • batchgeneratorsbatchgenerators provides data augmentation transforms for 2D and 3D…
  • batchgeneratorsv2Reimplemented data augmentation transforms for deep learning,…
  • torchioTorchIO reads, preprocesses, augments, and samples 3D medical images…

Give your agent the search over MCP, or paste the wish link into any chat.

More Artificial Intelligence packages

litellm With conditions
PyPI · Artificial Intelligence · released Aug 2026

LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.

Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.

MITcompiled wheel
682.8Mdownloads / mo
huggingface-hub Worth it
PyPI · Artificial Intelligence · released Aug 2026

Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.

Install it if you work with Hugging Face Hub models or datasets.

Apache-2.0pure Python · 3.10.0+
442.4Mdownloads / mo
langchain Worth it
PyPI · Python Modules · released Aug 2026

LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.

MITpure Python
315.4Mdownloads / mo
hf-xet With conditions
PyPI · Artificial Intelligence · released Aug 2026

hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.

Apache-2.0compiled wheel · 3.8+
258.4Mdownloads / mo
tokenizers Worth it
PyPI · Artificial Intelligence · released Apr 2026

Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.

Apache-2.0compiled wheel · 3.10+
222.9Mdownloads / mo
transformers Worth it
PyPI · Artificial Intelligence · released Aug 2026

Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.

Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.

permissive licensepure Python · 3.10.0+
186.6Mdownloads / mo

See also albumentations · batchgeneratorsv2 · TotalSegmentator · torchio · imgaug · ttach · torch-audiomentations · cellpose · edt · opensimplex