PeterL1n / BackgroundMattingV2

Real-Time High-Resolution Background Matting
MIT License
6.81k stars 950 forks source link

c++ in gpu #103

Open luoww1992 opened 3 years ago

luoww1992 commented 3 years ago

my env: win10 vs2019 libtorch 1.7.1 -cuda101-debug cuda101

i can run it by change the device in torch::Device("cpu"); but how to use it in gpu? How did you do it in gpu with torchscript model?

PeterL1n commented 3 years ago

Looks like this is more a libtorch issue rather than our model issue. Please try run other models to make sure it is not your environment problem.

luoww1992 commented 3 years ago

@PeterL1n i run it in gpu with c++ sucessfully,but it is slow. i am try to do it. how many fps you test in c++? what should we do to get high fps in c++ gpu with 1920*1080 ?

luoww1992 commented 3 years ago

@PeterL1n https://github.com/PeterL1n/BackgroundMattingV2/issues/54#issuecomment-848411458