annayding commited on
Commit
f77e3aa
1 Parent(s): f024a1d

changed type of boxes

Browse files
Files changed (1) hide show
  1. utils.py +3 -3
utils.py CHANGED
@@ -10,14 +10,14 @@ from tqdm import tqdm
10
  def plot_predictions(
11
  image: str,
12
  labels: list[str],
13
- scores: torch.Tensor,
14
- boxes: torch.Tensor,
15
  ) -> np.ndarray:
16
 
17
  image_source = cv2.imread(image)
18
  image_source = cv2.cvtColor(image_source, cv2.COLOR_BGR2RGB)
19
 
20
- boxes = sv.Detections(xyxy=boxes.cpu().numpy())
21
 
22
  labels = [
23
  f"{phrase} {logit:.2f}"
 
10
  def plot_predictions(
11
  image: str,
12
  labels: list[str],
13
+ scores: list[float],
14
+ boxes: list[float],
15
  ) -> np.ndarray:
16
 
17
  image_source = cv2.imread(image)
18
  image_source = cv2.cvtColor(image_source, cv2.COLOR_BGR2RGB)
19
 
20
+ boxes = sv.Detections(xyxy=boxes)
21
 
22
  labels = [
23
  f"{phrase} {logit:.2f}"