Run pre-commit and fix issues
This commit is contained in:
@@ -28,8 +28,10 @@ def move_detections(
|
||||
(sv.Detections) repositioned Detections object.
|
||||
"""
|
||||
detections.xyxy = move_boxes(xyxy=detections.xyxy, offset=offset)
|
||||
if 'xyxyxyxy' in detections:
|
||||
detections.xyxyxyxy = move_obb_boxes(xyxyxyxy = detections.xyxyxyxy, offset = offset)
|
||||
if "xyxyxyxy" in detections:
|
||||
detections.xyxyxyxy = move_obb_boxes(
|
||||
xyxyxyxy=detections.xyxyxyxy, offset=offset
|
||||
)
|
||||
if detections.mask is not None:
|
||||
if resolution_wh is None:
|
||||
raise ValueError(
|
||||
|
||||
@@ -595,6 +595,7 @@ def move_boxes(
|
||||
"""
|
||||
return xyxy + np.hstack([offset, offset])
|
||||
|
||||
|
||||
def move_obb_boxes(xyxyxyxy, offset):
|
||||
"""
|
||||
Parameters:
|
||||
@@ -604,7 +605,7 @@ def move_obb_boxes(xyxyxyxy, offset):
|
||||
is `[dx, dy]`.
|
||||
|
||||
Returns:
|
||||
npt.NDArray[np.float64]: Repositioned oriented bounding boxes.
|
||||
npt.NDArray[np.float64]: Repositioned oriented bounding boxes.
|
||||
|
||||
Examples:
|
||||
```python
|
||||
@@ -623,6 +624,7 @@ def move_obb_boxes(xyxyxyxy, offset):
|
||||
|
||||
return xyxyxyxy + np.hstack([offset, offset, offset, offset])
|
||||
|
||||
|
||||
def move_masks(
|
||||
masks: npt.NDArray[np.bool_],
|
||||
offset: npt.NDArray[np.int32],
|
||||
|
||||
Reference in New Issue
Block a user