Background Matting V2 Installation Tutorial (Real-Time High-Resolution Background Matting)

preview_player
Показать описание
My main channel where I introduce the latest fascinating AI tools

Main Video for Background Matting V2

Background Matting V2 GitHub

Anaconda Install

CUDA 10.2 Install

ffmpeg Install

Notes:
conda create -n bgmatt python=3.6
conda activate bgmatt

conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch

Рекомендации по теме
Комментарии
Автор

If you have a 3080, use CUDA 11.1 instead then use this command

conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch-nightly -c conda-forge

instead of conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch

JDRos
Автор

I love you, I'm just saving this for later, because I don't even have a dedicated gpu ...

Maisonier
Автор

Would this work well for casual YouTube videos like mine where I might be moving around a lot playing VR but I don't want to use a giant green screen?

GamerReality
Автор

THIS VIDEO IS GOOD GOOD FOR A STUPID PERSON LIKE ME! THANK YOU!

nichapol_soma
Автор

so I tried using HD 1920x1080 with 30 fps. I tried using resnet50 and mobilenetv2 but the output only a video with a 0-second duration. anyone know why?

kiyandark
Автор

do I have to go through this entire process for each video I wanna do?

ArshadKhan-fzsu
Автор

I'm getting this error, why?

Traceback (most recent call last):
File "inference_video.py", line 31, in <module>
from torchvision import transforms as T
ModuleNotFoundError: No module named 'torchvision'

Nesggy
Автор

Did you just go to the dentist ? Your voice is almost impossible to understand.

johnny
Автор

i feel like i'm hacking NASA or something with this isntallion process omg 😂

DragunnitumGaming
Автор

I have followed all steps and getting the following error: ModuleNotFoundError: No module named 'cv2'

I have a terminal opened from anaconda, and have activated conda bgmatt. Any ideas?

EDIT: I solved my errors by installing the following

pip install opencv-python

and then

pip install tqdm

StevenDiLeo
Автор

How would you set this up to work in realtime on a webcam and in OBS?

MOOMOOMOO
Автор

I was finally able to get this to run, but am having issues using my own footage. When It goes through my footage, the comp it leaves is not a green screen, but I can see little splotches of green in places, but it definitely it not getting rid of all the background. However I ran this on the sample footage, and it left a clean beautiful green screen. My personal test footage is stabilized, so im not sure exactly what's going wrong :/

StevenDiLeo
Автор

Nice! But can you also use this with Zoom?

pixelboy
Автор

so we have to take an empty shot(the BG) of the set on which we shot the og video(the src) ?

aertist
Автор

thanks i had fun keeping up with the video and got the result i want

Fl
Автор

Hey bycloudump! Thank you so much for this. I'm getting the following error when trying to process a video, do you know why?
(I change the directory names here for it wasn't in the error itself)
Traceback (most recent call last):
File "inference_video.py", line 182, in <module>
for input_batch in tqdm(DataLoader(dataset, batch_size=1, pin_memory=True)):
File line 1171, in __iter__
for obj in iterable:
File line 435, in __next__
data = self._next_data()
File line 475, in _next_data
data = # may raise StopIteration
File line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File line 17, in __getitem__
x = tuple(d[idx % len(d)] for d in self.datasets)
File line 17, in <genexpr>
x = tuple(d[idx % len(d)] for d in self.datasets)
ZeroDivisionError: integer division or modulo by zero


Thank you!!

TheIinInterconnectedness
Автор

Is there any way to get this to work without an NVIDIA graphics card?

LuisMedina
Автор

what is the best value of --model-refine-sample-pixels for HD and FHD videos?

aliganjbakhsh
Автор

The last command didn't work for me, it says: can't open file 'inference_video.py': [Errno 2] No such file or directory

TruckKun
Автор

Hey, does this work on AMD Radeon GPUs? I own a RX 6800 XT which is pretty powerful, but of course I can't use the cuda toolkit

Micha-mxii