Closed murilovarges closed 6 years ago
@murilovarges Did you compiled caffe2 with openCV and ffmpeg flags are ON. I think CMake could not detect your dependencies, thus compile w/o VideoInputOp.
Thank you @dutran for the response. Yes, I compiled caffe2 with openCV 2.4.2. I will try recompile caffe2 with openCV 3.4.1 and report here the result later.
I think VideoInputOp works only with OpenCV3, please try to install it.
Hello @dutran I compiled caffe2 with openCV 3.4.1 and ffmpeg flags are ON, but I still with same errors.
I assume you install caffe2 from this https://github.com/pytorch/pytorch and follow instructions from here: https://caffe2.ai/docs/getting-started.html?configuration=compile . Do you install caffe2 pre-build or from source, pre-build version may not include VideoInputOp.
try to compile caffe2 yourself, follow https://caffe2.ai/docs/getting-started.html?configuration=compile when you do cmake ..
, you should get a summary about dependencies found by cmake, make sure it found ffmpeg, OpenCV (check version).
I already compiled caffe2 from https://github.com/pytorch/pytorch, I checked and ffmpeg flags are ON.
I'm finding that the problem may be with ffmpeg, I'm using an old version (ffmpeg 0.11.1), which version do you use? I'm updating ffmpeg and I report the result here.
I used the latest on compiled from source (https://trac.ffmpeg.org/wiki/CompilationGuide/Centos) tested on CentOS.
@murilovarges: @CHJoanna from our team has just double-checked and wrote some installation note here in case you need a reference.
@murilovarges is your openCV compiled with CUDA support?
I ran into a similar issue (it was on centOS7 with OpenCV 2.4.x, and it got solved when I recompiled the OpenCV to 3.4.x with
-D WITH_CUDA=ON
option on and then recompiled cafe again.
For complete transparency, I used following parameters when configuring OpenCV, and the instructions found here:
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_CUDA=ON \
-D ENABLE_FAST_MATH=1 \
-D CUDA_FAST_MATH=1 \
-D WITH_CUBLAS=1 \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.1.0/modules \
-D BUILD_EXAMPLES=ON \
-D BUILD_SHARED_LIBS=ON ..
@murilovarges have you got your compiling issue solved?
Hi @dutran, thank you very much for the tutorial, I'm using Ubuntu 16.04 and facing some problems with OpenCV compilation. I'll work in this today and report the result here.
Thank you so much @dutran and @CHJoanna, I followed the tutorial with some minor changes for Ubuntu and now I'm able to run the script for "fine tuning" without "VideoInput" errors.
Great!
Thank you so much @dutran and @CHJoanna, I followed the tutorial with some minor changes for Ubuntu and now I'm able to run the script for "fine tuning" without "VideoInput" errors.
Hi, currently I meet a problem the same as yours. Could you tell me how did you solve your problem?
Do you followed the Installation Guide?
Do you followed the Installation Guide?
Hi, thank you for your attention. I followed the installation guide except for the installation code
cmake ..
sudo make -j8 install
Instead, I install Caffe2 by following the tutorial provided by Caffe2 website. Before installing Caffe2, I have installed OpenCV and FFmpeg as the R2Plus1D tutorial suggests.
I am curious about what might cause the error "AttributeError: Method VideoInput is not a registered operator." Do you think is it because of OpenCV? Thanks.
Hi,
I'm trying to finetune using the script "finetune_ucf101.sh" I follow the tutorial "https://github.com/facebookresearch/R2Plus1D/blob/master/tutorials/hmdb51_finetune.md".
Follow the errors: Traceback (most recent call last): File "tools/train_net.py", line 501, in
main()
File "tools/train_net.py", line 496, in main
Train(args)
File "tools/train_net.py", line 280, in Train
net_type=('prof_dag' if args.profiling == 1 else 'dag'),
File "/usr/local/lib/python2.7/dist-packages/caffe2/python/data_parallel_model.py", line 31, in Parallelize_GPU
Parallelize(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/caffe2/python/data_parallel_model.py", line 207, in Parallelize
input_builder_fun(model_helper_obj)
File "tools/train_net.py", line 268, in add_video_input
use_local_file=args.use_local_file,
File "/home/murilo/R2Plus1D/lib/utils/model_helper.py", line 127, in AddVideoInput
data, label = model.net.VideoInput(
File "/usr/local/lib/python2.7/dist-packages/caffe2/python/core.py", line 2054, in getattr
",".join(workspace.C.nearby_opnames(op_type)) + ']'
AttributeError: Method VideoInput is not a registered operator. Did you mean: []