facebookresearch / video-nonlocal-net

Non-local Neural Networks for Video Classification
Other
1.98k stars 323 forks source link

How to get caffe2_customized_ops/video compatible with the current official caffe2 repository? #76

Open abhaygargab opened 4 years ago

abhaygargab commented 4 years ago

Hello,

In file included from /home/u1698461/Downloads/CATER-master/pytorch_once_again/pytorch/caffe2/video/customized_video_io.cc:25:0: /home/u1698461/Downloads/CATER-master/pytorch_once_again/pytorch/caffe2/video/customized_video_io.h:30:10: fatal error: caffe/proto/caffe.pb.h: No such file or directory

include "caffe/proto/caffe.pb.h"

      ^~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated. caffe2/CMakeFiles/torch_cpu.dir/build.make:6166: recipe for target 'caffe2/CMakeFiles/torch_cpu.dir/video/customized_video_io.cc.o' failed make[2]: [caffe2/CMakeFiles/torch_cpu.dir/video/customized_video_io.cc.o] Error 1 make[2]: Waiting for unfinished jobs.... In file included from /home/u1698461/Downloads/CATER-master/pytorch_once_again/pytorch/caffe2/video/customized_video_input_op.cc:25:0: /home/u1698461/Downloads/CATER-master/pytorch_once_again/pytorch/caffe2/video/customized_video_input_op.h:43:10: fatal error: caffe2/utils/thread_pool.h: No such file or directory

include "caffe2/utils/thread_pool.h"

      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated. caffe2/CMakeFiles/torch_cpu.dir/build.make:6153: recipe for target 'caffe2/CMakeFiles/torch_cpu.dir/video/customized_video_input_op.cc.o' failed make[2]: [caffe2/CMakeFiles/torch_cpu.dir/video/customized_video_input_op.cc.o] Error 1 CMakeFiles/Makefile2:9446: recipe for target 'caffe2/CMakeFiles/torch_cpu.dir/all' failed make[1]: [caffe2/CMakeFiles/torch_cpu.dir/all] Error 2 Makefile:159: recipe for target 'all' failed make: *** [all] Error 2

Steps Followed:

  1. Used python = 3.6
  2. I have cloned the official Pytorch repository and replaced the caffe2/video with caffe2_customized_ops/video
  3. Changed the USE_FFMPEG = ON and USE_OPENCV = ON in CMakeLists.txt

I think the reason for this error is that the provided caffe2_customized_ops/video is the modified version of older caffe2/video which has since been modified. Can you please suggest the steps how to modify the newer version of caffe2/video to get caffe2_customized_ops/video which is compatible with the official Pytorch repository??

maskaravivek commented 3 years ago

I am facing the same problem. I tried following the steps in #52 and https://zhuanlan.zhihu.com/p/36045849 but none of the suggestions seems to be working. It would be great if someone could guide me on how to make the project work with the latest PyTorch repo or how to make it with the old Caffe code