Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output.png is an Empty Image #3

Open
noayed opened this issue Aug 14, 2018 · 4 comments
Open

output.png is an Empty Image #3

noayed opened this issue Aug 14, 2018 · 4 comments

Comments

@noayed
Copy link

noayed commented Aug 14, 2018

I've compiled the stereo model, and ran the following command:
./stereo_img --im0 ../data/im0.png --im1 ../data/im1.png
The output.png image I got is empty (zeros only), and the output.pfm contains non-zero values - possibly some version of the original image (screenshot below).
Do you have any idea what could be the problem?

Output of the make command:

COMPILER FLAGS:
-- CMAKE_BUILD_TYPE: Release
-- BUILD_SHARED_LIBS: ON
-- CMAKE_C_FLAGS= -fopenmp
-- CMAKE_CXX_FLAGS = -fopenmp -std=c++11 -fPIC -fmax-errors=3 -fpermissive -ggdb -Wunused-result -Wno-unused-variable -Wno-unused-value -Wno-unused-but-set-variable -Wdisabled-optimization -Wdiv-by-zero -Wc++11-compat -Wno-float-equal -O2 -DPARALLEL -ffast-math -DNDEBUG
-- CMAKE_CXX_FLAGS_RELEASE = -O3 -DNDEBUG
-- CUDA_NVCC_FLAGS= -arch=sm_30;-expt-extended-lambda;-ftemplate-backtrace-limit=2;-lineinfo;-std=c++11;-Xcompiler=-Wno-sign-compare;-O2;-keep;-src-in-ptx;-DNDEBUG;-Xptxas=-warn-lmem-usage;-Xptxas=-warn-spills
-- CUDA_PROPAGATE_HOST_FLAGS= OFF
-- COMPILE_DEFINITIONS =
-- Imageutilities requested components: iucore;iuio;iumath
-- ImageUtilities using iuio, adding OpenCV as dependency
-- Found OpenCV: /usr/local (found version "3.4.0") found components: opencv_core opencv_highgui
Enabling fixes for OpenCV >= 3
-- Found OpenCV: /usr/local (found version "3.4.0") found components: opencv_videoio opencv_core opencv_imgcodecs opencv_imgproc opencv_highgui
-- Found Imageutilities: /home/administrator/cnn-crf-stereo/dependencies/imageutilities/lib /home/administrator/cnn-crf-stereo/dependencies/imageutilities/include;/usr/local/cuda-9.0/samples/common/inc
-- dir1='/usr/include'
-- dir1='/usr/include/OpenEXR'
COMPILER FLAGS:
-- CMAKE_CXX_FLAGS= -fopenmp -std=c++11 -fPIC -fmax-errors=3 -fpermissive -ggdb -Wunused-result -Wno-unused-variable -Wno-unused-value -Wno-unused-but-set-variable -Wdisabled-optimization -Wdiv-by-zero -Wc++11-compat -Wno-float-equal -O2 -DPARALLEL -ffast-math -DNDEBUG --std=c++11
-- CUDA_NVCC_FLAGS= -arch=sm_30;-expt-extended-lambda;-ftemplate-backtrace-limit=2;-lineinfo;-std=c++11;-Xcompiler=-Wno-sign-compare;-O2;-keep;-src-in-ptx;-DNDEBUG;-Xptxas=-warn-lmem-usage;-Xptxas=-warn-spills
-- CUDA_PROPAGATE_HOST_FLAGS= OFF
-- Boost version: 1.59.0
-- Found the following Boost libraries:
-- program_options
-- filesystem
-- system
link dirs /home/administrator/cnn-crf-stereo/dependencies/imageutilities/lib/libiucore.so;/home/administrator/cnn-crf-stereo/dependencies/imageutilities/lib/libiuio.so;/home/administrator/cnn-crf-stereo/dependencies/imageutilities/lib/libiumath.so;/usr/local/cuda-9.0/lib64/libcufft.so;/usr/lib/x86_64-linux-gnu/libHalf.so;/usr/lib/x86_64-linux-gnu/libIex.so;/usr/lib/x86_64-linux-gnu/libIlmImf.so;/usr/lib/x86_64-linux-gnu/libIlmThread.so;/usr/lib/x86_64-linux-gnu/libImath.so;opencv_core;opencv_highgui;opencv_videoio;opencv_core;opencv_imgcodecs;opencv_imgproc;opencv_highgui;opencv_core;opencv_highgui;opencv_videoio;opencv_core;opencv_imgcodecs;opencv_imgproc;opencv_highgui;/home/administrator/cnn-crf-stereo/stereo/../dependencies/slackprop/lib/libslack_prop.so;cnpy
-- Configuring done
-- Generating done
-- Build files have been written to: /home/administrator/cnn-crf-stereo/build
[ 5%] Linking CXX shared library libcudnn_stereo.so
[ 68%] Built target cudnn_stereo
[ 73%] Linking CXX shared library libstereo.so
[ 89%] Built target stereo
[ 94%] Linking CXX executable stereo_img
[100%] Built target stereo_img

output

Thanks!

@noayed
Copy link
Author

noayed commented Aug 14, 2018

Also, when trying to evaluate results on middlebury images, I get the following results:

$ python compute_numbers_middlebury.py
Compute results for CNN3 ...
Q 4.0
Compute results for CNN3CRF ...
Q 4.0
Compute results for CNN3CRFJOINT ...
Q 4.0
Compute results for CNN3CRFFULL ...
Q 4.0
Compute results for CNN7 ...
Q 4.0
Compute results for CNN7CRF ...
Q 4.0
Compute results for CNN7CRFJOINT ...
Q 4.0
Compute results for CNN7CRFFULL ...
Q 4.0
CNN3 23.888
CNN3CRF 100.0
CNN3CRFJOINT 100.0
CNN3CRFFULL 100.0
CNN7 18.578
CNN7CRF 100.0
CNN7CRFJOINT 100.0
CNN7CRFFULL 100.0

So it looks like the problem might be in the CRF part..

@pknoebelreiter
Copy link
Member

pknoebelreiter commented Aug 20, 2018

If the output is a zero-only image, then there is a CUDA problem. Since the CNN-only part seems to work in your case the problem is likely in the CRF as you said. The project is tested only with CUDA 8.0, hence I think your CUDA version 9.0 is the problem. I will investigate this problem in more detail.

@grandyang
Copy link

Got the same issue, empty output.png.

I am using Cuda 9.2.

@pknoebelreiter
Copy link
Member

Only CUDA 8.0 works for the CRF part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants