annayding
commited on
Commit
•
f77e3aa
1
Parent(s):
f024a1d
changed type of boxes
Browse files
utils.py
CHANGED
@@ -10,14 +10,14 @@ from tqdm import tqdm
|
|
10 |
def plot_predictions(
|
11 |
image: str,
|
12 |
labels: list[str],
|
13 |
-
scores:
|
14 |
-
boxes:
|
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}"
|
|
|
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}"
|