Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -65,8 +65,8 @@ def capture_function(vid=None):
|
|
65 |
fbox=[]
|
66 |
cnt=0
|
67 |
frame_count1= int(frame_count)
|
68 |
-
for i in range(int(frame_count1)-
|
69 |
-
capture.set(cv2.CAP_PROP_POS_FRAMES, i)
|
70 |
ret, frame_f = capture.read(i)
|
71 |
#frame_ff = cv2.cvtColor(frame_f, cv2.COLOR_BGR2RGB)
|
72 |
cv2.imwrite(f'{uid}-frames/{i}.png',frame_f)
|
@@ -74,7 +74,7 @@ def capture_function(vid=None):
|
|
74 |
frame_num=f'Working on {i+1} of {frame_count1}'
|
75 |
|
76 |
yield fbox,fbox,frame_num
|
77 |
-
|
78 |
|
79 |
def im_2_vid(images,fps):
|
80 |
#width, height = Image.open(images[0]).size
|
|
|
65 |
fbox=[]
|
66 |
cnt=0
|
67 |
frame_count1= int(frame_count)
|
68 |
+
for i in range(int(frame_count1)-1):
|
69 |
+
#capture.set(cv2.CAP_PROP_POS_FRAMES, i)
|
70 |
ret, frame_f = capture.read(i)
|
71 |
#frame_ff = cv2.cvtColor(frame_f, cv2.COLOR_BGR2RGB)
|
72 |
cv2.imwrite(f'{uid}-frames/{i}.png',frame_f)
|
|
|
74 |
frame_num=f'Working on {i+1} of {frame_count1}'
|
75 |
|
76 |
yield fbox,fbox,frame_num
|
77 |
+
return fbox,fbox,frame_num
|
78 |
|
79 |
def im_2_vid(images,fps):
|
80 |
#width, height = Image.open(images[0]).size
|