Update app.py
Browse files
app.py
CHANGED
@@ -417,9 +417,9 @@ def show_json(txt):
|
|
417 |
|
418 |
def seg_frame(newmask):
|
419 |
|
420 |
-
if
|
421 |
gd = cv2.imread('./gradient_large.png', cv2.IMREAD_GRAYSCALE).astype(np.uint8)
|
422 |
-
elif
|
423 |
gd = cv2.imread('./gradient.png', cv2.IMREAD_GRAYSCALE).astype(np.uint8)
|
424 |
else:
|
425 |
gd = cv2.imread('./gradient_small.png', cv2.IMREAD_GRAYSCALE).astype(np.uint8)
|
|
|
417 |
|
418 |
def seg_frame(newmask):
|
419 |
|
420 |
+
if newmask.shape[0] == 2048: #height
|
421 |
gd = cv2.imread('./gradient_large.png', cv2.IMREAD_GRAYSCALE).astype(np.uint8)
|
422 |
+
elif newmask.shape[0] == 1024:
|
423 |
gd = cv2.imread('./gradient.png', cv2.IMREAD_GRAYSCALE).astype(np.uint8)
|
424 |
else:
|
425 |
gd = cv2.imread('./gradient_small.png', cv2.IMREAD_GRAYSCALE).astype(np.uint8)
|