@@ -276,7 +276,7 @@ def box_area(boxes: Tensor, fmt: str = "xyxy") -> Tensor:
276276
277277 Args:
278278 boxes (Tensor[..., 4]): boxes for which the area will be computed.
279- format (str): Format of the input boxes.
279+ fmt (str): Format of the input boxes.
280280 Default is "xyxy" to preserve backward compatibility.
281281 Supported formats are "xyxy", "xywh", and "cxcywh".
282282
@@ -291,7 +291,7 @@ def box_area(boxes: Tensor, fmt: str = "xyxy") -> Tensor:
291291 "cxcywh" ,
292292 )
293293 if fmt not in allowed_fmts :
294- raise ValueError (f"Unsupported Bounding Box area for given fmt { fmt } " )
294+ raise ValueError (f"Unsupported Bounding Box area for given format { fmt } " )
295295 boxes = _upcast (boxes )
296296 if fmt == "xyxy" :
297297 area = (boxes [..., 2 ] - boxes [..., 0 ]) * (boxes [..., 3 ] - boxes [..., 1 ])
@@ -348,7 +348,7 @@ def box_iou(boxes1: Tensor, boxes2: Tensor, fmt: str = "xyxy") -> Tensor:
348348 Args:
349349 boxes1 (Tensor[..., N, 4]): first set of boxes
350350 boxes2 (Tensor[..., M, 4]): second set of boxes
351- format (str): Format of the input boxes.
351+ fmt (str): Format of the input boxes.
352352 Default is "xyxy" to preserve backward compatibility.
353353 Supported formats are "xyxy", "xywh", and "cxcywh".
354354
@@ -364,7 +364,7 @@ def box_iou(boxes1: Tensor, boxes2: Tensor, fmt: str = "xyxy") -> Tensor:
364364 "cxcywh" ,
365365 )
366366 if fmt not in allowed_fmts :
367- raise ValueError (f"Unsupported Box IoU Calculation for given fmt { fmt } ." )
367+ raise ValueError (f"Unsupported Box IoU Calculation for given format { fmt } ." )
368368 inter , union = _box_inter_union (boxes1 , boxes2 , fmt = fmt )
369369 iou = inter / union
370370 return iou
0 commit comments