Liusifei / caffe-lowlevel

Project for paper "Learning Recursive Filters for Low-Level Vision via a Hybrid Neural Network", ECCV 2016
Other
81 stars 34 forks source link

error during compile ImgAffineWarp.cpp #1

Closed ArcherFMY closed 7 years ago

ArcherFMY commented 7 years ago

Hi,

Thank you for you sharing your codes!

Recently I am studying your ECCV paper---Learning Recursive Filter for Low-Level Vision via a Hybrid Network, and I cloned the codes to my computer.

But I got Some Errors when compiling ImgAffineWarp.cpp & ImgAffineWarp.h 1) the INTER_LINEAR used in ImgAffineWarp.h was not declared 2) the INTER_NEAREST used in ImgAffineWarp.cpp was not declared

Here are the detailed messages:

find: `examples': No such file or directory
find: `examples': No such file or directory
find: `examples': No such file or directory
PROTOC src/caffe/proto/caffe.proto
CXX src/caffe/blob.cpp
CXX src/caffe/common.cpp
CXX src/caffe/data_transformer.cpp
CXX src/caffe/internal_thread.cpp
CXX src/caffe/layers/absval_layer.cpp
CXX src/caffe/layers/balance_loss_layer.cpp
CXX src/caffe/layers/argmax_layer.cpp
CXX src/caffe/layers/accuracy_layer.cpp
CXX src/caffe/layers/base_conv_layer.cpp
CXX src/caffe/layers/base_data_layer.cpp
CXX src/caffe/layers/bnll_layer.cpp
CXX src/caffe/layers/bn_layer.cpp
CXX src/caffe/layers/concat_layer.cpp
CXX src/caffe/layers/contrastive_loss_layer.cpp
CXX src/caffe/layers/conv_layer.cpp
CXX src/caffe/layers/cudnn_pooling_layer.cpp
CXX src/caffe/layers/crop_layer.cpp
CXX src/caffe/layers/cudnn_relu_layer.cpp
CXX src/caffe/layers/cudnn_conv_layer.cpp
CXX src/caffe/layers/cudnn_softmax_layer.cpp
CXX src/caffe/layers/deconv_layer.cpp
CXX src/caffe/layers/dropout_layer.cpp
CXX src/caffe/layers/cudnn_sigmoid_layer.cpp
CXX src/caffe/layers/cudnn_tanh_layer.cpp
CXX src/caffe/layers/dummy_data_layer.cpp
CXX src/caffe/layers/loss_layer.cpp
CXX src/caffe/layers/lrn_layer.cpp
CXX src/caffe/layers/gatelstm_layer.cpp
CXX src/caffe/layers/eltwise_layer.cpp
CXX src/caffe/layers/data_layer.cpp
CXX src/caffe/layers/euclidean_loss_layer.cpp
CXX src/caffe/layers/hinge_loss_layer.cpp
CXX src/caffe/layers/gaterecurrent_layer.cpp
CXX src/caffe/layers/image_data_arbitrary_layer.cpp
CXX src/caffe/layers/infogain_loss_layer.cpp
CXX src/caffe/layers/manipulatelabel_layer.cpp
CXX src/caffe/layers/flatten_layer.cpp
CXX src/caffe/layers/hdf5_output_layer.cpp
CXX src/caffe/layers/multinomial_logistic_loss_layer.cpp
CXX src/caffe/layers/im2col_layer.cpp
CXX src/caffe/layers/neuron_layer.cpp
CXX src/caffe/layers/inner_product_layer.cpp
CXX src/caffe/layers/relu_layer.cpp
CXX src/caffe/layers/expandlabel_layer.cpp
CXX src/caffe/layers/pooling_layer.cpp
CXX src/caffe/layers/exp_layer.cpp
CXX src/caffe/layers/hdf5_data_layer.cpp
CXX src/caffe/layers/power_layer.cpp
CXX src/caffe/layers/prelu_layer.cpp
CXX src/caffe/layers/image_data_layer.cpp
CXX src/caffe/layers/slice_layer.cpp
CXX src/caffe/layers/spatialrecurrent_layer.cpp
CXX src/caffe/layers/spatiallstm_layer.cpp
CXX src/caffe/layers/tanh_layer.cpp
CXX src/caffe/layers/temporallstm_layer.cpp
CXX src/caffe/layers/threshold_layer.cpp
CXX src/caffe/layer_factory.cpp
CXX src/caffe/solver.cpp
CXX src/caffe/syncedmem.cpp
CXX src/caffe/util/benchmark.cpp
CXX src/caffe/util/cudnn.cpp
NVCC src/caffe/layers/concat_layer.cu
NVCC src/caffe/layers/conv_layer.cu
CXX src/caffe/layers/manipulate_loss_layer.cpp
CXX src/caffe/layers/softmax_loss_layer.cpp
NVCC src/caffe/layers/eltwise_layer.cu
CXX src/caffe/layers/window_data_layer.cpp
NVCC src/caffe/layers/hdf5_data_layer.cu
CXX src/caffe/net.cpp
NVCC src/caffe/layers/gaterecurrent_layer.cu
CXX src/caffe/util/math_functions.cpp
NVCC src/caffe/layers/absval_layer.cu
CXX src/caffe/layers/mvn_layer.cpp
NVCC src/caffe/layers/cudnn_pooling_layer.cu
NVCC src/caffe/layers/lrn_layer.cu
CXX src/caffe/layers/regionconv_layer.cpp
CXX src/caffe/layers/sigmoid_cross_entropy_loss_layer.cpp
CXX src/caffe/layers/silence_layer.cpp
NVCC src/caffe/layers/mvn_layer.cu
NVCC src/caffe/layers/pooling_layer.cu
NVCC src/caffe/layers/cudnn_tanh_layer.cu
CXX src/caffe/layers/softmax_layer.cpp
NVCC src/caffe/layers/euclidean_loss_layer.cu
NVCC src/caffe/layers/balance_loss_layer.cu
NVCC src/caffe/layers/bn_layer.cu
NVCC src/caffe/layers/contrastive_loss_layer.cu
CXX src/caffe/layers/memory_data_layer.cpp
NVCC src/caffe/layers/softmax_layer.cu
NVCC src/caffe/layers/slice_layer.cu
NVCC src/caffe/layers/deconv_layer.cu
NVCC src/caffe/layers/dropout_layer.cu
NVCC src/caffe/layers/regionconv_layer.cu
NVCC src/caffe/layers/expandlabel_layer.cu
CXX src/caffe/layers/split_layer.cpp
NVCC src/caffe/layers/threshold_layer.cu
CXX src/caffe/util/db.cpp
NVCC src/caffe/layers/relu_layer.cu
NVCC src/caffe/layers/bnll_layer.cu
CXX tools/caffe.cpp
NVCC src/caffe/layers/sigmoid_cross_entropy_loss_layer.cu
NVCC src/caffe/layers/cudnn_conv_layer.cu
NVCC src/caffe/layers/cudnn_relu_layer.cu
NVCC src/caffe/layers/manipulatelabel_layer.cu
NVCC src/caffe/layers/sigmoid_layer.cu
NVCC src/caffe/layers/silence_layer.cu
NVCC src/caffe/layers/manipulate_loss_layer.cu
CXX src/caffe/layers/resize_layer.cpp
CXX src/caffe/layers/sigmoid_layer.cpp
NVCC src/caffe/layers/power_layer.cu
NVCC src/caffe/layers/prelu_layer.cu
NVCC src/caffe/util/im2col.cu
NVCC src/caffe/layers/temporallstm_layer.cu
CXX src/caffe/util/im2col_new.cpp
CXX src/caffe/util/ImgAffineWarp.cpp
CXX src/caffe/util/insert_splits.cpp
CXX src/caffe/util/io.cpp
CXX src/caffe/util/im2col.cpp
CXX src/caffe/util/upgrade_proto.cpp
CXX src/caffe/util/util_img.cpp
NVCC src/caffe/layers/base_data_layer.cu
NVCC src/caffe/layers/hdf5_output_layer.cu
CXX tools/caffe_predict.cpp
CXX tools/compute_image_mean.cpp
NVCC src/caffe/layers/crop_layer.cu
CXX tools/test_net.cpp
CXX tools/train_net.cpp
NVCC src/caffe/layers/cudnn_sigmoid_layer.cu
NVCC src/caffe/layers/cudnn_softmax_layer.cu
NVCC src/caffe/layers/exp_layer.cu
NVCC src/caffe/layers/gatelstm_layer.cu
CXX tools/convert_imageset.cpp
CXX tools/device_query.cpp
CXX tools/extract_features.cpp
CXX tools/finetune_net.cpp
NVCC src/caffe/layers/im2col_layer.cu
NVCC src/caffe/layers/inner_product_layer.cu
NVCC src/caffe/layers/spatialrecurrent_layer.cu
NVCC src/caffe/layers/split_layer.cu
NVCC src/caffe/util/im2col_new.cu
NVCC src/caffe/util/math_functions.cu
NVCC src/caffe/util/util_img.cu
NVCC src/caffe/layers/resize_layer.cu
CXX tools/net_speed_benchmark.cpp
CXX tools/upgrade_net_proto_text.cpp
NVCC src/caffe/layers/softmax_loss_layer.cu
NVCC src/caffe/layers/spatiallstm_layer.cu
NVCC src/caffe/layers/tanh_layer.cu
CXX tools/upgrade_net_proto_binary.cpp
CXX .build_release/src/caffe/proto/caffe.pb.cc
In file included from src/caffe/util/ImgAffineWarp.cpp:1:0:
./include/caffe/util/ImgAffineWarp.hpp:36:87: error: ‘INTER_LINEAR’ was not declared in this scope
src/caffe/util/ImgAffineWarp.cpp: In function ‘void mAffineWarp(cv::Mat_<float>, const cv::Mat&, cv::Mat&, int)’:
src/caffe/util/ImgAffineWarp.cpp:32:36: error: ‘INTER_NEAREST’ was not declared in this scope
src/caffe/util/ImgAffineWarp.cpp:46:36: error: ‘INTER_NEAREST’ was not declared in this scope
make: *** [.build_release/src/caffe/util/ImgAffineWarp.o] Error 1
make: *** Waiting for unfinished jobs....
src/caffe/layers/balance_loss_layer.cpp: In instantiation of ‘void caffe::BalanceLossLayer<Dtype>::Backward_cpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = float]’:
src/caffe/layers/balance_loss_layer.cpp:164:1:   required from here
src/caffe/layers/balance_loss_layer.cpp:36:21: warning: unused variable ‘prob_data’ [-Wunused-variable]
src/caffe/layers/balance_loss_layer.cpp: In instantiation of ‘void caffe::BalanceLossLayer<Dtype>::Backward_cpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = double]’:
src/caffe/layers/balance_loss_layer.cpp:164:1:   required from here
src/caffe/layers/balance_loss_layer.cpp:36:21: warning: unused variable ‘prob_data’ [-Wunused-variable]
src/caffe/layers/bn_layer.cpp: In instantiation of ‘void caffe::BNLayer<Dtype>::Backward_cpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = float]’:
src/caffe/layers/bn_layer.cpp:350:3:   required from here
src/caffe/layers/bn_layer.cpp:228:18: warning: unused variable ‘bottom_data’ [-Wunused-variable]
src/caffe/layers/bn_layer.cpp: In instantiation of ‘void caffe::BNLayer<Dtype>::Backward_cpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = double]’:
src/caffe/layers/bn_layer.cpp:350:3:   required from here
src/caffe/layers/bn_layer.cpp:228:18: warning: unused variable ‘bottom_data’ [-Wunused-variable]
src/caffe/layers/expandlabel_layer.cpp: In instantiation of ‘void caffe::ExpandlabelLayer<Dtype>::LayerSetUp(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = float]’:
src/caffe/layers/expandlabel_layer.cpp:132:1:   required from here
src/caffe/layers/expandlabel_layer.cpp:19:9: warning: unused variable ‘num’ [-Wunused-variable]
src/caffe/layers/expandlabel_layer.cpp:20:9: warning: unused variable ‘height’ [-Wunused-variable]
src/caffe/layers/expandlabel_layer.cpp:21:9: warning: unused variable ‘width’ [-Wunused-variable]
src/caffe/layers/expandlabel_layer.cpp: In instantiation of ‘void caffe::ExpandlabelLayer<Dtype>::LayerSetUp(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = double]’:
src/caffe/layers/expandlabel_layer.cpp:132:1:   required from here
src/caffe/layers/expandlabel_layer.cpp:19:9: warning: unused variable ‘num’ [-Wunused-variable]
src/caffe/layers/expandlabel_layer.cpp:20:9: warning: unused variable ‘height’ [-Wunused-variable]
src/caffe/layers/expandlabel_layer.cpp:21:9: warning: unused variable ‘width’ [-Wunused-variable]
src/caffe/layers/regionconv_layer.cpp: In instantiation of ‘void caffe::RegionconvolutionLayer<Dtype>::Backward_cpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = float]’:
src/caffe/layers/regionconv_layer.cpp:329:1:   required from here
src/caffe/layers/regionconv_layer.cpp:279:18: warning: unused variable ‘output_col_data’ [-Wunused-variable]
src/caffe/layers/regionconv_layer.cpp: In instantiation of ‘void caffe::RegionconvolutionLayer<Dtype>::Backward_cpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = double]’:
src/caffe/layers/regionconv_layer.cpp:329:1:   required from here
src/caffe/layers/regionconv_layer.cpp:279:18: warning: unused variable ‘output_col_data’ [-Wunused-variable]
src/caffe/layers/manipulate_loss_layer.cpp: In instantiation of ‘void caffe::ManipulateLossLayer<Dtype>::Backward_cpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = float]’:
src/caffe/layers/manipulate_loss_layer.cpp:253:1:   required from here
src/caffe/layers/manipulate_loss_layer.cpp:39:19: warning: unused variable ‘prob_data’ [-Wunused-variable]
src/caffe/layers/manipulate_loss_layer.cpp: In instantiation of ‘void caffe::ManipulateLossLayer<Dtype>::Backward_cpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = double]’:
src/caffe/layers/manipulate_loss_layer.cpp:253:1:   required from here
src/caffe/layers/manipulate_loss_layer.cpp:39:19: warning: unused variable ‘prob_data’ [-Wunused-variable]
src/caffe/layers/spatiallstm_layer.cpp: In instantiation of ‘void caffe::SpatialLstmLayer<Dtype>::Forward_cpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = float]’:
src/caffe/layers/spatiallstm_layer.cpp:455:1:   required from here
src/caffe/layers/spatiallstm_layer.cpp:198:16: warning: unused variable ‘col_data’ [-Wunused-variable]
src/caffe/layers/spatiallstm_layer.cpp: In instantiation of ‘void caffe::SpatialLstmLayer<Dtype>::Backward_cpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = float]’:
src/caffe/layers/spatiallstm_layer.cpp:455:1:   required from here
src/caffe/layers/spatiallstm_layer.cpp:318:20: warning: unused variable ‘col_diff’ [-Wunused-variable]
src/caffe/layers/spatiallstm_layer.cpp: In instantiation of ‘void caffe::SpatialLstmLayer<Dtype>::Forward_cpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = double]’:
src/caffe/layers/spatiallstm_layer.cpp:455:1:   required from here
src/caffe/layers/spatiallstm_layer.cpp:198:16: warning: unused variable ‘col_data’ [-Wunused-variable]
src/caffe/layers/spatiallstm_layer.cpp: In instantiation of ‘void caffe::SpatialLstmLayer<Dtype>::Backward_cpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = double]’:
src/caffe/layers/spatiallstm_layer.cpp:455:1:   required from here
src/caffe/layers/spatiallstm_layer.cpp:318:20: warning: unused variable ‘col_diff’ [-Wunused-variable]
src/caffe/layers/image_data_arbitrary_layer.cpp: In instantiation of ‘void caffe::ImageDataArbitraryLayer<Dtype>::DataLayerSetUp(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = double]’:
src/caffe/layers/image_data_arbitrary_layer.cpp:312:5:   required from here
src/caffe/layers/image_data_arbitrary_layer.cpp:83:25: warning: format ‘%f’ expects argument of type ‘float*’, but argument 3 has type ‘double*’ [-Wformat]
src/caffe/layers/image_data_arbitrary_layer.cpp: In member function ‘void caffe::ImageDataArbitraryLayer<Dtype>::DataLayerSetUp(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = double]’:
src/caffe/layers/image_data_arbitrary_layer.cpp:83:25: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
src/caffe/layers/image_data_arbitrary_layer.cpp: In member function ‘void caffe::ImageDataArbitraryLayer<Dtype>::DataLayerSetUp(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = float]’:
src/caffe/layers/image_data_arbitrary_layer.cpp:83:25: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
src/caffe/util/math_functions.cpp: In instantiation of ‘void caffe::caffe_cpu_permute(const Dtype*, Dtype*, const int*, const int*, int, int) [with Dtype = float]’:
src/caffe/util/math_functions.cpp:506:157:   required from here
src/caffe/util/math_functions.cpp:479:6: warning: unused variable ‘n’ [-Wunused-variable]
src/caffe/util/math_functions.cpp: In instantiation of ‘void caffe::caffe_cpu_permute(const Dtype*, Dtype*, const int*, const int*, int, int) [with Dtype = double]’:
src/caffe/util/math_functions.cpp:507:160:   required from here
src/caffe/util/math_functions.cpp:479:6: warning: unused variable ‘n’ [-Wunused-variable]
tools/caffe_predict.cpp: In function ‘cv::Mat get_outputmap(const std::vector<std::vector<caffe::Blob<float>*, std::allocator<caffe::Blob<float>*> >, std::allocator<std::vector<caffe::Blob<float>*, std::allocator<caffe::Blob<float>*> > > >&, int, bool)’:
tools/caffe_predict.cpp:161:7: warning: unused variable ‘count’ [-Wunused-variable]
tools/caffe_predict.cpp: In function ‘cv::Mat forwardNet(caffe::Net<float>&, std::string, cv::Mat, int, int, bool, bool)’:
tools/caffe_predict.cpp:225:34: warning: unused variable ‘bottom_need_backward’ [-Wunused-variable]
tools/caffe_predict.cpp: In function ‘std::vector<caffe::Blob<float>*, std::allocator<caffe::Blob<float>*> > extractNetfeature(caffe::Net<float>&, std::string, cv::Mat, int, int)’:
tools/caffe_predict.cpp:257:7: warning: unused variable ‘input_height’ [-Wunused-variable]
tools/caffe_predict.cpp:258:7: warning: unused variable ‘input_width’ [-Wunused-variable]
tools/caffe_predict.cpp:275:34: warning: unused variable ‘bottom_need_backward’ [-Wunused-variable]
tools/caffe_predict.cpp: In function ‘int test_saveimg()’:
tools/caffe_predict.cpp:338:9: warning: unused variable ‘loss’ [-Wunused-variable]
tools/caffe_predict.cpp:340:13: warning: unused variable ‘start’ [-Wunused-variable]
tools/caffe_predict.cpp:340:20: warning: unused variable ‘finish’ [-Wunused-variable]
tools/caffe_predict.cpp:341:12: warning: unused variable ‘t_start’ [-Wunused-variable]
tools/caffe_predict.cpp:341:21: warning: unused variable ‘t_end’ [-Wunused-variable]
tools/caffe_predict.cpp: In function ‘int test_extractfeature()’:
tools/caffe_predict.cpp:413:9: warning: unused variable ‘loss’ [-Wunused-variable]
tools/caffe_predict.cpp:415:13: warning: unused variable ‘start’ [-Wunused-variable]
tools/caffe_predict.cpp:415:20: warning: unused variable ‘finish’ [-Wunused-variable]
tools/caffe_predict.cpp:416:12: warning: unused variable ‘t_start’ [-Wunused-variable]
tools/caffe_predict.cpp:416:21: warning: unused variable ‘t_end’ [-Wunused-variable]
tools/caffe_predict.cpp: In function ‘int test_extract_one_feature()’:
tools/caffe_predict.cpp:496:9: warning: unused variable ‘loss’ [-Wunused-variable]
tools/caffe_predict.cpp:498:13: warning: unused variable ‘start’ [-Wunused-variable]
tools/caffe_predict.cpp:498:20: warning: unused variable ‘finish’ [-Wunused-variable]
tools/caffe_predict.cpp:499:12: warning: unused variable ‘t_start’ [-Wunused-variable]
tools/caffe_predict.cpp:499:21: warning: unused variable ‘t_end’ [-Wunused-variable]
tools/caffe_predict.cpp: In function ‘int test_extractparam()’:
tools/caffe_predict.cpp:547:10: warning: unused variable ‘inputcolorimg’ [-Wunused-variable]
tools/caffe_predict.cpp:550:15: warning: unused variable ‘height’ [-Wunused-variable]
tools/caffe_predict.cpp:551:15: warning: unused variable ‘width’ [-Wunused-variable]

I'm using GTX1080 + Cuda 8.0 + Opencv3.1

I wonder if there are some modified things in Cuda and Opencv?

Thanks!

Liusifei commented 7 years ago

Hi,

INTER_LINEAR is one of the types in cv::InterpolationFlags, so you may possibly need to check you opencv installation first.

Best, Sifei

ArcherFMY commented 7 years ago

@Liusifei

Thank you!

I found it was the problem of the version of the OpenCV.

I replaced 'INTER_NEAREST' with 'CV_INTER_NN' and 'INTER_LINEAR' with 'CV_INTER_LINEAR' and it worked.