Open klutzpedro opened 4 years ago
@Klutz2904
You need to set CUDA_VISIBLE_DEVICES=0
in the environment.
To do this, you should either execute the command with !(running_ on ipython/jupyter)
!CUDA_VISIBLE_DEVICES=0 python test_background-matting_image.py -m real-hand-held -i sample_video/input/ -o sample_video/output/ -tb sample_video/background/
or on terminal without !
CUDA_VISIBLE_DEVICES=0 python test_background-matting_image.py -m real-hand-held -i sample_video/input/ -o sample_video/output/ -tb sample_video/background/
Need more help, thanks
~/Background-Matting$ CUDA_VISIBLE_DEVICES=0 python test_background-matting_image.py -m real-hand-held -i sample_video/input/ -o sample_video/output/ -tb sample_video/background/
CUDA Device: 0
Using video mode
Traceback (most recent call last):
File "test_background-matting_image.py", line 57, in
@Klutz2904 It seems that the machine on which you are trying to run this is not configured properly for using GPUs. It might be easier to run the code on google colab where authors have set up the system. Link to Colab
error occured when executed this command : python test_background-matting_image.py -m real-hand-held -i sample_video/input/ -o sample_video/output/ -tb sample_video/background/
Traceback (most recent call last): File "test_background-matting_image.py", line 20, in
print('CUDA Device: ' + os.environ["CUDA_VISIBLE_DEVICES"])
File "/home/dwijayanto/anaconda3/envs/back-matting/lib/python3.6/os.py", line 669, in getitem
raise KeyError(key) from None
KeyError: 'CUDA_VISIBLE_DEVICES'