ClampBoundingBoxes¶
- class torchvision.transforms.v2.ClampBoundingBoxes[source]¶
Clamp bounding boxes to their corresponding image dimensions.
The clamping is done according to the bounding boxes’
canvas_size
meta-data.- transform(inpt: BoundingBoxes, params: Dict[str, Any]) BoundingBoxes [source]¶
Method to override for custom transforms.