ptran / idla-person-reid

dlib implementation of the "Improved Deep Learning Architecture for Person Re-Identification"
31 stars 11 forks source link

compile error : nvcc fatal : Unknown option 'Wreturn-type' #4

Closed PLester closed 6 years ago

PLester commented 6 years ago

I compile dlib well and HDF5 well, but I cannot compile this repository, error is as following, I have no idea to handle the error from cuda, please help me , thank you !

[ 87%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dnn/curand_dlibapi.cpp.o [ 88%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dnn/cuda_data_ptr.cpp.o [ 90%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dnn/gpu_data.cpp.o [ 91%] Linking CXX static library libdlib.a [ 91%] Built target dlib [ 92%] Building NVCC (Device) object CMakeFiles/idla.dir/src/idla_generated_difference_impl.cu.o nvcc fatal : Unknown option 'Wreturn-type' CMake Error at idla_generated_difference_impl.cu.o.cmake:207 (message): Error generating /home/pl/cpp_test/idla-person-reid/build/CMakeFiles/idla.dir/src/./idla_generated_difference_impl.cu.o

CMakeFiles/idla.dir/build.make:63: recipe for target 'CMakeFiles/idla.dir/src/idla_generated_difference_impl.cu.o' failed make[2]: [CMakeFiles/idla.dir/src/idla_generated_difference_impl.cu.o] Error 1 CMakeFiles/Makefile2:105: recipe for target 'CMakeFiles/idla.dir/all' failed make[1]: [CMakeFiles/idla.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

ptran commented 6 years ago

@PLester Commit 68ec19 should fix the issue. Let me know if the code works for you.

PLester commented 6 years ago

Thank you very much for your answer, I have compiled the code and trained CUHK03 dataset. Actually, I want to use this algorithm to do a real-time person re-id, so I have to change the code to a "deploy mode", but I have no experience with the dlib. If possible, could you give me some guidance to change the code to achieve my target. THANK U !

hsqaihkl commented 6 years ago

@PLester There is no one can‘t do real-time Person RE-ID. U can see the Face++'s e.g .It's run in a video but not the camera!( It's that I guess but you can find finally result!)

PLester commented 6 years ago

Maybe, I’m not meaning the “really real-time”, but just a speed is almostly acceptable. Now I’m changing the code to use it in my robot, hoping I can do it. Very thanks for your code, It’s a great work, I like this algorithm and I like the code too.

hsqaihkl commented 6 years ago

@PLester you are the chinese?

PLester commented 6 years ago

YES, I'm Chinese, in BeiJing.

hsqaihkl commented 6 years ago

@PLester Good!

ptran commented 6 years ago

@PLester since this is resolved, can you close this?

In terms of running the network on a different application, I would transfer the network definition below to another application that you want to run it on.

template <
    long num_filters,
    long nr,
    long nc,
    int stride_y,
    int stride_x,
    typename SUBNET
    >
using connp = dlib::add_layer<dlib::con_<num_filters,nr,nc,stride_y,stride_x,0,0>, SUBNET>;

template <long N, template <typename> class BN, long shape, long stride, typename SUBNET>
using block = dlib::relu<BN<connp<N, shape, shape, stride, stride, SUBNET>>>;

using net_type = dlib::softmax<dlib::fc<2,
                                        dlib::relu<dlib::affine<dlib::fc<500,reinterpret<2,
                                        dlib::max_pool<2,2,2,2,block<25,dlib::affine,3,1,
                                        block<25,dlib::affine,5,5, // patch summary
                                        dlib::relu<cross_neighborhood_differences<5,5,
                                        dlib::max_pool<2,2,2,2,block<25,dlib::affine,3,1,block<25,dlib::affine,3,1,
                                        dlib::max_pool<2,2,2,2,block<20,dlib::affine,3,1,block<20,dlib::affine,3,1,
                                        input_rgb_image_pair
                                        >>>>>>>>>>>>>>>>>;

You can load the trained weights for net_type in the application and then feed in person detections from different frames and see the confidence produced to determine if it's the same person or not. If you are using GPU, it might be difficult to get this running with a person detection network simultaneously.

ptran commented 6 years ago

Closing this issue because I think it's resolved. You guys can re-open if necessary.