快捷方式

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 的全面開發者文件

檢視文件

教程

獲取面向初學者和高階開發者的深度教程

檢視教程

資源

查詢開發資源並獲得問題解答

檢視資源