executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
augmentables-and-batchesUse when applying imgaug transforms to keypoints, boxes, polygons, line strings, heatmaps, segmentation maps, or mixed batches.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the task involves applying imgaug transforms to images and aligned non-image data: keypoints, bounding boxes, polygons, line strings, heatmaps, segmentation maps, or Batch/UnnormalizedBatch containers.
KeypointsOnImage, BoundingBoxesOnImage, PolygonsOnImage, LineStringsOnImage, HeatmapsOnImage, and SegmentationMapsOnImage.on(...), drawing, clipping, and out-of-image handling.Batch and UnnormalizedBatch workflows for mixed data and background augmentation.../augmentation-pipelines/SKILL.md.../parameters-random-and-utilities/SKILL.md.../multicore-and-diagnostics/SKILL.md.references/augmentables-data-formats.md to choose object types and data layouts.references/batch-workflows.md when the task uses Batch, UnnormalizedBatch, or background augmentation.scripts/smoke_aligned_augmentables.py for a tiny alignment smoke.references/troubleshooting.md for shape/count mismatches, invalid polygons, dense-map interpolation, or out-of-image coordinate issues.import numpy as np
import imgaug as ia
import imgaug.augmenters as iaa
images = np.zeros((2, 64, 64, 3), dtype=np.uint8)
keypoints = [[ia.Keypoint(x=10.5, y=20.5)], [ia.Keypoint(x=30.5, y=40.5)]]
boxes = [[ia.BoundingBox(x1=5, y1=5, x2=20, y2=20)], [ia.BoundingBox(x1=8, y1=8, x2=24, y2=24)]]
seq = iaa.Sequential([iaa.Fliplr(1.0), iaa.Affine(translate_px={"x": 2})])
images_aug, keypoints_aug, boxes_aug = seq(
images=images,
keypoints=keypoints,
bounding_boxes=boxes,
)
Use one call for all aligned data whenever possible. This ensures the same sampled geometric transform is applied to every augmentable group.
shape to dense augmentable objects so imgaug can project coordinates correctly.Use UnnormalizedBatch when a loader naturally returns flexible Python lists or arrays and you want imgaug to normalize and restore output forms. Use Batch when inputs are already normalized imgaug augmentable objects. For multiprocessing, combine this sub-skill with the multicore sub-skill.
A safe aligned-data smoke should assert: