mcahny / Deep-Video-Inpainting

Official pytorch implementation for "Deep Video Inpainting" (CVPR 2019)
508 stars 95 forks source link

Can‘t run the demo code #3

Closed facetohard closed 5 years ago

facetohard commented 5 years ago

Have you test the demo code?I have run python demo_vi.py, it threw the error No module named models. I think that there may be miss a file named __init__.py.

Another problem is that there is not VINet_final in the file vinet.py

mcahny commented 5 years ago

Thanks for the comment. Fixed accordingly. If still a problem, I will reopen the issue.

farazBhatti commented 5 years ago

I've tried running the dem_vi.py file but am getting the following error.

ModuleNotFoundError:No module named lib.resample2d_package._ext.resample2d._resample2d also checked it in the folder but couldn't find it

mcahny commented 5 years ago

Are you on python 3.6 with pytorch 0.4.0? and did you install all packages in lib folder? I am not very sure which step you are in.

farazBhatti commented 5 years ago

yes i am using python3.6.8 with torch 0.4.
Deep-Video-Inpainting$ cd lib/resample2d_package/_ext/resample2d/_resample2d if checked whether the file is there or not through terminal bash: cd: lib/resample2d_package/_ext/resample2d/_resample2d: No such file or directory ive also manually checked inside resample2d folder, there is no resample2d file. i ran install.sh from root (Deep-Video-Inpainting)folder
here is one of make.sh file i updated python to python3 `#!/usr/bin/env bash TORCH=$(python3 -c "import os; import torch; print(os.path.dirname(torch.file))")

cd src

echo "Compiling correlation kernels by nvcc..."

rm correlation_cuda_kernel.o rm -r ../_ext

nvcc -c -o correlation_cuda_kernel.o correlation_cuda_kernel.cu -x cu -Xcompiler -fPIC -arch=sm_52

cd ../ python3 build.py`

mcahny commented 5 years ago

Can you check if you can follow installing the Flownet2 dependencies posted in https://github.com/phoenix104104/fast_blind_video_consistency ? Thanks.

farazBhatti commented 5 years ago

Not helping, still problem persists. there is no _resample2d file ...

facetohard commented 5 years ago

@farazBhatti I have solved this problem. Follow these procedure may help you.

  1. Upgrade your pytorch to the newest(maybe 1.1.0)
  2. Replace the director lib/resample2d_package and models/correlation_package with the same director flownet2-pytorch
  3. In each director, you should run the command python setup.py install --user
  4. Remove the word modules in 1, 2, 3

If you still have problem, please reopen the issue.

farazBhatti commented 5 years ago

@facetohard upgrading pytorch give following error : ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead. maybe i should open a new thread for my own problem. pls note: i do not have cuda installed and i am running to cpu.maybe this might be the issue

facetohard commented 5 years ago

@farazBhatti Have you replace lib/resample2d_package and models/correlation_package?

farazBhatti commented 5 years ago

yes ive changed it @facetohard but as i dont have cuda installed , running setup gives OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root. maybe this repository doesnt support cpu at the moment

facetohard commented 5 years ago

Sorry, I have made a mistake that my pytorch version is 1.1.0.

sagar1garg commented 4 years ago

@facetohard are you using pytorch 1.1.0 or some other version. Cuda 9 is not compatible with pytorch 1.1.0 I think

facetohard commented 4 years ago

https://pytorch.org/get-started/previous-versions/ conda install pytorch=1.1.0 cuda90 -c pytorch

Alanjunhao commented 4 years ago

@farazBhatti I have solved this problem. Follow these procedure may help you.

  1. Upgrade your pytorch to the newest(maybe 1.1.0)
  2. Replace the director lib/resample2d_package and models/correlation_package with the same director flownet2-pytorch
  3. In each director, you should run the command python setup.py install --user
  4. Remove the word modules in 1, 2, 3

If you still have problem, please reopen the issue.

By strictly doing so, I've got a segmentation fault when running demo_vi.py.