Update app.py
Browse files
app.py
CHANGED
@@ -93,7 +93,7 @@ def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
|
|
93 |
|
94 |
# Run inference
|
95 |
blob = cv2.dnn.blobFromImage(
|
96 |
-
cv2.resize(image, (
|
97 |
)
|
98 |
net.setInput(blob)
|
99 |
output = net.forward()
|
@@ -144,7 +144,7 @@ webrtc_ctx = webrtc_streamer(
|
|
144 |
},
|
145 |
video_frame_callback=video_frame_callback,
|
146 |
media_stream_constraints={"video": True, "audio": False},
|
147 |
-
async_processing=
|
148 |
)
|
149 |
|
150 |
if st.checkbox("Show the detected labels", value=True):
|
|
|
93 |
|
94 |
# Run inference
|
95 |
blob = cv2.dnn.blobFromImage(
|
96 |
+
cv2.resize(image, (128, 128)), 0.007843, (128, 128), 127.5
|
97 |
)
|
98 |
net.setInput(blob)
|
99 |
output = net.forward()
|
|
|
144 |
},
|
145 |
video_frame_callback=video_frame_callback,
|
146 |
media_stream_constraints={"video": True, "audio": False},
|
147 |
+
async_processing=True,
|
148 |
)
|
149 |
|
150 |
if st.checkbox("Show the detected labels", value=True):
|