Spaces:
Sleeping
Sleeping
feed pil image to the yolo predict
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ if uploaded_file is not None:
|
|
23 |
st.write("Detecting...")
|
24 |
|
25 |
# Perform inference
|
26 |
-
results = model.predict(
|
27 |
r = results[0]
|
28 |
im_bgr = r.plot(conf=False, pil=True, font_size=48, line_width=3) # Returns a PIL image if pil=True
|
29 |
im_rgb = Image.fromarray(im_bgr[..., ::-1]) # Convert BGR to RGB
|
|
|
23 |
st.write("Detecting...")
|
24 |
|
25 |
# Perform inference
|
26 |
+
results = model.predict(image)
|
27 |
r = results[0]
|
28 |
im_bgr = r.plot(conf=False, pil=True, font_size=48, line_width=3) # Returns a PIL image if pil=True
|
29 |
im_rgb = Image.fromarray(im_bgr[..., ::-1]) # Convert BGR to RGB
|