Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use background image with images? #113

Open
kyeno opened this issue Dec 12, 2023 · 3 comments
Open

Cannot use background image with images? #113

kyeno opened this issue Dec 12, 2023 · 3 comments

Comments

@kyeno
Copy link

kyeno commented Dec 12, 2023

Hey!

I tried quite a few variants of using plain-white-image as a background and the -bi option, but it doesn't seem to bother at all when working with images (JPEGs in my case).

@kyeno
Copy link
Author

kyeno commented Dec 12, 2023

I "worked around" this with a simple bash script additionally invoking ImageMagick:

NOTE: This is made to batch-process entire directories.

#!/bin/sh
for a in *; do 
  backgroundremover -i "$a" -wn 32 -gb 10 -m "u2net_human_seg" -o "bgr_tmp_$a.png"
  convert -flatten "bgr_tmp_$a.png" "bgr_$a.png"
  rm -f "bgr_tmp_$a.png"
done

@nadermx
Copy link
Owner

nadermx commented Dec 15, 2023

I'll look into this

@shiunyi71
Copy link

shiunyi71 commented Mar 2, 2024

I have the same question, but I found another solution. I use the model to generate the mask video into a mp4 file. This file is much smaller than the mov file. I use FFmpeg to combine the input video with the mask video on a background image or video to generate the final video into a mp4 file. This way can avoid producing a huge mov file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants