Shortcuts

ConvertBoundingBoxFormat

class torchvision.transforms.v2.ConvertBoundingBoxFormat(format: Union[str, BoundingBoxFormat])[source]

[BETA] Convert bounding box coordinates to the given format, eg from “CXCYWH” to “XYXY”.

Note

The ConvertBoundingBoxFormat transform is in Beta stage, and while we do not expect disruptive breaking changes, some APIs may slightly change according to user feedback. Please submit any feedback you may have in this issue: https://github.com/pytorch/vision/issues/6753.

Parameters:

format (str or tv_tensors.BoundingBoxFormat) – output bounding box format. Possible values are defined by BoundingBoxFormat and string values match the enums, e.g. “XYXY” or “XYWH” etc.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources