Closed RokiaAbdeen closed 2 years ago
I found these lines in forwad_warp_cuda.cpp `// Because of the incompatible of Pytorch 1.0 && Pytorch 0.4, we have to annotation this.
` I didn't understand what should I modify exactly to solve this error
It seems like the macro AT_ASSERT takes different types or numbers of arguments in different PyTorch versions. You can probably look up the PyTorch documentation & modify the function according to your pytorch version.
Or, you can also comment out the lines using CHECK_INPUT
.
For more details on the forward warping function, you can refer to this repository: https://github.com/lizhihao6/Forward-Warp
the problem is solved by commenting out these two lines : `#define CHECK_CUDA(x) AT_ASSERT(x.type().is_cuda(), #x " must be a CUDA tensor")
thank you so much
Another question please, the function _adaptive_disocc_detection_disp() in losses.py file is used to find the dis-occluded regions for the left disparity only ? can it be used for the right disparity too ? how can it find the occlusion from one disp map only ? why do you use the value 0.5 as a threshold why not a 0.3 ? thanks in advance ..
It's because I only used the left image for the loss calculation. I guess it's a design choice, and you can also include the loss for the right disparity by calculating its occlusion map from the left disparity.
The occlusion map for the left disparity is the inverse of the disocclusion map from the right disparity (the disocclusion map is obtained by forward-warping the right disparity). You can probably refer to the Fig. 3 in our previous paper.
The threshold 0.5 can be a hyper-parameter.
I mean you have used _adaptive_disocc_detection_disp() in losses.py file to find the left occlusion , its input is the right disparity. Can I use the left disparity as an input to find the right occlusion too?
Yes, that's possible too.
left_diss_occlusion_map=_adaptive_disocc_detection_disp(right_disp) left_occ_map=~left_diss_occlusion_map and the same for the right_occ_map, right ?
left_diss_occlusion_map=_adaptive_disocc_detection_disp(right_disp)
Probably you need to reverse the sign of the disparity because it is in the opposite direction.
right_disp -> -right_disp
left_occ_map=~left_diss_occlusion_map
Yes, you can do it that way. Then, in that case, occluded pixels will have True
.
If you are not sure, you can always visualize the result and check if it makes sense.
Hi , I got this error while I am trying to compile the warping_package how could I handle this error please thanks in advance