Commit
·
eab0e5c
1
Parent(s):
1bfc058
Update app.py
Browse files
app.py
CHANGED
@@ -11,10 +11,7 @@ n_raw_model = YOLO("N-Raw.pt")
|
|
11 |
s_raw_model = YOLO("S-Raw.pt")
|
12 |
|
13 |
def snap(image, model, conf, iou):
|
14 |
-
|
15 |
-
print(type(image))
|
16 |
-
image = np.array(image)
|
17 |
-
|
18 |
# Run the selected model
|
19 |
results = None
|
20 |
if model == "M-Raw":
|
@@ -48,7 +45,7 @@ def snap(image, model, conf, iou):
|
|
48 |
cv2.putText(image, f"{classes} {probs:.2f}", (x1, y1), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0), 2)
|
49 |
|
50 |
# Convert the resulting image to a PIL image
|
51 |
-
resulting_image =
|
52 |
|
53 |
# Get the labels
|
54 |
# labels = results.pandas().xyxy[0]["name"].values
|
|
|
11 |
s_raw_model = YOLO("S-Raw.pt")
|
12 |
|
13 |
def snap(image, model, conf, iou):
|
14 |
+
|
|
|
|
|
|
|
15 |
# Run the selected model
|
16 |
results = None
|
17 |
if model == "M-Raw":
|
|
|
45 |
cv2.putText(image, f"{classes} {probs:.2f}", (x1, y1), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0), 2)
|
46 |
|
47 |
# Convert the resulting image to a PIL image
|
48 |
+
resulting_image = image
|
49 |
|
50 |
# Get the labels
|
51 |
# labels = results.pandas().xyxy[0]["name"].values
|