Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,9 +14,9 @@ st.title("🎥 YOLO Object Detection Live Stream")
|
|
| 14 |
image = camera_input_live()
|
| 15 |
|
| 16 |
uploaded_image = PIL.Image.open(image)
|
| 17 |
-
uploaded_image_cv = cv2.cvtColor(
|
| 18 |
visualized_image = utils.predict_image(uploaded_image_cv, conf_threshold)
|
| 19 |
-
|
| 20 |
img_plot = result[0].plot()
|
| 21 |
|
| 22 |
st.image(img_plot, channels = "BGR")
|
|
|
|
| 14 |
image = camera_input_live()
|
| 15 |
|
| 16 |
uploaded_image = PIL.Image.open(image)
|
| 17 |
+
uploaded_image_cv = cv2.cvtColor(np.array(uploaded_image), cv2.COLOR_RGB2BGR)
|
| 18 |
visualized_image = utils.predict_image(uploaded_image_cv, conf_threshold)
|
| 19 |
+
result = model(frame)
|
| 20 |
img_plot = result[0].plot()
|
| 21 |
|
| 22 |
st.image(img_plot, channels = "BGR")
|