mdaiter / openMVG

openMVG with a LATCH descriptor, an ORB descriptor, DEEP descriptors from the cvpr15compare repo, PNNet/Torch loader and a GPU-based L2 matcher integrated
Other
31 stars 20 forks source link

openMVG_main_ComputeFeatures with LATCH_BINARY openCV error #2

Closed tzumby closed 8 years ago

tzumby commented 8 years ago

Hey @mdaiter,

I'm getting this error when running the compute features with LATCH_BINARY:

OpenCV Error: Gpu API call (invalid texture reference) in call, file /opt/opencv/modules/cudev/include/opencv2/cudev/grid/detail/transform.hpp, line 340 terminate called after throwing an instance of 'cv::Exception' what(): /opt/opencv/modules/cudev/include/opencv2/cudev/grid/detail/transform.hpp:340: error: (-217) invalid texture reference in function call

I built OpenCV 3.1.0 (with Cuda 7.5 & GTX 970 card) with OpenCV_contrib at the same version. Not sure if this ticket would make more sense in the OpenCV project. I'm curious which version did you use to build openMVG ?

Thanks!

tzumby commented 8 years ago

There seems to be a ticket that describes the same error in OpenCV, although I'm not getting this one when resuming from suspension:

https://github.com/opencv/opencv/issues/6176

mdaiter commented 8 years ago

@tzumby on it

mdaiter commented 8 years ago

@tzumby can't seem to reproduce. Can you give me a sample image dataset you're using?

tzumby commented 8 years ago

Hey @mdaiter,

Here's a link to the image dataset and a summary of the commands I'm running:

sfm.zip

openMVG_main_SfMInit_ImageListing -i images/ -f 2420.36363636363636 -o image_list

sfm_data.json

openMVG_main_ComputeFeatures -i image_list/sfm_data.json -m LATCH_BINARY -o matches

image_describer.json

This is the error ComputeFeatures returns:

~/sfm/ganesh$ openMVG_main_ComputeFeatures -i image_list/sfm_data.json -m LATCH_BINARY -o matches You called : 
openMVG_main_ComputeFeatures
--input_file image_list/sfm_data.json
--outdir matches
--describerMethod LATCH_BINARY
--upright 0
--describerPreset NORMAL
--force 0
--numThreads 0

- EXTRACT FEATURES -
0%   10   20   30   40   50   60   70   80   90   100%
|----|----|----|----|----|----|----|----|----|----|
Using max kepoints: 15360
Finished setting image size: 3120 4160
OpenCV Error: Gpu API call (invalid texture reference) in call, file /opt/opencv/modules/cudev/include/opencv2/cudev/grid/detail/transform.hpp, line 340
terminate called after throwing an instance of 'cv::Exception'
  what():  /opt/opencv/modules/cudev/include/opencv2/cudev/grid/detail/transform.hpp:340: error: (-217) invalid texture reference in function call
mdaiter commented 8 years ago

@tzumby Sorry for the late response! I've been trying to pin down this issue for the past couple of days. It appears as though there's an issue within OpenCV 3.1.0, because when I try running detectAsync with the CUDA ORB code, everything crashes. I'm also running on a 1080 with CUDA 8.0 RC. Weird.

mdaiter commented 8 years ago

@tzumby can you try again? Think I fixed it.

mdaiter commented 8 years ago

@tzumby just tried on your dataset, and it works on my machine.

tzumby commented 8 years ago

Thanks @mdaiter, I'll give it another try soon.

tzumby commented 8 years ago

Just compiled and tested computing features with LATCH_BINARY. I had to update nvcc -arch to match Maxwell (sm_52), I'm assuming sm_60 is Pascal since you mentioned you're using the 1080 ?

mdaiter commented 8 years ago

Yep!

mdaiter commented 8 years ago

@tzumby does it work?

tzumby commented 8 years ago

Yep, everything works.