lmb-freiburg / flownet2

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

About the compiling process? #104

Closed WANGYuSCU closed 6 years ago

WANGYuSCU commented 6 years ago

Inside the directory, under ubuntu I have done these steps.

  1. cp Makefile.config.example Makefile.config
  2. revise the Makefile.config: CPU ONLY, python sitepackage which include numpy, /usr/include/hdf5/serial, /usr/lib/x86_64-linux-gnu/hdf5/serial;
  3. make -j 5 all tools pycaffe

This compiling process will aways fail. I am the first time to use ubuntu and make. Could some one give me advice on how to run it on my computer? Thanks.

nikolausmayer commented 6 years ago

Hi, the FlowNet2 does not work with CPU_ONLY. You have to enable GPU support to compile and use our codebase. This is because we do not have CPU code for some of our custom layers.

WANGYuSCU commented 6 years ago

Thanks a lot. By the way, Is GTX-980 enough then? If it is not enought, I will give up. Or I will run them in my desktop. Thank again.

nikolausmayer commented 6 years ago

Yes, a GTX 980 can run all our networks. If compilation causes more problems, you can also check out our FlowNet2 Docker image: https://github.com/lmb-freiburg/flownet2-docker It's the same code, but you only have to install docker and nvidia-docker manually.

nikolausmayer commented 6 years ago

The proposed change should be in the deploy.prototxt file of the network you are running. Look for "engine: cudnn" lines. I've never seen that error myself. Maybe it's caused by another Cuda or CuDNN installation?

WANGYuSCU commented 6 years ago

Thanks I find it in the last. Still new problem comes, I am a beginner of Ubuntu. I really brought you so much trouble.

WANGYuSCU commented 6 years ago

So what is your cuda and cudnn version. I am using cuda8.0 and cudnn5.1. Enen I changed the engine to caffe. Problem "Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file" shows. TAT

nikolausmayer commented 6 years ago

Hm.. are you perhaps in a wrong directory? Or do you have multiple version of Protobuf installed which might interfere which each other?

WANGYuSCU commented 6 years ago

Thank you. I have succeed in running your code. I didn't check the result yet. But indeed there is a .flo file generated. I found many of the problem is because of makefile.config, cuda and cudnn installation. It is really painful to know which one to set. I have referenced many documents and found it out finally.

WANGYuSCU commented 6 years ago

I have one more question. After the generation of the .flo file. I find with readflow function provided in your code is not working in windows. But on my macbook, I can read the optical flow data successfully. I wonder is that the .flo file better been processed in ubuntu?

nikolausmayer commented 6 years ago

Yes, I know... the system setup is a pain.

The .flo problem might be something about the line endings in the file; they are by convention different in windows and linux. I don't use macOS but I would guess it follows the linux format.

WANGYuSCU commented 6 years ago

Really thanks a lot for your help.