--- id: batchgeneratorsv2 version: "0.3.5" license: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) license_treatment: permissive maintenance: active --- # batchgeneratorsv2 — Batchgenerators but better License: permissive · Maintenance: active · Downloads: 125.3K/mo ## What it is and what it does batchgeneratorsv2 is a rewrite of the batchgenerators framework for medical image analysis and deep learning pipelines. It provides data augmentation transforms that explicitly handle different data types—images, segmentation masks, pixel-wise regression targets, keypoints, and bounding boxes—with transforms applied at the sample level rather than batch level. The package prioritizes CPU performance and uses PyTorch implementations where possible, though it remains in early development with only a subset of the original transforms currently available. The package is built for workflows that need reliable, type-aware augmentation for medical imaging and computer vision tasks. It depends on torch, numpy, and the original batchgenerators package, making it suitable for projects already using PyTorch. The explicit distinction between data types means you don't have to manually manage which transforms apply to which parts of your data. Use it for: - Augment medical imaging datasets for segmentation tasks while preserving label correspondence - Apply sample-level transforms in medical image analysis pipelines built with nnU-Net - Preprocess images, masks, and keypoints together with type-aware augmentation for detection workflows - Build CPU-optimized data loading pipelines for deep learning without GPU augmentation overhead ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Reimplemented data augmentation transforms for deep learning, optimized for CPU performance and designed to work with torch and numpy on individual samples rather than batches. Yes, with conditions. Install if you need sample-level, type-aware augmentation for medical imaging or computer vision and are comfortable with an early-stage library (Planning status). The low install friction, active maintenance, and permissive Apache license make it low-risk. However, verify that the currently implemented transforms cover your use case, since the package explicitly covers only a subset of the original batchgenerators. ## Install pip install batchgeneratorsv2 uv add batchgeneratorsv2 poetry add batchgeneratorsv2 ## Installing batchgeneratorsv2 Before you install: Low friction install with three core dependencies (torch, numpy, batchgenerators). Active maintenance status with a release 29 days ago. Early development stage (Planning) means the API and feature set may still shift. License in practice: Apache 2.0 permissive license allows commercial and derivative use with attribution and modification notice requirements. No restrictions on redistribution or proprietary applications. Quickstart: pip install batchgeneratorsv2 from batchgeneratorsv2.transforms import SomeTransform import torch import numpy as np # Apply transforms at sample level transform = SomeTransform() augmented_sample = transform(sample) Requires Python >=3.9 and torch installed. GPU-based augmentation is not supported; CPU optimization is the design focus. Verify before relying: - Which specific transforms are currently implemented beyond the description's mention of a 'small subset' - Performance benchmarks comparing torch-based implementations to the original batchgenerators - API stability guarantees given the 'work in progress' status and Planning classifier ## Package facts - License: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 125.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags data augmentation transforms, medical image augmentation, batch data generation, sample-level transforms, deep learning preprocessing, image segmentation augmentation, torch-based augmentation, medical-imaging, data-augmentation, pytorch [View on SkillFed](https://skillfed.io/packages/batchgeneratorsv2) · [View on PyPI](https://pypi.org/project/batchgeneratorsv2/)