快捷方式

ConvertBoundingBoxFormat

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

将边界框坐标转换为给定的 format,例如从 “CXCYWH” 转换为 “XYXY”。

参数:

format (strtv_tensors.BoundingBoxFormat) – 输出边界框格式。可能的值由 BoundingBoxFormat 定义,字符串值与枚举匹配,例如 “XYXY” 或 “XYWH” 等。

transform(inpt: BoundingBoxes, params: Dict[str, Any]) BoundingBoxes[source]

用于覆盖自定义变换的方法。

请参阅 如何编写自己的 v2 变换

文档

访问 PyTorch 的全面开发者文档

查看文档

教程

获取面向初学者和高级开发者的深度教程

查看教程

资源

查找开发资源并获得问题解答

查看资源