统一图像与标注的增强流程,防止数据错位。
AlbumentationsX: One Augmentation Pipeline for Images and Related Annotations
- 所有变换共用同一随机种子和参数,确保图像与标注同步变化。
- 支持掩码、框、关键点等多类型标注的一致处理,避免对齐错误。
- 可保存管道配置,便于复现与调试,适合计算机视觉项目使用。
图像增强可能导致训练样本因图像与其标注接受不同随机变换而损坏。例如,裁剪必须对图像、掩码、边界框、关键点、立体视图、视频帧或体数据使用相同的坐标。若代码路径分别选择这些值,可能无声地导致数据错位。AlbumentationsX 将变换列表、概率、标注设置和随机种子封装在一个 Compose 对象中。每次调用仅生成一次随机值,并应用于训练样本的所有支持部分。该库保持每个对象的掩码、框和标签一致,并允许项目自定义新增变换。它还能保存管道定义,展示单次调用的执行过程,并可重复运行。使用示例中,Compose 位于文件解码为数组之后、PyTorch 批量组合之前。AlbumentationsX 执行声明的变换,但使用者仍需自行判断翻转、裁剪、色彩调整等操作是否保留任务所需的正确标签。
原文摘要 · Abstract (English)
Augmentation can corrupt a training example when an image and its annotations receive different random changes. A crop must use the same coordinates for the image, mask, boxes, keypoints, stereo views, video frames, or volume. Code paths that choose these values separately can silently misalign the data. AlbumentationsX keeps the transform list, probabilities, annotation settings, and random seed in one Compose object. Each call chooses random values once and applies them to every supported part of the training example. The library keeps each object's mask, box, and label together and lets projects add their own transforms. It can also save the pipeline definition, show what happened in one call, and run that call again. The examples place Compose after files have been decoded into arrays and before PyTorch groups examples into a batch. AlbumentationsX executes the declared transforms. Practitioners still decide whether a flip, crop, color change, or other operation preserves the correct label for their task.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。