Transparent bacground?

#13
by shtefcs - opened

Hi, how do we set a transparent background?

hi @shtefcs , the current format that returns the results is .mp4 and this format does not support "real" transparent backgrounds like images, so for now you need to convert the given results to .webm or .mov and then use a editing software to remove the green color (or any other target color).
this will result in the video having no background at all, not even the color.

at the same time, i may add a toggle to the space later that if active, does all these by itself and returns the true transparent video.

hi @shtefcs , the current format that returns the results is .mp4 and this format does not support "real" transparent backgrounds like images, so for now you need to convert the given results to .webm or .mov and then use a editing software to remove the green color (or any other target color).
this will result in the video having no background at all, not even the color.

at the same time, i may add a toggle to the space later that if active, does all these by itself and returns the true transparent video.

oh I see. I was wondering if that was a problem, that mp4 doesnt support transparency. I appreciate your explanation.

Having that option would be super helpful, and save tons of efforts. Like having ability to export directly in format that supports transparency.

The use case I have is, I am trying to remove a bg from a video I generated using MidJoruney, a nice 3d object animation. And I wanna use that object on my website https://automatio.ai as a part of UI. So that is why I need that transparency.

hi again @shtefcs , i did add the true transparency option. you can use it by choosing "webm" as the output format. the only problem is that, for some reason the processing library takes way more time for rgba output than the normal rgb (which is for mp4). well i tried to make it a bit faster and i did, but it is still a lot slower than normal.
you can use it though, maybe it was not that bad.

also i saw your website. im into automation too and i kinda fell in love with your project, plus the website design was beautiful :)

hi again @shtefcs , i did add the true transparency option. you can use it by choosing "webm" as the output format. the only problem is that, for some reason the processing library takes way more time for rgba output than the normal rgb (which is for mp4). well i tried to make it a bit faster and i did, but it is still a lot slower than normal.
you can use it though, maybe it was not that bad.

also i saw your website. im into automation too and i kinda fell in love with your project, plus the website design was beautiful :)

hey, thank you for trying that. I just tested it out, indeed its slow, and its stopped midway.

Question for you. Is the video bg removerer basically same as image bg remove? Its just removing bg from each frame?

image.png

Regarding the website, thank you, I just released it 2 days ago. There are still work to do there, but I am more focused on rebuilding Automatio from scratch, so its become fully AI driven. I wanted to use video bg removal for this diamond element in footer of the website.

image.png

shtefcs changed discussion status to closed

same as image bg remove? Its just removing bg from each frame?
yes. as far as i know (and the time i created this space) the whole thing was to extract the frames and then put them together after they got processes.
thats the reason webm is slower than mp4, because its rgba instead of rgb.

oh and another thing, since the background color is solid you can use chromakey in a video editing app and after you removed the solid color, save it as webm yourself. (im sure you already knew all these, but just saying for the sake of context)

same as image bg remove? Its just removing bg from each frame?
yes. as far as i know (and the time i created this space) the whole thing was to extract the frames and then put them together after they got processes.
thats the reason webm is slower than mp4, because its rgba instead of rgb.

oh and another thing, since the background color is solid you can use chromakey in a video editing app and after you removed the solid color, save it as webm yourself. (im sure you already knew all these, but just saying for the sake of context)

Thanks for the info anyway. I already used some free online tool that removes green background and let u downlad small sample as MOV/Webm.

Under the hood what LLM u are using if I may ask?

llm for what purpose?

llm for what purpose?

I mean "model". I guess under the hood even for image background removal its using some model?

The image background removal model is not LLM (Large Language Model), because its only visual. This space is using plemeri/transparent-background python package which uses this model:
https://huggingface.co/briaai/RMBG-1.4

The image background removal model is not LLM (Large Language Model), because its only visual. This space is using plemeri/transparent-background python package which uses this model:
https://huggingface.co/briaai/RMBG-1.4

thanks for the confirmation. It was bad expression when I said LLM. I mean model generally. I was wondering if you are using exactly that model, since I came accross it on multiple spaces.

So u are basically taking video, split in frames, and u do remove bg for each frame, and then u stich it back together.

Is there any open source or affordable but good model available at ur knowledge, that is even better?

I am thinking of adding some kind video remove service on Automatio, commercial one.

Good morning

From what i know right now, Bria RMBG is currently the most stable and best model to use.
It is optimized enough that most people can use it locally so its affordble too at my opinion.

At the end, the idea remains the same thing you said (as far as i know), process the frames one by one.

Sign up or log in to comment