Update app.py
Browse files
app.py
CHANGED
|
@@ -91,7 +91,7 @@ if source_radio == "VIDEO":
|
|
| 91 |
if source_radio == "WEBCAM":
|
| 92 |
input = camera_input_live()
|
| 93 |
uploaded_image = Image.open(input)
|
| 94 |
-
uploaded_image_cv = cv2.cvtColor(
|
| 95 |
boxes, resized_image = utils.predict_image(uploaded_image_cv, conf_threshold)
|
| 96 |
visualized_image = utils.convert_result_to_image(uploaded_image_cv, resized_image, boxes, conf_labels=False)
|
| 97 |
st.image(visualized_image, channels = "RGB")
|
|
|
|
| 91 |
if source_radio == "WEBCAM":
|
| 92 |
input = camera_input_live()
|
| 93 |
uploaded_image = Image.open(input)
|
| 94 |
+
uploaded_image_cv = cv2.cvtColor(np.array(uploaded_image), cv2.COLOR_RGB2BGR)
|
| 95 |
boxes, resized_image = utils.predict_image(uploaded_image_cv, conf_threshold)
|
| 96 |
visualized_image = utils.convert_result_to_image(uploaded_image_cv, resized_image, boxes, conf_labels=False)
|
| 97 |
st.image(visualized_image, channels = "RGB")
|