ConvertBoundingBoxFormat¶
- class torchvision.transforms.v2.ConvertBoundingBoxFormat(format: Union[str, BoundingBoxFormat])[source]¶
將邊界框座標轉換為給定的
format,例如從“CXCYWH”轉換為“XYXY”。- 引數:
format (str 或 tv_tensors.BoundingBoxFormat) – 輸出邊界框的格式。可能的值由
BoundingBoxFormat定義,字串值與列舉值匹配,例如“XYXY”或“XYWH”等。
- transform(inpt: BoundingBoxes, params: Dict[str, Any]) BoundingBoxes[source]¶
用於自定義轉換的重寫方法。