Update app.py
Browse files
app.py
CHANGED
|
@@ -616,7 +616,7 @@ def segment_video(video, prompt_mode, categoryname, custom_category, expressiong
|
|
| 616 |
size = (ori_width,ori_height)
|
| 617 |
print('writing video...')
|
| 618 |
output_file = "test.mp4"
|
| 619 |
-
writer = skvideo.io.FFmpegWriter(output_file)
|
| 620 |
for i in range(len(ourput_frames)):
|
| 621 |
writer.writeFrame(ourput_frames[i])
|
| 622 |
writer.close()
|
|
@@ -841,10 +841,14 @@ def segment_video(video, prompt_mode, categoryname, custom_category, expressiong
|
|
| 841 |
|
| 842 |
size = (ori_width,ori_height)
|
| 843 |
output_file = "test.mp4"
|
| 844 |
-
|
| 845 |
for i in range(len(output_vos_results)):
|
| 846 |
-
|
| 847 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 848 |
torch.cuda.empty_cache()
|
| 849 |
return output_file
|
| 850 |
|
|
|
|
| 616 |
size = (ori_width,ori_height)
|
| 617 |
print('writing video...')
|
| 618 |
output_file = "test.mp4"
|
| 619 |
+
writer = skvideo.io.FFmpegWriter(output_file,outputdict={'-r': read_fps,})
|
| 620 |
for i in range(len(ourput_frames)):
|
| 621 |
writer.writeFrame(ourput_frames[i])
|
| 622 |
writer.close()
|
|
|
|
| 841 |
|
| 842 |
size = (ori_width,ori_height)
|
| 843 |
output_file = "test.mp4"
|
| 844 |
+
writer = skvideo.io.FFmpegWriter(output_file,outputdict={'-r': read_fps,})
|
| 845 |
for i in range(len(output_vos_results)):
|
| 846 |
+
writer.writeFrame(output_vos_results[i])
|
| 847 |
+
writer.close()
|
| 848 |
+
# out = cv2.VideoWriter(output_file,cv2.VideoWriter_fourcc(*'avc1'), read_fps, size)
|
| 849 |
+
# for i in range(len(output_vos_results)):
|
| 850 |
+
# out.write(output_vos_results[i])
|
| 851 |
+
# out.release()
|
| 852 |
torch.cuda.empty_cache()
|
| 853 |
return output_file
|
| 854 |
|