Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,10 @@ def response(image):
|
|
22 |
cls = np.array(r.boxes.cls)
|
23 |
cls = cls.astype(int)
|
24 |
for con, cl in zip(conf,cls):
|
25 |
-
|
|
|
|
|
|
|
26 |
|
27 |
|
28 |
# im_rgb = Image.fromarray(im_rgb)
|
|
|
22 |
cls = np.array(r.boxes.cls)
|
23 |
cls = cls.astype(int)
|
24 |
for con, cl in zip(conf,cls):
|
25 |
+
con = con.astype(float)
|
26 |
+
con = round(con,3)
|
27 |
+
con = con * 100
|
28 |
+
text += (f"Detected {name[cl]} with confidence {con}% at ({xy[0]},{xy[1]})\n")
|
29 |
|
30 |
|
31 |
# im_rgb = Image.fromarray(im_rgb)
|