lmb-freiburg / flownet2

FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks
https://lmb.informatik.uni-freiburg.de/Publications/2017/IMKDB17/
Other
1k stars 318 forks source link

An error of convert_imageset_and_flow #75

Closed gyguo closed 7 years ago

gyguo commented 7 years ago

https://github.com/lmb-freiburg/flownet2/blob/1d72c5206b891d9dc97d8fe075213e0afbfa9814/tools/convert_imageset_and_flow.cpp#L135

assert(cv_img2.cols==xSize && cv_img1.rows==ySize ); should be changed toassert(cv_img2.cols==xSize && cv_img2.rows==ySize );

strivejin commented 7 years ago

when I run : make -j 5 all tools pycaffe I get error do you know how to solve it ? Could you help me ? The error like this:

tools/convert_imageset_and_disparity.cpp:5:1: warning: multi-line comment [-Wcomment] // convert_imageset [-g] ROOTFOLDER/ LISTFILE DB_NAME RANDOM_SHUFFLE[0 or 1] \ ^ tools/convert_imageset_and_disparity.cpp: In member function ‘void ImagePair::read_data()’: tools/convert_imageset_and_disparity.cpp:156:31: error: ‘numeric_limits’ is not a member of ‘std’ value=std::numeric_limits::max(); ^ tools/convert_imageset_and_disparity.cpp:156:51: error: expected primary-expression before ‘short’ value=std::numeric_limits::max(); ^ In file included from ./include/thirdparty/CImg/CImg.h:208:0, from tools/convert_imageset_and_disparity.cpp:38: tools/convert_imageset_and_disparity.cpp: In function ‘int main(int, char)’: tools/convert_imageset_and_disparity.cpp:328:14: error: expected unqualified-id before ‘int’ leveldb::Status status = leveldb::DB::Open( ^ In file included from tools/convert_imageset_and_disparity.cpp:17:0: tools/convert_imageset_and_disparity.cpp:330:11: error: ‘status’ was not declared in this scope CHECK(status.ok()) << "Failed to open leveldb " << argv[arg_offset+2]; ^ tools/convert_imageset_and_disparity.cpp:330:11: note: suggested alternatives: In file included from /usr/include/boost/filesystem.hpp:17:0, from ./include/caffe/util/io.hpp:4, from tools/convert_imageset_and_disparity.cpp:36: /usr/include/boost/filesystem/operations.hpp:396:15: note: ‘boost::filesystem::status’ file_status status(const path& p, system::error_code& ec) ^ /usr/include/boost/filesystem/operations.hpp:320:17: note: ‘boost::filesystem::detail::status’ file_status status(const path&p, system::error_code ec=0); ^ Makefile:585: recipe for target '.build_release/tools/convert_imageset_and_disparity.o' failed make: [.build_release/tools/convert_imageset_and_disparity.o] Error 1

@gyguo

nikolausmayer commented 7 years ago

@gyguo You're right, thanks!

@strivejin

tools/convert_imageset_and_disparity.cpp:156:31: error: ‘numeric_limits’ is not a member of ‘std’
value=std::numeric_limits::max();
^

There's something about your system that I don't understand. This error should not happen: <limits> is included (and does not throw an error) and you are using GCC 5.3 on Ubuntu 16.04. But you don't get the whole output from VERBOSE=1 make and your compiler does not find std::numeric_limits which is in <limits>.

Does the file /usr/include/limits.h exist on your system?

strivejin commented 7 years ago

@nikolausmayer

thanks for your reply. The file /usr/include/limits.h exist on my system. I also change the gcc version to gcc5.4 . I tried a lot of ways,but it still do not work. I think there may be some problems with my system. I will try to reinstall my Ubuntu 16.04,then try it again.

strivejin commented 7 years ago

@nikolausmayer

I am so happy I can run it by reinstall my system . I run it in Ubuntu 16.04 ,gcc 5.4 ,CUDA 8 ,CUDNN 5.1 ,Opencv3.1. And add #include in 'convert_imageset_and_flow.cpp'. Thank you very much.

nikolausmayer commented 7 years ago

@gyguo fixed in https://github.com/lmb-freiburg/flownet2/commit/9eed763789c06fa5f44e7af79078c0446a82bfc6

@strivejin good to hear :) although still a strange issue

ggaziv commented 6 years ago

@nikolausmayer Similarly, missing #include <limits> in tools/convert_imageset_and_flow.cpp results in tools/convert_imageset_and_flow.cpp <...> error: ‘numeric_limits’ is not a member of ‘std’ value=std::numeric_limits::max(); I believe that was caused the issue for @strivejin as well. Thanks, Guy