facebookresearch / consistent_depth

We estimate dense, flicker-free, geometrically consistent depth from monocular video, for example hand-held cell phone video.
MIT License
1.61k stars 236 forks source link

Error : no kernel image is available for execution on the device #56

Open udomoody opened 2 years ago

udomoody commented 2 years ago

I try to run the demo in in Google Colab but always get this error in the "Compute Flow" step. How can I fix this?

The full log is:

Sampled 522 frame pairs. Resizing flow to (224, 384) Loading pretrained model from 'checkpoints/flownet2.pth'. error in correlation_forward_cuda_kernel: no kernel image is available for execution on the device Traceback (most recent call last): File "main.py", line 13, in dp.process(params) File "/content/consistent_depth/process.py", line 117, in process return self.pipeline(params) File "/content/consistent_depth/process.py", line 71, in pipeline self.flow.compute_flow(frame_pairs, params.flow_checkpoint) File "/content/consistent_depth/flow.py", line 143, in compute_flow optical_flow_flownet2_homography.process(args) File "/content/consistent_depth/optical_flow_flownet2_homography.py", line 258, in process flow = infer(args, Flownet, device, im1, im2) File "/content/consistent_depth/optical_flow_flownet2_homography.py", line 199, in infer flow = Flownet(inputs)[0].permute(1, 2, 0).data.cpu().numpy() File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, kwargs) File "/content/consistent_depth/third_party/flownet2/models.py", line 124, in forward flownetc_flow2 = self.flownetc(x)[0] File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, *kwargs) File "/content/consistent_depth/third_party/flownet2/networks/FlowNetC.py", line 86, in forward out_corr = self.corr(out_conv3a, out_conv3b) # False File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(input, kwargs) File "/content/consistent_depth/third_party/flownet2/networks/correlation_package/correlation.py", line 67, in forward result = CorrelationFunction(self.pad_size, self.kernel_size, self.max_displacement,self.stride1, self.stride2, self.corr_multiply)(input1, input2) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, **kwargs) File "/content/consistent_depth/third_party/flownet2/networks/correlation_package/correlation.py", line 35, in forward self.pad_size, self.kernel_size, self.max_displacement,self.stride1, self.stride2, self.corr_multiply) RuntimeError: CUDA call failed (correlation_forward_cuda at correlation_cuda.cc:82) frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x33 (0x7f3908df5193 in /usr/local/lib/python3.7/dist-packages/torch/lib/libc10.so) frame #1: correlation_forward_cuda(at::Tensor&, at::Tensor&, at::Tensor&, at::Tensor&, at::Tensor&, int, int, int, int, int, int) + 0x628 (0x7f38e9a77b78 in /root/.local/lib/python3.7/site-packages/correlation_cuda-0.0.0-py3.7-linux-x86_64.egg/correlation_cuda.cpython-37m-x86_64-linux-gnu.so) frame #2: + 0x1bd9a (0x7f38e9a87d9a in /root/.local/lib/python3.7/site-packages/correlation_cuda-0.0.0-py3.7-linux-x86_64.egg/correlation_cuda.cpython-37m-x86_64-linux-gnu.so) frame #3: + 0x188e0 (0x7f38e9a848e0 in /root/.local/lib/python3.7/site-packages/correlation_cuda-0.0.0-py3.7-linux-x86_64.egg/correlation_cuda.cpython-37m-x86_64-linux-gnu.so)

frame #57: __libc_start_main + 0xe7 (0x7f3962ad6bf7 in /lib/x86_64-linux-gnu/libc.so.6)
suchanun commented 2 years ago

hi @udomoody, have you solved this problem? Thank you.