Spaces:
Sleeping
Sleeping
Commit ·
00f3fbc
1
Parent(s): ca3acbe
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,8 @@ def tog_off():
|
|
| 44 |
def pl_fn(cap,cur,last,fps,pl_tog):
|
| 45 |
player.set(cv2.CAP_PROP_POS_FRAMES, cur)
|
| 46 |
ret, frame_bgr = player.read(cur)
|
| 47 |
-
frame = cv2.cvtColor(frame_bgr, cv2.COLOR_BGR2RGB)
|
|
|
|
| 48 |
output = segmentor(frame)
|
| 49 |
for i in range(len(output)):
|
| 50 |
mask = np.array(output[i]['mask'])/255
|
|
|
|
| 44 |
def pl_fn(cap,cur,last,fps,pl_tog):
|
| 45 |
player.set(cv2.CAP_PROP_POS_FRAMES, cur)
|
| 46 |
ret, frame_bgr = player.read(cur)
|
| 47 |
+
#frame = cv2.cvtColor(frame_bgr, cv2.COLOR_BGR2RGB)
|
| 48 |
+
frame = Image.open(frame_bgr)
|
| 49 |
output = segmentor(frame)
|
| 50 |
for i in range(len(output)):
|
| 51 |
mask = np.array(output[i]['mask'])/255
|