small fixes

This commit is contained in:
DeepBeepMeep 2025-04-12 04:10:21 +02:00
parent e934775eb1
commit 4c79c62419
2 changed files with 8 additions and 2 deletions

View File

@ -311,9 +311,13 @@ def video_matting(video_state, end_slider, interactive_state, mask_dropdown, ero
output_frames.append(output_frame) output_frames.append(output_frame)
foreground = output_frames foreground = output_frames
foreground_output = save_video(foreground, output_path="./results/{}_fg.mp4".format(video_state["video_name"]), fps=fps) if not os.path.exists("mask_outputs"):
os.makedirs("mask_outputs")
foreground_output = save_video(foreground, output_path="./mask_outputs/{}_fg.mp4".format(video_state["video_name"]), fps=fps)
# foreground_output = generate_video_from_frames(foreground, output_path="./results/{}_fg.mp4".format(video_state["video_name"]), fps=fps, audio_path=audio_path) # import video_input to name the output video # foreground_output = generate_video_from_frames(foreground, output_path="./results/{}_fg.mp4".format(video_state["video_name"]), fps=fps, audio_path=audio_path) # import video_input to name the output video
alpha_output = save_video(alpha, output_path="./results/{}_alpha.mp4".format(video_state["video_name"]), fps=fps) alpha_output = save_video(alpha, output_path="./mask_outputs/{}_alpha.mp4".format(video_state["video_name"]), fps=fps)
# alpha_output = generate_video_from_frames(alpha, output_path="./results/{}_alpha.mp4".format(video_state["video_name"]), fps=fps, gray2rgb=True, audio_path=audio_path) # import video_input to name the output video # alpha_output = generate_video_from_frames(alpha, output_path="./results/{}_alpha.mp4".format(video_state["video_name"]), fps=fps, gray2rgb=True, audio_path=audio_path) # import video_input to name the output video
return foreground_output, alpha_output return foreground_output, alpha_output

View File

@ -26,4 +26,6 @@ matplotlib
timm timm
segment-anything segment-anything
ffmpeg-python ffmpeg-python
omegaconf
hydra-core
# rembg==2.0.65 # rembg==2.0.65