Update run.py
Browse files
run.py
CHANGED
@@ -51,7 +51,7 @@ def segment(im, interval_s=2):
|
|
51 |
logits_n = (logits[0, 0] - logits[0, 0].min()) / (logits[0, 0].max() - logits[0, 0].min())
|
52 |
logits_n = cv2.resize(logits_n, (im.shape[1], im.shape[0]))
|
53 |
imout[..., 1] = np.clip(imout[..., 1] + logits_n * 200, 0, 254)
|
54 |
-
return imout,
|
55 |
|
56 |
# with gr.Blocks() as demo:
|
57 |
# inp = gr.Image(sources=["webcam"], streaming=True)
|
|
|
51 |
logits_n = (logits[0, 0] - logits[0, 0].min()) / (logits[0, 0].max() - logits[0, 0].min())
|
52 |
logits_n = cv2.resize(logits_n, (im.shape[1], im.shape[0]))
|
53 |
imout[..., 1] = np.clip(imout[..., 1] + logits_n * 200, 0, 254)
|
54 |
+
return imout, counter.count #np.flipud(im)
|
55 |
|
56 |
# with gr.Blocks() as demo:
|
57 |
# inp = gr.Image(sources=["webcam"], streaming=True)
|