Skip to content

Commit

Permalink
fix: remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Smirkey authored Jan 21, 2024
1 parent 1d66557 commit b9822f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion bindings/python/powerboxes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from ._powerboxes import masks_to_boxes as _masks_to_boxes
from ._powerboxes import rotated_giou_distance as _rotated_giou_distance
from ._powerboxes import rotated_iou_distance as _rotated_iou_distance
from ._powerboxes import rotated_tiou_distance as _rotated_tiou_distance
from ._tiou import _dtype_to_func_tiou_distance

_BOXES_NOT_SAME_TYPE = "boxes1 and boxes2 must have the same dtype"
Expand Down Expand Up @@ -289,7 +290,7 @@ def rotated_tiou_distance(
if not isinstance(boxes1, np.ndarray) or not isinstance(boxes2, np.ndarray):
raise TypeError(_BOXES_NOT_NP_ARRAY)
if boxes1.dtype == boxes2.dtype == np.dtype("float64"):
return _rotated_giou_distance(boxes1, boxes2)
return _rotated_tiou_distance(boxes1, boxes2)
else:
raise TypeError(
f"Boxes dtype: {boxes1.dtype}, {boxes2.dtype} not in float64 dtype"
Expand Down
3 changes: 1 addition & 2 deletions powerboxesrs/src/tiou.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
use ndarray::Array2;
use num_traits::{Num, ToPrimitive};
use rstar::RTree;

use crate::{
boxes::{self, rotated_box_areas},
rotation::{intersection_area, minimal_bounding_rect, Rect},
rotation::{minimal_bounding_rect, Rect},
utils,
};
/// Computes the Tracking Intersection over Union (TIOU) distance between two sets of bounding boxes.
Expand Down

0 comments on commit b9822f4

Please sign in to comment.