Closed adrelino closed 7 years ago
Dear @hazirbas, could you please pull the code again and run it? I added some output which prints the available device memory. Maybe your GPU is just running out of memory while loading the image stack. Our code is quite stupid in that it just tries to read in all the images at once, allocates a lot of device and host memory and maybe doesn't release all of it properly before going to the next step. There are definitely smarter ways to do it. No streaming e.g. so if it doesn't fit, it just crashes.
Hi @adrelino, Thanks for your help. I will try it asap and let you know what exactly happens! Caner.
Hi again,
Here is the output error I get. My image size is 378x379. And I have 19 images in my focal stack.
PARAM[DEF]: grayscale : 0 ================================== General Parameters ============================== Specified sequence folder: ./IMG_0001 Export filename: Use page locked memory: False Use GPU to smooth depth estimate: True Use every n-th picture: 1 Use Tensor3f Class (experimental): False Delay: 1 minVal: -10 maxVal: 10 Degree of polynomial: 6 DenomRegu: 0.3
================================== Executing ======================================= AvailableGlobalMemory: 12682.91992 / 12799.57422 MB calling cudaDeviceReset to try to free GPU memory AvailableGlobalMemory: 12682.91992 / 12799.57422 MB Determine sharpness from images in ./IMG_0001 type: CV_8UC3 channels: 3 elemSize1: 1 bytes maxRange: 255 Executing with a single stream [1] 14446 segmentation fault (core dumped) ./vdff -dir ./IMG_0001 x
Hi Caner, thanks for the feedback. It should be no problem with the image size, since we tried it on more than 400 HD images. Unfortunately, the debug output is not really detailed, it seems to crash in determining the sharpness of the image, but that's rather vague.
Could you provide us with a backtrace in gdb? For that:
Hi @mngKd ,
Here is the output:
================================== Executing =======================================
[New Thread 0x7fffd6627700 (LWP 13263)]
[New Thread 0x7fffd5e26700 (LWP 13264)]
AvailableGlobalMemory: 12682.91992 / 12799.57422 MB
calling cudaDeviceReset to try to free GPU memory
[Thread 0x7fffd5e26700 (LWP 13264) exited]
[Thread 0x7fffd6627700 (LWP 13263) exited]
[New Thread 0x7fffd6627700 (LWP 13265)]
[New Thread 0x7fffd5e26700 (LWP 13266)]
AvailableGlobalMemory: 12682.91992 / 12799.57422 MB
Determine sharpness from images in /IMG_0001
type: CV_8UC3 channels: 3 elemSize1: 1 bytes maxRange: 255 Executing with a single stream
Determining sharpness from picture 1 from 11
Thread 1 "vdff" received signal SIGSEGV, Segmentation fault.
_int_malloc (av=av@entry=0x7fffef4ebb20
from /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4
at variational-depth-from-focus/src/openCVHelpers.cpp:393
firstImage=..., paddingTop=3, paddingBottom=3, paddingLeft=2, paddingRight=3, nrPixels=429786, diffW=5, diffH=6, grayscale=false)
at variational-depth-from-focus/src/DataPreparator.cu:111
grayscale=false) at variational-depth-from-focus/src/DataPreparator.cu:282
info=...) at variational-depth-from-focus/src/vdff.cu:145
Thanks for the fast feedback,
seems to be a openCV problem with loading the "/IMG_0001/im_02.png" file, so it would be interesting to have a look at the images.
I will later drop by our office, and maybe you can give me your sample files, so that I can have a closer look at it.
Cheers from the master lab, Dennis
Edit: got the images, will check in the evening what's wrong
@hazirbas:
(Split up into new issue from #2 )