Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

docs(augmentation): document the base-class hierarchy (#3860)

Edgar Ribaff52425524bd
diff --git a/docs/source/augmentation.base.rst b/docs/source/augmentation.base.rst
index 54543960c..fb9f005a8 100644
--- a/docs/source/augmentation.base.rst
+++ b/docs/source/augmentation.base.rst
@@ -15,6 +15,29 @@ location of image pixels and `IntensityAugmentationBase2D` that preserves the pi
generic `AugmentationBase2D` that allows higher freedom for customized augmentation design.
+The Base-Class Hierarchy
+------------------------
+
+The bases form a chain, each layer adding one concern and shared by several subclasses β€” so pick the
+*shallowest* base that already does what you need:
+
+.. code-block:: text
+
+ nn.Module
+ └─ _BasicAugmentationBase parameter sampling + the forward skeleton
+ β”œβ”€ _AugmentationBase dispatch to image / mask / box / keypoint / class data keys
+ β”‚ β”œβ”€ AugmentationBase2D 2D tensor validation (subclass for a fully custom 2D op)
+ β”‚ β”‚ └─ RigidAffineAugmentationBase2D transform-matrix machinery
+ β”‚ β”‚ β”œβ”€ IntensityAugmentationBase2D pointwise ops β€” override apply_transform
+ β”‚ β”‚ └─ GeometricAugmentationBase2D warp ops β€” also override compute_transformation
+ β”‚ └─ AugmentationBase3D … (the 3D mirror of the 2D chain)
+ └─ MixAugmentationBaseV2 mix ops (MixUp / CutMix) β€” bypass the per-key dispatch
+
+Each level is a distinct, reused axis (sampling, data-key dispatch, 2D vs 3D, rigid-matrix vs free-form,
+intensity vs geometric); the four ``*Base2D`` classes are public API that external code subclasses.
+For a custom augmentation, subclass ``IntensityAugmentationBase2D`` or ``GeometricAugmentationBase2D``.
+
+
The Predefined Augmentation Routine
-----------------------------------