├── .gitignore ├── mean └── mean.binaryproto ├── src ├── .classify.cpp.swo ├── hdf5_reader.cpp ├── flow_color_coder.cpp ├── classify.cpp └── main.cpp ├── .gitmodules ├── include ├── flow_color_coder.h ├── hdf5_reader.h └── classify.h ├── CMakeLists.txt ├── README.md └── model_description └── deploy_2class_city.prototxt /.gitignore: -------------------------------------------------------------------------------- 1 | build/* 2 | datasets/* 3 | models/* 4 | -------------------------------------------------------------------------------- /mean/mean.binaryproto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanVer/SMSnet/HEAD/mean/mean.binaryproto -------------------------------------------------------------------------------- /src/.classify.cpp.swo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohanVer/SMSnet/HEAD/src/.classify.cpp.swo -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "extern/caffe"] 2 | path = extern/caffe 3 | url = https://github.com/BVLC/caffe.git 4 | [submodule "extern/--name"] 5 | path = extern/--name 6 | url = https://github.com/JohanVer/caffe.git 7 | [submodule "extern/modcaffe"] 8 | path = extern/modcaffe 9 | url = https://github.com/JohanVer/caffe.git 10 | -------------------------------------------------------------------------------- /include/flow_color_coder.h: -------------------------------------------------------------------------------- 1 | #ifndef FLOW_COLOR_CODER_H 2 | #define FLOW_COLOR_CODER_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #define MAXCOLS 60 13 | // the "official" threshold - if the absolute value of either 14 | // flow component is greater, it's considered unknown 15 | #define UNKNOWN_FLOW_THRESH 1e9 16 | 17 | // value to use to represent unknown flow 18 | #define UNKNOWN_FLOW 1e10 19 | 20 | class flow_color_coder 21 | { 22 | public: 23 | flow_color_coder(); 24 | 25 | void motionToColor(const cv::Mat &in, cv::Mat &out, float maxmotion); 26 | 27 | void computeColor(float fx, float fy, cv::Vec &pix); 28 | 29 | void makecolorwheel(); 30 | 31 | void setcols(int r, int g, int b, int k); 32 | 33 | int verbose; 34 | int ncols; 35 | int colorwheel[MAXCOLS][3]; 36 | }; 37 | 38 | #endif // FLOW_COLOR_CODER_H 39 | -------------------------------------------------------------------------------- /include/hdf5_reader.h: -------------------------------------------------------------------------------- 1 | #ifndef HDF5_READER_H 2 | #define HDF5_READER_H 3 | 4 | #include "caffe/util/hdf5.hpp" 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "hdf5.h" 19 | #include "caffe/blob.hpp" 20 | #include "caffe/common.hpp" 21 | #include "caffe/layers/hdf5_data_layer.hpp" 22 | #include "caffe/proto/caffe.pb.h" 23 | 24 | class hdf5_reader 25 | { 26 | public: 27 | hdf5_reader(const boost::filesystem::path hdf5_paths, const std::string &dataset_name); 28 | bool loadPaths(const boost::filesystem::path &path_to_paths_file, std::vector &list_of_paths); 29 | cv::Mat nextImage(); 30 | private: 31 | std::vector hdf5_paths_; 32 | 33 | 34 | size_t current_idx; 35 | std::vector*> blob_bottom_vec_; 36 | std::vector*> blob_top_vec_; 37 | caffe::Blob* const blob_top_data_; 38 | caffe::LayerParameter param; 39 | 40 | caffe::HDF5DataParameter* hdf5_data_param; 41 | std::unique_ptr> layer_; 42 | 43 | int width, height, num_cols; 44 | }; 45 | 46 | #endif // HDF5_READER_H 47 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(caffe_test) 2 | cmake_minimum_required(VERSION 2.8) 3 | add_definitions(-DUSE_OPENCV) 4 | add_definitions(${Caffe_DEFINITIONS}) 5 | 6 | include(CheckCXXCompilerFlag) 7 | CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) 8 | CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X) 9 | if(COMPILER_SUPPORTS_CXX11) 10 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") 11 | elseif(COMPILER_SUPPORTS_CXX0X) 12 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") 13 | else() 14 | message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.") 15 | endif() 16 | 17 | set(CMAKE_BUILD_TYPE Release) 18 | 19 | find_package(OpenCV REQUIRED ) 20 | find_package(Boost COMPONENTS system filesystem chrono timer REQUIRED) 21 | find_package(HDF5 REQUIRED) 22 | find_package(Caffe REQUIRED) 23 | find_package(Protobuf REQUIRED) 24 | 25 | include_directories( ${OpenCV_INCLUDE_DIRS} ${Caffe_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CAFFE_BUILD_INCLUDE} ${PROTOBUF_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS}) 26 | 27 | add_library(caffe_test 28 | src/classify.cpp 29 | src/flow_color_coder.cpp 30 | src/hdf5_reader.cpp 31 | include/classify.h 32 | include/flow_color_coder.h 33 | include/hdf5_reader.h 34 | ) 35 | 36 | target_link_libraries ( caffe_test ${SYSTEM_LIBS} ${OpenCV_LIBS} ${Boost_LIBRARIES} ${Caffe_LIBRARIES} ${PROTOBUF_LIBRARIES} ${HDF5_LIBRARIES} rt dl z m X11) 37 | 38 | add_executable(caffe_test_ex src/main.cpp) 39 | target_link_libraries (caffe_test_ex ${SYSTEM_LIBS} caffe_test ${GLOG_LIBRARIES} ${PROTOBUF_LIBRARIES} ${HDF5_LIBRARIES} rt dl m X11) 40 | 41 | -------------------------------------------------------------------------------- /src/hdf5_reader.cpp: -------------------------------------------------------------------------------- 1 | #include "../include/hdf5_reader.h" 2 | 3 | bool hdf5_reader::loadPaths(const boost::filesystem::path &path_to_paths_file, std::vector &list_of_paths){ 4 | std::ifstream path_file; 5 | path_file.open(path_to_paths_file.string()); 6 | 7 | std::string line; 8 | while (std::getline(path_file, line)) 9 | { 10 | list_of_paths.push_back(boost::filesystem::path(line)); 11 | } 12 | 13 | if(list_of_paths.size()){ 14 | std::cout << "Loaded " << list_of_paths.size() << " file paths\n"; 15 | return true; 16 | } 17 | else{ 18 | std::cerr << "list size of path file is zero...\n"; 19 | return false; 20 | } 21 | } 22 | 23 | hdf5_reader::hdf5_reader(const boost::filesystem::path hdf5_paths, const std::string &dataset_name): 24 | current_idx(0), 25 | blob_top_data_(new caffe::Blob()) 26 | { 27 | blob_top_vec_.push_back(blob_top_data_); 28 | 29 | std::cout << "Using sample HDF5 data file " << hdf5_paths.string() << std::endl; 30 | 31 | param.add_top(dataset_name); 32 | std::cout << "Searching for dataset: " << dataset_name << " in hdf5 file ..." << std::endl; 33 | hdf5_data_param = param.mutable_hdf5_data_param(); 34 | int batch_size = 1; 35 | hdf5_data_param->set_batch_size(batch_size); 36 | hdf5_data_param->set_source(hdf5_paths.string()); 37 | 38 | 39 | layer_ = std::unique_ptr > (new caffe::HDF5DataLayer(param)); 40 | layer_->SetUp(this->blob_bottom_vec_, this->blob_top_vec_); 41 | 42 | 43 | height = this->blob_top_data_->height(); 44 | width = this->blob_top_data_->width(); 45 | num_cols = this->blob_top_data_->channels(); 46 | 47 | std::cout << "Channels: " << num_cols << " Height:" << height << " Width: " << width << std::endl; 48 | } 49 | 50 | cv::Mat hdf5_reader::nextImage(){ 51 | 52 | layer_->Forward(this->blob_bottom_vec_, this->blob_top_vec_); 53 | cv::Mat out; 54 | if(num_cols == 2){ 55 | out = cv::Mat(height, width, CV_32FC2); 56 | }else if(num_cols == 1){ 57 | out = cv::Mat(height, width, CV_32FC1); 58 | } 59 | 60 | for (int j = 0; j < num_cols; ++j) { 61 | for (int h = 0; h < height; ++h) { 62 | for (int w = 0; w < width; ++w) { 63 | int idx = (j * height * width + 64 | h * width + w); 65 | if(num_cols == 2){ 66 | cv::Vec2f &p_m = out.at(h, w); 67 | p_m[j] = this->blob_top_data_->cpu_data()[idx]; 68 | }else if(num_cols ==1){ 69 | float &p_m = out.at(h, w); 70 | p_m = this->blob_top_data_->cpu_data()[idx]; 71 | } 72 | } 73 | } 74 | } 75 | return out; 76 | } 77 | -------------------------------------------------------------------------------- /include/classify.h: -------------------------------------------------------------------------------- 1 | #ifndef CLASSIFY_H 2 | #define CLASSIFY_H 3 | 4 | #include 5 | 6 | #ifdef DEPTH_COLOR 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | namespace classify{ 22 | 23 | class PredictionStatistic{ 24 | public: 25 | PredictionStatistic(){ 26 | true_pos_= 0; 27 | false_pos_ = 0; 28 | false_neg_ = 0; 29 | iou_ = 0; 30 | precision_ = 0; 31 | recall_ = 0; 32 | } 33 | 34 | unsigned int true_pos_; 35 | unsigned int false_pos_; 36 | unsigned int false_neg_; 37 | double iou_; 38 | double precision_; 39 | double recall_; 40 | }; 41 | 42 | class Classifier { 43 | public: 44 | Classifier(const std::string& model_file, 45 | const std::string& trained_file, 46 | const std::map &mean_files); 47 | 48 | std::vector > Classify(const std::vector &img, std::vector req_layer); 49 | 50 | int calcMeanStatistic(const std::map &stat, std::set &ignore_list, double &mean_iou, double &mean_prec, double &mean_rec, double &mean_fp, double &mean_fn); 51 | 52 | void calculateStatistics(const cv::Mat &net_im, const cv::Mat >, std::set &ignore_list, std::map &statistics, double &acc, double &error); 53 | 54 | void createColorCodedLabels(const cv::Mat &labels, cv::Mat &color_coded, std::map color_map); 55 | 56 | uint getNumberOfClasses(){ 57 | return num_output_classes_; 58 | } 59 | 60 | cv::Size getInputSize(){ 61 | return input_geometry_; 62 | } 63 | 64 | void Argmax(const std::vector &channels, cv::Mat &argmax); 65 | 66 | cv::Mat depthImage(cv::Mat &in); 67 | 68 | cv::Mat flowImage(cv::Mat &in); 69 | 70 | private: 71 | void SetMean(const cv::Scalar &mean, uint8_t index); 72 | 73 | void SetMean(const std::map &mean_file); 74 | 75 | std::vector > Predict(const std::vector &img, std::vector req_layers); 76 | 77 | void WrapInputLayer(std::vector* input_channels, size_t num_input); 78 | 79 | void WrapOutputLayer(std::vector< cv::Mat> *output_channels, std::string l_name); 80 | 81 | void Preprocess(const cv::Mat& img, 82 | std::vector* input_channels, uint8_t input_index); 83 | 84 | 85 | private: 86 | std::shared_ptr > net_; 87 | cv::Size input_geometry_; 88 | int num_channels_; 89 | uint num_output_classes_; 90 | std::map mean_; 91 | cv::Mat label_image_; 92 | std::vector labels_; 93 | }; 94 | 95 | 96 | } 97 | 98 | 99 | #endif // CLASSIFY_H 100 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SMSnet 2 | Model-evaluator of Publication : "SMSnet: Semantic Motion Segmentation using Deep Convolutional Neural Networks" 3 | 4 | [![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/oTL7l7ZuQpM/0.jpg)](https://www.youtube.com/watch?v=oTL7l7ZuQpM) 5 | 6 | ## Models 7 | The models can be downloaded here: [Models](http://aisdatasets.informatik.uni-freiburg.de/smsnet/models.tar.gz) 8 | This link contains the models trained on City-Kitti-Motion using EFS and without EFS on inf range and 40m range 9 | 10 | ## Test databases 11 | The databases can be downloaded here: 12 | - [KITTI Test Dataset](http://aisdatasets.informatik.uni-freiburg.de/smsnet/datasets/kitti.tar.gz) 13 | 14 | 15 | Each compressed archiv includes 8 lmdb databases: 16 | 17 | Labels: 18 | - IMAGES_LMDB0: Labels with 20m range 19 | - IMAGES_LMDB1: Labels with 40m range 20 | - IMAGES_LMDB2: Labels with 60m range 21 | - LABELS_LMDB: Labels with inf range 22 | 23 | Images: 24 | - IMAGES_LMDB3: Left image corresponding to label 25 | - IMAGES_LMDB4: Previous left image 26 | 27 | Flow: 28 | Note: The flow is centered at 128 and scaled by 1/6.4 in order to fit into the UC1 LMDB format 29 | - IMAGES_LMDB5: Flow with EFS 30 | - IMAGES_LMDB6: Flow 31 | 32 | ### Raw Annotations 33 | The full moving car/ static car annotations for the training and validation sets can be downloaded here: 34 | 35 | 36 | ## Prerequisites 37 | 1. Caffe 38 | 2. CUDA 39 | 3. OPENCV 40 | 4. HDF5 41 | 5. PROTOBUF 42 | 43 | ## How to use 44 | 45 | ### Build caffe 46 | This repo comes with a modified version of caffe 47 | 1. Clone repo 48 | 2. Go into extern/modcaffe 49 | 3. Create a build folder "mkdir build && cd build" 50 | 4. Compile: "cmake .." then "make -j8" 51 | 52 | ### SMSnet evaluator 53 | 1. Go to repo and create build dir: "mkdir build && mkdir datasets && mkdir models" 54 | 2. Download KITTI dataset from the provided link and extract it into "datasets" 55 | 3. Download Models and extract them into "models" 56 | 4. Go to build folder: "cd build" 57 | 5. Compile: "cmake .." then "make" 58 | 6. run program : "./caffe_test_ex" . The network and the KITTI database should load. The network predictions and the GT is visualized. To get the next prediction just press Enter. 59 | If you want to change the Dataset take a look in the code (main.cpp) 60 | 61 | ## Troubleshooting 62 | If you get : "caffe/proto/caffe.pb.h: No such file or directory" try to go in your caffe dir (extern/modcaffe) and type: 63 | 1. protoc src/caffe/proto/caffe.proto --cpp_out=. 64 | 2. mkdir include/caffe/proto 65 | 3. mv src/caffe/proto/caffe.pb.h include/caffe/proto 66 | 67 | # Cite 68 | If you use this code or the datasets please make sure that you cite the following papers: 69 | 70 | ~~~~ 71 | @InProceedings{Vertens17Icra, 72 | author = {Johan Vertens, Abhinav Valada and Wolfram Burgard}, 73 | title = {SMSnet: Semantic Motion Segmentation 74 | using Deep Convolutional Neural Networks}, 75 | year = 2017, 76 | month = sept, 77 | url = {https://github.com/JohanVer/SMSnet}, 78 | address = {Vancouver, Canada} 79 | } 80 | ~~~~ 81 | 82 | ~~~~ 83 | @article{DBLP:journals/corr/CordtsORREBFRS16, 84 | author = {Marius Cordts and 85 | Mohamed Omran and 86 | Sebastian Ramos and 87 | Timo Rehfeld and 88 | Markus Enzweiler and 89 | Rodrigo Benenson and 90 | Uwe Franke and 91 | Stefan Roth and 92 | Bernt Schiele}, 93 | title = {The Cityscapes Dataset for Semantic Urban Scene Understanding}, 94 | journal = {CoRR}, 95 | volume = {abs/1604.01685}, 96 | year = {2016}, 97 | url = {http://arxiv.org/abs/1604.01685}, 98 | timestamp = {Wed, 07 Jun 2017 14:41:02 +0200}, 99 | biburl = {http://dblp.uni-trier.de/rec/bib/journals/corr/CordtsORREBFRS16}, 100 | bibsource = {dblp computer science bibliography, http://dblp.org} 101 | } 102 | ~~~~ 103 | 104 | ~~~~ 105 | @ARTICLE{Geiger2013IJRR, 106 | author = {Andreas Geiger and Philip Lenz and Christoph Stiller and Raquel Urtasun}, 107 | title = {Vision meets Robotics: The KITTI Dataset}, 108 | journal = {International Journal of Robotics Research (IJRR)}, 109 | year = {2013} 110 | } 111 | ~~~~ 112 | -------------------------------------------------------------------------------- /src/flow_color_coder.cpp: -------------------------------------------------------------------------------- 1 | #include "../include/flow_color_coder.h" 2 | 3 | // return whether flow vector is unknown 4 | bool unknown_flow(float u, float v) { 5 | return (fabs(u) > UNKNOWN_FLOW_THRESH) 6 | || (fabs(v) > UNKNOWN_FLOW_THRESH) 7 | || std::isnan(u) || std::isnan(v); 8 | } 9 | 10 | bool unknown_flow(float *f) { 11 | return unknown_flow(f[0], f[1]); 12 | } 13 | 14 | void flow_color_coder::setcols(int r, int g, int b, int k) 15 | { 16 | colorwheel[k][0] = r; 17 | colorwheel[k][1] = g; 18 | colorwheel[k][2] = b; 19 | } 20 | 21 | flow_color_coder::flow_color_coder() 22 | { 23 | ncols = 0; 24 | verbose = 1; 25 | } 26 | 27 | void flow_color_coder::makecolorwheel() 28 | { 29 | // relative lengths of color transitions: 30 | // these are chosen based on perceptual similarity 31 | // (e.g. one can distinguish more shades between red and yellow 32 | // than between yellow and green) 33 | int RY = 15; 34 | int YG = 6; 35 | int GC = 4; 36 | int CB = 11; 37 | int BM = 13; 38 | int MR = 6; 39 | ncols = RY + YG + GC + CB + BM + MR; 40 | //printf("ncols = %d\n", ncols); 41 | if (ncols > MAXCOLS) 42 | exit(1); 43 | 44 | int i; 45 | int k = 0; 46 | for (i = 0; i < RY; i++) setcols(255, 255*i/RY, 0, k++); 47 | for (i = 0; i < YG; i++) setcols(255-255*i/YG, 255, 0, k++); 48 | for (i = 0; i < GC; i++) setcols(0, 255, 255*i/GC, k++); 49 | for (i = 0; i < CB; i++) setcols(0, 255-255*i/CB, 255, k++); 50 | for (i = 0; i < BM; i++) setcols(255*i/BM, 0, 255, k++); 51 | for (i = 0; i < MR; i++) setcols(255, 0, 255-255*i/MR, k++); 52 | } 53 | 54 | void flow_color_coder::computeColor(float fx, float fy, cv::Vec &pix) 55 | { 56 | if (ncols == 0) 57 | makecolorwheel(); 58 | 59 | float rad = sqrt(fx * fx + fy * fy); 60 | float a = atan2(-fy, -fx) / M_PI; 61 | float fk = (a + 1.0) / 2.0 * (ncols-1); 62 | int k0 = (int)fk; 63 | int k1 = (k0 + 1) % ncols; 64 | float f = fk - k0; 65 | //f = 0; // uncomment to see original color wheel 66 | for (int b = 0; b < 3; b++) { 67 | float col0 = colorwheel[k0][b] / 255.0; 68 | float col1 = colorwheel[k1][b] / 255.0; 69 | float col = (1 - f) * col0 + f * col1; 70 | if (rad <= 1) 71 | col = 1 - rad * (1 - col); // increase saturation with radius 72 | else 73 | col *= .75; // out of range 74 | pix[2 - b] = (int)(255.0 * col); 75 | } 76 | } 77 | 78 | void flow_color_coder::motionToColor(const cv::Mat &in, cv::Mat &out, float maxmotion){ 79 | cv::Size sh = in.size(); 80 | int width = sh.width, height = sh.height; 81 | out = cv::Mat(height, width, CV_8UC3, cv::Scalar(0,0,0)); 82 | int x, y; 83 | // determine motion range: 84 | float maxx = -999, maxy = -999; 85 | float minx = 999, miny = 999; 86 | float maxrad = -1; 87 | for (y = 0; y < height; y++) { 88 | for (x = 0; x < width; x++) { 89 | cv::Vec input_px = in.at>(y, x); 90 | float fx = input_px[0]; 91 | float fy = input_px[1]; 92 | 93 | if (unknown_flow(fx, fy)) 94 | continue; 95 | maxx = std::max(maxx, fx); 96 | maxy = std::max(maxy, fy); 97 | minx = std::min(minx, fx); 98 | miny = std::min(miny, fy); 99 | float rad = sqrt(fx * fx + fy * fy); 100 | maxrad = std::max(maxrad, rad); 101 | } 102 | } 103 | //printf("max motion: %.4f motion range: u = %.3f .. %.3f; v = %.3f .. %.3f\n", 104 | // maxrad, minx, maxx, miny, maxy); 105 | std::cout << "max_motion: " << maxrad << " motion_range: u= " << minx << " .. " << maxx << " v= " << miny << " .. " << maxy << std::endl; 106 | 107 | 108 | if (maxmotion > 0) // i.e., specified on commandline 109 | maxrad = maxmotion; 110 | 111 | if (maxrad == 0) // if flow == 0 everywhere 112 | maxrad = 1; 113 | 114 | if (verbose) 115 | fprintf(stderr, "normalizing by %g\n", maxrad); 116 | 117 | for (y = 0; y < height; y++) { 118 | for (x = 0; x < width; x++) { 119 | cv::Vec input_px = in.at>(y, x); 120 | float fx = input_px[0]; 121 | float fy = input_px[1]; 122 | 123 | cv::Vec &output_px = out.at>(y, x); 124 | if (unknown_flow(fx, fy)) { 125 | output_px[0] = output_px[1] = output_px[2] = 0; 126 | } else { 127 | computeColor(fx/maxrad, fy/maxrad, output_px); 128 | } 129 | } 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /src/classify.cpp: -------------------------------------------------------------------------------- 1 | #include "../include/classify.h" 2 | 3 | using namespace caffe; // NOLINT(build/namespaces) 4 | using std::string; 5 | 6 | namespace classify{ 7 | 8 | Classifier::Classifier(const string& model_file, 9 | const string& trained_file, 10 | const std::map& mean_files) { 11 | #ifdef CPU_ONLY 12 | Caffe::set_mode(Caffe::CPU); 13 | #else 14 | Caffe::set_mode(Caffe::GPU); 15 | Caffe::SetDevice(0); 16 | #endif 17 | /* Load the network. */ 18 | net_.reset(new Net(model_file, TEST)); 19 | net_->CopyTrainedLayersFrom(trained_file); 20 | 21 | // CHECK_EQ(net_->num_outputs(), 1) << "Network should have exactly one output."; 22 | 23 | Blob* input_layer = net_->input_blobs()[0]; 24 | num_channels_ = input_layer->channels(); 25 | CHECK(num_channels_ == 3) << "Input layer should have 3 channels."; 26 | input_geometry_ = cv::Size(input_layer->width(), input_layer->height()); 27 | 28 | Blob* output_layer = net_->output_blobs()[0]; 29 | num_output_classes_ = output_layer->channels(); 30 | std::cout << "Network has : " << num_output_classes_ << " output classes...." << std::endl; 31 | /* Load the binaryproto mean file. */ 32 | SetMean(mean_files); 33 | //SetMean(cv::Scalar(81.1208038, 102.18515,120.44704)); 34 | 35 | std::cout << "Neural Network is setup..." << std::endl; 36 | 37 | } 38 | 39 | size_t countPixelBelongingToClass(const cv::Mat &img, size_t class_nr){ 40 | size_t counter = 0; 41 | for(auto y = 0; y < img.rows; y++){ 42 | for(auto x = 0; x < img.cols; x++){ 43 | unsigned char pixel = img.at(y, x); 44 | if(pixel == class_nr) counter++; 45 | } 46 | } 47 | return counter; 48 | } 49 | 50 | int Classifier::calcMeanStatistic(const std::map &stat, std::set &ignore_list, double &mean_iou, double &mean_prec, double &mean_rec, double &mean_fp, double &mean_fn){ 51 | mean_iou = 0.0; 52 | mean_prec = 0.0; 53 | mean_rec = 0.0; 54 | mean_fp = 0.0; 55 | mean_fn = 0.0; 56 | size_t valid_counter = 0; 57 | for(auto i = stat.begin(); i != stat.end(); i++){ 58 | double iou = i->second.iou_; 59 | double precision =i->second.precision_; 60 | double recall =i->second.recall_; 61 | double fp =i->second.false_pos_; 62 | double fn =i->second.false_neg_; 63 | if(ignore_list.find(i->first) == ignore_list.end()){ 64 | if(iou != -1){ 65 | mean_iou += iou; 66 | //std::cout << "IOU " << i->first << " : " << iou << std::endl; 67 | valid_counter++; 68 | 69 | mean_prec += precision; 70 | //std::cout << "Precision: " << i->first << " : " << precision << std::endl; 71 | 72 | mean_rec += recall; 73 | //std::cout << "Recall: " << i->first << " : " << recall << std::endl; 74 | 75 | mean_fp += fp; 76 | 77 | mean_fn += fn; 78 | } 79 | } 80 | } 81 | 82 | if(valid_counter){ 83 | mean_iou /= valid_counter; 84 | mean_rec /= valid_counter; 85 | mean_prec /= valid_counter; 86 | mean_fp /= valid_counter; 87 | mean_fn /= valid_counter; 88 | } 89 | return valid_counter; 90 | } 91 | 92 | 93 | void Classifier::calculateStatistics(const cv::Mat &net_im, const cv::Mat >, std::set &ignore_list, std::map &statistics, double &acc, double &error){ 94 | 95 | // Calculate accuracy and error 96 | acc = 0; 97 | error = 0; 98 | for(auto y = 0; y < net_im.rows; y++){ 99 | for(auto x = 0; x < net_im.cols; x++){ 100 | unsigned char net_pixel = net_im.at(y, x); 101 | unsigned char gt_pixel = gt.at(y, x); 102 | if(net_pixel == gt_pixel){ 103 | acc++; 104 | }else{ 105 | error++; 106 | } 107 | } 108 | } 109 | acc = acc / (net_im.cols * net_im.rows); 110 | error = error / (net_im.cols * net_im.rows); 111 | 112 | // Get true positive, false positive, false negative 113 | for(auto cl = 0; cl < num_output_classes_; cl++){ 114 | size_t cl_in_img = 0; 115 | 116 | PredictionStatistic class_stat; 117 | for(auto y = 0; y < net_im.rows; y++){ 118 | for(auto x = 0; x < net_im.cols; x++){ 119 | unsigned char net_pixel = net_im.at(y, x); 120 | unsigned char gt_pixel = gt.at(y, x); 121 | 122 | if(gt_pixel == cl){ 123 | cl_in_img++; 124 | } 125 | 126 | if(net_pixel == cl || gt_pixel == cl){ 127 | if(gt_pixel != 0 && gt_pixel != 11){ 128 | if(net_pixel == cl && gt_pixel == cl){ 129 | // True positive 130 | class_stat.true_pos_ += 1; 131 | } 132 | else if(net_pixel == cl && gt_pixel != cl){ 133 | // False positive 134 | class_stat.false_pos_ += 1; 135 | } 136 | else if(net_pixel !=cl && gt_pixel == cl){ 137 | // False negative 138 | class_stat.false_neg_ += 1; 139 | } 140 | } 141 | }else{ 142 | // True negative 143 | } 144 | } 145 | } 146 | 147 | // Calc IoU 148 | // double iou_test = (double) class_stat.true_pos_ /((double) countPixelBelongingToClass(net_im, cl) + (double) countPixelBelongingToClass(gt, cl) - (double) class_stat.true_pos_); 149 | double div = ((double)class_stat.true_pos_ + (double)class_stat.false_pos_ + (double)class_stat.false_neg_); 150 | //std::cout <<"cl: " << cl << "div : " << div << " tp: " << (double) class_stat.true_pos_ << " fn: " << (double) class_stat.false_neg_ << " cl_in_img: " << cl_in_img << " fp: " << class_stat.false_pos_ << std::endl; 151 | double tp_temp = (double) class_stat.true_pos_; 152 | //if(div != 0 && tp_temp != 0 && cl_in_img > 0){ 153 | if(div != 0 ){ 154 | class_stat.iou_ = tp_temp / div; 155 | }else{ 156 | class_stat.iou_ = -1; 157 | } 158 | // Calc precision 159 | div = (double) (class_stat.true_pos_ + class_stat.false_pos_); 160 | if(div > 0 ){ 161 | class_stat.precision_ = (double)class_stat.true_pos_ / div; 162 | }else{ 163 | class_stat.precision_ = -1; 164 | } 165 | 166 | // Calc recall 167 | div = (double) (class_stat.true_pos_ + class_stat.false_neg_); 168 | if(div > 0 ){ 169 | class_stat.recall_ = (double)class_stat.true_pos_ / div; 170 | } 171 | else{ 172 | class_stat.recall_ = -1; 173 | } 174 | 175 | 176 | statistics[cl] = class_stat; 177 | } 178 | } 179 | 180 | void Classifier::createColorCodedLabels(const cv::Mat &labels, cv::Mat &color_coded, std::map color_map){ 181 | for(auto y = 0; y < labels.rows; y++){ 182 | for(auto x = 0; x < labels.cols; x++){ 183 | unsigned char label = labels.at(y, x); 184 | if(color_map.find(label) != color_map.end()){ 185 | cv::Vec3b color = color_map.at(label); 186 | (color_coded.at(y, x))[0] = color[0]; 187 | (color_coded.at(y, x))[1] = color[1]; 188 | (color_coded.at(y, x))[2] = color[2]; 189 | }else{ 190 | (color_coded.at(y, x))[0] = 0; 191 | (color_coded.at(y, x))[1] = 0; 192 | (color_coded.at(y, x))[2] = 0; 193 | } 194 | } 195 | } 196 | } 197 | 198 | void Classifier::Argmax(const std::vector &channels, cv::Mat &argmax){ 199 | 200 | size_t width = channels.front().cols; 201 | size_t height = channels.front().rows; 202 | argmax = cv::Mat(height, width, CV_8UC1, cv::Scalar(0)); 203 | 204 | for(size_t y = 0; y < height; y++){ 205 | for(size_t x = 0; x < width; x++){ 206 | 207 | unsigned char best_i = 0; 208 | float best_val = std::numeric_limits::lowest(); 209 | 210 | for(size_t ch = 0; ch < channels.size(); ch++){ 211 | float val = channels.at(ch).at(y, x); 212 | if(val > best_val){ 213 | best_val = val; 214 | best_i = ch; 215 | } 216 | } 217 | argmax.at(y,x) = best_i; 218 | } 219 | } 220 | 221 | double max= 0; 222 | double min = 0; 223 | cv::minMaxLoc(argmax, &min, &max); 224 | } 225 | 226 | /* Return the top N predictions. */ 227 | std::vector > Classifier::Classify(const std::vector& imgs, std::vector req_layer) { 228 | const std::vector > &output = Predict(imgs, req_layer); 229 | num_output_classes_ = output.front().size(); 230 | return output; 231 | 232 | } 233 | 234 | void Classifier::SetMean(const cv::Scalar &mean, uint8_t index){ 235 | mean_[index] = cv::Mat(input_geometry_, CV_32FC3, mean); 236 | } 237 | 238 | /* Load the mean file in binaryproto format. */ 239 | void Classifier::SetMean(const std::map& mean_files) { 240 | for(auto i = mean_files.begin(); i != mean_files.end(); i++){ 241 | 242 | BlobProto blob_proto; 243 | ReadProtoFromBinaryFileOrDie(i->second.c_str(), &blob_proto); 244 | 245 | /* Convert from BlobProto to Blob */ 246 | Blob mean_blob; 247 | mean_blob.FromProto(blob_proto); 248 | //CHECK_EQ(mean_blob.channels(), num_channels_) 249 | // << "Number of channels of mean file doesn't match input layer."; 250 | 251 | /* The format of the mean file is planar 32-bit float BGR or grayscale. */ 252 | std::vector channels; 253 | float* data = mean_blob.mutable_cpu_data(); 254 | for (int k = 0; k < num_channels_; ++k) { 255 | /* Extract an individual channel. */ 256 | cv::Mat channel(mean_blob.height(), mean_blob.width(), CV_32FC1, data); 257 | channels.push_back(channel); 258 | data += mean_blob.height() * mean_blob.width(); 259 | } 260 | 261 | /* Merge the separate channels into a single image. */ 262 | cv::Mat mean; 263 | //std::reverse(channels.begin(),channels.end()); 264 | cv::merge(channels, mean); 265 | 266 | mean_[i->first] = mean; 267 | } 268 | } 269 | 270 | std::vector > Classifier::Predict(const std::vector& imgs, std::vector req_layers) { 271 | std::cout << "Forward net with " << imgs.size() << " inputs" << std::endl; 272 | for(auto j = 0; j < imgs.size(); j++){ 273 | Blob* input_layer = net_->input_blobs()[j]; 274 | input_layer->Reshape(1, imgs.at(j).channels(), 275 | input_geometry_.height, input_geometry_.width); 276 | } 277 | 278 | std::cout << "Input dimensions: " << input_geometry_ << std::endl; 279 | /* Forward dimension change to all layers. */ 280 | net_->Reshape(); 281 | 282 | for(auto j = 0; j < imgs.size(); j++){ 283 | // CHECK 284 | std::vector input_channels; 285 | WrapInputLayer(&input_channels, j); 286 | Preprocess(imgs.at(j), &input_channels, j); 287 | } 288 | 289 | boost::timer::cpu_timer timer; 290 | net_->ForwardPrefilled(); 291 | std::cout << "Forward took: " << timer.format() << '\n'; 292 | 293 | std::vector > final; 294 | for(auto r = 0; r < req_layers.size(); r++){ 295 | //std::cout << "Wrapping output..." << std::endl; 296 | std::vector< cv::Mat> output_channels; 297 | WrapOutputLayer(&output_channels, req_layers.at(r)); 298 | //std::cout << "Argmax channels..." << std::endl; 299 | //for(auto i = 0; i< output_channels.size(); i++){ 300 | // std::cout << "Channel " << i << " width: " << output_channels.at(i).cols << " height: " << output_channels.at(i).rows << std::endl; 301 | //} 302 | final.push_back(output_channels); 303 | } 304 | return final; 305 | } 306 | 307 | 308 | void Classifier::WrapInputLayer( std::vector* input_channels, size_t num_input) { 309 | Blob* input_layer = net_->input_blobs()[num_input]; 310 | 311 | int width = input_layer->width(); 312 | int height = input_layer->height(); 313 | float* input_data = input_layer->mutable_cpu_data(); 314 | for (int i = 0; i < input_layer->channels(); ++i) { 315 | const cv::Mat channel(height, width, CV_32FC1, input_data); 316 | input_channels->push_back(channel); 317 | input_data += width * height; 318 | } 319 | } 320 | 321 | void Classifier::WrapOutputLayer(std::vector< cv::Mat>* output_channel, std::string l_name) { 322 | boost::shared_ptr > output_layer = net_->blob_by_name(l_name); 323 | //Blob* output_layer = net_->output_blobs()[0]; 324 | 325 | int width = output_layer->width(); 326 | int height = output_layer->height(); 327 | 328 | float* output_data = output_layer->mutable_cpu_data(); 329 | std::cout << "Ouput layer channels: " << output_layer->channels() << std::endl; 330 | for (int i = 0; i < output_layer->channels(); ++i) { 331 | cv::Mat channel(height, width, CV_32F, output_data); 332 | output_channel->push_back(channel); 333 | output_data += width * height; 334 | } 335 | } 336 | 337 | void Classifier::Preprocess(const cv::Mat& img, 338 | std::vector* input_channels, uint8_t input_index) { 339 | /* Convert the input image to the input image format of the network. */ 340 | cv::Mat sample; 341 | sample = img; 342 | 343 | cv::Mat sample_resized; 344 | if (sample.size() != input_geometry_) 345 | cv::resize(sample, sample_resized, input_geometry_); 346 | else 347 | sample_resized = sample; 348 | 349 | cv::Mat sample_float; 350 | switch(sample_resized.channels()){ 351 | case 1: 352 | sample_resized.convertTo(sample_float, CV_32FC1); 353 | break; 354 | 355 | case 2: 356 | sample_resized.convertTo(sample_float, CV_32FC2); 357 | break; 358 | 359 | case 3: 360 | sample_resized.convertTo(sample_float, CV_32FC3); 361 | break; 362 | } 363 | 364 | cv::Mat sample_normalized; 365 | if(mean_.find(input_index) != mean_.end()){ 366 | cv::Mat mean; 367 | cv::resize(mean_.at(input_index), mean, img.size()); 368 | cv::subtract(sample_float, mean, sample_normalized); 369 | }else{ 370 | sample_normalized = sample_float; 371 | } 372 | 373 | cv::split(sample_normalized, *input_channels); 374 | 375 | CHECK(reinterpret_cast(input_channels->at(0).data) 376 | == net_->input_blobs()[input_index]->cpu_data()) 377 | << "Input channels are not wrapping the input layer of the network."; 378 | } 379 | 380 | cv::Mat Classifier::depthImage( cv::Mat &in){ 381 | #ifdef DEPTH_COLOR 382 | 383 | //in = -1 * in; 384 | double min; 385 | double max; 386 | cv::minMaxIdx(in, &min, &max); 387 | cv::Mat adjMap; 388 | //std::cout << "Max " << max << " Min " << min << std::endl; 389 | // expand your range to 0..255. Similar to histEq(); 390 | in.convertTo(adjMap,CV_8UC1);//, 255 / (max-min), -min); 391 | 392 | // this is great. It converts your grayscale image into a tone-mapped one, 393 | // much more pleasing for the eye 394 | // function is found in contrib module, so include contrib.hpp 395 | // and link accordingly 396 | cv::Mat falseColorsMap; 397 | cv::applyColorMap(adjMap, falseColorsMap, cv::COLORMAP_JET); 398 | 399 | return falseColorsMap; 400 | #endif 401 | 402 | } 403 | 404 | cv::Mat Classifier::flowImage(cv::Mat &in){ 405 | //extraxt x and y channels 406 | cv::Mat xy[2]; //X,Y 407 | cv::split(in, xy); 408 | 409 | //calculate angle and magnitude 410 | cv::Mat magnitude, angle; 411 | cv::cartToPolar(xy[0], xy[1], magnitude, angle, true); 412 | 413 | //translate magnitude to range [0;1] 414 | double mag_max; 415 | cv::minMaxLoc(magnitude, 0, &mag_max); 416 | magnitude.convertTo(magnitude, -1, 1.0 / mag_max); 417 | 418 | //build hsv image 419 | cv::Mat _hsv[3], hsv; 420 | _hsv[0] = angle; 421 | _hsv[1] = cv::Mat::ones(angle.size(), CV_32F); 422 | _hsv[2] = magnitude; 423 | cv::merge(_hsv, 3, hsv); 424 | 425 | //convert to BGR and show 426 | cv::Mat bgr;//CV_32FC3 matrix 427 | cv::cvtColor(hsv, bgr, cv::COLOR_HSV2BGR); 428 | return bgr; 429 | } 430 | 431 | } 432 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "../include/classify.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | //#include 12 | #include 13 | #include 14 | #include 15 | //#include 16 | #include "boost/scoped_ptr.hpp" 17 | #include "google/protobuf/text_format.h" 18 | #include "../include/flow_color_coder.h" 19 | #include "../include/hdf5_reader.h" 20 | 21 | cv::Mat createDisparityChange(const cv::Mat &disp1, const cv::Mat &disp2, const cv::Mat &flow); 22 | 23 | std::map net_colors_; 24 | std::set ignore_list; 25 | 26 | std::map mean_files; 27 | std::vector images_paths_file; 28 | std::vector output_layer_names; 29 | 30 | flow_color_coder flow_coder; 31 | 32 | // If you just want to evaluate IOU values, set display_mode to false 33 | const bool display_mode = true; 34 | 35 | // NOTE: If you want to change from kitti to the city dataset comment all lines marked with KITTI and uncomment all lines marked with CITY 36 | 37 | // KITTI 38 | const std::string model_file = "../model_description/deploy_2class_kitti.prototxt"; 39 | const std::string trained_file = "../models/city_kitti_efs_inf.caffemodel"; 40 | 41 | //CITY 42 | //const std::string model_file = "../model_description/deploy_2class_city.prototxt"; 43 | //const std::string trained_file = "../models/city_kitti_efs_40.caffemodel"; 44 | 45 | const bool is_not_txt = true; 46 | 47 | const std::string labels_paths_file = "../datasets/kitti/labels_lmdb"; // KITTI 48 | //const std::string labels_paths_file = "../datasets/city/images_lmdb1"; // CITY 49 | 50 | const std::string color_mapping_file = ""; 51 | 52 | std::map hdf5_channel_names; 53 | int number_input_images; 54 | 55 | void setupVars(){ 56 | // Images 57 | // First has to correspond to label 58 | images_paths_file.push_back("../datasets/kitti/images_lmdb3"); // KITTI 59 | //images_paths_file.push_back("../datasets/city/images_lmdb3"); // CITY 60 | 61 | // Flow (either ego-flow subtracted or raw flow) In the LMDB Databases the flow is scaled by 1/6.4 and centered at 128 to fit in the unsigned char format 62 | images_paths_file.push_back("../datasets/kitti/images_lmdb5"); // KITTI 63 | //images_paths_file.push_back("../datasets/city/images_lmdb5"); // CITY 64 | 65 | // Mean file assignment 66 | mean_files[0] = "../mean/mean.binaryproto"; 67 | 68 | // Requested layer names (first has to correspond to label) 69 | output_layer_names.push_back("out"); 70 | 71 | // This class numbers will be ignored for evaluation 72 | ignore_list.insert(0); 73 | 74 | // Number of images which should be passed to network 75 | number_input_images = 2; 76 | } 77 | 78 | void setupColorMaps(){ 79 | net_colors_[2] = cv::Vec3b(0,0,255); 80 | net_colors_[3] = cv::Vec3b(255,0,0); 81 | net_colors_[4] = cv::Vec3b(0,255,0); 82 | } 83 | 84 | void setupMapping3c(boost::filesystem::path source, std::map &mapping){ 85 | mapping.clear(); 86 | 87 | std::ifstream mapping_file; 88 | mapping_file.open(source.string()); 89 | 90 | std::string line; 91 | while (std::getline(mapping_file, line)){ 92 | size_t separator = line.find("="); 93 | std::string id = line.substr(0,separator); 94 | size_t end_1 = line.find(","); 95 | std::string r = line.substr(separator+1,end_1); 96 | size_t end_2 = line.find(",", end_1 +1); 97 | std::string g = line.substr(end_1+1,end_2); 98 | std::string b = line.substr(end_2+1); 99 | 100 | 101 | cv::Vec3b map_keys; 102 | map_keys[0] = std::stoi(b); 103 | map_keys[1] = std::stoi(g); 104 | map_keys[2] = std::stoi(r); 105 | 106 | size_t value_i = std::stoi(id); 107 | 108 | std::cout << "Read mapping: " << value_i << " --> " << map_keys << std::endl; 109 | mapping[value_i] = map_keys; 110 | } 111 | } 112 | 113 | bool loadPaths(const boost::filesystem::path &path_to_paths_file, std::vector &list_of_paths){ 114 | std::ifstream path_file; 115 | path_file.open(path_to_paths_file.string()); 116 | 117 | std::string line; 118 | while (std::getline(path_file, line)) 119 | { 120 | list_of_paths.push_back(boost::filesystem::path(line)); 121 | } 122 | 123 | if(list_of_paths.size()){ 124 | std::cout << "Loaded " << list_of_paths.size() << " file paths\n"; 125 | return true; 126 | } 127 | else{ 128 | std::cerr << "list size of path file is zero...\n"; 129 | return false; 130 | } 131 | } 132 | 133 | cv::Mat datumToMat(caffe::Datum &datum){ 134 | cv::Mat mat; 135 | if(datum.channels() == 1){ 136 | mat = cv::Mat(datum.height(), datum.width(), CV_8UC1, cv::Scalar(0)); 137 | }else if(datum.channels() == 3){ 138 | mat = cv::Mat(datum.height(), datum.width(), CV_8UC3, cv::Scalar(0,0,0)); 139 | } 140 | size_t pix_per_channel = datum.height() * datum.width(); 141 | 142 | std::vector channels; 143 | for(auto ch = 0; ch < datum.channels(); ch++){ 144 | cv::Mat channel = cv::Mat(datum.height(), datum.width(), CV_8UC1, cv::Scalar(0)); 145 | 146 | for(auto k = 0; k < pix_per_channel; k++){ 147 | uint8_t label = (uint8_t) datum.data()[k + ch * pix_per_channel ]; 148 | channel.at(k) = label; 149 | } 150 | channels.push_back(channel); 151 | } 152 | cv::merge(channels, mat); 153 | // TODO: clone necessary ? 154 | return mat.clone(); 155 | } 156 | 157 | 158 | void computeLateAverages(std::vector > &all_statistics, size_t num_classes){ 159 | for(auto cl = 0; cl < num_classes ; cl++){ 160 | long total_tp = 0; 161 | long total_fp = 0; 162 | long total_fn = 0; 163 | for(auto i = 0; i < all_statistics.size(); i++){ 164 | std::map &stat_im = all_statistics.at(i); 165 | total_tp += stat_im.at(cl).true_pos_; 166 | total_fp += stat_im.at(cl).false_pos_; 167 | total_fn += stat_im.at(cl).false_neg_; 168 | } 169 | 170 | long div = total_tp + total_fp + total_fn; 171 | std::cout << "TP: " << total_tp << " FP: " << total_fp << " FN: " << total_fn << std::endl; 172 | if(div != 0){ 173 | double iou = double(total_tp) / double(div); 174 | std::cout << "------------Mean IoU for class: " << cl << " is: " << iou << "------------------" << std::endl; 175 | } 176 | 177 | } 178 | } 179 | 180 | 181 | template 182 | void mapLabels(T mapping, const cv::Mat &in, cv::Mat &out){ 183 | for(auto y = 0; y < in.rows; y++){ 184 | for(auto x = 0; x < in.cols; x++){ 185 | V pixel = in.at(y, x); 186 | if(mapping.find(pixel) == mapping.end()){ 187 | out.at(y, x) = 0; 188 | }else{ 189 | out.at(y, x) = mapping.at(pixel); 190 | } 191 | } 192 | } 193 | } 194 | 195 | int main(int argc, char** argv) { 196 | 197 | ::google::InitGoogleLogging(argv[0]); 198 | 199 | if(color_mapping_file.empty()){ 200 | setupColorMaps(); 201 | }else{ 202 | setupMapping3c(boost::filesystem::path(color_mapping_file), net_colors_); 203 | } 204 | 205 | setupVars(); 206 | 207 | if(display_mode){ 208 | cv::namedWindow("Network output", CV_WINDOW_AUTOSIZE|CV_WINDOW_FREERATIO); 209 | cv::namedWindow("Reference output", CV_WINDOW_AUTOSIZE|CV_WINDOW_FREERATIO); 210 | cv::namedWindow("Label output", CV_WINDOW_AUTOSIZE|CV_WINDOW_FREERATIO); 211 | } 212 | std::cout << "Loading network..." << std::endl; 213 | classify::Classifier classifier(model_file, trained_file, mean_files); 214 | std::cout << "Total number of classes: " << classifier.getNumberOfClasses() << std::endl; 215 | 216 | std::vector > all_statistics; 217 | 218 | std::vector > feed_images; 219 | std::vector feed_labels; 220 | std::vector > db_images; 221 | 222 | std::vector > hdf5_readers; 223 | 224 | std::unique_ptr db_labels; 225 | std::vector >images_cursor; 226 | caffe::db::Cursor *labels_cursor; 227 | 228 | int adapted_width = -1; 229 | int adapted_height = -1; 230 | 231 | double mean_iou_global = 0; 232 | double mean_prec_global = 0; 233 | double mean_rec_global = 0; 234 | double mean_fp_global = 0; 235 | double mean_fn_global = 0; 236 | size_t images_size = 0; 237 | size_t labels_size = 0; 238 | 239 | size_t save_counter = 0; 240 | 241 | size_t total_valid_counter = 0; 242 | 243 | size_t input_size = number_input_images; //images_paths_file.size(); 244 | 245 | std::map database_types; 246 | 247 | if(!is_not_txt){ 248 | std::cout << "Reading from txt files..." << std::endl; 249 | feed_images.resize(images_paths_file.size()); 250 | for(auto i = 0; i < images_paths_file.size(); i++){ 251 | loadPaths(boost::filesystem::path(images_paths_file.at(i)), feed_images.at(i)); 252 | } 253 | loadPaths(boost::filesystem::path(labels_paths_file), feed_labels); 254 | images_size = feed_images.front().size(); 255 | }else{ 256 | size_t lmdb_count = 0; 257 | size_t hdf5_count = 0; 258 | std::cout << "Reading from databases..." << std::endl; 259 | for(auto i = 0; i < images_paths_file.size(); i++){ 260 | boost::filesystem::path path = boost::filesystem::path(images_paths_file.at(i)); 261 | if(boost::filesystem::is_directory(path)){ 262 | database_types[i] = "lmdb"; 263 | lmdb_count++; 264 | }else if(path.filename().string().find("hdf") != std::string::npos){ 265 | hdf5_count++; 266 | database_types[i] = "hdf5"; 267 | } 268 | } 269 | 270 | std::cout << "LMDB files detected: " << lmdb_count << std::endl; 271 | std::cout << "HDF5 files detected: " << hdf5_count << std::endl; 272 | 273 | size_t h_c = 0; 274 | for(auto db_idx = 0; db_idx < images_paths_file.size(); db_idx++){ 275 | if(database_types[db_idx] == "lmdb"){ 276 | std::cout << "Open LMDB: " << images_paths_file.at(db_idx) << std::endl; 277 | db_images.push_back(std::unique_ptr(caffe::db::GetDB("lmdb"))); 278 | db_images.back()->Open(images_paths_file.at(db_idx),caffe::db::Mode::READ); 279 | images_cursor.push_back(std::unique_ptr(db_images.back()->NewCursor())); 280 | images_cursor.back()->SeekToFirst(); 281 | 282 | 283 | }else if(database_types[db_idx] == "hdf5"){ 284 | std::cout << "Open HDF5: " << images_paths_file.at(db_idx) << std::endl; 285 | hdf5_readers.push_back(std::unique_ptr(new hdf5_reader(boost::filesystem::path(images_paths_file.at(db_idx)), hdf5_channel_names[h_c]))); 286 | h_c++; 287 | } 288 | } 289 | 290 | // First lmdb database has to exist -> counting for images 291 | // count images 292 | while(images_cursor.front()->valid()){ 293 | images_cursor.front()->Next(); 294 | images_size++; 295 | } 296 | images_cursor.front()->SeekToFirst(); 297 | 298 | // Labels is assumed to be always a lmdb database 299 | if(!labels_paths_file.empty()){ 300 | db_labels = std::unique_ptr(caffe::db::GetDB("lmdb")); 301 | db_labels->Open(labels_paths_file,caffe::db::Mode::READ); 302 | labels_cursor = db_labels->NewCursor(); 303 | labels_cursor->SeekToFirst(); 304 | // count images 305 | while(labels_cursor->valid()){ 306 | labels_cursor->Next(); 307 | labels_size++; 308 | } 309 | labels_cursor->SeekToFirst(); 310 | assert(labels_size == images_size); 311 | } 312 | } 313 | 314 | cv::Size input_shape = classifier.getInputSize(); 315 | 316 | std::cout << "Image size: " << images_size << std::endl; 317 | for(auto i = 0; i < images_size; i++){ 318 | std::vector imgs; 319 | if(!is_not_txt){ 320 | std::cout << "---------- Prediction for " 321 | << feed_images.front().at(i).filename().string() << " ----------" << std::endl; 322 | 323 | for(auto j = 0; j < input_size; ++j){ 324 | cv::Mat rez; 325 | int divisor = 64; 326 | cv::Mat org = cv::imread(feed_images.at(j).at(i).string(), 1); 327 | if(org.cols % divisor == 0 && org.rows % divisor ==0){ 328 | std::cout << "Size statisfies size divisor of " << divisor << std::endl; 329 | cv::resize(org, rez, input_shape); 330 | }else{ 331 | adapted_width = std::ceil(input_shape.width/divisor) * divisor; 332 | adapted_height = std::ceil(input_shape.height/divisor) * divisor; 333 | cv::resize(org, rez, cv::Size(adapted_width, adapted_height)); 334 | std::cout << "Input does not statisfy the divisor: " << divisor << " adapted width: " << adapted_width << " adapted height: " << adapted_height << std::endl; 335 | } 336 | imgs.push_back(rez); 337 | CHECK(!imgs.back().empty()) << "Unable to decode image " << feed_images.at(j).at(i).string(); 338 | } 339 | }else{ 340 | uchar lm_c = 0; 341 | uchar h5_c = 0; 342 | for(auto j = 0; j < input_size; ++j){ 343 | if(database_types[j] == "lmdb"){ 344 | caffe::Datum datum; 345 | datum.ParseFromString(images_cursor.at(lm_c)->value()); 346 | imgs.push_back(datumToMat(datum)); 347 | images_cursor.at(lm_c)->Next(); 348 | lm_c++; 349 | } 350 | 351 | if(database_types[j] == "hdf5"){ 352 | imgs.push_back(hdf5_readers.at(h5_c)->nextImage()); 353 | h5_c++; 354 | } 355 | } 356 | } 357 | 358 | std::cout << "Channels 1 : " << imgs.front().channels() << std::endl; 359 | 360 | // Classify image 361 | cv::Size org_size = imgs.front().size(); 362 | std::vector > final_raw = classifier.Classify(imgs, output_layer_names); 363 | 364 | 365 | cv::Mat out_argmax; 366 | cv::Mat net_blended; 367 | cv::Mat label_blended; 368 | cv::Mat net_color_coded; 369 | cv::Mat label_color_coded; 370 | 371 | classifier.Argmax(final_raw.front(), out_argmax); 372 | 373 | #ifdef STATIC_BIG_CLASS 374 | std::map relabel_mapping; 375 | relabel_mapping[0]=0; 376 | relabel_mapping[1]=3; 377 | relabel_mapping[2]=2; 378 | relabel_mapping[3]=3; 379 | cv::Mat relabelled = cv::Mat(org_size.height, org_size.width, CV_8UC1, cv::Scalar(0)); 380 | mapLabels, unsigned char>(relabel_mapping, out_argmax, relabelled); 381 | out_argmax = relabelled; 382 | #endif 383 | 384 | cv::Size output_size = out_argmax.size(); 385 | // Blend color_coded net image with original image 386 | //// cv::resize(out_argmax, out_argmax, org_size, CV_INTER_NN); 387 | double max= 0; 388 | double min = 0; 389 | cv::minMaxLoc(out_argmax, &min, &max); 390 | float alpha = 0.45; 391 | double beta = (1.0 - alpha); 392 | net_color_coded = cv::Mat(org_size.height, org_size.width, CV_8UC3, cv::Scalar(0,0,0)); 393 | classifier.createColorCodedLabels(out_argmax,net_color_coded, net_colors_); 394 | cv::addWeighted( net_color_coded, alpha, imgs.front(), beta, 0.0, net_blended); 395 | 396 | 397 | if(!labels_paths_file.empty()){ 398 | std::cout << "Output size: " << out_argmax.size() << std::endl; 399 | // Compare network output with GT and calculate metrics 400 | cv::Mat label_image; 401 | cv::Mat label_resized; 402 | if(!is_not_txt){ 403 | label_image = cv::imread(feed_labels.at(i).string().c_str(), 0); 404 | cv::resize(label_image, label_resized, out_argmax.size(), cv::INTER_NEAREST); 405 | }else{ 406 | labels_cursor->value(); 407 | caffe::Datum datum; 408 | datum.ParseFromString(labels_cursor->value()); 409 | const std::string data = datum.data(); 410 | 411 | label_image = datumToMat(datum); 412 | //cv::resize(label_image, label_resized, out_argmax.size(), cv::INTER_NEAREST); 413 | label_resized = label_image; 414 | labels_cursor->Next(); 415 | } 416 | 417 | #ifdef STATIC_BIG_CLASS 418 | cv::Mat relabelled_label = cv::Mat(org_size.height, org_size.width, CV_8UC1, cv::Scalar(0)); 419 | mapLabels, unsigned char>(relabel_mapping, label_resized, relabelled_label); 420 | label_resized = relabelled_label; 421 | #endif 422 | 423 | std::map statistics; 424 | double accuracy = 0; 425 | double error = 0; 426 | classifier.calculateStatistics(out_argmax, label_resized, ignore_list, statistics, accuracy, error); 427 | all_statistics.push_back(statistics); 428 | 429 | cv::Mat resized; 430 | if(display_mode){ 431 | // Blend original label with original image 432 | label_color_coded = cv::Mat(org_size.height, org_size.width, CV_8UC3, cv::Scalar(0,0,0)); 433 | classifier.createColorCodedLabels(label_resized,label_color_coded, net_colors_); 434 | cv::addWeighted( label_color_coded, alpha, imgs.front(), beta, 0.0, label_blended); 435 | } 436 | // Show output 437 | for(auto i = statistics.begin(); i != statistics.end(); i++){ 438 | std::cout << "----------------------------------------------------------------------------" << std::endl; 439 | std::cout << "Precision for class: " << i->first << " is: " << i->second.precision_ << std::endl; 440 | std::cout << "Recall for class: " << i->first << " is: " << i->second.recall_ << std::endl; 441 | std::cout << "IoU for class: " << i->first << " is: " << i->second.iou_ << std::endl; 442 | std::cout << "TP for class: " << i->first << " are: " << i->second.true_pos_ << std::endl; 443 | std::cout << "FP for class: " << i->first << " are: " << i->second.false_pos_ << std::endl; 444 | std::cout << "FN for class: " << i->first << " are: " << i->second.false_neg_ << std::endl; 445 | } 446 | double mean_image_iou = 0; 447 | double mean_image_prec = 0; 448 | double mean_image_rec = 0; 449 | double mean_image_fp = 0; 450 | double mean_image_fn = 0; 451 | /* 452 | int valid_counter = classifier.calcMeanStatistic(statistics, ignore_list, mean_image_iou, mean_image_prec, mean_image_rec, mean_image_fp, mean_image_fn); 453 | if(valid_counter){ 454 | mean_iou_global += mean_image_iou; 455 | mean_prec_global += mean_image_prec; 456 | mean_rec_global += mean_image_rec; 457 | mean_fp_global += mean_image_fp; 458 | mean_fn_global += mean_image_fn; 459 | std::cout << "Mean IoU of Image: " << mean_image_iou << std::endl; 460 | std::cout << "Mean Precision of Image: " << mean_image_prec << std::endl; 461 | std::cout << "Mean Recall of Image: " << mean_image_rec << std::endl; 462 | std::cout << "Mean FP of Image: " << mean_image_fp << std::endl; 463 | std::cout << "Mean FN of Image: " << mean_image_fn << std::endl; 464 | 465 | total_valid_counter +=1; 466 | } 467 | */ 468 | } 469 | 470 | if(display_mode){ 471 | cv::imshow("Network output", net_blended); 472 | if(!labels_paths_file.empty()) cv::imshow("Reference output", label_blended); 473 | //cv::imshow("Current", imgs.front()); 474 | cv::imshow("Label output", net_color_coded); 475 | //save_counter++; 476 | 477 | std::vector flow_channels; 478 | cv::split(imgs.at(1), flow_channels); 479 | 480 | cv::Mat &magnitude = flow_channels.at(2); 481 | cv::Mat magnitude_norm; 482 | magnitude.convertTo(magnitude_norm, CV_8UC1); 483 | cv::imshow("Flow Magnitude", magnitude_norm); 484 | 485 | int k = cv::waitKey(0); 486 | } 487 | std::cout << "Processed : " << i << " of: " << images_size << " , percentage: " << ((double) i / (double) images_size) * 100.0 << std::endl; 488 | } 489 | 490 | computeLateAverages(all_statistics, classifier.getNumberOfClasses()); 491 | 492 | return 0; 493 | } 494 | 495 | cv::Mat createDisparityChange(const cv::Mat &disp1, const cv::Mat &disp2, const cv::Mat &flow){ 496 | cv::Mat t_disp = cv::Mat(disp1.rows, disp1.cols, CV_32FC1,0.0); 497 | for(auto x = 0; x < flow.cols; x++){ 498 | for(auto y = 0; y < flow.rows; y++){ 499 | const cv::Vec2f &f_p = flow.at(y,x); 500 | // Compute new pixel position 501 | int n_x = x + f_p[0]; 502 | int n_y = y + f_p[1]; 503 | 504 | if(n_x >= 0 && n_x < disp1.cols && n_y >= 0 && n_y < disp1.rows){ 505 | t_disp.at(n_y, n_x) = disp1.at(y,x); 506 | } 507 | } 508 | } 509 | 510 | cv::Mat disp_change = cv::Mat(disp2.rows, disp2.cols, CV_32FC1); 511 | for(auto x = 0; x < flow.cols; x++){ 512 | for(auto y = 0; y < flow.rows; y++){ 513 | disp_change.at(y,x) = std::fabs(disp2.at(y,x) - t_disp.at(y,x)); 514 | } 515 | } 516 | return disp_change; 517 | } 518 | -------------------------------------------------------------------------------- /model_description/deploy_2class_city.prototxt: -------------------------------------------------------------------------------- 1 | layer { 2 | name: "data" 3 | type: "Input" 4 | top: "img_l" 5 | input_param { shape: { dim: 1 dim: 3 dim: 384 dim: 768 } } 6 | } 7 | layer { 8 | name: "data" 9 | type: "Input" 10 | top: "flow" 11 | input_param { shape: { dim: 1 dim: 3 dim: 384 dim: 768 } } 12 | } 13 | layer { 14 | name: "rec_flow1" 15 | type: "Mean" 16 | bottom: "flow" 17 | top: "rec_flow1" 18 | mean_param { 19 | operation: SUBTRACT 20 | value: 128.0 21 | value: 128.0 22 | value: 0.0 23 | } 24 | } 25 | layer { 26 | name: "seg1_conv1_2" 27 | type: "Convolution" 28 | bottom: "img_l" 29 | top: "seg1_conv1_2" 30 | param { 31 | lr_mult: 0 32 | decay_mult: 0 33 | } 34 | param { 35 | lr_mult: 0 36 | decay_mult: 0 37 | } 38 | convolution_param { 39 | num_output: 64 40 | pad: 3 41 | kernel_size: 7 42 | stride: 2 43 | weight_filler { 44 | type: "xavier" 45 | } 46 | engine: CUDNN 47 | } 48 | } 49 | layer { 50 | name: "seg1_bn_conv1_2" 51 | type: "BatchNorm" 52 | bottom: "seg1_conv1_2" 53 | top: "seg1_conv1_2" 54 | param { 55 | lr_mult: 0 56 | } 57 | param { 58 | lr_mult: 0 59 | } 60 | param { 61 | lr_mult: 0 62 | } 63 | batch_norm_param { 64 | use_global_stats: true 65 | } 66 | } 67 | layer { 68 | name: "seg1_scale_conv1_2" 69 | type: "Scale" 70 | bottom: "seg1_conv1_2" 71 | top: "seg1_conv1_2" 72 | param { 73 | lr_mult: 0 74 | decay_mult: 0 75 | } 76 | param { 77 | lr_mult: 0 78 | decay_mult: 0 79 | } 80 | scale_param { 81 | bias_term: true 82 | } 83 | } 84 | layer { 85 | name: "seg1_conv1_2_relu" 86 | type: "ReLU" 87 | bottom: "seg1_conv1_2" 88 | top: "seg1_conv1_2" 89 | } 90 | layer { 91 | name: "seg1_pool1_2" 92 | type: "Pooling" 93 | bottom: "seg1_conv1_2" 94 | top: "seg1_pool1_2" 95 | pooling_param { 96 | pool: MAX 97 | kernel_size: 2 98 | stride: 2 99 | pad: 0 100 | } 101 | } 102 | layer { 103 | name: "seg1_res2a_branch2a" 104 | type: "Convolution" 105 | bottom: "seg1_pool1_2" 106 | top: "seg1_res2a_branch2a" 107 | param { 108 | lr_mult: 0 109 | decay_mult: 0 110 | } 111 | convolution_param { 112 | num_output: 64 113 | bias_term: false 114 | pad: 0 115 | kernel_size: 1 116 | stride: 1 117 | weight_filler { 118 | type: "xavier" 119 | } 120 | engine: CUDNN 121 | } 122 | } 123 | layer { 124 | name: "seg1_bn2a_branch2a" 125 | type: "BatchNorm" 126 | bottom: "seg1_res2a_branch2a" 127 | top: "seg1_res2a_branch2a" 128 | param { 129 | lr_mult: 0 130 | } 131 | param { 132 | lr_mult: 0 133 | } 134 | param { 135 | lr_mult: 0 136 | } 137 | batch_norm_param { 138 | use_global_stats: true 139 | } 140 | } 141 | layer { 142 | name: "seg1_scale2a_branch2a" 143 | type: "Scale" 144 | bottom: "seg1_res2a_branch2a" 145 | top: "seg1_res2a_branch2a" 146 | param { 147 | lr_mult: 0 148 | decay_mult: 0 149 | } 150 | param { 151 | lr_mult: 0 152 | decay_mult: 0 153 | } 154 | scale_param { 155 | bias_term: true 156 | } 157 | } 158 | layer { 159 | name: "seg1_res2a_branch2a_relu" 160 | type: "ReLU" 161 | bottom: "seg1_res2a_branch2a" 162 | top: "seg1_res2a_branch2a" 163 | } 164 | layer { 165 | name: "seg1_res2a_branch2b" 166 | type: "Convolution" 167 | bottom: "seg1_res2a_branch2a" 168 | top: "seg1_res2a_branch2b" 169 | param { 170 | lr_mult: 0 171 | decay_mult: 0 172 | } 173 | convolution_param { 174 | num_output: 64 175 | bias_term: false 176 | pad: 1 177 | kernel_size: 3 178 | stride: 1 179 | weight_filler { 180 | type: "xavier" 181 | } 182 | engine: CUDNN 183 | } 184 | } 185 | layer { 186 | name: "seg1_bn2a_branch2b" 187 | type: "BatchNorm" 188 | bottom: "seg1_res2a_branch2b" 189 | top: "seg1_res2a_branch2b" 190 | param { 191 | lr_mult: 0 192 | } 193 | param { 194 | lr_mult: 0 195 | } 196 | param { 197 | lr_mult: 0 198 | } 199 | batch_norm_param { 200 | use_global_stats: true 201 | } 202 | } 203 | layer { 204 | name: "seg1_scale2a_branch2b" 205 | type: "Scale" 206 | bottom: "seg1_res2a_branch2b" 207 | top: "seg1_res2a_branch2b" 208 | param { 209 | lr_mult: 0 210 | decay_mult: 0 211 | } 212 | param { 213 | lr_mult: 0 214 | decay_mult: 0 215 | } 216 | scale_param { 217 | bias_term: true 218 | } 219 | } 220 | layer { 221 | name: "seg1_res2a_branch2b_relu" 222 | type: "ReLU" 223 | bottom: "seg1_res2a_branch2b" 224 | top: "seg1_res2a_branch2b" 225 | } 226 | layer { 227 | name: "seg1_res2a_branch2c" 228 | type: "Convolution" 229 | bottom: "seg1_res2a_branch2b" 230 | top: "seg1_res2a_branch2c" 231 | param { 232 | lr_mult: 0 233 | decay_mult: 0 234 | } 235 | convolution_param { 236 | num_output: 256 237 | bias_term: false 238 | pad: 0 239 | kernel_size: 1 240 | stride: 1 241 | weight_filler { 242 | type: "xavier" 243 | } 244 | engine: CUDNN 245 | } 246 | } 247 | layer { 248 | name: "seg1_bn2a_branch2c" 249 | type: "BatchNorm" 250 | bottom: "seg1_res2a_branch2c" 251 | top: "seg1_res2a_branch2c" 252 | param { 253 | lr_mult: 0 254 | } 255 | param { 256 | lr_mult: 0 257 | } 258 | param { 259 | lr_mult: 0 260 | } 261 | batch_norm_param { 262 | use_global_stats: true 263 | } 264 | } 265 | layer { 266 | name: "seg1_scale2a_branch2c" 267 | type: "Scale" 268 | bottom: "seg1_res2a_branch2c" 269 | top: "seg1_res2a_branch2c" 270 | param { 271 | lr_mult: 0 272 | decay_mult: 0 273 | } 274 | param { 275 | lr_mult: 0 276 | decay_mult: 0 277 | } 278 | scale_param { 279 | bias_term: true 280 | } 281 | } 282 | layer { 283 | name: "seg1_res2a_branch1" 284 | type: "Convolution" 285 | bottom: "seg1_pool1_2" 286 | top: "seg1_res2a_branch1" 287 | param { 288 | lr_mult: 0 289 | decay_mult: 0 290 | } 291 | convolution_param { 292 | num_output: 256 293 | bias_term: false 294 | pad: 0 295 | kernel_size: 1 296 | stride: 1 297 | weight_filler { 298 | type: "xavier" 299 | } 300 | engine: CUDNN 301 | } 302 | } 303 | layer { 304 | name: "seg1_bn2a_branch1" 305 | type: "BatchNorm" 306 | bottom: "seg1_res2a_branch1" 307 | top: "seg1_res2a_branch1" 308 | param { 309 | lr_mult: 0 310 | } 311 | param { 312 | lr_mult: 0 313 | } 314 | param { 315 | lr_mult: 0 316 | } 317 | batch_norm_param { 318 | use_global_stats: true 319 | } 320 | } 321 | layer { 322 | name: "seg1_scale2a_branch1" 323 | type: "Scale" 324 | bottom: "seg1_res2a_branch1" 325 | top: "seg1_res2a_branch1" 326 | param { 327 | lr_mult: 0 328 | decay_mult: 0 329 | } 330 | param { 331 | lr_mult: 0 332 | decay_mult: 0 333 | } 334 | scale_param { 335 | bias_term: true 336 | } 337 | } 338 | layer { 339 | name: "seg1_res2a" 340 | type: "Eltwise" 341 | bottom: "seg1_res2a_branch2c" 342 | bottom: "seg1_res2a_branch1" 343 | top: "seg1_res2a" 344 | } 345 | layer { 346 | name: "seg1_res2a_relu" 347 | type: "ReLU" 348 | bottom: "seg1_res2a" 349 | top: "seg1_res2a" 350 | } 351 | layer { 352 | name: "seg1_res2b_branch2a" 353 | type: "Convolution" 354 | bottom: "seg1_res2a" 355 | top: "seg1_res2b_branch2a" 356 | param { 357 | lr_mult: 0 358 | decay_mult: 0 359 | } 360 | convolution_param { 361 | num_output: 64 362 | bias_term: false 363 | pad: 0 364 | kernel_size: 1 365 | stride: 1 366 | weight_filler { 367 | type: "xavier" 368 | } 369 | engine: CUDNN 370 | } 371 | } 372 | layer { 373 | name: "seg1_bn2b_branch2a" 374 | type: "BatchNorm" 375 | bottom: "seg1_res2b_branch2a" 376 | top: "seg1_res2b_branch2a" 377 | param { 378 | lr_mult: 0 379 | } 380 | param { 381 | lr_mult: 0 382 | } 383 | param { 384 | lr_mult: 0 385 | } 386 | batch_norm_param { 387 | use_global_stats: true 388 | } 389 | } 390 | layer { 391 | name: "seg1_scale2b_branch2a" 392 | type: "Scale" 393 | bottom: "seg1_res2b_branch2a" 394 | top: "seg1_res2b_branch2a" 395 | param { 396 | lr_mult: 0 397 | decay_mult: 0 398 | } 399 | param { 400 | lr_mult: 0 401 | decay_mult: 0 402 | } 403 | scale_param { 404 | bias_term: true 405 | } 406 | } 407 | layer { 408 | name: "seg1_res2b_branch2a_relu" 409 | type: "ReLU" 410 | bottom: "seg1_res2b_branch2a" 411 | top: "seg1_res2b_branch2a" 412 | } 413 | layer { 414 | name: "seg1_res2b_branch2b" 415 | type: "Convolution" 416 | bottom: "seg1_res2b_branch2a" 417 | top: "seg1_res2b_branch2b" 418 | param { 419 | lr_mult: 0 420 | decay_mult: 0 421 | } 422 | convolution_param { 423 | num_output: 64 424 | bias_term: false 425 | pad: 1 426 | kernel_size: 3 427 | stride: 1 428 | weight_filler { 429 | type: "xavier" 430 | } 431 | engine: CUDNN 432 | } 433 | } 434 | layer { 435 | name: "seg1_bn2b_branch2b" 436 | type: "BatchNorm" 437 | bottom: "seg1_res2b_branch2b" 438 | top: "seg1_res2b_branch2b" 439 | param { 440 | lr_mult: 0 441 | } 442 | param { 443 | lr_mult: 0 444 | } 445 | param { 446 | lr_mult: 0 447 | } 448 | batch_norm_param { 449 | use_global_stats: true 450 | } 451 | } 452 | layer { 453 | name: "seg1_scale2b_branch2b" 454 | type: "Scale" 455 | bottom: "seg1_res2b_branch2b" 456 | top: "seg1_res2b_branch2b" 457 | param { 458 | lr_mult: 0 459 | decay_mult: 0 460 | } 461 | param { 462 | lr_mult: 0 463 | decay_mult: 0 464 | } 465 | scale_param { 466 | bias_term: true 467 | } 468 | } 469 | layer { 470 | name: "seg1_res2b_branch2b_relu" 471 | type: "ReLU" 472 | bottom: "seg1_res2b_branch2b" 473 | top: "seg1_res2b_branch2b" 474 | } 475 | layer { 476 | name: "seg1_res2b_branch2c" 477 | type: "Convolution" 478 | bottom: "seg1_res2b_branch2b" 479 | top: "seg1_res2b_branch2c" 480 | param { 481 | lr_mult: 0 482 | decay_mult: 0 483 | } 484 | convolution_param { 485 | num_output: 256 486 | bias_term: false 487 | pad: 0 488 | kernel_size: 1 489 | stride: 1 490 | weight_filler { 491 | type: "xavier" 492 | } 493 | engine: CUDNN 494 | } 495 | } 496 | layer { 497 | name: "seg1_bn2b_branch2c" 498 | type: "BatchNorm" 499 | bottom: "seg1_res2b_branch2c" 500 | top: "seg1_res2b_branch2c" 501 | param { 502 | lr_mult: 0 503 | } 504 | param { 505 | lr_mult: 0 506 | } 507 | param { 508 | lr_mult: 0 509 | } 510 | batch_norm_param { 511 | use_global_stats: true 512 | } 513 | } 514 | layer { 515 | name: "seg1_scale2b_branch2c" 516 | type: "Scale" 517 | bottom: "seg1_res2b_branch2c" 518 | top: "seg1_res2b_branch2c" 519 | param { 520 | lr_mult: 0 521 | decay_mult: 0 522 | } 523 | param { 524 | lr_mult: 0 525 | decay_mult: 0 526 | } 527 | scale_param { 528 | bias_term: true 529 | } 530 | } 531 | layer { 532 | name: "seg1_res2b" 533 | type: "Eltwise" 534 | bottom: "seg1_res2b_branch2c" 535 | bottom: "seg1_res2a" 536 | top: "seg1_res2b" 537 | } 538 | layer { 539 | name: "seg1_res2b_relu" 540 | type: "ReLU" 541 | bottom: "seg1_res2b" 542 | top: "seg1_res2b" 543 | } 544 | layer { 545 | name: "seg1_res2c_branch2a" 546 | type: "Convolution" 547 | bottom: "seg1_res2b" 548 | top: "seg1_res2c_branch2a" 549 | param { 550 | lr_mult: 0 551 | decay_mult: 0 552 | } 553 | convolution_param { 554 | num_output: 64 555 | bias_term: false 556 | pad: 0 557 | kernel_size: 1 558 | stride: 1 559 | weight_filler { 560 | type: "xavier" 561 | } 562 | engine: CUDNN 563 | } 564 | } 565 | layer { 566 | name: "seg1_bn2c_branch2a" 567 | type: "BatchNorm" 568 | bottom: "seg1_res2c_branch2a" 569 | top: "seg1_res2c_branch2a" 570 | param { 571 | lr_mult: 0 572 | } 573 | param { 574 | lr_mult: 0 575 | } 576 | param { 577 | lr_mult: 0 578 | } 579 | batch_norm_param { 580 | use_global_stats: true 581 | } 582 | } 583 | layer { 584 | name: "seg1_scale2c_branch2a" 585 | type: "Scale" 586 | bottom: "seg1_res2c_branch2a" 587 | top: "seg1_res2c_branch2a" 588 | param { 589 | lr_mult: 0 590 | decay_mult: 0 591 | } 592 | param { 593 | lr_mult: 0 594 | decay_mult: 0 595 | } 596 | scale_param { 597 | bias_term: true 598 | } 599 | } 600 | layer { 601 | name: "seg1_res2c_branch2a_relu" 602 | type: "ReLU" 603 | bottom: "seg1_res2c_branch2a" 604 | top: "seg1_res2c_branch2a" 605 | } 606 | layer { 607 | name: "seg1_res2c_branch2b" 608 | type: "Convolution" 609 | bottom: "seg1_res2c_branch2a" 610 | top: "seg1_res2c_branch2b" 611 | param { 612 | lr_mult: 0 613 | decay_mult: 0 614 | } 615 | convolution_param { 616 | num_output: 64 617 | bias_term: false 618 | pad: 1 619 | kernel_size: 3 620 | stride: 1 621 | weight_filler { 622 | type: "xavier" 623 | } 624 | engine: CUDNN 625 | } 626 | } 627 | layer { 628 | name: "seg1_bn2c_branch2b" 629 | type: "BatchNorm" 630 | bottom: "seg1_res2c_branch2b" 631 | top: "seg1_res2c_branch2b" 632 | param { 633 | lr_mult: 0 634 | } 635 | param { 636 | lr_mult: 0 637 | } 638 | param { 639 | lr_mult: 0 640 | } 641 | batch_norm_param { 642 | use_global_stats: true 643 | } 644 | } 645 | layer { 646 | name: "seg1_scale2c_branch2b" 647 | type: "Scale" 648 | bottom: "seg1_res2c_branch2b" 649 | top: "seg1_res2c_branch2b" 650 | param { 651 | lr_mult: 0 652 | decay_mult: 0 653 | } 654 | param { 655 | lr_mult: 0 656 | decay_mult: 0 657 | } 658 | scale_param { 659 | bias_term: true 660 | } 661 | } 662 | layer { 663 | name: "seg1_res2c_branch2b_relu" 664 | type: "ReLU" 665 | bottom: "seg1_res2c_branch2b" 666 | top: "seg1_res2c_branch2b" 667 | } 668 | layer { 669 | name: "seg1_res2c_branch2c" 670 | type: "Convolution" 671 | bottom: "seg1_res2c_branch2b" 672 | top: "seg1_res2c_branch2c" 673 | param { 674 | lr_mult: 0 675 | decay_mult: 0 676 | } 677 | convolution_param { 678 | num_output: 256 679 | bias_term: false 680 | pad: 0 681 | kernel_size: 1 682 | stride: 1 683 | weight_filler { 684 | type: "xavier" 685 | } 686 | engine: CUDNN 687 | } 688 | } 689 | layer { 690 | name: "seg1_bn2c_branch2c" 691 | type: "BatchNorm" 692 | bottom: "seg1_res2c_branch2c" 693 | top: "seg1_res2c_branch2c" 694 | param { 695 | lr_mult: 0 696 | } 697 | param { 698 | lr_mult: 0 699 | } 700 | param { 701 | lr_mult: 0 702 | } 703 | batch_norm_param { 704 | use_global_stats: true 705 | } 706 | } 707 | layer { 708 | name: "seg1_scale2c_branch2c" 709 | type: "Scale" 710 | bottom: "seg1_res2c_branch2c" 711 | top: "seg1_res2c_branch2c" 712 | param { 713 | lr_mult: 0 714 | decay_mult: 0 715 | } 716 | param { 717 | lr_mult: 0 718 | decay_mult: 0 719 | } 720 | scale_param { 721 | bias_term: true 722 | } 723 | } 724 | layer { 725 | name: "seg1_res2c" 726 | type: "Eltwise" 727 | bottom: "seg1_res2c_branch2c" 728 | bottom: "seg1_res2b" 729 | top: "seg1_res2c" 730 | } 731 | layer { 732 | name: "seg1_res2c_relu" 733 | type: "ReLU" 734 | bottom: "seg1_res2c" 735 | top: "seg1_res2c" 736 | } 737 | layer { 738 | name: "seg1_res3a_branch2a" 739 | type: "Convolution" 740 | bottom: "seg1_res2c" 741 | top: "seg1_res3a_branch2a" 742 | param { 743 | lr_mult: 0 744 | decay_mult: 0 745 | } 746 | convolution_param { 747 | num_output: 128 748 | bias_term: false 749 | pad: 0 750 | kernel_size: 1 751 | stride: 2 752 | weight_filler { 753 | type: "xavier" 754 | } 755 | engine: CUDNN 756 | } 757 | } 758 | layer { 759 | name: "seg1_bn3a_branch2a" 760 | type: "BatchNorm" 761 | bottom: "seg1_res3a_branch2a" 762 | top: "seg1_res3a_branch2a" 763 | param { 764 | lr_mult: 0 765 | } 766 | param { 767 | lr_mult: 0 768 | } 769 | param { 770 | lr_mult: 0 771 | } 772 | batch_norm_param { 773 | use_global_stats: true 774 | } 775 | } 776 | layer { 777 | name: "seg1_scale3a_branch2a" 778 | type: "Scale" 779 | bottom: "seg1_res3a_branch2a" 780 | top: "seg1_res3a_branch2a" 781 | param { 782 | lr_mult: 0 783 | decay_mult: 0 784 | } 785 | param { 786 | lr_mult: 0 787 | decay_mult: 0 788 | } 789 | scale_param { 790 | bias_term: true 791 | } 792 | } 793 | layer { 794 | name: "seg1_res3a_branch2a_relu" 795 | type: "ReLU" 796 | bottom: "seg1_res3a_branch2a" 797 | top: "seg1_res3a_branch2a" 798 | } 799 | layer { 800 | name: "seg1_res3a_branch2b" 801 | type: "Convolution" 802 | bottom: "seg1_res3a_branch2a" 803 | top: "seg1_res3a_branch2b" 804 | param { 805 | lr_mult: 0 806 | decay_mult: 0 807 | } 808 | convolution_param { 809 | num_output: 128 810 | bias_term: false 811 | pad: 1 812 | kernel_size: 3 813 | stride: 1 814 | weight_filler { 815 | type: "xavier" 816 | } 817 | engine: CUDNN 818 | } 819 | } 820 | layer { 821 | name: "seg1_bn3a_branch2b" 822 | type: "BatchNorm" 823 | bottom: "seg1_res3a_branch2b" 824 | top: "seg1_res3a_branch2b" 825 | param { 826 | lr_mult: 0 827 | } 828 | param { 829 | lr_mult: 0 830 | } 831 | param { 832 | lr_mult: 0 833 | } 834 | batch_norm_param { 835 | use_global_stats: true 836 | } 837 | } 838 | layer { 839 | name: "seg1_scale3a_branch2b" 840 | type: "Scale" 841 | bottom: "seg1_res3a_branch2b" 842 | top: "seg1_res3a_branch2b" 843 | param { 844 | lr_mult: 0 845 | decay_mult: 0 846 | } 847 | param { 848 | lr_mult: 0 849 | decay_mult: 0 850 | } 851 | scale_param { 852 | bias_term: true 853 | } 854 | } 855 | layer { 856 | name: "seg1_res3a_branch2b_relu" 857 | type: "ReLU" 858 | bottom: "seg1_res3a_branch2b" 859 | top: "seg1_res3a_branch2b" 860 | } 861 | layer { 862 | name: "seg1_res3a_branch2c" 863 | type: "Convolution" 864 | bottom: "seg1_res3a_branch2b" 865 | top: "seg1_res3a_branch2c" 866 | param { 867 | lr_mult: 0 868 | decay_mult: 0 869 | } 870 | convolution_param { 871 | num_output: 512 872 | bias_term: false 873 | pad: 0 874 | kernel_size: 1 875 | stride: 1 876 | weight_filler { 877 | type: "xavier" 878 | } 879 | engine: CUDNN 880 | } 881 | } 882 | layer { 883 | name: "seg1_bn3a_branch2c" 884 | type: "BatchNorm" 885 | bottom: "seg1_res3a_branch2c" 886 | top: "seg1_res3a_branch2c" 887 | param { 888 | lr_mult: 0 889 | } 890 | param { 891 | lr_mult: 0 892 | } 893 | param { 894 | lr_mult: 0 895 | } 896 | batch_norm_param { 897 | use_global_stats: true 898 | } 899 | } 900 | layer { 901 | name: "seg1_scale3a_branch2c" 902 | type: "Scale" 903 | bottom: "seg1_res3a_branch2c" 904 | top: "seg1_res3a_branch2c" 905 | param { 906 | lr_mult: 0 907 | decay_mult: 0 908 | } 909 | param { 910 | lr_mult: 0 911 | decay_mult: 0 912 | } 913 | scale_param { 914 | bias_term: true 915 | } 916 | } 917 | layer { 918 | name: "seg1_res3a_branch1" 919 | type: "Convolution" 920 | bottom: "seg1_res2c" 921 | top: "seg1_res3a_branch1" 922 | param { 923 | lr_mult: 0 924 | decay_mult: 0 925 | } 926 | convolution_param { 927 | num_output: 512 928 | bias_term: false 929 | pad: 0 930 | kernel_size: 1 931 | stride: 2 932 | weight_filler { 933 | type: "xavier" 934 | } 935 | engine: CUDNN 936 | } 937 | } 938 | layer { 939 | name: "seg1_bn3a_branch1" 940 | type: "BatchNorm" 941 | bottom: "seg1_res3a_branch1" 942 | top: "seg1_res3a_branch1" 943 | param { 944 | lr_mult: 0 945 | } 946 | param { 947 | lr_mult: 0 948 | } 949 | param { 950 | lr_mult: 0 951 | } 952 | batch_norm_param { 953 | use_global_stats: true 954 | } 955 | } 956 | layer { 957 | name: "seg1_scale3a_branch1" 958 | type: "Scale" 959 | bottom: "seg1_res3a_branch1" 960 | top: "seg1_res3a_branch1" 961 | param { 962 | lr_mult: 0 963 | decay_mult: 0 964 | } 965 | param { 966 | lr_mult: 0 967 | decay_mult: 0 968 | } 969 | scale_param { 970 | bias_term: true 971 | } 972 | } 973 | layer { 974 | name: "seg1_res3a" 975 | type: "Eltwise" 976 | bottom: "seg1_res3a_branch2c" 977 | bottom: "seg1_res3a_branch1" 978 | top: "seg1_res3a" 979 | } 980 | layer { 981 | name: "seg1_res3a_relu" 982 | type: "ReLU" 983 | bottom: "seg1_res3a" 984 | top: "seg1_res3a" 985 | } 986 | layer { 987 | name: "seg1_res3b_branch2a" 988 | type: "Convolution" 989 | bottom: "seg1_res3a" 990 | top: "seg1_res3b_branch2a" 991 | param { 992 | lr_mult: 0 993 | decay_mult: 0 994 | } 995 | convolution_param { 996 | num_output: 128 997 | bias_term: false 998 | pad: 0 999 | kernel_size: 1 1000 | stride: 1 1001 | weight_filler { 1002 | type: "xavier" 1003 | } 1004 | engine: CUDNN 1005 | } 1006 | } 1007 | layer { 1008 | name: "seg1_bn3b_branch2a" 1009 | type: "BatchNorm" 1010 | bottom: "seg1_res3b_branch2a" 1011 | top: "seg1_res3b_branch2a" 1012 | param { 1013 | lr_mult: 0 1014 | } 1015 | param { 1016 | lr_mult: 0 1017 | } 1018 | param { 1019 | lr_mult: 0 1020 | } 1021 | batch_norm_param { 1022 | use_global_stats: true 1023 | } 1024 | } 1025 | layer { 1026 | name: "seg1_scale3b_branch2a" 1027 | type: "Scale" 1028 | bottom: "seg1_res3b_branch2a" 1029 | top: "seg1_res3b_branch2a" 1030 | param { 1031 | lr_mult: 0 1032 | decay_mult: 0 1033 | } 1034 | param { 1035 | lr_mult: 0 1036 | decay_mult: 0 1037 | } 1038 | scale_param { 1039 | bias_term: true 1040 | } 1041 | } 1042 | layer { 1043 | name: "seg1_res3b_branch2a_relu" 1044 | type: "ReLU" 1045 | bottom: "seg1_res3b_branch2a" 1046 | top: "seg1_res3b_branch2a" 1047 | } 1048 | layer { 1049 | name: "seg1_res3b_branch2b" 1050 | type: "Convolution" 1051 | bottom: "seg1_res3b_branch2a" 1052 | top: "seg1_res3b_branch2b" 1053 | param { 1054 | lr_mult: 0 1055 | decay_mult: 0 1056 | } 1057 | convolution_param { 1058 | num_output: 128 1059 | bias_term: false 1060 | pad: 1 1061 | kernel_size: 3 1062 | stride: 1 1063 | weight_filler { 1064 | type: "xavier" 1065 | } 1066 | engine: CUDNN 1067 | } 1068 | } 1069 | layer { 1070 | name: "seg1_bn3b_branch2b" 1071 | type: "BatchNorm" 1072 | bottom: "seg1_res3b_branch2b" 1073 | top: "seg1_res3b_branch2b" 1074 | param { 1075 | lr_mult: 0 1076 | } 1077 | param { 1078 | lr_mult: 0 1079 | } 1080 | param { 1081 | lr_mult: 0 1082 | } 1083 | batch_norm_param { 1084 | use_global_stats: true 1085 | } 1086 | } 1087 | layer { 1088 | name: "seg1_scale3b_branch2b" 1089 | type: "Scale" 1090 | bottom: "seg1_res3b_branch2b" 1091 | top: "seg1_res3b_branch2b" 1092 | param { 1093 | lr_mult: 0 1094 | decay_mult: 0 1095 | } 1096 | param { 1097 | lr_mult: 0 1098 | decay_mult: 0 1099 | } 1100 | scale_param { 1101 | bias_term: true 1102 | } 1103 | } 1104 | layer { 1105 | name: "seg1_res3b_branch2b_relu" 1106 | type: "ReLU" 1107 | bottom: "seg1_res3b_branch2b" 1108 | top: "seg1_res3b_branch2b" 1109 | } 1110 | layer { 1111 | name: "seg1_res3b_branch2c" 1112 | type: "Convolution" 1113 | bottom: "seg1_res3b_branch2b" 1114 | top: "seg1_res3b_branch2c" 1115 | param { 1116 | lr_mult: 0 1117 | decay_mult: 0 1118 | } 1119 | convolution_param { 1120 | num_output: 512 1121 | bias_term: false 1122 | pad: 0 1123 | kernel_size: 1 1124 | stride: 1 1125 | weight_filler { 1126 | type: "xavier" 1127 | } 1128 | engine: CUDNN 1129 | } 1130 | } 1131 | layer { 1132 | name: "seg1_bn3b_branch2c" 1133 | type: "BatchNorm" 1134 | bottom: "seg1_res3b_branch2c" 1135 | top: "seg1_res3b_branch2c" 1136 | param { 1137 | lr_mult: 0 1138 | } 1139 | param { 1140 | lr_mult: 0 1141 | } 1142 | param { 1143 | lr_mult: 0 1144 | } 1145 | batch_norm_param { 1146 | use_global_stats: true 1147 | } 1148 | } 1149 | layer { 1150 | name: "seg1_scale3b_branch2c" 1151 | type: "Scale" 1152 | bottom: "seg1_res3b_branch2c" 1153 | top: "seg1_res3b_branch2c" 1154 | param { 1155 | lr_mult: 0 1156 | decay_mult: 0 1157 | } 1158 | param { 1159 | lr_mult: 0 1160 | decay_mult: 0 1161 | } 1162 | scale_param { 1163 | bias_term: true 1164 | } 1165 | } 1166 | layer { 1167 | name: "seg1_res3b" 1168 | type: "Eltwise" 1169 | bottom: "seg1_res3b_branch2c" 1170 | bottom: "seg1_res3a" 1171 | top: "seg1_res3b" 1172 | } 1173 | layer { 1174 | name: "seg1_res3b_relu" 1175 | type: "ReLU" 1176 | bottom: "seg1_res3b" 1177 | top: "seg1_res3b" 1178 | } 1179 | layer { 1180 | name: "seg1_res3c_branch2a" 1181 | type: "Convolution" 1182 | bottom: "seg1_res3b" 1183 | top: "seg1_res3c_branch2a" 1184 | param { 1185 | lr_mult: 0 1186 | decay_mult: 0 1187 | } 1188 | convolution_param { 1189 | num_output: 128 1190 | bias_term: false 1191 | pad: 0 1192 | kernel_size: 1 1193 | stride: 1 1194 | weight_filler { 1195 | type: "xavier" 1196 | } 1197 | engine: CUDNN 1198 | } 1199 | } 1200 | layer { 1201 | name: "seg1_bn3c_branch2a" 1202 | type: "BatchNorm" 1203 | bottom: "seg1_res3c_branch2a" 1204 | top: "seg1_res3c_branch2a" 1205 | param { 1206 | lr_mult: 0 1207 | } 1208 | param { 1209 | lr_mult: 0 1210 | } 1211 | param { 1212 | lr_mult: 0 1213 | } 1214 | batch_norm_param { 1215 | use_global_stats: true 1216 | } 1217 | } 1218 | layer { 1219 | name: "seg1_scale3c_branch2a" 1220 | type: "Scale" 1221 | bottom: "seg1_res3c_branch2a" 1222 | top: "seg1_res3c_branch2a" 1223 | param { 1224 | lr_mult: 0 1225 | decay_mult: 0 1226 | } 1227 | param { 1228 | lr_mult: 0 1229 | decay_mult: 0 1230 | } 1231 | scale_param { 1232 | bias_term: true 1233 | } 1234 | } 1235 | layer { 1236 | name: "seg1_res3c_branch2a_relu" 1237 | type: "ReLU" 1238 | bottom: "seg1_res3c_branch2a" 1239 | top: "seg1_res3c_branch2a" 1240 | } 1241 | layer { 1242 | name: "seg1_res3c_branch2b" 1243 | type: "Convolution" 1244 | bottom: "seg1_res3c_branch2a" 1245 | top: "seg1_res3c_branch2b" 1246 | param { 1247 | lr_mult: 0 1248 | decay_mult: 0 1249 | } 1250 | convolution_param { 1251 | num_output: 128 1252 | bias_term: false 1253 | pad: 1 1254 | kernel_size: 3 1255 | stride: 1 1256 | weight_filler { 1257 | type: "xavier" 1258 | } 1259 | engine: CUDNN 1260 | } 1261 | } 1262 | layer { 1263 | name: "seg1_bn3c_branch2b" 1264 | type: "BatchNorm" 1265 | bottom: "seg1_res3c_branch2b" 1266 | top: "seg1_res3c_branch2b" 1267 | param { 1268 | lr_mult: 0 1269 | } 1270 | param { 1271 | lr_mult: 0 1272 | } 1273 | param { 1274 | lr_mult: 0 1275 | } 1276 | batch_norm_param { 1277 | use_global_stats: true 1278 | } 1279 | } 1280 | layer { 1281 | name: "seg1_scale3c_branch2b" 1282 | type: "Scale" 1283 | bottom: "seg1_res3c_branch2b" 1284 | top: "seg1_res3c_branch2b" 1285 | param { 1286 | lr_mult: 0 1287 | decay_mult: 0 1288 | } 1289 | param { 1290 | lr_mult: 0 1291 | decay_mult: 0 1292 | } 1293 | scale_param { 1294 | bias_term: true 1295 | } 1296 | } 1297 | layer { 1298 | name: "seg1_res3c_branch2b_relu" 1299 | type: "ReLU" 1300 | bottom: "seg1_res3c_branch2b" 1301 | top: "seg1_res3c_branch2b" 1302 | } 1303 | layer { 1304 | name: "seg1_res3c_branch2c" 1305 | type: "Convolution" 1306 | bottom: "seg1_res3c_branch2b" 1307 | top: "seg1_res3c_branch2c" 1308 | param { 1309 | lr_mult: 0 1310 | decay_mult: 0 1311 | } 1312 | convolution_param { 1313 | num_output: 512 1314 | bias_term: false 1315 | pad: 0 1316 | kernel_size: 1 1317 | stride: 1 1318 | weight_filler { 1319 | type: "xavier" 1320 | } 1321 | engine: CUDNN 1322 | } 1323 | } 1324 | layer { 1325 | name: "seg1_bn3c_branch2c" 1326 | type: "BatchNorm" 1327 | bottom: "seg1_res3c_branch2c" 1328 | top: "seg1_res3c_branch2c" 1329 | param { 1330 | lr_mult: 0 1331 | } 1332 | param { 1333 | lr_mult: 0 1334 | } 1335 | param { 1336 | lr_mult: 0 1337 | } 1338 | batch_norm_param { 1339 | use_global_stats: true 1340 | } 1341 | } 1342 | layer { 1343 | name: "seg1_scale3c_branch2c" 1344 | type: "Scale" 1345 | bottom: "seg1_res3c_branch2c" 1346 | top: "seg1_res3c_branch2c" 1347 | param { 1348 | lr_mult: 0 1349 | decay_mult: 0 1350 | } 1351 | param { 1352 | lr_mult: 0 1353 | decay_mult: 0 1354 | } 1355 | scale_param { 1356 | bias_term: true 1357 | } 1358 | } 1359 | layer { 1360 | name: "seg1_res3c" 1361 | type: "Eltwise" 1362 | bottom: "seg1_res3c_branch2c" 1363 | bottom: "seg1_res3b" 1364 | top: "seg1_res3c" 1365 | } 1366 | layer { 1367 | name: "seg1_res3c_relu" 1368 | type: "ReLU" 1369 | bottom: "seg1_res3c" 1370 | top: "seg1_res3c" 1371 | } 1372 | layer { 1373 | name: "seg1_res3d_branch2a" 1374 | type: "Convolution" 1375 | bottom: "seg1_res3c" 1376 | top: "seg1_res3d_branch2a" 1377 | param { 1378 | lr_mult: 0 1379 | decay_mult: 0 1380 | } 1381 | convolution_param { 1382 | num_output: 128 1383 | bias_term: false 1384 | pad: 0 1385 | kernel_size: 1 1386 | stride: 1 1387 | weight_filler { 1388 | type: "xavier" 1389 | } 1390 | engine: CUDNN 1391 | } 1392 | } 1393 | layer { 1394 | name: "seg1_bn3d_branch2a" 1395 | type: "BatchNorm" 1396 | bottom: "seg1_res3d_branch2a" 1397 | top: "seg1_res3d_branch2a" 1398 | param { 1399 | lr_mult: 0 1400 | } 1401 | param { 1402 | lr_mult: 0 1403 | } 1404 | param { 1405 | lr_mult: 0 1406 | } 1407 | batch_norm_param { 1408 | use_global_stats: true 1409 | } 1410 | } 1411 | layer { 1412 | name: "seg1_scale3d_branch2a" 1413 | type: "Scale" 1414 | bottom: "seg1_res3d_branch2a" 1415 | top: "seg1_res3d_branch2a" 1416 | param { 1417 | lr_mult: 0 1418 | decay_mult: 0 1419 | } 1420 | param { 1421 | lr_mult: 0 1422 | decay_mult: 0 1423 | } 1424 | scale_param { 1425 | bias_term: true 1426 | } 1427 | } 1428 | layer { 1429 | name: "seg1_res3d_branch2a_relu" 1430 | type: "ReLU" 1431 | bottom: "seg1_res3d_branch2a" 1432 | top: "seg1_res3d_branch2a" 1433 | } 1434 | layer { 1435 | name: "seg1_res3dconv1_2_p1" 1436 | type: "Convolution" 1437 | bottom: "seg1_res3d_branch2a" 1438 | top: "seg1_res3dconv1_2_p1" 1439 | param { 1440 | lr_mult: 0 1441 | decay_mult: 0 1442 | } 1443 | convolution_param { 1444 | num_output: 64 1445 | bias_term: false 1446 | pad: 1 1447 | kernel_size: 3 1448 | stride: 1 1449 | weight_filler { 1450 | type: "xavier" 1451 | } 1452 | engine: CUDNN 1453 | } 1454 | } 1455 | layer { 1456 | name: "seg1_bn3d_dil1" 1457 | type: "BatchNorm" 1458 | bottom: "seg1_res3dconv1_2_p1" 1459 | top: "seg1_res3dconv1_2_p1" 1460 | param { 1461 | lr_mult: 0 1462 | } 1463 | param { 1464 | lr_mult: 0 1465 | } 1466 | param { 1467 | lr_mult: 0 1468 | } 1469 | batch_norm_param { 1470 | use_global_stats: true 1471 | } 1472 | } 1473 | layer { 1474 | name: "seg1_scale3d_dil1" 1475 | type: "Scale" 1476 | bottom: "seg1_res3dconv1_2_p1" 1477 | top: "seg1_res3dconv1_2_p1" 1478 | param { 1479 | lr_mult: 0 1480 | decay_mult: 0 1481 | } 1482 | param { 1483 | lr_mult: 0 1484 | decay_mult: 0 1485 | } 1486 | scale_param { 1487 | bias_term: true 1488 | } 1489 | } 1490 | layer { 1491 | name: "seg1_res3drelu1_2" 1492 | type: "ReLU" 1493 | bottom: "seg1_res3dconv1_2_p1" 1494 | top: "seg1_res3dconv1_2_p1" 1495 | } 1496 | layer { 1497 | name: "seg1_res3dconv1_2_p2" 1498 | type: "Convolution" 1499 | bottom: "seg1_res3d_branch2a" 1500 | top: "seg1_res3dconv1_2_p2" 1501 | param { 1502 | lr_mult: 0 1503 | decay_mult: 0 1504 | } 1505 | param { 1506 | lr_mult: 0 1507 | decay_mult: 0 1508 | } 1509 | convolution_param { 1510 | num_output: 64 1511 | pad: 2 1512 | kernel_size: 3 1513 | weight_filler { 1514 | type: "xavier" 1515 | } 1516 | engine: CAFFE 1517 | dilation: 2 1518 | } 1519 | } 1520 | layer { 1521 | name: "seg1_bn3d_dil2" 1522 | type: "BatchNorm" 1523 | bottom: "seg1_res3dconv1_2_p2" 1524 | top: "seg1_res3dconv1_2_p2" 1525 | param { 1526 | lr_mult: 0 1527 | } 1528 | param { 1529 | lr_mult: 0 1530 | } 1531 | param { 1532 | lr_mult: 0 1533 | } 1534 | batch_norm_param { 1535 | use_global_stats: true 1536 | } 1537 | } 1538 | layer { 1539 | name: "seg1_scale3d_dil2" 1540 | type: "Scale" 1541 | bottom: "seg1_res3dconv1_2_p2" 1542 | top: "seg1_res3dconv1_2_p2" 1543 | param { 1544 | lr_mult: 0 1545 | decay_mult: 0 1546 | } 1547 | param { 1548 | lr_mult: 0 1549 | decay_mult: 0 1550 | } 1551 | scale_param { 1552 | bias_term: true 1553 | } 1554 | } 1555 | layer { 1556 | name: "seg1_res3drelu1_2_p2" 1557 | type: "ReLU" 1558 | bottom: "seg1_res3dconv1_2_p2" 1559 | top: "seg1_res3dconv1_2_p2" 1560 | } 1561 | layer { 1562 | name: "seg1_3ddil_sum" 1563 | type: "Concat" 1564 | bottom: "seg1_res3dconv1_2_p1" 1565 | bottom: "seg1_res3dconv1_2_p2" 1566 | top: "seg1_3ddil_sum" 1567 | } 1568 | layer { 1569 | name: "seg1_res3d_branch2c" 1570 | type: "Convolution" 1571 | bottom: "seg1_3ddil_sum" 1572 | top: "seg1_res3d_branch2c" 1573 | param { 1574 | lr_mult: 0 1575 | decay_mult: 0 1576 | } 1577 | convolution_param { 1578 | num_output: 512 1579 | bias_term: false 1580 | pad: 0 1581 | kernel_size: 1 1582 | stride: 1 1583 | weight_filler { 1584 | type: "xavier" 1585 | } 1586 | engine: CUDNN 1587 | } 1588 | } 1589 | layer { 1590 | name: "seg1_bn3d_branch2c" 1591 | type: "BatchNorm" 1592 | bottom: "seg1_res3d_branch2c" 1593 | top: "seg1_res3d_branch2c" 1594 | param { 1595 | lr_mult: 0 1596 | } 1597 | param { 1598 | lr_mult: 0 1599 | } 1600 | param { 1601 | lr_mult: 0 1602 | } 1603 | batch_norm_param { 1604 | use_global_stats: true 1605 | } 1606 | } 1607 | layer { 1608 | name: "seg1_scale3d_branch2c" 1609 | type: "Scale" 1610 | bottom: "seg1_res3d_branch2c" 1611 | top: "seg1_res3d_branch2c" 1612 | param { 1613 | lr_mult: 0 1614 | decay_mult: 0 1615 | } 1616 | param { 1617 | lr_mult: 0 1618 | decay_mult: 0 1619 | } 1620 | scale_param { 1621 | bias_term: true 1622 | } 1623 | } 1624 | layer { 1625 | name: "seg1_res3d" 1626 | type: "Eltwise" 1627 | bottom: "seg1_res3d_branch2c" 1628 | bottom: "seg1_res3c" 1629 | top: "seg1_res3d" 1630 | } 1631 | layer { 1632 | name: "seg1_res3d_relu" 1633 | type: "ReLU" 1634 | bottom: "seg1_res3d" 1635 | top: "seg1_res3d" 1636 | } 1637 | layer { 1638 | name: "seg1_res4a_branch2a" 1639 | type: "Convolution" 1640 | bottom: "seg1_res3d" 1641 | top: "seg1_res4a_branch2a" 1642 | param { 1643 | lr_mult: 0 1644 | decay_mult: 0 1645 | } 1646 | convolution_param { 1647 | num_output: 256 1648 | bias_term: false 1649 | pad: 0 1650 | kernel_size: 1 1651 | stride: 2 1652 | weight_filler { 1653 | type: "xavier" 1654 | } 1655 | engine: CUDNN 1656 | } 1657 | } 1658 | layer { 1659 | name: "seg1_bn4a_branch2a" 1660 | type: "BatchNorm" 1661 | bottom: "seg1_res4a_branch2a" 1662 | top: "seg1_res4a_branch2a" 1663 | param { 1664 | lr_mult: 0 1665 | } 1666 | param { 1667 | lr_mult: 0 1668 | } 1669 | param { 1670 | lr_mult: 0 1671 | } 1672 | batch_norm_param { 1673 | use_global_stats: true 1674 | } 1675 | } 1676 | layer { 1677 | name: "seg1_scale4a_branch2a" 1678 | type: "Scale" 1679 | bottom: "seg1_res4a_branch2a" 1680 | top: "seg1_res4a_branch2a" 1681 | param { 1682 | lr_mult: 0 1683 | decay_mult: 0 1684 | } 1685 | param { 1686 | lr_mult: 0 1687 | decay_mult: 0 1688 | } 1689 | scale_param { 1690 | bias_term: true 1691 | } 1692 | } 1693 | layer { 1694 | name: "seg1_res4a_branch2a_relu" 1695 | type: "ReLU" 1696 | bottom: "seg1_res4a_branch2a" 1697 | top: "seg1_res4a_branch2a" 1698 | } 1699 | layer { 1700 | name: "seg1_res4a_branch2b" 1701 | type: "Convolution" 1702 | bottom: "seg1_res4a_branch2a" 1703 | top: "seg1_res4a_branch2b" 1704 | param { 1705 | lr_mult: 0 1706 | decay_mult: 0 1707 | } 1708 | convolution_param { 1709 | num_output: 256 1710 | bias_term: false 1711 | pad: 1 1712 | kernel_size: 3 1713 | stride: 1 1714 | weight_filler { 1715 | type: "xavier" 1716 | } 1717 | engine: CUDNN 1718 | } 1719 | } 1720 | layer { 1721 | name: "seg1_bn4a_branch2b" 1722 | type: "BatchNorm" 1723 | bottom: "seg1_res4a_branch2b" 1724 | top: "seg1_res4a_branch2b" 1725 | param { 1726 | lr_mult: 0 1727 | } 1728 | param { 1729 | lr_mult: 0 1730 | } 1731 | param { 1732 | lr_mult: 0 1733 | } 1734 | batch_norm_param { 1735 | use_global_stats: true 1736 | } 1737 | } 1738 | layer { 1739 | name: "seg1_scale4a_branch2b" 1740 | type: "Scale" 1741 | bottom: "seg1_res4a_branch2b" 1742 | top: "seg1_res4a_branch2b" 1743 | param { 1744 | lr_mult: 0 1745 | decay_mult: 0 1746 | } 1747 | param { 1748 | lr_mult: 0 1749 | decay_mult: 0 1750 | } 1751 | scale_param { 1752 | bias_term: true 1753 | } 1754 | } 1755 | layer { 1756 | name: "seg1_res4a_branch2b_relu" 1757 | type: "ReLU" 1758 | bottom: "seg1_res4a_branch2b" 1759 | top: "seg1_res4a_branch2b" 1760 | } 1761 | layer { 1762 | name: "seg1_res4a_branch2c" 1763 | type: "Convolution" 1764 | bottom: "seg1_res4a_branch2b" 1765 | top: "seg1_res4a_branch2c" 1766 | param { 1767 | lr_mult: 0 1768 | decay_mult: 0 1769 | } 1770 | convolution_param { 1771 | num_output: 1024 1772 | bias_term: false 1773 | pad: 0 1774 | kernel_size: 1 1775 | stride: 1 1776 | weight_filler { 1777 | type: "xavier" 1778 | } 1779 | engine: CUDNN 1780 | } 1781 | } 1782 | layer { 1783 | name: "seg1_bn4a_branch2c" 1784 | type: "BatchNorm" 1785 | bottom: "seg1_res4a_branch2c" 1786 | top: "seg1_res4a_branch2c" 1787 | param { 1788 | lr_mult: 0 1789 | } 1790 | param { 1791 | lr_mult: 0 1792 | } 1793 | param { 1794 | lr_mult: 0 1795 | } 1796 | batch_norm_param { 1797 | use_global_stats: true 1798 | } 1799 | } 1800 | layer { 1801 | name: "seg1_scale4a_branch2c" 1802 | type: "Scale" 1803 | bottom: "seg1_res4a_branch2c" 1804 | top: "seg1_res4a_branch2c" 1805 | param { 1806 | lr_mult: 0 1807 | decay_mult: 0 1808 | } 1809 | param { 1810 | lr_mult: 0 1811 | decay_mult: 0 1812 | } 1813 | scale_param { 1814 | bias_term: true 1815 | } 1816 | } 1817 | layer { 1818 | name: "seg1_res4a_branch1" 1819 | type: "Convolution" 1820 | bottom: "seg1_res3d" 1821 | top: "seg1_res4a_branch1" 1822 | param { 1823 | lr_mult: 0 1824 | decay_mult: 0 1825 | } 1826 | convolution_param { 1827 | num_output: 1024 1828 | bias_term: false 1829 | pad: 0 1830 | kernel_size: 1 1831 | stride: 2 1832 | weight_filler { 1833 | type: "xavier" 1834 | } 1835 | engine: CUDNN 1836 | } 1837 | } 1838 | layer { 1839 | name: "seg1_bn4a_branch1" 1840 | type: "BatchNorm" 1841 | bottom: "seg1_res4a_branch1" 1842 | top: "seg1_res4a_branch1" 1843 | param { 1844 | lr_mult: 0 1845 | } 1846 | param { 1847 | lr_mult: 0 1848 | } 1849 | param { 1850 | lr_mult: 0 1851 | } 1852 | batch_norm_param { 1853 | use_global_stats: true 1854 | } 1855 | } 1856 | layer { 1857 | name: "seg1_scale4a_branch1" 1858 | type: "Scale" 1859 | bottom: "seg1_res4a_branch1" 1860 | top: "seg1_res4a_branch1" 1861 | param { 1862 | lr_mult: 0 1863 | decay_mult: 0 1864 | } 1865 | param { 1866 | lr_mult: 0 1867 | decay_mult: 0 1868 | } 1869 | scale_param { 1870 | bias_term: true 1871 | } 1872 | } 1873 | layer { 1874 | name: "seg1_res4a" 1875 | type: "Eltwise" 1876 | bottom: "seg1_res4a_branch2c" 1877 | bottom: "seg1_res4a_branch1" 1878 | top: "seg1_res4a" 1879 | } 1880 | layer { 1881 | name: "seg1_res4a_relu" 1882 | type: "ReLU" 1883 | bottom: "seg1_res4a" 1884 | top: "seg1_res4a" 1885 | } 1886 | layer { 1887 | name: "seg1_res4b_branch2a" 1888 | type: "Convolution" 1889 | bottom: "seg1_res4a" 1890 | top: "seg1_res4b_branch2a" 1891 | param { 1892 | lr_mult: 0 1893 | decay_mult: 0 1894 | } 1895 | convolution_param { 1896 | num_output: 256 1897 | bias_term: false 1898 | pad: 0 1899 | kernel_size: 1 1900 | stride: 1 1901 | weight_filler { 1902 | type: "xavier" 1903 | } 1904 | engine: CUDNN 1905 | } 1906 | } 1907 | layer { 1908 | name: "seg1_bn4b_branch2a" 1909 | type: "BatchNorm" 1910 | bottom: "seg1_res4b_branch2a" 1911 | top: "seg1_res4b_branch2a" 1912 | param { 1913 | lr_mult: 0 1914 | } 1915 | param { 1916 | lr_mult: 0 1917 | } 1918 | param { 1919 | lr_mult: 0 1920 | } 1921 | batch_norm_param { 1922 | use_global_stats: true 1923 | } 1924 | } 1925 | layer { 1926 | name: "seg1_scale4b_branch2a" 1927 | type: "Scale" 1928 | bottom: "seg1_res4b_branch2a" 1929 | top: "seg1_res4b_branch2a" 1930 | param { 1931 | lr_mult: 0 1932 | decay_mult: 0 1933 | } 1934 | param { 1935 | lr_mult: 0 1936 | decay_mult: 0 1937 | } 1938 | scale_param { 1939 | bias_term: true 1940 | } 1941 | } 1942 | layer { 1943 | name: "seg1_res4b_branch2a_relu" 1944 | type: "ReLU" 1945 | bottom: "seg1_res4b_branch2a" 1946 | top: "seg1_res4b_branch2a" 1947 | } 1948 | layer { 1949 | name: "seg1_res4b_branch2b" 1950 | type: "Convolution" 1951 | bottom: "seg1_res4b_branch2a" 1952 | top: "seg1_res4b_branch2b" 1953 | param { 1954 | lr_mult: 0 1955 | decay_mult: 0 1956 | } 1957 | convolution_param { 1958 | num_output: 256 1959 | bias_term: false 1960 | pad: 1 1961 | kernel_size: 3 1962 | stride: 1 1963 | weight_filler { 1964 | type: "xavier" 1965 | } 1966 | engine: CUDNN 1967 | } 1968 | } 1969 | layer { 1970 | name: "seg1_bn4b_branch2b" 1971 | type: "BatchNorm" 1972 | bottom: "seg1_res4b_branch2b" 1973 | top: "seg1_res4b_branch2b" 1974 | param { 1975 | lr_mult: 0 1976 | } 1977 | param { 1978 | lr_mult: 0 1979 | } 1980 | param { 1981 | lr_mult: 0 1982 | } 1983 | batch_norm_param { 1984 | use_global_stats: true 1985 | } 1986 | } 1987 | layer { 1988 | name: "seg1_scale4b_branch2b" 1989 | type: "Scale" 1990 | bottom: "seg1_res4b_branch2b" 1991 | top: "seg1_res4b_branch2b" 1992 | param { 1993 | lr_mult: 0 1994 | decay_mult: 0 1995 | } 1996 | param { 1997 | lr_mult: 0 1998 | decay_mult: 0 1999 | } 2000 | scale_param { 2001 | bias_term: true 2002 | } 2003 | } 2004 | layer { 2005 | name: "seg1_res4b_branch2b_relu" 2006 | type: "ReLU" 2007 | bottom: "seg1_res4b_branch2b" 2008 | top: "seg1_res4b_branch2b" 2009 | } 2010 | layer { 2011 | name: "seg1_res4b_branch2c" 2012 | type: "Convolution" 2013 | bottom: "seg1_res4b_branch2b" 2014 | top: "seg1_res4b_branch2c" 2015 | param { 2016 | lr_mult: 0 2017 | decay_mult: 0 2018 | } 2019 | convolution_param { 2020 | num_output: 1024 2021 | bias_term: false 2022 | pad: 0 2023 | kernel_size: 1 2024 | stride: 1 2025 | weight_filler { 2026 | type: "xavier" 2027 | } 2028 | engine: CUDNN 2029 | } 2030 | } 2031 | layer { 2032 | name: "seg1_bn4b_branch2c" 2033 | type: "BatchNorm" 2034 | bottom: "seg1_res4b_branch2c" 2035 | top: "seg1_res4b_branch2c" 2036 | param { 2037 | lr_mult: 0 2038 | } 2039 | param { 2040 | lr_mult: 0 2041 | } 2042 | param { 2043 | lr_mult: 0 2044 | } 2045 | batch_norm_param { 2046 | use_global_stats: true 2047 | } 2048 | } 2049 | layer { 2050 | name: "seg1_scale4b_branch2c" 2051 | type: "Scale" 2052 | bottom: "seg1_res4b_branch2c" 2053 | top: "seg1_res4b_branch2c" 2054 | param { 2055 | lr_mult: 0 2056 | decay_mult: 0 2057 | } 2058 | param { 2059 | lr_mult: 0 2060 | decay_mult: 0 2061 | } 2062 | scale_param { 2063 | bias_term: true 2064 | } 2065 | } 2066 | layer { 2067 | name: "seg1_res4b" 2068 | type: "Eltwise" 2069 | bottom: "seg1_res4b_branch2c" 2070 | bottom: "seg1_res4a" 2071 | top: "seg1_res4b" 2072 | } 2073 | layer { 2074 | name: "seg1_res4b_relu" 2075 | type: "ReLU" 2076 | bottom: "seg1_res4b" 2077 | top: "seg1_res4b" 2078 | } 2079 | layer { 2080 | name: "seg1_res4c_branch2a" 2081 | type: "Convolution" 2082 | bottom: "seg1_res4b" 2083 | top: "seg1_res4c_branch2a" 2084 | param { 2085 | lr_mult: 0 2086 | decay_mult: 0 2087 | } 2088 | convolution_param { 2089 | num_output: 256 2090 | bias_term: false 2091 | pad: 0 2092 | kernel_size: 1 2093 | stride: 1 2094 | weight_filler { 2095 | type: "xavier" 2096 | } 2097 | engine: CUDNN 2098 | } 2099 | } 2100 | layer { 2101 | name: "seg1_bn4c_branch2a" 2102 | type: "BatchNorm" 2103 | bottom: "seg1_res4c_branch2a" 2104 | top: "seg1_res4c_branch2a" 2105 | param { 2106 | lr_mult: 0 2107 | } 2108 | param { 2109 | lr_mult: 0 2110 | } 2111 | param { 2112 | lr_mult: 0 2113 | } 2114 | batch_norm_param { 2115 | use_global_stats: true 2116 | } 2117 | } 2118 | layer { 2119 | name: "seg1_scale4c_branch2a" 2120 | type: "Scale" 2121 | bottom: "seg1_res4c_branch2a" 2122 | top: "seg1_res4c_branch2a" 2123 | param { 2124 | lr_mult: 0 2125 | decay_mult: 0 2126 | } 2127 | param { 2128 | lr_mult: 0 2129 | decay_mult: 0 2130 | } 2131 | scale_param { 2132 | bias_term: true 2133 | } 2134 | } 2135 | layer { 2136 | name: "seg1_res4c_branch2a_relu" 2137 | type: "ReLU" 2138 | bottom: "seg1_res4c_branch2a" 2139 | top: "seg1_res4c_branch2a" 2140 | } 2141 | layer { 2142 | name: "seg1_res4cconv1_2_p1" 2143 | type: "Convolution" 2144 | bottom: "seg1_res4c_branch2a" 2145 | top: "seg1_res4cconv1_2_p1" 2146 | param { 2147 | lr_mult: 0 2148 | decay_mult: 0 2149 | } 2150 | convolution_param { 2151 | num_output: 128 2152 | bias_term: false 2153 | pad: 1 2154 | kernel_size: 3 2155 | stride: 1 2156 | weight_filler { 2157 | type: "xavier" 2158 | } 2159 | engine: CUDNN 2160 | } 2161 | } 2162 | layer { 2163 | name: "seg1_bn4c_dil1" 2164 | type: "BatchNorm" 2165 | bottom: "seg1_res4cconv1_2_p1" 2166 | top: "seg1_res4cconv1_2_p1" 2167 | param { 2168 | lr_mult: 0 2169 | } 2170 | param { 2171 | lr_mult: 0 2172 | } 2173 | param { 2174 | lr_mult: 0 2175 | } 2176 | batch_norm_param { 2177 | use_global_stats: true 2178 | } 2179 | } 2180 | layer { 2181 | name: "seg1_scale4c_dil1" 2182 | type: "Scale" 2183 | bottom: "seg1_res4cconv1_2_p1" 2184 | top: "seg1_res4cconv1_2_p1" 2185 | param { 2186 | lr_mult: 0 2187 | decay_mult: 0 2188 | } 2189 | param { 2190 | lr_mult: 0 2191 | decay_mult: 0 2192 | } 2193 | scale_param { 2194 | bias_term: true 2195 | } 2196 | } 2197 | layer { 2198 | name: "seg1_res4crelu1_2" 2199 | type: "ReLU" 2200 | bottom: "seg1_res4cconv1_2_p1" 2201 | top: "seg1_res4cconv1_2_p1" 2202 | } 2203 | layer { 2204 | name: "seg1_res4cconv1_2_p2" 2205 | type: "Convolution" 2206 | bottom: "seg1_res4c_branch2a" 2207 | top: "seg1_res4cconv1_2_p2" 2208 | param { 2209 | lr_mult: 0 2210 | decay_mult: 0 2211 | } 2212 | param { 2213 | lr_mult: 0 2214 | decay_mult: 0 2215 | } 2216 | convolution_param { 2217 | num_output: 128 2218 | pad: 2 2219 | kernel_size: 3 2220 | weight_filler { 2221 | type: "xavier" 2222 | } 2223 | engine: CAFFE 2224 | dilation: 2 2225 | } 2226 | } 2227 | layer { 2228 | name: "seg1_bn4c_dil2" 2229 | type: "BatchNorm" 2230 | bottom: "seg1_res4cconv1_2_p2" 2231 | top: "seg1_res4cconv1_2_p2" 2232 | param { 2233 | lr_mult: 0 2234 | } 2235 | param { 2236 | lr_mult: 0 2237 | } 2238 | param { 2239 | lr_mult: 0 2240 | } 2241 | batch_norm_param { 2242 | use_global_stats: true 2243 | } 2244 | } 2245 | layer { 2246 | name: "seg1_scale4c_dil2" 2247 | type: "Scale" 2248 | bottom: "seg1_res4cconv1_2_p2" 2249 | top: "seg1_res4cconv1_2_p2" 2250 | param { 2251 | lr_mult: 0 2252 | decay_mult: 0 2253 | } 2254 | param { 2255 | lr_mult: 0 2256 | decay_mult: 0 2257 | } 2258 | scale_param { 2259 | bias_term: true 2260 | } 2261 | } 2262 | layer { 2263 | name: "seg1_res4crelu1_2_p2" 2264 | type: "ReLU" 2265 | bottom: "seg1_res4cconv1_2_p2" 2266 | top: "seg1_res4cconv1_2_p2" 2267 | } 2268 | layer { 2269 | name: "seg1_4cdil_sum" 2270 | type: "Concat" 2271 | bottom: "seg1_res4cconv1_2_p1" 2272 | bottom: "seg1_res4cconv1_2_p2" 2273 | top: "seg1_4cdil_sum" 2274 | } 2275 | layer { 2276 | name: "seg1_res4c_branch2c" 2277 | type: "Convolution" 2278 | bottom: "seg1_4cdil_sum" 2279 | top: "seg1_res4c_branch2c" 2280 | param { 2281 | lr_mult: 0 2282 | decay_mult: 0 2283 | } 2284 | convolution_param { 2285 | num_output: 1024 2286 | bias_term: false 2287 | pad: 0 2288 | kernel_size: 1 2289 | stride: 1 2290 | weight_filler { 2291 | type: "xavier" 2292 | } 2293 | engine: CUDNN 2294 | } 2295 | } 2296 | layer { 2297 | name: "seg1_bn4c_branch2c" 2298 | type: "BatchNorm" 2299 | bottom: "seg1_res4c_branch2c" 2300 | top: "seg1_res4c_branch2c" 2301 | param { 2302 | lr_mult: 0 2303 | } 2304 | param { 2305 | lr_mult: 0 2306 | } 2307 | param { 2308 | lr_mult: 0 2309 | } 2310 | batch_norm_param { 2311 | use_global_stats: true 2312 | } 2313 | } 2314 | layer { 2315 | name: "seg1_scale4c_branch2c" 2316 | type: "Scale" 2317 | bottom: "seg1_res4c_branch2c" 2318 | top: "seg1_res4c_branch2c" 2319 | param { 2320 | lr_mult: 0 2321 | decay_mult: 0 2322 | } 2323 | param { 2324 | lr_mult: 0 2325 | decay_mult: 0 2326 | } 2327 | scale_param { 2328 | bias_term: true 2329 | } 2330 | } 2331 | layer { 2332 | name: "seg1_res4c" 2333 | type: "Eltwise" 2334 | bottom: "seg1_res4c_branch2c" 2335 | bottom: "seg1_res4b" 2336 | top: "seg1_res4c" 2337 | } 2338 | layer { 2339 | name: "seg1_res4c_relu" 2340 | type: "ReLU" 2341 | bottom: "seg1_res4c" 2342 | top: "seg1_res4c" 2343 | } 2344 | layer { 2345 | name: "seg1_res4d_branch2a" 2346 | type: "Convolution" 2347 | bottom: "seg1_res4c" 2348 | top: "seg1_res4d_branch2a" 2349 | param { 2350 | lr_mult: 0 2351 | decay_mult: 0 2352 | } 2353 | convolution_param { 2354 | num_output: 256 2355 | bias_term: false 2356 | pad: 0 2357 | kernel_size: 1 2358 | stride: 1 2359 | weight_filler { 2360 | type: "xavier" 2361 | } 2362 | engine: CUDNN 2363 | } 2364 | } 2365 | layer { 2366 | name: "seg1_bn4d_branch2a" 2367 | type: "BatchNorm" 2368 | bottom: "seg1_res4d_branch2a" 2369 | top: "seg1_res4d_branch2a" 2370 | param { 2371 | lr_mult: 0 2372 | } 2373 | param { 2374 | lr_mult: 0 2375 | } 2376 | param { 2377 | lr_mult: 0 2378 | } 2379 | batch_norm_param { 2380 | use_global_stats: true 2381 | } 2382 | } 2383 | layer { 2384 | name: "seg1_scale4d_branch2a" 2385 | type: "Scale" 2386 | bottom: "seg1_res4d_branch2a" 2387 | top: "seg1_res4d_branch2a" 2388 | param { 2389 | lr_mult: 0 2390 | decay_mult: 0 2391 | } 2392 | param { 2393 | lr_mult: 0 2394 | decay_mult: 0 2395 | } 2396 | scale_param { 2397 | bias_term: true 2398 | } 2399 | } 2400 | layer { 2401 | name: "seg1_res4d_branch2a_relu" 2402 | type: "ReLU" 2403 | bottom: "seg1_res4d_branch2a" 2404 | top: "seg1_res4d_branch2a" 2405 | } 2406 | layer { 2407 | name: "seg1_res4dconv1_2_p1" 2408 | type: "Convolution" 2409 | bottom: "seg1_res4d_branch2a" 2410 | top: "seg1_res4dconv1_2_p1" 2411 | param { 2412 | lr_mult: 0 2413 | decay_mult: 0 2414 | } 2415 | convolution_param { 2416 | num_output: 128 2417 | bias_term: false 2418 | pad: 1 2419 | kernel_size: 3 2420 | stride: 1 2421 | weight_filler { 2422 | type: "xavier" 2423 | } 2424 | engine: CUDNN 2425 | } 2426 | } 2427 | layer { 2428 | name: "seg1_bn4d_dil1" 2429 | type: "BatchNorm" 2430 | bottom: "seg1_res4dconv1_2_p1" 2431 | top: "seg1_res4dconv1_2_p1" 2432 | param { 2433 | lr_mult: 0 2434 | } 2435 | param { 2436 | lr_mult: 0 2437 | } 2438 | param { 2439 | lr_mult: 0 2440 | } 2441 | batch_norm_param { 2442 | use_global_stats: true 2443 | } 2444 | } 2445 | layer { 2446 | name: "seg1_scale4d_dil1" 2447 | type: "Scale" 2448 | bottom: "seg1_res4dconv1_2_p1" 2449 | top: "seg1_res4dconv1_2_p1" 2450 | param { 2451 | lr_mult: 0 2452 | decay_mult: 0 2453 | } 2454 | param { 2455 | lr_mult: 0 2456 | decay_mult: 0 2457 | } 2458 | scale_param { 2459 | bias_term: true 2460 | } 2461 | } 2462 | layer { 2463 | name: "seg1_res4drelu1_2" 2464 | type: "ReLU" 2465 | bottom: "seg1_res4dconv1_2_p1" 2466 | top: "seg1_res4dconv1_2_p1" 2467 | } 2468 | layer { 2469 | name: "seg1_res4dconv1_2_p2" 2470 | type: "Convolution" 2471 | bottom: "seg1_res4d_branch2a" 2472 | top: "seg1_res4dconv1_2_p2" 2473 | param { 2474 | lr_mult: 0 2475 | decay_mult: 0 2476 | } 2477 | param { 2478 | lr_mult: 0 2479 | decay_mult: 0 2480 | } 2481 | convolution_param { 2482 | num_output: 128 2483 | pad: 4 2484 | kernel_size: 3 2485 | weight_filler { 2486 | type: "xavier" 2487 | } 2488 | engine: CAFFE 2489 | dilation: 4 2490 | } 2491 | } 2492 | layer { 2493 | name: "seg1_bn4d_dil2" 2494 | type: "BatchNorm" 2495 | bottom: "seg1_res4dconv1_2_p2" 2496 | top: "seg1_res4dconv1_2_p2" 2497 | param { 2498 | lr_mult: 0 2499 | } 2500 | param { 2501 | lr_mult: 0 2502 | } 2503 | param { 2504 | lr_mult: 0 2505 | } 2506 | batch_norm_param { 2507 | use_global_stats: true 2508 | } 2509 | } 2510 | layer { 2511 | name: "seg1_scale4d_dil2" 2512 | type: "Scale" 2513 | bottom: "seg1_res4dconv1_2_p2" 2514 | top: "seg1_res4dconv1_2_p2" 2515 | param { 2516 | lr_mult: 0 2517 | decay_mult: 0 2518 | } 2519 | param { 2520 | lr_mult: 0 2521 | decay_mult: 0 2522 | } 2523 | scale_param { 2524 | bias_term: true 2525 | } 2526 | } 2527 | layer { 2528 | name: "seg1_res4drelu1_2_p2" 2529 | type: "ReLU" 2530 | bottom: "seg1_res4dconv1_2_p2" 2531 | top: "seg1_res4dconv1_2_p2" 2532 | } 2533 | layer { 2534 | name: "seg1_4ddil_sum" 2535 | type: "Concat" 2536 | bottom: "seg1_res4dconv1_2_p1" 2537 | bottom: "seg1_res4dconv1_2_p2" 2538 | top: "seg1_4ddil_sum" 2539 | } 2540 | layer { 2541 | name: "seg1_res4d_branch2c" 2542 | type: "Convolution" 2543 | bottom: "seg1_4ddil_sum" 2544 | top: "seg1_res4d_branch2c" 2545 | param { 2546 | lr_mult: 0 2547 | decay_mult: 0 2548 | } 2549 | convolution_param { 2550 | num_output: 1024 2551 | bias_term: false 2552 | pad: 0 2553 | kernel_size: 1 2554 | stride: 1 2555 | weight_filler { 2556 | type: "xavier" 2557 | } 2558 | engine: CUDNN 2559 | } 2560 | } 2561 | layer { 2562 | name: "seg1_bn4d_branch2c" 2563 | type: "BatchNorm" 2564 | bottom: "seg1_res4d_branch2c" 2565 | top: "seg1_res4d_branch2c" 2566 | param { 2567 | lr_mult: 0 2568 | } 2569 | param { 2570 | lr_mult: 0 2571 | } 2572 | param { 2573 | lr_mult: 0 2574 | } 2575 | batch_norm_param { 2576 | use_global_stats: true 2577 | } 2578 | } 2579 | layer { 2580 | name: "seg1_scale4d_branch2c" 2581 | type: "Scale" 2582 | bottom: "seg1_res4d_branch2c" 2583 | top: "seg1_res4d_branch2c" 2584 | param { 2585 | lr_mult: 0 2586 | decay_mult: 0 2587 | } 2588 | param { 2589 | lr_mult: 0 2590 | decay_mult: 0 2591 | } 2592 | scale_param { 2593 | bias_term: true 2594 | } 2595 | } 2596 | layer { 2597 | name: "seg1_res4d" 2598 | type: "Eltwise" 2599 | bottom: "seg1_res4d_branch2c" 2600 | bottom: "seg1_res4c" 2601 | top: "seg1_res4d" 2602 | } 2603 | layer { 2604 | name: "seg1_res4d_relu" 2605 | type: "ReLU" 2606 | bottom: "seg1_res4d" 2607 | top: "seg1_res4d" 2608 | } 2609 | layer { 2610 | name: "seg1_res4e_branch2a" 2611 | type: "Convolution" 2612 | bottom: "seg1_res4d" 2613 | top: "seg1_res4e_branch2a" 2614 | param { 2615 | lr_mult: 0 2616 | decay_mult: 0 2617 | } 2618 | convolution_param { 2619 | num_output: 256 2620 | bias_term: false 2621 | pad: 0 2622 | kernel_size: 1 2623 | stride: 1 2624 | weight_filler { 2625 | type: "xavier" 2626 | } 2627 | engine: CUDNN 2628 | } 2629 | } 2630 | layer { 2631 | name: "seg1_bn4e_branch2a" 2632 | type: "BatchNorm" 2633 | bottom: "seg1_res4e_branch2a" 2634 | top: "seg1_res4e_branch2a" 2635 | param { 2636 | lr_mult: 0 2637 | } 2638 | param { 2639 | lr_mult: 0 2640 | } 2641 | param { 2642 | lr_mult: 0 2643 | } 2644 | batch_norm_param { 2645 | use_global_stats: true 2646 | } 2647 | } 2648 | layer { 2649 | name: "seg1_scale4e_branch2a" 2650 | type: "Scale" 2651 | bottom: "seg1_res4e_branch2a" 2652 | top: "seg1_res4e_branch2a" 2653 | param { 2654 | lr_mult: 0 2655 | decay_mult: 0 2656 | } 2657 | param { 2658 | lr_mult: 0 2659 | decay_mult: 0 2660 | } 2661 | scale_param { 2662 | bias_term: true 2663 | } 2664 | } 2665 | layer { 2666 | name: "seg1_res4e_branch2a_relu" 2667 | type: "ReLU" 2668 | bottom: "seg1_res4e_branch2a" 2669 | top: "seg1_res4e_branch2a" 2670 | } 2671 | layer { 2672 | name: "seg1_res4econv1_2_p1" 2673 | type: "Convolution" 2674 | bottom: "seg1_res4e_branch2a" 2675 | top: "seg1_res4econv1_2_p1" 2676 | param { 2677 | lr_mult: 0 2678 | decay_mult: 0 2679 | } 2680 | convolution_param { 2681 | num_output: 128 2682 | bias_term: false 2683 | pad: 1 2684 | kernel_size: 3 2685 | stride: 1 2686 | weight_filler { 2687 | type: "xavier" 2688 | } 2689 | engine: CUDNN 2690 | } 2691 | } 2692 | layer { 2693 | name: "seg1_bn4e_dil1" 2694 | type: "BatchNorm" 2695 | bottom: "seg1_res4econv1_2_p1" 2696 | top: "seg1_res4econv1_2_p1" 2697 | param { 2698 | lr_mult: 0 2699 | } 2700 | param { 2701 | lr_mult: 0 2702 | } 2703 | param { 2704 | lr_mult: 0 2705 | } 2706 | batch_norm_param { 2707 | use_global_stats: true 2708 | } 2709 | } 2710 | layer { 2711 | name: "seg1_scale4e_dil1" 2712 | type: "Scale" 2713 | bottom: "seg1_res4econv1_2_p1" 2714 | top: "seg1_res4econv1_2_p1" 2715 | param { 2716 | lr_mult: 0 2717 | decay_mult: 0 2718 | } 2719 | param { 2720 | lr_mult: 0 2721 | decay_mult: 0 2722 | } 2723 | scale_param { 2724 | bias_term: true 2725 | } 2726 | } 2727 | layer { 2728 | name: "seg1_res4erelu1_2" 2729 | type: "ReLU" 2730 | bottom: "seg1_res4econv1_2_p1" 2731 | top: "seg1_res4econv1_2_p1" 2732 | } 2733 | layer { 2734 | name: "seg1_res4econv1_2_p2" 2735 | type: "Convolution" 2736 | bottom: "seg1_res4e_branch2a" 2737 | top: "seg1_res4econv1_2_p2" 2738 | param { 2739 | lr_mult: 0 2740 | decay_mult: 0 2741 | } 2742 | param { 2743 | lr_mult: 0 2744 | decay_mult: 0 2745 | } 2746 | convolution_param { 2747 | num_output: 128 2748 | pad: 8 2749 | kernel_size: 3 2750 | weight_filler { 2751 | type: "xavier" 2752 | } 2753 | engine: CAFFE 2754 | dilation: 8 2755 | } 2756 | } 2757 | layer { 2758 | name: "seg1_bn4e_dil2" 2759 | type: "BatchNorm" 2760 | bottom: "seg1_res4econv1_2_p2" 2761 | top: "seg1_res4econv1_2_p2" 2762 | param { 2763 | lr_mult: 0 2764 | } 2765 | param { 2766 | lr_mult: 0 2767 | } 2768 | param { 2769 | lr_mult: 0 2770 | } 2771 | batch_norm_param { 2772 | use_global_stats: true 2773 | } 2774 | } 2775 | layer { 2776 | name: "seg1_scale4e_dil2" 2777 | type: "Scale" 2778 | bottom: "seg1_res4econv1_2_p2" 2779 | top: "seg1_res4econv1_2_p2" 2780 | param { 2781 | lr_mult: 0 2782 | decay_mult: 0 2783 | } 2784 | param { 2785 | lr_mult: 0 2786 | decay_mult: 0 2787 | } 2788 | scale_param { 2789 | bias_term: true 2790 | } 2791 | } 2792 | layer { 2793 | name: "seg1_res4erelu1_2_p2" 2794 | type: "ReLU" 2795 | bottom: "seg1_res4econv1_2_p2" 2796 | top: "seg1_res4econv1_2_p2" 2797 | } 2798 | layer { 2799 | name: "seg1_4edil_sum" 2800 | type: "Concat" 2801 | bottom: "seg1_res4econv1_2_p1" 2802 | bottom: "seg1_res4econv1_2_p2" 2803 | top: "seg1_4edil_sum" 2804 | } 2805 | layer { 2806 | name: "seg1_res4e_branch2c" 2807 | type: "Convolution" 2808 | bottom: "seg1_4edil_sum" 2809 | top: "seg1_res4e_branch2c" 2810 | param { 2811 | lr_mult: 0 2812 | decay_mult: 0 2813 | } 2814 | convolution_param { 2815 | num_output: 1024 2816 | bias_term: false 2817 | pad: 0 2818 | kernel_size: 1 2819 | stride: 1 2820 | weight_filler { 2821 | type: "xavier" 2822 | } 2823 | engine: CUDNN 2824 | } 2825 | } 2826 | layer { 2827 | name: "seg1_bn4e_branch2c" 2828 | type: "BatchNorm" 2829 | bottom: "seg1_res4e_branch2c" 2830 | top: "seg1_res4e_branch2c" 2831 | param { 2832 | lr_mult: 0 2833 | } 2834 | param { 2835 | lr_mult: 0 2836 | } 2837 | param { 2838 | lr_mult: 0 2839 | } 2840 | batch_norm_param { 2841 | use_global_stats: true 2842 | } 2843 | } 2844 | layer { 2845 | name: "seg1_scale4e_branch2c" 2846 | type: "Scale" 2847 | bottom: "seg1_res4e_branch2c" 2848 | top: "seg1_res4e_branch2c" 2849 | param { 2850 | lr_mult: 0 2851 | decay_mult: 0 2852 | } 2853 | param { 2854 | lr_mult: 0 2855 | decay_mult: 0 2856 | } 2857 | scale_param { 2858 | bias_term: true 2859 | } 2860 | } 2861 | layer { 2862 | name: "seg1_res4e" 2863 | type: "Eltwise" 2864 | bottom: "seg1_res4e_branch2c" 2865 | bottom: "seg1_res4d" 2866 | top: "seg1_res4e" 2867 | } 2868 | layer { 2869 | name: "seg1_res4e_relu" 2870 | type: "ReLU" 2871 | bottom: "seg1_res4e" 2872 | top: "seg1_res4e" 2873 | } 2874 | layer { 2875 | name: "seg1_res4f_branch2a" 2876 | type: "Convolution" 2877 | bottom: "seg1_res4e" 2878 | top: "seg1_res4f_branch2a" 2879 | param { 2880 | lr_mult: 0 2881 | decay_mult: 0 2882 | } 2883 | convolution_param { 2884 | num_output: 256 2885 | bias_term: false 2886 | pad: 0 2887 | kernel_size: 1 2888 | stride: 1 2889 | weight_filler { 2890 | type: "xavier" 2891 | } 2892 | engine: CUDNN 2893 | } 2894 | } 2895 | layer { 2896 | name: "seg1_bn4f_branch2a" 2897 | type: "BatchNorm" 2898 | bottom: "seg1_res4f_branch2a" 2899 | top: "seg1_res4f_branch2a" 2900 | param { 2901 | lr_mult: 0 2902 | } 2903 | param { 2904 | lr_mult: 0 2905 | } 2906 | param { 2907 | lr_mult: 0 2908 | } 2909 | batch_norm_param { 2910 | use_global_stats: true 2911 | } 2912 | } 2913 | layer { 2914 | name: "seg1_scale4f_branch2a" 2915 | type: "Scale" 2916 | bottom: "seg1_res4f_branch2a" 2917 | top: "seg1_res4f_branch2a" 2918 | param { 2919 | lr_mult: 0 2920 | decay_mult: 0 2921 | } 2922 | param { 2923 | lr_mult: 0 2924 | decay_mult: 0 2925 | } 2926 | scale_param { 2927 | bias_term: true 2928 | } 2929 | } 2930 | layer { 2931 | name: "seg1_res4f_branch2a_relu" 2932 | type: "ReLU" 2933 | bottom: "seg1_res4f_branch2a" 2934 | top: "seg1_res4f_branch2a" 2935 | } 2936 | layer { 2937 | name: "seg1_res4fconv1_2_p1" 2938 | type: "Convolution" 2939 | bottom: "seg1_res4f_branch2a" 2940 | top: "seg1_res4fconv1_2_p1" 2941 | param { 2942 | lr_mult: 0 2943 | decay_mult: 0 2944 | } 2945 | convolution_param { 2946 | num_output: 128 2947 | bias_term: false 2948 | pad: 1 2949 | kernel_size: 3 2950 | stride: 1 2951 | weight_filler { 2952 | type: "xavier" 2953 | } 2954 | engine: CUDNN 2955 | } 2956 | } 2957 | layer { 2958 | name: "seg1_bn4f_dil1" 2959 | type: "BatchNorm" 2960 | bottom: "seg1_res4fconv1_2_p1" 2961 | top: "seg1_res4fconv1_2_p1" 2962 | param { 2963 | lr_mult: 0 2964 | } 2965 | param { 2966 | lr_mult: 0 2967 | } 2968 | param { 2969 | lr_mult: 0 2970 | } 2971 | batch_norm_param { 2972 | use_global_stats: true 2973 | } 2974 | } 2975 | layer { 2976 | name: "seg1_scale4f_dil1" 2977 | type: "Scale" 2978 | bottom: "seg1_res4fconv1_2_p1" 2979 | top: "seg1_res4fconv1_2_p1" 2980 | param { 2981 | lr_mult: 0 2982 | decay_mult: 0 2983 | } 2984 | param { 2985 | lr_mult: 0 2986 | decay_mult: 0 2987 | } 2988 | scale_param { 2989 | bias_term: true 2990 | } 2991 | } 2992 | layer { 2993 | name: "seg1_res4frelu1_2" 2994 | type: "ReLU" 2995 | bottom: "seg1_res4fconv1_2_p1" 2996 | top: "seg1_res4fconv1_2_p1" 2997 | } 2998 | layer { 2999 | name: "seg1_res4fconv1_2_p2" 3000 | type: "Convolution" 3001 | bottom: "seg1_res4f_branch2a" 3002 | top: "seg1_res4fconv1_2_p2" 3003 | param { 3004 | lr_mult: 0 3005 | decay_mult: 0 3006 | } 3007 | param { 3008 | lr_mult: 0 3009 | decay_mult: 0 3010 | } 3011 | convolution_param { 3012 | num_output: 128 3013 | pad: 16 3014 | kernel_size: 3 3015 | weight_filler { 3016 | type: "xavier" 3017 | } 3018 | engine: CAFFE 3019 | dilation: 16 3020 | } 3021 | } 3022 | layer { 3023 | name: "seg1_bn4f_dil2" 3024 | type: "BatchNorm" 3025 | bottom: "seg1_res4fconv1_2_p2" 3026 | top: "seg1_res4fconv1_2_p2" 3027 | param { 3028 | lr_mult: 0 3029 | } 3030 | param { 3031 | lr_mult: 0 3032 | } 3033 | param { 3034 | lr_mult: 0 3035 | } 3036 | batch_norm_param { 3037 | use_global_stats: true 3038 | } 3039 | } 3040 | layer { 3041 | name: "seg1_scale4f_dil2" 3042 | type: "Scale" 3043 | bottom: "seg1_res4fconv1_2_p2" 3044 | top: "seg1_res4fconv1_2_p2" 3045 | param { 3046 | lr_mult: 0 3047 | decay_mult: 0 3048 | } 3049 | param { 3050 | lr_mult: 0 3051 | decay_mult: 0 3052 | } 3053 | scale_param { 3054 | bias_term: true 3055 | } 3056 | } 3057 | layer { 3058 | name: "seg1_res4frelu1_2_p2" 3059 | type: "ReLU" 3060 | bottom: "seg1_res4fconv1_2_p2" 3061 | top: "seg1_res4fconv1_2_p2" 3062 | } 3063 | layer { 3064 | name: "seg1_4fdil_sum" 3065 | type: "Concat" 3066 | bottom: "seg1_res4fconv1_2_p1" 3067 | bottom: "seg1_res4fconv1_2_p2" 3068 | top: "seg1_4fdil_sum" 3069 | } 3070 | layer { 3071 | name: "seg1_res4f_branch2c" 3072 | type: "Convolution" 3073 | bottom: "seg1_4fdil_sum" 3074 | top: "seg1_res4f_branch2c" 3075 | param { 3076 | lr_mult: 0 3077 | decay_mult: 0 3078 | } 3079 | convolution_param { 3080 | num_output: 1024 3081 | bias_term: false 3082 | pad: 0 3083 | kernel_size: 1 3084 | stride: 1 3085 | weight_filler { 3086 | type: "xavier" 3087 | } 3088 | engine: CUDNN 3089 | } 3090 | } 3091 | layer { 3092 | name: "seg1_bn4f_branch2c" 3093 | type: "BatchNorm" 3094 | bottom: "seg1_res4f_branch2c" 3095 | top: "seg1_res4f_branch2c" 3096 | param { 3097 | lr_mult: 0 3098 | } 3099 | param { 3100 | lr_mult: 0 3101 | } 3102 | param { 3103 | lr_mult: 0 3104 | } 3105 | batch_norm_param { 3106 | use_global_stats: true 3107 | } 3108 | } 3109 | layer { 3110 | name: "seg1_scale4f_branch2c" 3111 | type: "Scale" 3112 | bottom: "seg1_res4f_branch2c" 3113 | top: "seg1_res4f_branch2c" 3114 | param { 3115 | lr_mult: 0 3116 | decay_mult: 0 3117 | } 3118 | param { 3119 | lr_mult: 0 3120 | decay_mult: 0 3121 | } 3122 | scale_param { 3123 | bias_term: true 3124 | } 3125 | } 3126 | layer { 3127 | name: "seg1_res4f" 3128 | type: "Eltwise" 3129 | bottom: "seg1_res4f_branch2c" 3130 | bottom: "seg1_res4e" 3131 | top: "seg1_res4f" 3132 | } 3133 | layer { 3134 | name: "seg1_res4f_relu" 3135 | type: "ReLU" 3136 | bottom: "seg1_res4f" 3137 | top: "seg1_res4f" 3138 | } 3139 | layer { 3140 | name: "seg1_res5a_branch2a" 3141 | type: "Convolution" 3142 | bottom: "seg1_res4f" 3143 | top: "seg1_res5a_branch2a" 3144 | param { 3145 | lr_mult: 0 3146 | decay_mult: 0 3147 | } 3148 | convolution_param { 3149 | num_output: 512 3150 | bias_term: false 3151 | pad: 0 3152 | kernel_size: 1 3153 | stride: 1 3154 | weight_filler { 3155 | type: "xavier" 3156 | } 3157 | engine: CUDNN 3158 | } 3159 | } 3160 | layer { 3161 | name: "seg1_bn5a_branch2a" 3162 | type: "BatchNorm" 3163 | bottom: "seg1_res5a_branch2a" 3164 | top: "seg1_res5a_branch2a" 3165 | param { 3166 | lr_mult: 0 3167 | } 3168 | param { 3169 | lr_mult: 0 3170 | } 3171 | param { 3172 | lr_mult: 0 3173 | } 3174 | batch_norm_param { 3175 | use_global_stats: true 3176 | } 3177 | } 3178 | layer { 3179 | name: "seg1_scale5a_branch2a" 3180 | type: "Scale" 3181 | bottom: "seg1_res5a_branch2a" 3182 | top: "seg1_res5a_branch2a" 3183 | param { 3184 | lr_mult: 0 3185 | decay_mult: 0 3186 | } 3187 | param { 3188 | lr_mult: 0 3189 | decay_mult: 0 3190 | } 3191 | scale_param { 3192 | bias_term: true 3193 | } 3194 | } 3195 | layer { 3196 | name: "seg1_res5a_branch2a_relu" 3197 | type: "ReLU" 3198 | bottom: "seg1_res5a_branch2a" 3199 | top: "seg1_res5a_branch2a" 3200 | } 3201 | layer { 3202 | name: "seg1_res5aconv1_2_p1" 3203 | type: "Convolution" 3204 | bottom: "seg1_res5a_branch2a" 3205 | top: "seg1_res5aconv1_2_p1" 3206 | param { 3207 | lr_mult: 0 3208 | decay_mult: 0 3209 | } 3210 | convolution_param { 3211 | num_output: 256 3212 | bias_term: false 3213 | pad: 2 3214 | kernel_size: 3 3215 | stride: 1 3216 | weight_filler { 3217 | type: "xavier" 3218 | } 3219 | engine: CAFFE 3220 | dilation: 2 3221 | } 3222 | } 3223 | layer { 3224 | name: "seg1_bn5a_dil1" 3225 | type: "BatchNorm" 3226 | bottom: "seg1_res5aconv1_2_p1" 3227 | top: "seg1_res5aconv1_2_p1" 3228 | param { 3229 | lr_mult: 0 3230 | } 3231 | param { 3232 | lr_mult: 0 3233 | } 3234 | param { 3235 | lr_mult: 0 3236 | } 3237 | batch_norm_param { 3238 | use_global_stats: true 3239 | } 3240 | } 3241 | layer { 3242 | name: "seg1_scale5a_dil1" 3243 | type: "Scale" 3244 | bottom: "seg1_res5aconv1_2_p1" 3245 | top: "seg1_res5aconv1_2_p1" 3246 | param { 3247 | lr_mult: 0 3248 | decay_mult: 0 3249 | } 3250 | param { 3251 | lr_mult: 0 3252 | decay_mult: 0 3253 | } 3254 | scale_param { 3255 | bias_term: true 3256 | } 3257 | } 3258 | layer { 3259 | name: "seg1_res5arelu1_2" 3260 | type: "ReLU" 3261 | bottom: "seg1_res5aconv1_2_p1" 3262 | top: "seg1_res5aconv1_2_p1" 3263 | } 3264 | layer { 3265 | name: "seg1_res5aconv1_2_p2" 3266 | type: "Convolution" 3267 | bottom: "seg1_res5a_branch2a" 3268 | top: "seg1_res5aconv1_2_p2" 3269 | param { 3270 | lr_mult: 0 3271 | decay_mult: 0 3272 | } 3273 | param { 3274 | lr_mult: 0 3275 | decay_mult: 0 3276 | } 3277 | convolution_param { 3278 | num_output: 256 3279 | pad: 4 3280 | kernel_size: 3 3281 | weight_filler { 3282 | type: "xavier" 3283 | } 3284 | engine: CAFFE 3285 | dilation: 4 3286 | } 3287 | } 3288 | layer { 3289 | name: "seg1_bn5a_dil2" 3290 | type: "BatchNorm" 3291 | bottom: "seg1_res5aconv1_2_p2" 3292 | top: "seg1_res5aconv1_2_p2" 3293 | param { 3294 | lr_mult: 0 3295 | } 3296 | param { 3297 | lr_mult: 0 3298 | } 3299 | param { 3300 | lr_mult: 0 3301 | } 3302 | batch_norm_param { 3303 | use_global_stats: true 3304 | } 3305 | } 3306 | layer { 3307 | name: "seg1_scale5a_dil2" 3308 | type: "Scale" 3309 | bottom: "seg1_res5aconv1_2_p2" 3310 | top: "seg1_res5aconv1_2_p2" 3311 | param { 3312 | lr_mult: 0 3313 | decay_mult: 0 3314 | } 3315 | param { 3316 | lr_mult: 0 3317 | decay_mult: 0 3318 | } 3319 | scale_param { 3320 | bias_term: true 3321 | } 3322 | } 3323 | layer { 3324 | name: "seg1_res5arelu1_2_p2" 3325 | type: "ReLU" 3326 | bottom: "seg1_res5aconv1_2_p2" 3327 | top: "seg1_res5aconv1_2_p2" 3328 | } 3329 | layer { 3330 | name: "seg1_5adil_sum" 3331 | type: "Concat" 3332 | bottom: "seg1_res5aconv1_2_p1" 3333 | bottom: "seg1_res5aconv1_2_p2" 3334 | top: "seg1_5adil_sum" 3335 | } 3336 | layer { 3337 | name: "seg1_res5a_branch2c" 3338 | type: "Convolution" 3339 | bottom: "seg1_5adil_sum" 3340 | top: "seg1_res5a_branch2c" 3341 | param { 3342 | lr_mult: 0 3343 | decay_mult: 0 3344 | } 3345 | convolution_param { 3346 | num_output: 2048 3347 | bias_term: false 3348 | pad: 0 3349 | kernel_size: 1 3350 | stride: 1 3351 | weight_filler { 3352 | type: "xavier" 3353 | } 3354 | engine: CUDNN 3355 | } 3356 | } 3357 | layer { 3358 | name: "seg1_bn5a_branch2c" 3359 | type: "BatchNorm" 3360 | bottom: "seg1_res5a_branch2c" 3361 | top: "seg1_res5a_branch2c" 3362 | param { 3363 | lr_mult: 0 3364 | } 3365 | param { 3366 | lr_mult: 0 3367 | } 3368 | param { 3369 | lr_mult: 0 3370 | } 3371 | batch_norm_param { 3372 | use_global_stats: true 3373 | } 3374 | } 3375 | layer { 3376 | name: "seg1_scale5a_branch2c" 3377 | type: "Scale" 3378 | bottom: "seg1_res5a_branch2c" 3379 | top: "seg1_res5a_branch2c" 3380 | param { 3381 | lr_mult: 0 3382 | decay_mult: 0 3383 | } 3384 | param { 3385 | lr_mult: 0 3386 | decay_mult: 0 3387 | } 3388 | scale_param { 3389 | bias_term: true 3390 | } 3391 | } 3392 | layer { 3393 | name: "seg1_res5a_branch1" 3394 | type: "Convolution" 3395 | bottom: "seg1_res4f" 3396 | top: "seg1_res5a_branch1" 3397 | param { 3398 | lr_mult: 0 3399 | decay_mult: 0 3400 | } 3401 | convolution_param { 3402 | num_output: 2048 3403 | bias_term: false 3404 | pad: 0 3405 | kernel_size: 1 3406 | stride: 1 3407 | weight_filler { 3408 | type: "xavier" 3409 | } 3410 | engine: CUDNN 3411 | } 3412 | } 3413 | layer { 3414 | name: "seg1_bn5a_branch1" 3415 | type: "BatchNorm" 3416 | bottom: "seg1_res5a_branch1" 3417 | top: "seg1_res5a_branch1" 3418 | param { 3419 | lr_mult: 0 3420 | } 3421 | param { 3422 | lr_mult: 0 3423 | } 3424 | param { 3425 | lr_mult: 0 3426 | } 3427 | batch_norm_param { 3428 | use_global_stats: true 3429 | } 3430 | } 3431 | layer { 3432 | name: "seg1_scale5a_branch1" 3433 | type: "Scale" 3434 | bottom: "seg1_res5a_branch1" 3435 | top: "seg1_res5a_branch1" 3436 | param { 3437 | lr_mult: 0 3438 | decay_mult: 0 3439 | } 3440 | param { 3441 | lr_mult: 0 3442 | decay_mult: 0 3443 | } 3444 | scale_param { 3445 | bias_term: true 3446 | } 3447 | } 3448 | layer { 3449 | name: "seg1_res5a" 3450 | type: "Eltwise" 3451 | bottom: "seg1_res5a_branch2c" 3452 | bottom: "seg1_res5a_branch1" 3453 | top: "seg1_res5a" 3454 | } 3455 | layer { 3456 | name: "seg1_res5a_relu" 3457 | type: "ReLU" 3458 | bottom: "seg1_res5a" 3459 | top: "seg1_res5a" 3460 | } 3461 | layer { 3462 | name: "seg1_res5b_branch2a" 3463 | type: "Convolution" 3464 | bottom: "seg1_res5a" 3465 | top: "seg1_res5b_branch2a" 3466 | param { 3467 | lr_mult: 0 3468 | decay_mult: 0 3469 | } 3470 | convolution_param { 3471 | num_output: 512 3472 | bias_term: false 3473 | pad: 0 3474 | kernel_size: 1 3475 | stride: 1 3476 | weight_filler { 3477 | type: "xavier" 3478 | } 3479 | engine: CUDNN 3480 | } 3481 | } 3482 | layer { 3483 | name: "seg1_bn5b_branch2a" 3484 | type: "BatchNorm" 3485 | bottom: "seg1_res5b_branch2a" 3486 | top: "seg1_res5b_branch2a" 3487 | param { 3488 | lr_mult: 0 3489 | } 3490 | param { 3491 | lr_mult: 0 3492 | } 3493 | param { 3494 | lr_mult: 0 3495 | } 3496 | batch_norm_param { 3497 | use_global_stats: true 3498 | } 3499 | } 3500 | layer { 3501 | name: "seg1_scale5b_branch2a" 3502 | type: "Scale" 3503 | bottom: "seg1_res5b_branch2a" 3504 | top: "seg1_res5b_branch2a" 3505 | param { 3506 | lr_mult: 0 3507 | decay_mult: 0 3508 | } 3509 | param { 3510 | lr_mult: 0 3511 | decay_mult: 0 3512 | } 3513 | scale_param { 3514 | bias_term: true 3515 | } 3516 | } 3517 | layer { 3518 | name: "seg1_res5b_branch2a_relu" 3519 | type: "ReLU" 3520 | bottom: "seg1_res5b_branch2a" 3521 | top: "seg1_res5b_branch2a" 3522 | } 3523 | layer { 3524 | name: "seg1_res5bconv1_2_p1" 3525 | type: "Convolution" 3526 | bottom: "seg1_res5b_branch2a" 3527 | top: "seg1_res5bconv1_2_p1" 3528 | param { 3529 | lr_mult: 0 3530 | decay_mult: 0 3531 | } 3532 | convolution_param { 3533 | num_output: 256 3534 | bias_term: false 3535 | pad: 2 3536 | kernel_size: 3 3537 | stride: 1 3538 | weight_filler { 3539 | type: "xavier" 3540 | } 3541 | engine: CAFFE 3542 | dilation: 2 3543 | } 3544 | } 3545 | layer { 3546 | name: "seg1_bn5b_dil1" 3547 | type: "BatchNorm" 3548 | bottom: "seg1_res5bconv1_2_p1" 3549 | top: "seg1_res5bconv1_2_p1" 3550 | param { 3551 | lr_mult: 0 3552 | } 3553 | param { 3554 | lr_mult: 0 3555 | } 3556 | param { 3557 | lr_mult: 0 3558 | } 3559 | batch_norm_param { 3560 | use_global_stats: true 3561 | } 3562 | } 3563 | layer { 3564 | name: "seg1_scale5b_dil1" 3565 | type: "Scale" 3566 | bottom: "seg1_res5bconv1_2_p1" 3567 | top: "seg1_res5bconv1_2_p1" 3568 | param { 3569 | lr_mult: 0 3570 | decay_mult: 0 3571 | } 3572 | param { 3573 | lr_mult: 0 3574 | decay_mult: 0 3575 | } 3576 | scale_param { 3577 | bias_term: true 3578 | } 3579 | } 3580 | layer { 3581 | name: "seg1_res5brelu1_2" 3582 | type: "ReLU" 3583 | bottom: "seg1_res5bconv1_2_p1" 3584 | top: "seg1_res5bconv1_2_p1" 3585 | } 3586 | layer { 3587 | name: "seg1_res5bconv1_2_p2" 3588 | type: "Convolution" 3589 | bottom: "seg1_res5b_branch2a" 3590 | top: "seg1_res5bconv1_2_p2" 3591 | param { 3592 | lr_mult: 0 3593 | decay_mult: 0 3594 | } 3595 | param { 3596 | lr_mult: 0 3597 | decay_mult: 0 3598 | } 3599 | convolution_param { 3600 | num_output: 256 3601 | pad: 8 3602 | kernel_size: 3 3603 | weight_filler { 3604 | type: "xavier" 3605 | } 3606 | engine: CAFFE 3607 | dilation: 8 3608 | } 3609 | } 3610 | layer { 3611 | name: "seg1_bn5b_dil2" 3612 | type: "BatchNorm" 3613 | bottom: "seg1_res5bconv1_2_p2" 3614 | top: "seg1_res5bconv1_2_p2" 3615 | param { 3616 | lr_mult: 0 3617 | } 3618 | param { 3619 | lr_mult: 0 3620 | } 3621 | param { 3622 | lr_mult: 0 3623 | } 3624 | batch_norm_param { 3625 | use_global_stats: true 3626 | } 3627 | } 3628 | layer { 3629 | name: "seg1_scale5b_dil2" 3630 | type: "Scale" 3631 | bottom: "seg1_res5bconv1_2_p2" 3632 | top: "seg1_res5bconv1_2_p2" 3633 | param { 3634 | lr_mult: 0 3635 | decay_mult: 0 3636 | } 3637 | param { 3638 | lr_mult: 0 3639 | decay_mult: 0 3640 | } 3641 | scale_param { 3642 | bias_term: true 3643 | } 3644 | } 3645 | layer { 3646 | name: "seg1_res5brelu1_2_p2" 3647 | type: "ReLU" 3648 | bottom: "seg1_res5bconv1_2_p2" 3649 | top: "seg1_res5bconv1_2_p2" 3650 | } 3651 | layer { 3652 | name: "seg1_5bdil_sum" 3653 | type: "Concat" 3654 | bottom: "seg1_res5bconv1_2_p1" 3655 | bottom: "seg1_res5bconv1_2_p2" 3656 | top: "seg1_5bdil_sum" 3657 | } 3658 | layer { 3659 | name: "seg1_res5b_branch2c" 3660 | type: "Convolution" 3661 | bottom: "seg1_5bdil_sum" 3662 | top: "seg1_res5b_branch2c" 3663 | param { 3664 | lr_mult: 0 3665 | decay_mult: 0 3666 | } 3667 | convolution_param { 3668 | num_output: 2048 3669 | bias_term: false 3670 | pad: 0 3671 | kernel_size: 1 3672 | stride: 1 3673 | weight_filler { 3674 | type: "xavier" 3675 | } 3676 | engine: CUDNN 3677 | } 3678 | } 3679 | layer { 3680 | name: "seg1_bn5b_branch2c" 3681 | type: "BatchNorm" 3682 | bottom: "seg1_res5b_branch2c" 3683 | top: "seg1_res5b_branch2c" 3684 | param { 3685 | lr_mult: 0 3686 | } 3687 | param { 3688 | lr_mult: 0 3689 | } 3690 | param { 3691 | lr_mult: 0 3692 | } 3693 | batch_norm_param { 3694 | use_global_stats: true 3695 | } 3696 | } 3697 | layer { 3698 | name: "seg1_scale5b_branch2c" 3699 | type: "Scale" 3700 | bottom: "seg1_res5b_branch2c" 3701 | top: "seg1_res5b_branch2c" 3702 | param { 3703 | lr_mult: 0 3704 | decay_mult: 0 3705 | } 3706 | param { 3707 | lr_mult: 0 3708 | decay_mult: 0 3709 | } 3710 | scale_param { 3711 | bias_term: true 3712 | } 3713 | } 3714 | layer { 3715 | name: "seg1_res5b" 3716 | type: "Eltwise" 3717 | bottom: "seg1_res5b_branch2c" 3718 | bottom: "seg1_res5a" 3719 | top: "seg1_res5b" 3720 | } 3721 | layer { 3722 | name: "seg1_res5b_relu" 3723 | type: "ReLU" 3724 | bottom: "seg1_res5b" 3725 | top: "seg1_res5b" 3726 | } 3727 | layer { 3728 | name: "seg1_res5c_branch2a" 3729 | type: "Convolution" 3730 | bottom: "seg1_res5b" 3731 | top: "seg1_res5c_branch2a" 3732 | param { 3733 | lr_mult: 0 3734 | decay_mult: 0 3735 | } 3736 | convolution_param { 3737 | num_output: 512 3738 | bias_term: false 3739 | pad: 0 3740 | kernel_size: 1 3741 | stride: 1 3742 | weight_filler { 3743 | type: "xavier" 3744 | } 3745 | engine: CUDNN 3746 | } 3747 | } 3748 | layer { 3749 | name: "seg1_bn5c_branch2a" 3750 | type: "BatchNorm" 3751 | bottom: "seg1_res5c_branch2a" 3752 | top: "seg1_res5c_branch2a" 3753 | param { 3754 | lr_mult: 0 3755 | } 3756 | param { 3757 | lr_mult: 0 3758 | } 3759 | param { 3760 | lr_mult: 0 3761 | } 3762 | batch_norm_param { 3763 | use_global_stats: true 3764 | } 3765 | } 3766 | layer { 3767 | name: "seg1_scale5c_branch2a" 3768 | type: "Scale" 3769 | bottom: "seg1_res5c_branch2a" 3770 | top: "seg1_res5c_branch2a" 3771 | param { 3772 | lr_mult: 0 3773 | decay_mult: 0 3774 | } 3775 | param { 3776 | lr_mult: 0 3777 | decay_mult: 0 3778 | } 3779 | scale_param { 3780 | bias_term: true 3781 | } 3782 | } 3783 | layer { 3784 | name: "seg1_res5c_branch2a_relu" 3785 | type: "ReLU" 3786 | bottom: "seg1_res5c_branch2a" 3787 | top: "seg1_res5c_branch2a" 3788 | } 3789 | layer { 3790 | name: "seg1_res5cconv1_2_p1" 3791 | type: "Convolution" 3792 | bottom: "seg1_res5c_branch2a" 3793 | top: "seg1_res5cconv1_2_p1" 3794 | param { 3795 | lr_mult: 0 3796 | decay_mult: 0 3797 | } 3798 | convolution_param { 3799 | num_output: 256 3800 | bias_term: false 3801 | pad: 2 3802 | kernel_size: 3 3803 | stride: 1 3804 | weight_filler { 3805 | type: "xavier" 3806 | } 3807 | engine: CAFFE 3808 | dilation: 2 3809 | } 3810 | } 3811 | layer { 3812 | name: "seg1_bn5c_dil1" 3813 | type: "BatchNorm" 3814 | bottom: "seg1_res5cconv1_2_p1" 3815 | top: "seg1_res5cconv1_2_p1" 3816 | param { 3817 | lr_mult: 0 3818 | } 3819 | param { 3820 | lr_mult: 0 3821 | } 3822 | param { 3823 | lr_mult: 0 3824 | } 3825 | batch_norm_param { 3826 | use_global_stats: true 3827 | } 3828 | } 3829 | layer { 3830 | name: "seg1_scale5c_dil1" 3831 | type: "Scale" 3832 | bottom: "seg1_res5cconv1_2_p1" 3833 | top: "seg1_res5cconv1_2_p1" 3834 | param { 3835 | lr_mult: 0 3836 | decay_mult: 0 3837 | } 3838 | param { 3839 | lr_mult: 0 3840 | decay_mult: 0 3841 | } 3842 | scale_param { 3843 | bias_term: true 3844 | } 3845 | } 3846 | layer { 3847 | name: "seg1_res5crelu1_2" 3848 | type: "ReLU" 3849 | bottom: "seg1_res5cconv1_2_p1" 3850 | top: "seg1_res5cconv1_2_p1" 3851 | } 3852 | layer { 3853 | name: "seg1_res5cconv1_2_p2" 3854 | type: "Convolution" 3855 | bottom: "seg1_res5c_branch2a" 3856 | top: "seg1_res5cconv1_2_p2" 3857 | param { 3858 | lr_mult: 0 3859 | decay_mult: 0 3860 | } 3861 | param { 3862 | lr_mult: 0 3863 | decay_mult: 0 3864 | } 3865 | convolution_param { 3866 | num_output: 256 3867 | pad: 16 3868 | kernel_size: 3 3869 | weight_filler { 3870 | type: "xavier" 3871 | } 3872 | engine: CAFFE 3873 | dilation: 16 3874 | } 3875 | } 3876 | layer { 3877 | name: "seg1_bn5c_dil2" 3878 | type: "BatchNorm" 3879 | bottom: "seg1_res5cconv1_2_p2" 3880 | top: "seg1_res5cconv1_2_p2" 3881 | param { 3882 | lr_mult: 0 3883 | } 3884 | param { 3885 | lr_mult: 0 3886 | } 3887 | param { 3888 | lr_mult: 0 3889 | } 3890 | batch_norm_param { 3891 | use_global_stats: true 3892 | } 3893 | } 3894 | layer { 3895 | name: "seg1_scale5c_dil2" 3896 | type: "Scale" 3897 | bottom: "seg1_res5cconv1_2_p2" 3898 | top: "seg1_res5cconv1_2_p2" 3899 | param { 3900 | lr_mult: 0 3901 | decay_mult: 0 3902 | } 3903 | param { 3904 | lr_mult: 0 3905 | decay_mult: 0 3906 | } 3907 | scale_param { 3908 | bias_term: true 3909 | } 3910 | } 3911 | layer { 3912 | name: "seg1_res5crelu1_2_p2" 3913 | type: "ReLU" 3914 | bottom: "seg1_res5cconv1_2_p2" 3915 | top: "seg1_res5cconv1_2_p2" 3916 | } 3917 | layer { 3918 | name: "seg1_5cdil_sum" 3919 | type: "Concat" 3920 | bottom: "seg1_res5cconv1_2_p1" 3921 | bottom: "seg1_res5cconv1_2_p2" 3922 | top: "seg1_5cdil_sum" 3923 | } 3924 | layer { 3925 | name: "seg1_res5c_branch2c" 3926 | type: "Convolution" 3927 | bottom: "seg1_5cdil_sum" 3928 | top: "seg1_res5c_branch2c" 3929 | param { 3930 | lr_mult: 0 3931 | decay_mult: 0 3932 | } 3933 | convolution_param { 3934 | num_output: 2048 3935 | bias_term: false 3936 | pad: 0 3937 | kernel_size: 1 3938 | stride: 1 3939 | weight_filler { 3940 | type: "xavier" 3941 | } 3942 | engine: CUDNN 3943 | } 3944 | } 3945 | layer { 3946 | name: "seg1_5cdropout_2" 3947 | type: "Dropout" 3948 | bottom: "seg1_res5c_branch2c" 3949 | top: "seg1_res5c_branch2c" 3950 | dropout_param { 3951 | dropout_ratio: 0.45 3952 | } 3953 | } 3954 | layer { 3955 | name: "seg1_bn5c_branch2c" 3956 | type: "BatchNorm" 3957 | bottom: "seg1_res5c_branch2c" 3958 | top: "seg1_res5c_branch2c" 3959 | param { 3960 | lr_mult: 0 3961 | } 3962 | param { 3963 | lr_mult: 0 3964 | } 3965 | param { 3966 | lr_mult: 0 3967 | } 3968 | batch_norm_param { 3969 | use_global_stats: true 3970 | } 3971 | } 3972 | layer { 3973 | name: "seg1_scale5c_branch2c" 3974 | type: "Scale" 3975 | bottom: "seg1_res5c_branch2c" 3976 | top: "seg1_res5c_branch2c" 3977 | param { 3978 | lr_mult: 0 3979 | decay_mult: 0 3980 | } 3981 | param { 3982 | lr_mult: 0 3983 | decay_mult: 0 3984 | } 3985 | scale_param { 3986 | bias_term: true 3987 | } 3988 | } 3989 | layer { 3990 | name: "seg1_res5c" 3991 | type: "Eltwise" 3992 | bottom: "seg1_res5c_branch2c" 3993 | bottom: "seg1_res5b" 3994 | top: "seg1_res5c" 3995 | } 3996 | layer { 3997 | name: "seg1_res5c_relu" 3998 | type: "ReLU" 3999 | bottom: "seg1_res5c" 4000 | top: "seg1_res5c" 4001 | } 4002 | layer { 4003 | name: "front" 4004 | type: "Convolution" 4005 | bottom: "rec_flow1" 4006 | top: "front" 4007 | param { 4008 | lr_mult: 1 4009 | decay_mult: 1 4010 | } 4011 | param { 4012 | lr_mult: 2 4013 | decay_mult: 0 4014 | } 4015 | convolution_param { 4016 | num_output: 128 4017 | pad: 3 4018 | kernel_size: 7 4019 | stride: 2 4020 | weight_filler { 4021 | type: "xavier" 4022 | } 4023 | bias_filler { 4024 | type: "constant" 4025 | value: 0 4026 | } 4027 | engine: CUDNN 4028 | } 4029 | } 4030 | layer { 4031 | name: "relu_front" 4032 | type: "ReLU" 4033 | bottom: "front" 4034 | top: "front" 4035 | } 4036 | layer { 4037 | name: "bnfront" 4038 | type: "BatchNorm" 4039 | bottom: "front" 4040 | top: "front" 4041 | param { 4042 | lr_mult: 0 4043 | } 4044 | param { 4045 | lr_mult: 0 4046 | } 4047 | param { 4048 | lr_mult: 0 4049 | } 4050 | batch_norm_param { 4051 | use_global_stats: true 4052 | } 4053 | } 4054 | layer { 4055 | name: "scalefront" 4056 | type: "Scale" 4057 | bottom: "front" 4058 | top: "front" 4059 | param { 4060 | lr_mult: 0 4061 | decay_mult: 0 4062 | } 4063 | param { 4064 | lr_mult: 0 4065 | decay_mult: 0 4066 | } 4067 | scale_param { 4068 | bias_term: true 4069 | } 4070 | } 4071 | layer { 4072 | name: "front_pooled" 4073 | type: "Pooling" 4074 | bottom: "front" 4075 | top: "front_pooled" 4076 | pooling_param { 4077 | pool: MAX 4078 | kernel_size: 2 4079 | stride: 2 4080 | pad: 0 4081 | } 4082 | } 4083 | layer { 4084 | name: "res_fuse1_branch2a" 4085 | type: "Convolution" 4086 | bottom: "front_pooled" 4087 | top: "res_fuse1_branch2a" 4088 | param { 4089 | lr_mult: 1 4090 | decay_mult: 1 4091 | } 4092 | convolution_param { 4093 | num_output: 64 4094 | bias_term: false 4095 | pad: 0 4096 | kernel_size: 1 4097 | stride: 1 4098 | weight_filler { 4099 | type: "xavier" 4100 | } 4101 | engine: CUDNN 4102 | } 4103 | } 4104 | layer { 4105 | name: "bn_fuse1_branch2a" 4106 | type: "BatchNorm" 4107 | bottom: "res_fuse1_branch2a" 4108 | top: "res_fuse1_branch2a" 4109 | param { 4110 | lr_mult: 0 4111 | } 4112 | param { 4113 | lr_mult: 0 4114 | } 4115 | param { 4116 | lr_mult: 0 4117 | } 4118 | batch_norm_param { 4119 | use_global_stats: true 4120 | } 4121 | } 4122 | layer { 4123 | name: "scale_fuse1_branch2a" 4124 | type: "Scale" 4125 | bottom: "res_fuse1_branch2a" 4126 | top: "res_fuse1_branch2a" 4127 | param { 4128 | lr_mult: 0 4129 | decay_mult: 0 4130 | } 4131 | param { 4132 | lr_mult: 0 4133 | decay_mult: 0 4134 | } 4135 | scale_param { 4136 | bias_term: true 4137 | } 4138 | } 4139 | layer { 4140 | name: "res_fuse1_branch2a_relu" 4141 | type: "ReLU" 4142 | bottom: "res_fuse1_branch2a" 4143 | top: "res_fuse1_branch2a" 4144 | } 4145 | layer { 4146 | name: "res_fuse1_branch2b" 4147 | type: "Convolution" 4148 | bottom: "res_fuse1_branch2a" 4149 | top: "res_fuse1_branch2b" 4150 | param { 4151 | lr_mult: 1 4152 | decay_mult: 1 4153 | } 4154 | convolution_param { 4155 | num_output: 64 4156 | bias_term: false 4157 | pad: 1 4158 | kernel_size: 3 4159 | stride: 1 4160 | weight_filler { 4161 | type: "xavier" 4162 | } 4163 | engine: CUDNN 4164 | } 4165 | } 4166 | layer { 4167 | name: "bn_fuse1_branch2b" 4168 | type: "BatchNorm" 4169 | bottom: "res_fuse1_branch2b" 4170 | top: "res_fuse1_branch2b" 4171 | param { 4172 | lr_mult: 0 4173 | } 4174 | param { 4175 | lr_mult: 0 4176 | } 4177 | param { 4178 | lr_mult: 0 4179 | } 4180 | batch_norm_param { 4181 | use_global_stats: true 4182 | } 4183 | } 4184 | layer { 4185 | name: "scale_fuse1_branch2b" 4186 | type: "Scale" 4187 | bottom: "res_fuse1_branch2b" 4188 | top: "res_fuse1_branch2b" 4189 | param { 4190 | lr_mult: 0 4191 | decay_mult: 0 4192 | } 4193 | param { 4194 | lr_mult: 0 4195 | decay_mult: 0 4196 | } 4197 | scale_param { 4198 | bias_term: true 4199 | } 4200 | } 4201 | layer { 4202 | name: "res_fuse1_branch2b_relu" 4203 | type: "ReLU" 4204 | bottom: "res_fuse1_branch2b" 4205 | top: "res_fuse1_branch2b" 4206 | } 4207 | layer { 4208 | name: "res_fuse1_branch2c" 4209 | type: "Convolution" 4210 | bottom: "res_fuse1_branch2b" 4211 | top: "res_fuse1_branch2c" 4212 | param { 4213 | lr_mult: 1 4214 | decay_mult: 1 4215 | } 4216 | convolution_param { 4217 | num_output: 256 4218 | bias_term: false 4219 | pad: 0 4220 | kernel_size: 1 4221 | stride: 1 4222 | weight_filler { 4223 | type: "xavier" 4224 | } 4225 | engine: CUDNN 4226 | } 4227 | } 4228 | layer { 4229 | name: "bn_fuse1_branch2c" 4230 | type: "BatchNorm" 4231 | bottom: "res_fuse1_branch2c" 4232 | top: "res_fuse1_branch2c" 4233 | param { 4234 | lr_mult: 0 4235 | } 4236 | param { 4237 | lr_mult: 0 4238 | } 4239 | param { 4240 | lr_mult: 0 4241 | } 4242 | batch_norm_param { 4243 | use_global_stats: true 4244 | } 4245 | } 4246 | layer { 4247 | name: "scale_fuse1_branch2c" 4248 | type: "Scale" 4249 | bottom: "res_fuse1_branch2c" 4250 | top: "res_fuse1_branch2c" 4251 | param { 4252 | lr_mult: 0 4253 | decay_mult: 0 4254 | } 4255 | param { 4256 | lr_mult: 0 4257 | decay_mult: 0 4258 | } 4259 | scale_param { 4260 | bias_term: true 4261 | } 4262 | } 4263 | layer { 4264 | name: "res_fuse1_branch1" 4265 | type: "Convolution" 4266 | bottom: "front_pooled" 4267 | top: "res_fuse1_branch1" 4268 | param { 4269 | lr_mult: 0 4270 | decay_mult: 0 4271 | } 4272 | convolution_param { 4273 | num_output: 256 4274 | bias_term: false 4275 | pad: 0 4276 | kernel_size: 1 4277 | stride: 1 4278 | weight_filler { 4279 | type: "xavier" 4280 | } 4281 | engine: CUDNN 4282 | } 4283 | } 4284 | layer { 4285 | name: "bn_fuse1_branch1" 4286 | type: "BatchNorm" 4287 | bottom: "res_fuse1_branch1" 4288 | top: "res_fuse1_branch1" 4289 | param { 4290 | lr_mult: 0 4291 | } 4292 | param { 4293 | lr_mult: 0 4294 | } 4295 | param { 4296 | lr_mult: 0 4297 | } 4298 | batch_norm_param { 4299 | use_global_stats: true 4300 | } 4301 | } 4302 | layer { 4303 | name: "scale_fuse1_branch1" 4304 | type: "Scale" 4305 | bottom: "res_fuse1_branch1" 4306 | top: "res_fuse1_branch1" 4307 | param { 4308 | lr_mult: 0 4309 | decay_mult: 0 4310 | } 4311 | param { 4312 | lr_mult: 0 4313 | decay_mult: 0 4314 | } 4315 | scale_param { 4316 | bias_term: true 4317 | } 4318 | } 4319 | layer { 4320 | name: "res_fuse1" 4321 | type: "Eltwise" 4322 | bottom: "res_fuse1_branch2c" 4323 | bottom: "res_fuse1_branch1" 4324 | top: "res_fuse1" 4325 | } 4326 | layer { 4327 | name: "res_fuse1_relu" 4328 | type: "ReLU" 4329 | bottom: "res_fuse1" 4330 | top: "res_fuse1" 4331 | } 4332 | layer { 4333 | name: "res_fuse2_branch2a" 4334 | type: "Convolution" 4335 | bottom: "res_fuse1" 4336 | top: "res_fuse2_branch2a" 4337 | param { 4338 | lr_mult: 1 4339 | decay_mult: 1 4340 | } 4341 | convolution_param { 4342 | num_output: 64 4343 | bias_term: false 4344 | pad: 0 4345 | kernel_size: 1 4346 | stride: 1 4347 | weight_filler { 4348 | type: "xavier" 4349 | } 4350 | engine: CUDNN 4351 | } 4352 | } 4353 | layer { 4354 | name: "bn_fuse2_branch2a" 4355 | type: "BatchNorm" 4356 | bottom: "res_fuse2_branch2a" 4357 | top: "res_fuse2_branch2a" 4358 | param { 4359 | lr_mult: 0 4360 | } 4361 | param { 4362 | lr_mult: 0 4363 | } 4364 | param { 4365 | lr_mult: 0 4366 | } 4367 | batch_norm_param { 4368 | use_global_stats: true 4369 | } 4370 | } 4371 | layer { 4372 | name: "scale_fuse2_branch2a" 4373 | type: "Scale" 4374 | bottom: "res_fuse2_branch2a" 4375 | top: "res_fuse2_branch2a" 4376 | param { 4377 | lr_mult: 0 4378 | decay_mult: 0 4379 | } 4380 | param { 4381 | lr_mult: 0 4382 | decay_mult: 0 4383 | } 4384 | scale_param { 4385 | bias_term: true 4386 | } 4387 | } 4388 | layer { 4389 | name: "res_fuse2_branch2a_relu" 4390 | type: "ReLU" 4391 | bottom: "res_fuse2_branch2a" 4392 | top: "res_fuse2_branch2a" 4393 | } 4394 | layer { 4395 | name: "res_fuse2_branch2b" 4396 | type: "Convolution" 4397 | bottom: "res_fuse2_branch2a" 4398 | top: "res_fuse2_branch2b" 4399 | param { 4400 | lr_mult: 1 4401 | decay_mult: 1 4402 | } 4403 | convolution_param { 4404 | num_output: 64 4405 | bias_term: false 4406 | pad: 1 4407 | kernel_size: 3 4408 | stride: 1 4409 | weight_filler { 4410 | type: "xavier" 4411 | } 4412 | engine: CUDNN 4413 | } 4414 | } 4415 | layer { 4416 | name: "bn_fuse2_branch2b" 4417 | type: "BatchNorm" 4418 | bottom: "res_fuse2_branch2b" 4419 | top: "res_fuse2_branch2b" 4420 | param { 4421 | lr_mult: 0 4422 | } 4423 | param { 4424 | lr_mult: 0 4425 | } 4426 | param { 4427 | lr_mult: 0 4428 | } 4429 | batch_norm_param { 4430 | use_global_stats: true 4431 | } 4432 | } 4433 | layer { 4434 | name: "scale_fuse2_branch2b" 4435 | type: "Scale" 4436 | bottom: "res_fuse2_branch2b" 4437 | top: "res_fuse2_branch2b" 4438 | param { 4439 | lr_mult: 0 4440 | decay_mult: 0 4441 | } 4442 | param { 4443 | lr_mult: 0 4444 | decay_mult: 0 4445 | } 4446 | scale_param { 4447 | bias_term: true 4448 | } 4449 | } 4450 | layer { 4451 | name: "res_fuse2_branch2b_relu" 4452 | type: "ReLU" 4453 | bottom: "res_fuse2_branch2b" 4454 | top: "res_fuse2_branch2b" 4455 | } 4456 | layer { 4457 | name: "res_fuse2_branch2c" 4458 | type: "Convolution" 4459 | bottom: "res_fuse2_branch2b" 4460 | top: "res_fuse2_branch2c" 4461 | param { 4462 | lr_mult: 1 4463 | decay_mult: 1 4464 | } 4465 | convolution_param { 4466 | num_output: 256 4467 | bias_term: false 4468 | pad: 0 4469 | kernel_size: 1 4470 | stride: 1 4471 | weight_filler { 4472 | type: "xavier" 4473 | } 4474 | engine: CUDNN 4475 | } 4476 | } 4477 | layer { 4478 | name: "bn_fuse2_branch2c" 4479 | type: "BatchNorm" 4480 | bottom: "res_fuse2_branch2c" 4481 | top: "res_fuse2_branch2c" 4482 | param { 4483 | lr_mult: 0 4484 | } 4485 | param { 4486 | lr_mult: 0 4487 | } 4488 | param { 4489 | lr_mult: 0 4490 | } 4491 | batch_norm_param { 4492 | use_global_stats: true 4493 | } 4494 | } 4495 | layer { 4496 | name: "scale_fuse2_branch2c" 4497 | type: "Scale" 4498 | bottom: "res_fuse2_branch2c" 4499 | top: "res_fuse2_branch2c" 4500 | param { 4501 | lr_mult: 0 4502 | decay_mult: 0 4503 | } 4504 | param { 4505 | lr_mult: 0 4506 | decay_mult: 0 4507 | } 4508 | scale_param { 4509 | bias_term: true 4510 | } 4511 | } 4512 | layer { 4513 | name: "res_fuse2" 4514 | type: "Eltwise" 4515 | bottom: "res_fuse2_branch2c" 4516 | bottom: "res_fuse1" 4517 | top: "res_fuse2" 4518 | } 4519 | layer { 4520 | name: "res_fuse2_relu" 4521 | type: "ReLU" 4522 | bottom: "res_fuse2" 4523 | top: "res_fuse2" 4524 | } 4525 | layer { 4526 | name: "res_fuse3_branch2a" 4527 | type: "Convolution" 4528 | bottom: "res_fuse2" 4529 | top: "res_fuse3_branch2a" 4530 | param { 4531 | lr_mult: 1 4532 | decay_mult: 1 4533 | } 4534 | convolution_param { 4535 | num_output: 64 4536 | bias_term: false 4537 | pad: 0 4538 | kernel_size: 1 4539 | stride: 1 4540 | weight_filler { 4541 | type: "xavier" 4542 | } 4543 | engine: CUDNN 4544 | } 4545 | } 4546 | layer { 4547 | name: "bn_fuse3_branch2a" 4548 | type: "BatchNorm" 4549 | bottom: "res_fuse3_branch2a" 4550 | top: "res_fuse3_branch2a" 4551 | param { 4552 | lr_mult: 0 4553 | } 4554 | param { 4555 | lr_mult: 0 4556 | } 4557 | param { 4558 | lr_mult: 0 4559 | } 4560 | batch_norm_param { 4561 | use_global_stats: true 4562 | } 4563 | } 4564 | layer { 4565 | name: "scale_fuse3_branch2a" 4566 | type: "Scale" 4567 | bottom: "res_fuse3_branch2a" 4568 | top: "res_fuse3_branch2a" 4569 | param { 4570 | lr_mult: 0 4571 | decay_mult: 0 4572 | } 4573 | param { 4574 | lr_mult: 0 4575 | decay_mult: 0 4576 | } 4577 | scale_param { 4578 | bias_term: true 4579 | } 4580 | } 4581 | layer { 4582 | name: "res_fuse3_branch2a_relu" 4583 | type: "ReLU" 4584 | bottom: "res_fuse3_branch2a" 4585 | top: "res_fuse3_branch2a" 4586 | } 4587 | layer { 4588 | name: "res_fuse3_branch2b" 4589 | type: "Convolution" 4590 | bottom: "res_fuse3_branch2a" 4591 | top: "res_fuse3_branch2b" 4592 | param { 4593 | lr_mult: 1 4594 | decay_mult: 1 4595 | } 4596 | convolution_param { 4597 | num_output: 64 4598 | bias_term: false 4599 | pad: 1 4600 | kernel_size: 3 4601 | stride: 1 4602 | weight_filler { 4603 | type: "xavier" 4604 | } 4605 | engine: CUDNN 4606 | } 4607 | } 4608 | layer { 4609 | name: "bn_fuse3_branch2b" 4610 | type: "BatchNorm" 4611 | bottom: "res_fuse3_branch2b" 4612 | top: "res_fuse3_branch2b" 4613 | param { 4614 | lr_mult: 0 4615 | } 4616 | param { 4617 | lr_mult: 0 4618 | } 4619 | param { 4620 | lr_mult: 0 4621 | } 4622 | batch_norm_param { 4623 | use_global_stats: true 4624 | } 4625 | } 4626 | layer { 4627 | name: "scale_fuse3_branch2b" 4628 | type: "Scale" 4629 | bottom: "res_fuse3_branch2b" 4630 | top: "res_fuse3_branch2b" 4631 | param { 4632 | lr_mult: 0 4633 | decay_mult: 0 4634 | } 4635 | param { 4636 | lr_mult: 0 4637 | decay_mult: 0 4638 | } 4639 | scale_param { 4640 | bias_term: true 4641 | } 4642 | } 4643 | layer { 4644 | name: "res_fuse3_branch2b_relu" 4645 | type: "ReLU" 4646 | bottom: "res_fuse3_branch2b" 4647 | top: "res_fuse3_branch2b" 4648 | } 4649 | layer { 4650 | name: "res_fuse3_branch2c" 4651 | type: "Convolution" 4652 | bottom: "res_fuse3_branch2b" 4653 | top: "res_fuse3_branch2c" 4654 | param { 4655 | lr_mult: 1 4656 | decay_mult: 1 4657 | } 4658 | convolution_param { 4659 | num_output: 256 4660 | bias_term: false 4661 | pad: 0 4662 | kernel_size: 1 4663 | stride: 1 4664 | weight_filler { 4665 | type: "xavier" 4666 | } 4667 | engine: CUDNN 4668 | } 4669 | } 4670 | layer { 4671 | name: "bn_fuse3_branch2c" 4672 | type: "BatchNorm" 4673 | bottom: "res_fuse3_branch2c" 4674 | top: "res_fuse3_branch2c" 4675 | param { 4676 | lr_mult: 0 4677 | } 4678 | param { 4679 | lr_mult: 0 4680 | } 4681 | param { 4682 | lr_mult: 0 4683 | } 4684 | batch_norm_param { 4685 | use_global_stats: true 4686 | } 4687 | } 4688 | layer { 4689 | name: "scale_fuse3_branch2c" 4690 | type: "Scale" 4691 | bottom: "res_fuse3_branch2c" 4692 | top: "res_fuse3_branch2c" 4693 | param { 4694 | lr_mult: 0 4695 | decay_mult: 0 4696 | } 4697 | param { 4698 | lr_mult: 0 4699 | decay_mult: 0 4700 | } 4701 | scale_param { 4702 | bias_term: true 4703 | } 4704 | } 4705 | layer { 4706 | name: "res_fuse3" 4707 | type: "Eltwise" 4708 | bottom: "res_fuse3_branch2c" 4709 | bottom: "res_fuse2" 4710 | top: "res_fuse3" 4711 | } 4712 | layer { 4713 | name: "res_fuse3_relu" 4714 | type: "ReLU" 4715 | bottom: "res_fuse3" 4716 | top: "res_fuse3" 4717 | } 4718 | layer { 4719 | name: "res_fuse4_branch2a" 4720 | type: "Convolution" 4721 | bottom: "res_fuse3" 4722 | top: "res_fuse4_branch2a" 4723 | param { 4724 | lr_mult: 1 4725 | decay_mult: 1 4726 | } 4727 | convolution_param { 4728 | num_output: 128 4729 | bias_term: false 4730 | pad: 0 4731 | kernel_size: 1 4732 | stride: 2 4733 | weight_filler { 4734 | type: "xavier" 4735 | } 4736 | engine: CUDNN 4737 | } 4738 | } 4739 | layer { 4740 | name: "bn_fuse4_branch2a" 4741 | type: "BatchNorm" 4742 | bottom: "res_fuse4_branch2a" 4743 | top: "res_fuse4_branch2a" 4744 | param { 4745 | lr_mult: 0 4746 | } 4747 | param { 4748 | lr_mult: 0 4749 | } 4750 | param { 4751 | lr_mult: 0 4752 | } 4753 | batch_norm_param { 4754 | use_global_stats: true 4755 | } 4756 | } 4757 | layer { 4758 | name: "scale_fuse4_branch2a" 4759 | type: "Scale" 4760 | bottom: "res_fuse4_branch2a" 4761 | top: "res_fuse4_branch2a" 4762 | param { 4763 | lr_mult: 0 4764 | decay_mult: 0 4765 | } 4766 | param { 4767 | lr_mult: 0 4768 | decay_mult: 0 4769 | } 4770 | scale_param { 4771 | bias_term: true 4772 | } 4773 | } 4774 | layer { 4775 | name: "res_fuse4_branch2a_relu" 4776 | type: "ReLU" 4777 | bottom: "res_fuse4_branch2a" 4778 | top: "res_fuse4_branch2a" 4779 | } 4780 | layer { 4781 | name: "res_fuse4_branch2b" 4782 | type: "Convolution" 4783 | bottom: "res_fuse4_branch2a" 4784 | top: "res_fuse4_branch2b" 4785 | param { 4786 | lr_mult: 1 4787 | decay_mult: 1 4788 | } 4789 | convolution_param { 4790 | num_output: 128 4791 | bias_term: false 4792 | pad: 1 4793 | kernel_size: 3 4794 | stride: 1 4795 | weight_filler { 4796 | type: "xavier" 4797 | } 4798 | engine: CUDNN 4799 | } 4800 | } 4801 | layer { 4802 | name: "bn_fuse4_branch2b" 4803 | type: "BatchNorm" 4804 | bottom: "res_fuse4_branch2b" 4805 | top: "res_fuse4_branch2b" 4806 | param { 4807 | lr_mult: 0 4808 | } 4809 | param { 4810 | lr_mult: 0 4811 | } 4812 | param { 4813 | lr_mult: 0 4814 | } 4815 | batch_norm_param { 4816 | use_global_stats: true 4817 | } 4818 | } 4819 | layer { 4820 | name: "scale_fuse4_branch2b" 4821 | type: "Scale" 4822 | bottom: "res_fuse4_branch2b" 4823 | top: "res_fuse4_branch2b" 4824 | param { 4825 | lr_mult: 0 4826 | decay_mult: 0 4827 | } 4828 | param { 4829 | lr_mult: 0 4830 | decay_mult: 0 4831 | } 4832 | scale_param { 4833 | bias_term: true 4834 | } 4835 | } 4836 | layer { 4837 | name: "res_fuse4_branch2b_relu" 4838 | type: "ReLU" 4839 | bottom: "res_fuse4_branch2b" 4840 | top: "res_fuse4_branch2b" 4841 | } 4842 | layer { 4843 | name: "res_fuse4_branch2c" 4844 | type: "Convolution" 4845 | bottom: "res_fuse4_branch2b" 4846 | top: "res_fuse4_branch2c" 4847 | param { 4848 | lr_mult: 1 4849 | decay_mult: 1 4850 | } 4851 | convolution_param { 4852 | num_output: 512 4853 | bias_term: false 4854 | pad: 0 4855 | kernel_size: 1 4856 | stride: 1 4857 | weight_filler { 4858 | type: "xavier" 4859 | } 4860 | engine: CUDNN 4861 | } 4862 | } 4863 | layer { 4864 | name: "bn_fuse4_branch2c" 4865 | type: "BatchNorm" 4866 | bottom: "res_fuse4_branch2c" 4867 | top: "res_fuse4_branch2c" 4868 | param { 4869 | lr_mult: 0 4870 | } 4871 | param { 4872 | lr_mult: 0 4873 | } 4874 | param { 4875 | lr_mult: 0 4876 | } 4877 | batch_norm_param { 4878 | use_global_stats: true 4879 | } 4880 | } 4881 | layer { 4882 | name: "scale_fuse4_branch2c" 4883 | type: "Scale" 4884 | bottom: "res_fuse4_branch2c" 4885 | top: "res_fuse4_branch2c" 4886 | param { 4887 | lr_mult: 0 4888 | decay_mult: 0 4889 | } 4890 | param { 4891 | lr_mult: 0 4892 | decay_mult: 0 4893 | } 4894 | scale_param { 4895 | bias_term: true 4896 | } 4897 | } 4898 | layer { 4899 | name: "res_fuse4_branch1" 4900 | type: "Convolution" 4901 | bottom: "res_fuse3" 4902 | top: "res_fuse4_branch1" 4903 | param { 4904 | lr_mult: 0 4905 | decay_mult: 0 4906 | } 4907 | convolution_param { 4908 | num_output: 512 4909 | bias_term: false 4910 | pad: 0 4911 | kernel_size: 1 4912 | stride: 2 4913 | weight_filler { 4914 | type: "xavier" 4915 | } 4916 | engine: CUDNN 4917 | } 4918 | } 4919 | layer { 4920 | name: "bn_fuse4_branch1" 4921 | type: "BatchNorm" 4922 | bottom: "res_fuse4_branch1" 4923 | top: "res_fuse4_branch1" 4924 | param { 4925 | lr_mult: 0 4926 | } 4927 | param { 4928 | lr_mult: 0 4929 | } 4930 | param { 4931 | lr_mult: 0 4932 | } 4933 | batch_norm_param { 4934 | use_global_stats: true 4935 | } 4936 | } 4937 | layer { 4938 | name: "scale_fuse4_branch1" 4939 | type: "Scale" 4940 | bottom: "res_fuse4_branch1" 4941 | top: "res_fuse4_branch1" 4942 | param { 4943 | lr_mult: 0 4944 | decay_mult: 0 4945 | } 4946 | param { 4947 | lr_mult: 0 4948 | decay_mult: 0 4949 | } 4950 | scale_param { 4951 | bias_term: true 4952 | } 4953 | } 4954 | layer { 4955 | name: "res_fuse4" 4956 | type: "Eltwise" 4957 | bottom: "res_fuse4_branch2c" 4958 | bottom: "res_fuse4_branch1" 4959 | top: "res_fuse4" 4960 | } 4961 | layer { 4962 | name: "res_fuse4_relu" 4963 | type: "ReLU" 4964 | bottom: "res_fuse4" 4965 | top: "res_fuse4" 4966 | } 4967 | layer { 4968 | name: "res_fuse5_branch2a" 4969 | type: "Convolution" 4970 | bottom: "res_fuse4" 4971 | top: "res_fuse5_branch2a" 4972 | param { 4973 | lr_mult: 1 4974 | decay_mult: 1 4975 | } 4976 | convolution_param { 4977 | num_output: 128 4978 | bias_term: false 4979 | pad: 0 4980 | kernel_size: 1 4981 | stride: 1 4982 | weight_filler { 4983 | type: "xavier" 4984 | } 4985 | engine: CUDNN 4986 | } 4987 | } 4988 | layer { 4989 | name: "bn_fuse5_branch2a" 4990 | type: "BatchNorm" 4991 | bottom: "res_fuse5_branch2a" 4992 | top: "res_fuse5_branch2a" 4993 | param { 4994 | lr_mult: 0 4995 | } 4996 | param { 4997 | lr_mult: 0 4998 | } 4999 | param { 5000 | lr_mult: 0 5001 | } 5002 | batch_norm_param { 5003 | use_global_stats: true 5004 | } 5005 | } 5006 | layer { 5007 | name: "scale_fuse5_branch2a" 5008 | type: "Scale" 5009 | bottom: "res_fuse5_branch2a" 5010 | top: "res_fuse5_branch2a" 5011 | param { 5012 | lr_mult: 0 5013 | decay_mult: 0 5014 | } 5015 | param { 5016 | lr_mult: 0 5017 | decay_mult: 0 5018 | } 5019 | scale_param { 5020 | bias_term: true 5021 | } 5022 | } 5023 | layer { 5024 | name: "res_fuse5_branch2a_relu" 5025 | type: "ReLU" 5026 | bottom: "res_fuse5_branch2a" 5027 | top: "res_fuse5_branch2a" 5028 | } 5029 | layer { 5030 | name: "res_fuse5_branch2b" 5031 | type: "Convolution" 5032 | bottom: "res_fuse5_branch2a" 5033 | top: "res_fuse5_branch2b" 5034 | param { 5035 | lr_mult: 1 5036 | decay_mult: 1 5037 | } 5038 | convolution_param { 5039 | num_output: 128 5040 | bias_term: false 5041 | pad: 1 5042 | kernel_size: 3 5043 | stride: 1 5044 | weight_filler { 5045 | type: "xavier" 5046 | } 5047 | engine: CUDNN 5048 | } 5049 | } 5050 | layer { 5051 | name: "bn_fuse5_branch2b" 5052 | type: "BatchNorm" 5053 | bottom: "res_fuse5_branch2b" 5054 | top: "res_fuse5_branch2b" 5055 | param { 5056 | lr_mult: 0 5057 | } 5058 | param { 5059 | lr_mult: 0 5060 | } 5061 | param { 5062 | lr_mult: 0 5063 | } 5064 | batch_norm_param { 5065 | use_global_stats: true 5066 | } 5067 | } 5068 | layer { 5069 | name: "scale_fuse5_branch2b" 5070 | type: "Scale" 5071 | bottom: "res_fuse5_branch2b" 5072 | top: "res_fuse5_branch2b" 5073 | param { 5074 | lr_mult: 0 5075 | decay_mult: 0 5076 | } 5077 | param { 5078 | lr_mult: 0 5079 | decay_mult: 0 5080 | } 5081 | scale_param { 5082 | bias_term: true 5083 | } 5084 | } 5085 | layer { 5086 | name: "res_fuse5_branch2b_relu" 5087 | type: "ReLU" 5088 | bottom: "res_fuse5_branch2b" 5089 | top: "res_fuse5_branch2b" 5090 | } 5091 | layer { 5092 | name: "res_fuse5_branch2c" 5093 | type: "Convolution" 5094 | bottom: "res_fuse5_branch2b" 5095 | top: "res_fuse5_branch2c" 5096 | param { 5097 | lr_mult: 1 5098 | decay_mult: 1 5099 | } 5100 | convolution_param { 5101 | num_output: 512 5102 | bias_term: false 5103 | pad: 0 5104 | kernel_size: 1 5105 | stride: 1 5106 | weight_filler { 5107 | type: "xavier" 5108 | } 5109 | engine: CUDNN 5110 | } 5111 | } 5112 | layer { 5113 | name: "bn_fuse5_branch2c" 5114 | type: "BatchNorm" 5115 | bottom: "res_fuse5_branch2c" 5116 | top: "res_fuse5_branch2c" 5117 | param { 5118 | lr_mult: 0 5119 | } 5120 | param { 5121 | lr_mult: 0 5122 | } 5123 | param { 5124 | lr_mult: 0 5125 | } 5126 | batch_norm_param { 5127 | use_global_stats: true 5128 | } 5129 | } 5130 | layer { 5131 | name: "scale_fuse5_branch2c" 5132 | type: "Scale" 5133 | bottom: "res_fuse5_branch2c" 5134 | top: "res_fuse5_branch2c" 5135 | param { 5136 | lr_mult: 0 5137 | decay_mult: 0 5138 | } 5139 | param { 5140 | lr_mult: 0 5141 | decay_mult: 0 5142 | } 5143 | scale_param { 5144 | bias_term: true 5145 | } 5146 | } 5147 | layer { 5148 | name: "res_fuse5" 5149 | type: "Eltwise" 5150 | bottom: "res_fuse5_branch2c" 5151 | bottom: "res_fuse4" 5152 | top: "res_fuse5" 5153 | } 5154 | layer { 5155 | name: "res_fuse5_relu" 5156 | type: "ReLU" 5157 | bottom: "res_fuse5" 5158 | top: "res_fuse5" 5159 | } 5160 | layer { 5161 | name: "res_fuse7_branch2a" 5162 | type: "Convolution" 5163 | bottom: "res_fuse5" 5164 | top: "res_fuse7_branch2a" 5165 | param { 5166 | lr_mult: 1 5167 | decay_mult: 1 5168 | } 5169 | convolution_param { 5170 | num_output: 128 5171 | bias_term: false 5172 | pad: 0 5173 | kernel_size: 1 5174 | stride: 2 5175 | weight_filler { 5176 | type: "xavier" 5177 | } 5178 | engine: CUDNN 5179 | } 5180 | } 5181 | layer { 5182 | name: "bn_fuse7_branch2a" 5183 | type: "BatchNorm" 5184 | bottom: "res_fuse7_branch2a" 5185 | top: "res_fuse7_branch2a" 5186 | param { 5187 | lr_mult: 0 5188 | } 5189 | param { 5190 | lr_mult: 0 5191 | } 5192 | param { 5193 | lr_mult: 0 5194 | } 5195 | batch_norm_param { 5196 | use_global_stats: true 5197 | } 5198 | } 5199 | layer { 5200 | name: "scale_fuse7_branch2a" 5201 | type: "Scale" 5202 | bottom: "res_fuse7_branch2a" 5203 | top: "res_fuse7_branch2a" 5204 | param { 5205 | lr_mult: 0 5206 | decay_mult: 0 5207 | } 5208 | param { 5209 | lr_mult: 0 5210 | decay_mult: 0 5211 | } 5212 | scale_param { 5213 | bias_term: true 5214 | } 5215 | } 5216 | layer { 5217 | name: "res_fuse7_branch2a_relu" 5218 | type: "ReLU" 5219 | bottom: "res_fuse7_branch2a" 5220 | top: "res_fuse7_branch2a" 5221 | } 5222 | layer { 5223 | name: "res_fuse7_branch2b" 5224 | type: "Convolution" 5225 | bottom: "res_fuse7_branch2a" 5226 | top: "res_fuse7_branch2b" 5227 | param { 5228 | lr_mult: 1 5229 | decay_mult: 1 5230 | } 5231 | convolution_param { 5232 | num_output: 128 5233 | bias_term: false 5234 | pad: 1 5235 | kernel_size: 3 5236 | stride: 1 5237 | weight_filler { 5238 | type: "xavier" 5239 | } 5240 | engine: CUDNN 5241 | } 5242 | } 5243 | layer { 5244 | name: "bn_fuse7_branch2b" 5245 | type: "BatchNorm" 5246 | bottom: "res_fuse7_branch2b" 5247 | top: "res_fuse7_branch2b" 5248 | param { 5249 | lr_mult: 0 5250 | } 5251 | param { 5252 | lr_mult: 0 5253 | } 5254 | param { 5255 | lr_mult: 0 5256 | } 5257 | batch_norm_param { 5258 | use_global_stats: true 5259 | } 5260 | } 5261 | layer { 5262 | name: "scale_fuse7_branch2b" 5263 | type: "Scale" 5264 | bottom: "res_fuse7_branch2b" 5265 | top: "res_fuse7_branch2b" 5266 | param { 5267 | lr_mult: 0 5268 | decay_mult: 0 5269 | } 5270 | param { 5271 | lr_mult: 0 5272 | decay_mult: 0 5273 | } 5274 | scale_param { 5275 | bias_term: true 5276 | } 5277 | } 5278 | layer { 5279 | name: "res_fuse7_branch2b_relu" 5280 | type: "ReLU" 5281 | bottom: "res_fuse7_branch2b" 5282 | top: "res_fuse7_branch2b" 5283 | } 5284 | layer { 5285 | name: "res_fuse7_branch2c" 5286 | type: "Convolution" 5287 | bottom: "res_fuse7_branch2b" 5288 | top: "res_fuse7_branch2c" 5289 | param { 5290 | lr_mult: 1 5291 | decay_mult: 1 5292 | } 5293 | convolution_param { 5294 | num_output: 512 5295 | bias_term: false 5296 | pad: 0 5297 | kernel_size: 1 5298 | stride: 1 5299 | weight_filler { 5300 | type: "xavier" 5301 | } 5302 | engine: CUDNN 5303 | } 5304 | } 5305 | layer { 5306 | name: "bn_fuse7_branch2c" 5307 | type: "BatchNorm" 5308 | bottom: "res_fuse7_branch2c" 5309 | top: "res_fuse7_branch2c" 5310 | param { 5311 | lr_mult: 0 5312 | } 5313 | param { 5314 | lr_mult: 0 5315 | } 5316 | param { 5317 | lr_mult: 0 5318 | } 5319 | batch_norm_param { 5320 | use_global_stats: true 5321 | } 5322 | } 5323 | layer { 5324 | name: "scale_fuse7_branch2c" 5325 | type: "Scale" 5326 | bottom: "res_fuse7_branch2c" 5327 | top: "res_fuse7_branch2c" 5328 | param { 5329 | lr_mult: 0 5330 | decay_mult: 0 5331 | } 5332 | param { 5333 | lr_mult: 0 5334 | decay_mult: 0 5335 | } 5336 | scale_param { 5337 | bias_term: true 5338 | } 5339 | } 5340 | layer { 5341 | name: "res_fuse7_branch1" 5342 | type: "Convolution" 5343 | bottom: "res_fuse5" 5344 | top: "res_fuse7_branch1" 5345 | param { 5346 | lr_mult: 0 5347 | decay_mult: 0 5348 | } 5349 | convolution_param { 5350 | num_output: 512 5351 | bias_term: false 5352 | pad: 0 5353 | kernel_size: 1 5354 | stride: 2 5355 | weight_filler { 5356 | type: "xavier" 5357 | } 5358 | engine: CUDNN 5359 | } 5360 | } 5361 | layer { 5362 | name: "bn_fuse7_branch1" 5363 | type: "BatchNorm" 5364 | bottom: "res_fuse7_branch1" 5365 | top: "res_fuse7_branch1" 5366 | param { 5367 | lr_mult: 0 5368 | } 5369 | param { 5370 | lr_mult: 0 5371 | } 5372 | param { 5373 | lr_mult: 0 5374 | } 5375 | batch_norm_param { 5376 | use_global_stats: true 5377 | } 5378 | } 5379 | layer { 5380 | name: "scale_fuse7_branch1" 5381 | type: "Scale" 5382 | bottom: "res_fuse7_branch1" 5383 | top: "res_fuse7_branch1" 5384 | param { 5385 | lr_mult: 0 5386 | decay_mult: 0 5387 | } 5388 | param { 5389 | lr_mult: 0 5390 | decay_mult: 0 5391 | } 5392 | scale_param { 5393 | bias_term: true 5394 | } 5395 | } 5396 | layer { 5397 | name: "res_fuse7" 5398 | type: "Eltwise" 5399 | bottom: "res_fuse7_branch2c" 5400 | bottom: "res_fuse7_branch1" 5401 | top: "res_fuse7" 5402 | } 5403 | layer { 5404 | name: "res_fuse7_relu" 5405 | type: "ReLU" 5406 | bottom: "res_fuse7" 5407 | top: "res_fuse7" 5408 | } 5409 | layer { 5410 | name: "merged" 5411 | type: "Concat" 5412 | bottom: "res_fuse7" 5413 | bottom: "seg1_res5c" 5414 | top: "merged" 5415 | } 5416 | layer { 5417 | name: "res_be1_branch2a" 5418 | type: "Convolution" 5419 | bottom: "merged" 5420 | top: "res_be1_branch2a" 5421 | param { 5422 | lr_mult: 1 5423 | decay_mult: 1 5424 | } 5425 | convolution_param { 5426 | num_output: 128 5427 | bias_term: false 5428 | pad: 0 5429 | kernel_size: 1 5430 | stride: 1 5431 | weight_filler { 5432 | type: "xavier" 5433 | } 5434 | engine: CUDNN 5435 | } 5436 | } 5437 | layer { 5438 | name: "bn_be1_branch2a" 5439 | type: "BatchNorm" 5440 | bottom: "res_be1_branch2a" 5441 | top: "res_be1_branch2a" 5442 | param { 5443 | lr_mult: 0 5444 | } 5445 | param { 5446 | lr_mult: 0 5447 | } 5448 | param { 5449 | lr_mult: 0 5450 | } 5451 | batch_norm_param { 5452 | use_global_stats: true 5453 | } 5454 | } 5455 | layer { 5456 | name: "scale_be1_branch2a" 5457 | type: "Scale" 5458 | bottom: "res_be1_branch2a" 5459 | top: "res_be1_branch2a" 5460 | param { 5461 | lr_mult: 0 5462 | decay_mult: 0 5463 | } 5464 | param { 5465 | lr_mult: 0 5466 | decay_mult: 0 5467 | } 5468 | scale_param { 5469 | bias_term: true 5470 | } 5471 | } 5472 | layer { 5473 | name: "res_be1_branch2a_relu" 5474 | type: "ReLU" 5475 | bottom: "res_be1_branch2a" 5476 | top: "res_be1_branch2a" 5477 | } 5478 | layer { 5479 | name: "res_be1_branch2b" 5480 | type: "Convolution" 5481 | bottom: "res_be1_branch2a" 5482 | top: "res_be1_branch2b" 5483 | param { 5484 | lr_mult: 1 5485 | decay_mult: 1 5486 | } 5487 | convolution_param { 5488 | num_output: 128 5489 | bias_term: false 5490 | pad: 2 5491 | kernel_size: 3 5492 | stride: 1 5493 | weight_filler { 5494 | type: "xavier" 5495 | } 5496 | engine: CAFFE 5497 | dilation: 2 5498 | } 5499 | } 5500 | layer { 5501 | name: "bn_be1_branch2b" 5502 | type: "BatchNorm" 5503 | bottom: "res_be1_branch2b" 5504 | top: "res_be1_branch2b" 5505 | param { 5506 | lr_mult: 0 5507 | } 5508 | param { 5509 | lr_mult: 0 5510 | } 5511 | param { 5512 | lr_mult: 0 5513 | } 5514 | batch_norm_param { 5515 | use_global_stats: true 5516 | } 5517 | } 5518 | layer { 5519 | name: "scale_be1_branch2b" 5520 | type: "Scale" 5521 | bottom: "res_be1_branch2b" 5522 | top: "res_be1_branch2b" 5523 | param { 5524 | lr_mult: 0 5525 | decay_mult: 0 5526 | } 5527 | param { 5528 | lr_mult: 0 5529 | decay_mult: 0 5530 | } 5531 | scale_param { 5532 | bias_term: true 5533 | } 5534 | } 5535 | layer { 5536 | name: "res_be1_branch2b_relu" 5537 | type: "ReLU" 5538 | bottom: "res_be1_branch2b" 5539 | top: "res_be1_branch2b" 5540 | } 5541 | layer { 5542 | name: "res_be1_branch2c" 5543 | type: "Convolution" 5544 | bottom: "res_be1_branch2b" 5545 | top: "res_be1_branch2c" 5546 | param { 5547 | lr_mult: 1 5548 | decay_mult: 1 5549 | } 5550 | convolution_param { 5551 | num_output: 512 5552 | bias_term: false 5553 | pad: 0 5554 | kernel_size: 1 5555 | stride: 1 5556 | weight_filler { 5557 | type: "xavier" 5558 | } 5559 | engine: CUDNN 5560 | } 5561 | } 5562 | layer { 5563 | name: "bn_be1_branch2c" 5564 | type: "BatchNorm" 5565 | bottom: "res_be1_branch2c" 5566 | top: "res_be1_branch2c" 5567 | param { 5568 | lr_mult: 0 5569 | } 5570 | param { 5571 | lr_mult: 0 5572 | } 5573 | param { 5574 | lr_mult: 0 5575 | } 5576 | batch_norm_param { 5577 | use_global_stats: true 5578 | } 5579 | } 5580 | layer { 5581 | name: "scale_be1_branch2c" 5582 | type: "Scale" 5583 | bottom: "res_be1_branch2c" 5584 | top: "res_be1_branch2c" 5585 | param { 5586 | lr_mult: 0 5587 | decay_mult: 0 5588 | } 5589 | param { 5590 | lr_mult: 0 5591 | decay_mult: 0 5592 | } 5593 | scale_param { 5594 | bias_term: true 5595 | } 5596 | } 5597 | layer { 5598 | name: "res_be1_branch1" 5599 | type: "Convolution" 5600 | bottom: "merged" 5601 | top: "res_be1_branch1" 5602 | param { 5603 | lr_mult: 0 5604 | decay_mult: 0 5605 | } 5606 | convolution_param { 5607 | num_output: 512 5608 | bias_term: false 5609 | pad: 0 5610 | kernel_size: 1 5611 | stride: 1 5612 | weight_filler { 5613 | type: "xavier" 5614 | } 5615 | engine: CUDNN 5616 | } 5617 | } 5618 | layer { 5619 | name: "bn_be1_branch1" 5620 | type: "BatchNorm" 5621 | bottom: "res_be1_branch1" 5622 | top: "res_be1_branch1" 5623 | param { 5624 | lr_mult: 0 5625 | } 5626 | param { 5627 | lr_mult: 0 5628 | } 5629 | param { 5630 | lr_mult: 0 5631 | } 5632 | batch_norm_param { 5633 | use_global_stats: true 5634 | } 5635 | } 5636 | layer { 5637 | name: "scale_be1_branch1" 5638 | type: "Scale" 5639 | bottom: "res_be1_branch1" 5640 | top: "res_be1_branch1" 5641 | param { 5642 | lr_mult: 0 5643 | decay_mult: 0 5644 | } 5645 | param { 5646 | lr_mult: 0 5647 | decay_mult: 0 5648 | } 5649 | scale_param { 5650 | bias_term: true 5651 | } 5652 | } 5653 | layer { 5654 | name: "res_be1" 5655 | type: "Eltwise" 5656 | bottom: "res_be1_branch2c" 5657 | bottom: "res_be1_branch1" 5658 | top: "res_be1" 5659 | } 5660 | layer { 5661 | name: "res_be1_relu" 5662 | type: "ReLU" 5663 | bottom: "res_be1" 5664 | top: "res_be1" 5665 | } 5666 | layer { 5667 | name: "res_be2_branch2a" 5668 | type: "Convolution" 5669 | bottom: "res_be1" 5670 | top: "res_be2_branch2a" 5671 | param { 5672 | lr_mult: 1 5673 | decay_mult: 1 5674 | } 5675 | convolution_param { 5676 | num_output: 128 5677 | bias_term: false 5678 | pad: 0 5679 | kernel_size: 1 5680 | stride: 1 5681 | weight_filler { 5682 | type: "xavier" 5683 | } 5684 | engine: CUDNN 5685 | } 5686 | } 5687 | layer { 5688 | name: "bn_be2_branch2a" 5689 | type: "BatchNorm" 5690 | bottom: "res_be2_branch2a" 5691 | top: "res_be2_branch2a" 5692 | param { 5693 | lr_mult: 0 5694 | } 5695 | param { 5696 | lr_mult: 0 5697 | } 5698 | param { 5699 | lr_mult: 0 5700 | } 5701 | batch_norm_param { 5702 | use_global_stats: true 5703 | } 5704 | } 5705 | layer { 5706 | name: "scale_be2_branch2a" 5707 | type: "Scale" 5708 | bottom: "res_be2_branch2a" 5709 | top: "res_be2_branch2a" 5710 | param { 5711 | lr_mult: 0 5712 | decay_mult: 0 5713 | } 5714 | param { 5715 | lr_mult: 0 5716 | decay_mult: 0 5717 | } 5718 | scale_param { 5719 | bias_term: true 5720 | } 5721 | } 5722 | layer { 5723 | name: "res_be2_branch2a_relu" 5724 | type: "ReLU" 5725 | bottom: "res_be2_branch2a" 5726 | top: "res_be2_branch2a" 5727 | } 5728 | layer { 5729 | name: "res_be2_branch2b" 5730 | type: "Convolution" 5731 | bottom: "res_be2_branch2a" 5732 | top: "res_be2_branch2b" 5733 | param { 5734 | lr_mult: 1 5735 | decay_mult: 1 5736 | } 5737 | convolution_param { 5738 | num_output: 128 5739 | bias_term: false 5740 | pad: 2 5741 | kernel_size: 3 5742 | stride: 1 5743 | weight_filler { 5744 | type: "xavier" 5745 | } 5746 | engine: CAFFE 5747 | dilation: 2 5748 | } 5749 | } 5750 | layer { 5751 | name: "bn_be2_branch2b" 5752 | type: "BatchNorm" 5753 | bottom: "res_be2_branch2b" 5754 | top: "res_be2_branch2b" 5755 | param { 5756 | lr_mult: 0 5757 | } 5758 | param { 5759 | lr_mult: 0 5760 | } 5761 | param { 5762 | lr_mult: 0 5763 | } 5764 | batch_norm_param { 5765 | use_global_stats: true 5766 | } 5767 | } 5768 | layer { 5769 | name: "scale_be2_branch2b" 5770 | type: "Scale" 5771 | bottom: "res_be2_branch2b" 5772 | top: "res_be2_branch2b" 5773 | param { 5774 | lr_mult: 0 5775 | decay_mult: 0 5776 | } 5777 | param { 5778 | lr_mult: 0 5779 | decay_mult: 0 5780 | } 5781 | scale_param { 5782 | bias_term: true 5783 | } 5784 | } 5785 | layer { 5786 | name: "res_be2_branch2b_relu" 5787 | type: "ReLU" 5788 | bottom: "res_be2_branch2b" 5789 | top: "res_be2_branch2b" 5790 | } 5791 | layer { 5792 | name: "res_be2_branch2c" 5793 | type: "Convolution" 5794 | bottom: "res_be2_branch2b" 5795 | top: "res_be2_branch2c" 5796 | param { 5797 | lr_mult: 1 5798 | decay_mult: 1 5799 | } 5800 | convolution_param { 5801 | num_output: 512 5802 | bias_term: false 5803 | pad: 0 5804 | kernel_size: 1 5805 | stride: 1 5806 | weight_filler { 5807 | type: "xavier" 5808 | } 5809 | engine: CUDNN 5810 | } 5811 | } 5812 | layer { 5813 | name: "bn_be2_branch2c" 5814 | type: "BatchNorm" 5815 | bottom: "res_be2_branch2c" 5816 | top: "res_be2_branch2c" 5817 | param { 5818 | lr_mult: 0 5819 | } 5820 | param { 5821 | lr_mult: 0 5822 | } 5823 | param { 5824 | lr_mult: 0 5825 | } 5826 | batch_norm_param { 5827 | use_global_stats: true 5828 | } 5829 | } 5830 | layer { 5831 | name: "scale_be2_branch2c" 5832 | type: "Scale" 5833 | bottom: "res_be2_branch2c" 5834 | top: "res_be2_branch2c" 5835 | param { 5836 | lr_mult: 0 5837 | decay_mult: 0 5838 | } 5839 | param { 5840 | lr_mult: 0 5841 | decay_mult: 0 5842 | } 5843 | scale_param { 5844 | bias_term: true 5845 | } 5846 | } 5847 | layer { 5848 | name: "res_be2" 5849 | type: "Eltwise" 5850 | bottom: "res_be2_branch2c" 5851 | bottom: "res_be1" 5852 | top: "res_be2" 5853 | } 5854 | layer { 5855 | name: "res_be2_relu" 5856 | type: "ReLU" 5857 | bottom: "res_be2" 5858 | top: "res_be2" 5859 | } 5860 | layer { 5861 | name: "res_be3_branch2a" 5862 | type: "Convolution" 5863 | bottom: "res_be2" 5864 | top: "res_be3_branch2a" 5865 | param { 5866 | lr_mult: 1 5867 | decay_mult: 1 5868 | } 5869 | convolution_param { 5870 | num_output: 128 5871 | bias_term: false 5872 | pad: 0 5873 | kernel_size: 1 5874 | stride: 1 5875 | weight_filler { 5876 | type: "xavier" 5877 | } 5878 | engine: CUDNN 5879 | } 5880 | } 5881 | layer { 5882 | name: "bn_be3_branch2a" 5883 | type: "BatchNorm" 5884 | bottom: "res_be3_branch2a" 5885 | top: "res_be3_branch2a" 5886 | param { 5887 | lr_mult: 0 5888 | } 5889 | param { 5890 | lr_mult: 0 5891 | } 5892 | param { 5893 | lr_mult: 0 5894 | } 5895 | batch_norm_param { 5896 | use_global_stats: true 5897 | } 5898 | } 5899 | layer { 5900 | name: "scale_be3_branch2a" 5901 | type: "Scale" 5902 | bottom: "res_be3_branch2a" 5903 | top: "res_be3_branch2a" 5904 | param { 5905 | lr_mult: 0 5906 | decay_mult: 0 5907 | } 5908 | param { 5909 | lr_mult: 0 5910 | decay_mult: 0 5911 | } 5912 | scale_param { 5913 | bias_term: true 5914 | } 5915 | } 5916 | layer { 5917 | name: "res_be3_branch2a_relu" 5918 | type: "ReLU" 5919 | bottom: "res_be3_branch2a" 5920 | top: "res_be3_branch2a" 5921 | } 5922 | layer { 5923 | name: "res_be3_branch2b" 5924 | type: "Convolution" 5925 | bottom: "res_be3_branch2a" 5926 | top: "res_be3_branch2b" 5927 | param { 5928 | lr_mult: 1 5929 | decay_mult: 1 5930 | } 5931 | convolution_param { 5932 | num_output: 128 5933 | bias_term: false 5934 | pad: 2 5935 | kernel_size: 3 5936 | stride: 1 5937 | weight_filler { 5938 | type: "xavier" 5939 | } 5940 | engine: CAFFE 5941 | dilation: 2 5942 | } 5943 | } 5944 | layer { 5945 | name: "bn_be3_branch2b" 5946 | type: "BatchNorm" 5947 | bottom: "res_be3_branch2b" 5948 | top: "res_be3_branch2b" 5949 | param { 5950 | lr_mult: 0 5951 | } 5952 | param { 5953 | lr_mult: 0 5954 | } 5955 | param { 5956 | lr_mult: 0 5957 | } 5958 | batch_norm_param { 5959 | use_global_stats: true 5960 | } 5961 | } 5962 | layer { 5963 | name: "scale_be3_branch2b" 5964 | type: "Scale" 5965 | bottom: "res_be3_branch2b" 5966 | top: "res_be3_branch2b" 5967 | param { 5968 | lr_mult: 0 5969 | decay_mult: 0 5970 | } 5971 | param { 5972 | lr_mult: 0 5973 | decay_mult: 0 5974 | } 5975 | scale_param { 5976 | bias_term: true 5977 | } 5978 | } 5979 | layer { 5980 | name: "res_be3_branch2b_relu" 5981 | type: "ReLU" 5982 | bottom: "res_be3_branch2b" 5983 | top: "res_be3_branch2b" 5984 | } 5985 | layer { 5986 | name: "res_be3_branch2c" 5987 | type: "Convolution" 5988 | bottom: "res_be3_branch2b" 5989 | top: "res_be3_branch2c" 5990 | param { 5991 | lr_mult: 1 5992 | decay_mult: 1 5993 | } 5994 | convolution_param { 5995 | num_output: 512 5996 | bias_term: false 5997 | pad: 0 5998 | kernel_size: 1 5999 | stride: 1 6000 | weight_filler { 6001 | type: "xavier" 6002 | } 6003 | engine: CUDNN 6004 | } 6005 | } 6006 | layer { 6007 | name: "bn_be3_branch2c" 6008 | type: "BatchNorm" 6009 | bottom: "res_be3_branch2c" 6010 | top: "res_be3_branch2c" 6011 | param { 6012 | lr_mult: 0 6013 | } 6014 | param { 6015 | lr_mult: 0 6016 | } 6017 | param { 6018 | lr_mult: 0 6019 | } 6020 | batch_norm_param { 6021 | use_global_stats: true 6022 | } 6023 | } 6024 | layer { 6025 | name: "scale_be3_branch2c" 6026 | type: "Scale" 6027 | bottom: "res_be3_branch2c" 6028 | top: "res_be3_branch2c" 6029 | param { 6030 | lr_mult: 0 6031 | decay_mult: 0 6032 | } 6033 | param { 6034 | lr_mult: 0 6035 | decay_mult: 0 6036 | } 6037 | scale_param { 6038 | bias_term: true 6039 | } 6040 | } 6041 | layer { 6042 | name: "res_be3" 6043 | type: "Eltwise" 6044 | bottom: "res_be3_branch2c" 6045 | bottom: "res_be2" 6046 | top: "res_be3" 6047 | } 6048 | layer { 6049 | name: "res_be3_relu" 6050 | type: "ReLU" 6051 | bottom: "res_be3" 6052 | top: "res_be3" 6053 | } 6054 | layer { 6055 | name: "res_be4_branch2a" 6056 | type: "Convolution" 6057 | bottom: "res_be3" 6058 | top: "res_be4_branch2a" 6059 | param { 6060 | lr_mult: 1 6061 | decay_mult: 1 6062 | } 6063 | convolution_param { 6064 | num_output: 256 6065 | bias_term: false 6066 | pad: 0 6067 | kernel_size: 1 6068 | stride: 1 6069 | weight_filler { 6070 | type: "xavier" 6071 | } 6072 | engine: CUDNN 6073 | } 6074 | } 6075 | layer { 6076 | name: "bn_be4_branch2a" 6077 | type: "BatchNorm" 6078 | bottom: "res_be4_branch2a" 6079 | top: "res_be4_branch2a" 6080 | param { 6081 | lr_mult: 0 6082 | } 6083 | param { 6084 | lr_mult: 0 6085 | } 6086 | param { 6087 | lr_mult: 0 6088 | } 6089 | batch_norm_param { 6090 | use_global_stats: true 6091 | } 6092 | } 6093 | layer { 6094 | name: "scale_be4_branch2a" 6095 | type: "Scale" 6096 | bottom: "res_be4_branch2a" 6097 | top: "res_be4_branch2a" 6098 | param { 6099 | lr_mult: 0 6100 | decay_mult: 0 6101 | } 6102 | param { 6103 | lr_mult: 0 6104 | decay_mult: 0 6105 | } 6106 | scale_param { 6107 | bias_term: true 6108 | } 6109 | } 6110 | layer { 6111 | name: "res_be4_branch2a_relu" 6112 | type: "ReLU" 6113 | bottom: "res_be4_branch2a" 6114 | top: "res_be4_branch2a" 6115 | } 6116 | layer { 6117 | name: "res_be4conv1_2_p1" 6118 | type: "Convolution" 6119 | bottom: "res_be4_branch2a" 6120 | top: "res_be4conv1_2_p1" 6121 | param { 6122 | lr_mult: 1 6123 | decay_mult: 1 6124 | } 6125 | convolution_param { 6126 | num_output: 128 6127 | bias_term: false 6128 | pad: 2 6129 | kernel_size: 3 6130 | stride: 1 6131 | weight_filler { 6132 | type: "xavier" 6133 | } 6134 | engine: CAFFE 6135 | dilation: 2 6136 | } 6137 | } 6138 | layer { 6139 | name: "bn_be4_dil1" 6140 | type: "BatchNorm" 6141 | bottom: "res_be4conv1_2_p1" 6142 | top: "res_be4conv1_2_p1" 6143 | param { 6144 | lr_mult: 0 6145 | } 6146 | param { 6147 | lr_mult: 0 6148 | } 6149 | param { 6150 | lr_mult: 0 6151 | } 6152 | batch_norm_param { 6153 | use_global_stats: true 6154 | } 6155 | } 6156 | layer { 6157 | name: "scale_be4_dil1" 6158 | type: "Scale" 6159 | bottom: "res_be4conv1_2_p1" 6160 | top: "res_be4conv1_2_p1" 6161 | param { 6162 | lr_mult: 0 6163 | decay_mult: 0 6164 | } 6165 | param { 6166 | lr_mult: 0 6167 | decay_mult: 0 6168 | } 6169 | scale_param { 6170 | bias_term: true 6171 | } 6172 | } 6173 | layer { 6174 | name: "res_be4relu1_2" 6175 | type: "ReLU" 6176 | bottom: "res_be4conv1_2_p1" 6177 | top: "res_be4conv1_2_p1" 6178 | } 6179 | layer { 6180 | name: "res_be4conv1_2_p2" 6181 | type: "Convolution" 6182 | bottom: "res_be4_branch2a" 6183 | top: "res_be4conv1_2_p2" 6184 | param { 6185 | lr_mult: 1 6186 | decay_mult: 1 6187 | } 6188 | param { 6189 | lr_mult: 2 6190 | decay_mult: 0 6191 | } 6192 | convolution_param { 6193 | num_output: 128 6194 | pad: 2 6195 | kernel_size: 3 6196 | weight_filler { 6197 | type: "xavier" 6198 | } 6199 | engine: CAFFE 6200 | dilation: 2 6201 | } 6202 | } 6203 | layer { 6204 | name: "bn_be4_dil2" 6205 | type: "BatchNorm" 6206 | bottom: "res_be4conv1_2_p2" 6207 | top: "res_be4conv1_2_p2" 6208 | param { 6209 | lr_mult: 0 6210 | } 6211 | param { 6212 | lr_mult: 0 6213 | } 6214 | param { 6215 | lr_mult: 0 6216 | } 6217 | batch_norm_param { 6218 | use_global_stats: true 6219 | } 6220 | } 6221 | layer { 6222 | name: "scale_be4_dil2" 6223 | type: "Scale" 6224 | bottom: "res_be4conv1_2_p2" 6225 | top: "res_be4conv1_2_p2" 6226 | param { 6227 | lr_mult: 0 6228 | decay_mult: 0 6229 | } 6230 | param { 6231 | lr_mult: 0 6232 | decay_mult: 0 6233 | } 6234 | scale_param { 6235 | bias_term: true 6236 | } 6237 | } 6238 | layer { 6239 | name: "res_be4relu1_2_p2" 6240 | type: "ReLU" 6241 | bottom: "res_be4conv1_2_p2" 6242 | top: "res_be4conv1_2_p2" 6243 | } 6244 | layer { 6245 | name: "_be4dil_sum" 6246 | type: "Concat" 6247 | bottom: "res_be4conv1_2_p1" 6248 | bottom: "res_be4conv1_2_p2" 6249 | top: "_be4dil_sum" 6250 | } 6251 | layer { 6252 | name: "res_be4_branch2c" 6253 | type: "Convolution" 6254 | bottom: "_be4dil_sum" 6255 | top: "res_be4_branch2c" 6256 | param { 6257 | lr_mult: 1 6258 | decay_mult: 1 6259 | } 6260 | convolution_param { 6261 | num_output: 1024 6262 | bias_term: false 6263 | pad: 0 6264 | kernel_size: 1 6265 | stride: 1 6266 | weight_filler { 6267 | type: "xavier" 6268 | } 6269 | engine: CUDNN 6270 | } 6271 | } 6272 | layer { 6273 | name: "bn_be4_branch2c" 6274 | type: "BatchNorm" 6275 | bottom: "res_be4_branch2c" 6276 | top: "res_be4_branch2c" 6277 | param { 6278 | lr_mult: 0 6279 | } 6280 | param { 6281 | lr_mult: 0 6282 | } 6283 | param { 6284 | lr_mult: 0 6285 | } 6286 | batch_norm_param { 6287 | use_global_stats: true 6288 | } 6289 | } 6290 | layer { 6291 | name: "scale_be4_branch2c" 6292 | type: "Scale" 6293 | bottom: "res_be4_branch2c" 6294 | top: "res_be4_branch2c" 6295 | param { 6296 | lr_mult: 0 6297 | decay_mult: 0 6298 | } 6299 | param { 6300 | lr_mult: 0 6301 | decay_mult: 0 6302 | } 6303 | scale_param { 6304 | bias_term: true 6305 | } 6306 | } 6307 | layer { 6308 | name: "res_be4_branch1" 6309 | type: "Convolution" 6310 | bottom: "res_be3" 6311 | top: "res_be4_branch1" 6312 | param { 6313 | lr_mult: 0 6314 | decay_mult: 0 6315 | } 6316 | convolution_param { 6317 | num_output: 1024 6318 | bias_term: false 6319 | pad: 0 6320 | kernel_size: 1 6321 | stride: 1 6322 | weight_filler { 6323 | type: "xavier" 6324 | } 6325 | engine: CUDNN 6326 | } 6327 | } 6328 | layer { 6329 | name: "bn_be4_branch1" 6330 | type: "BatchNorm" 6331 | bottom: "res_be4_branch1" 6332 | top: "res_be4_branch1" 6333 | param { 6334 | lr_mult: 0 6335 | } 6336 | param { 6337 | lr_mult: 0 6338 | } 6339 | param { 6340 | lr_mult: 0 6341 | } 6342 | batch_norm_param { 6343 | use_global_stats: true 6344 | } 6345 | } 6346 | layer { 6347 | name: "scale_be4_branch1" 6348 | type: "Scale" 6349 | bottom: "res_be4_branch1" 6350 | top: "res_be4_branch1" 6351 | param { 6352 | lr_mult: 0 6353 | decay_mult: 0 6354 | } 6355 | param { 6356 | lr_mult: 0 6357 | decay_mult: 0 6358 | } 6359 | scale_param { 6360 | bias_term: true 6361 | } 6362 | } 6363 | layer { 6364 | name: "res_be4" 6365 | type: "Eltwise" 6366 | bottom: "res_be4_branch2c" 6367 | bottom: "res_be4_branch1" 6368 | top: "res_be4" 6369 | } 6370 | layer { 6371 | name: "res_be4_relu" 6372 | type: "ReLU" 6373 | bottom: "res_be4" 6374 | top: "res_be4" 6375 | } 6376 | layer { 6377 | name: "res_be5_branch2a" 6378 | type: "Convolution" 6379 | bottom: "res_be4" 6380 | top: "res_be5_branch2a" 6381 | param { 6382 | lr_mult: 1 6383 | decay_mult: 1 6384 | } 6385 | convolution_param { 6386 | num_output: 256 6387 | bias_term: false 6388 | pad: 0 6389 | kernel_size: 1 6390 | stride: 1 6391 | weight_filler { 6392 | type: "xavier" 6393 | } 6394 | engine: CUDNN 6395 | } 6396 | } 6397 | layer { 6398 | name: "bn_be5_branch2a" 6399 | type: "BatchNorm" 6400 | bottom: "res_be5_branch2a" 6401 | top: "res_be5_branch2a" 6402 | param { 6403 | lr_mult: 0 6404 | } 6405 | param { 6406 | lr_mult: 0 6407 | } 6408 | param { 6409 | lr_mult: 0 6410 | } 6411 | batch_norm_param { 6412 | use_global_stats: true 6413 | } 6414 | } 6415 | layer { 6416 | name: "scale_be5_branch2a" 6417 | type: "Scale" 6418 | bottom: "res_be5_branch2a" 6419 | top: "res_be5_branch2a" 6420 | param { 6421 | lr_mult: 0 6422 | decay_mult: 0 6423 | } 6424 | param { 6425 | lr_mult: 0 6426 | decay_mult: 0 6427 | } 6428 | scale_param { 6429 | bias_term: true 6430 | } 6431 | } 6432 | layer { 6433 | name: "res_be5_branch2a_relu" 6434 | type: "ReLU" 6435 | bottom: "res_be5_branch2a" 6436 | top: "res_be5_branch2a" 6437 | } 6438 | layer { 6439 | name: "res_be5conv1_2_p1" 6440 | type: "Convolution" 6441 | bottom: "res_be5_branch2a" 6442 | top: "res_be5conv1_2_p1" 6443 | param { 6444 | lr_mult: 1 6445 | decay_mult: 1 6446 | } 6447 | convolution_param { 6448 | num_output: 128 6449 | bias_term: false 6450 | pad: 2 6451 | kernel_size: 3 6452 | stride: 1 6453 | weight_filler { 6454 | type: "xavier" 6455 | } 6456 | engine: CAFFE 6457 | dilation: 2 6458 | } 6459 | } 6460 | layer { 6461 | name: "bn_be5_dil1" 6462 | type: "BatchNorm" 6463 | bottom: "res_be5conv1_2_p1" 6464 | top: "res_be5conv1_2_p1" 6465 | param { 6466 | lr_mult: 0 6467 | } 6468 | param { 6469 | lr_mult: 0 6470 | } 6471 | param { 6472 | lr_mult: 0 6473 | } 6474 | batch_norm_param { 6475 | use_global_stats: true 6476 | } 6477 | } 6478 | layer { 6479 | name: "scale_be5_dil1" 6480 | type: "Scale" 6481 | bottom: "res_be5conv1_2_p1" 6482 | top: "res_be5conv1_2_p1" 6483 | param { 6484 | lr_mult: 0 6485 | decay_mult: 0 6486 | } 6487 | param { 6488 | lr_mult: 0 6489 | decay_mult: 0 6490 | } 6491 | scale_param { 6492 | bias_term: true 6493 | } 6494 | } 6495 | layer { 6496 | name: "res_be5relu1_2" 6497 | type: "ReLU" 6498 | bottom: "res_be5conv1_2_p1" 6499 | top: "res_be5conv1_2_p1" 6500 | } 6501 | layer { 6502 | name: "res_be5conv1_2_p2" 6503 | type: "Convolution" 6504 | bottom: "res_be5_branch2a" 6505 | top: "res_be5conv1_2_p2" 6506 | param { 6507 | lr_mult: 1 6508 | decay_mult: 1 6509 | } 6510 | param { 6511 | lr_mult: 2 6512 | decay_mult: 0 6513 | } 6514 | convolution_param { 6515 | num_output: 128 6516 | pad: 4 6517 | kernel_size: 3 6518 | weight_filler { 6519 | type: "xavier" 6520 | } 6521 | engine: CAFFE 6522 | dilation: 4 6523 | } 6524 | } 6525 | layer { 6526 | name: "bn_be5_dil2" 6527 | type: "BatchNorm" 6528 | bottom: "res_be5conv1_2_p2" 6529 | top: "res_be5conv1_2_p2" 6530 | param { 6531 | lr_mult: 0 6532 | } 6533 | param { 6534 | lr_mult: 0 6535 | } 6536 | param { 6537 | lr_mult: 0 6538 | } 6539 | batch_norm_param { 6540 | use_global_stats: true 6541 | } 6542 | } 6543 | layer { 6544 | name: "scale_be5_dil2" 6545 | type: "Scale" 6546 | bottom: "res_be5conv1_2_p2" 6547 | top: "res_be5conv1_2_p2" 6548 | param { 6549 | lr_mult: 0 6550 | decay_mult: 0 6551 | } 6552 | param { 6553 | lr_mult: 0 6554 | decay_mult: 0 6555 | } 6556 | scale_param { 6557 | bias_term: true 6558 | } 6559 | } 6560 | layer { 6561 | name: "res_be5relu1_2_p2" 6562 | type: "ReLU" 6563 | bottom: "res_be5conv1_2_p2" 6564 | top: "res_be5conv1_2_p2" 6565 | } 6566 | layer { 6567 | name: "_be5dil_sum" 6568 | type: "Concat" 6569 | bottom: "res_be5conv1_2_p1" 6570 | bottom: "res_be5conv1_2_p2" 6571 | top: "_be5dil_sum" 6572 | } 6573 | layer { 6574 | name: "res_be5_branch2c" 6575 | type: "Convolution" 6576 | bottom: "_be5dil_sum" 6577 | top: "res_be5_branch2c" 6578 | param { 6579 | lr_mult: 1 6580 | decay_mult: 1 6581 | } 6582 | convolution_param { 6583 | num_output: 1024 6584 | bias_term: false 6585 | pad: 0 6586 | kernel_size: 1 6587 | stride: 1 6588 | weight_filler { 6589 | type: "xavier" 6590 | } 6591 | engine: CUDNN 6592 | } 6593 | } 6594 | layer { 6595 | name: "bn_be5_branch2c" 6596 | type: "BatchNorm" 6597 | bottom: "res_be5_branch2c" 6598 | top: "res_be5_branch2c" 6599 | param { 6600 | lr_mult: 0 6601 | } 6602 | param { 6603 | lr_mult: 0 6604 | } 6605 | param { 6606 | lr_mult: 0 6607 | } 6608 | batch_norm_param { 6609 | use_global_stats: true 6610 | } 6611 | } 6612 | layer { 6613 | name: "scale_be5_branch2c" 6614 | type: "Scale" 6615 | bottom: "res_be5_branch2c" 6616 | top: "res_be5_branch2c" 6617 | param { 6618 | lr_mult: 0 6619 | decay_mult: 0 6620 | } 6621 | param { 6622 | lr_mult: 0 6623 | decay_mult: 0 6624 | } 6625 | scale_param { 6626 | bias_term: true 6627 | } 6628 | } 6629 | layer { 6630 | name: "res_be5" 6631 | type: "Eltwise" 6632 | bottom: "res_be5_branch2c" 6633 | bottom: "res_be4" 6634 | top: "res_be5" 6635 | } 6636 | layer { 6637 | name: "res_be5_relu" 6638 | type: "ReLU" 6639 | bottom: "res_be5" 6640 | top: "res_be5" 6641 | } 6642 | layer { 6643 | name: "res_be6_branch2a" 6644 | type: "Convolution" 6645 | bottom: "res_be5" 6646 | top: "res_be6_branch2a" 6647 | param { 6648 | lr_mult: 1 6649 | decay_mult: 1 6650 | } 6651 | convolution_param { 6652 | num_output: 256 6653 | bias_term: false 6654 | pad: 0 6655 | kernel_size: 1 6656 | stride: 1 6657 | weight_filler { 6658 | type: "xavier" 6659 | } 6660 | engine: CUDNN 6661 | } 6662 | } 6663 | layer { 6664 | name: "bn_be6_branch2a" 6665 | type: "BatchNorm" 6666 | bottom: "res_be6_branch2a" 6667 | top: "res_be6_branch2a" 6668 | param { 6669 | lr_mult: 0 6670 | } 6671 | param { 6672 | lr_mult: 0 6673 | } 6674 | param { 6675 | lr_mult: 0 6676 | } 6677 | batch_norm_param { 6678 | use_global_stats: true 6679 | } 6680 | } 6681 | layer { 6682 | name: "scale_be6_branch2a" 6683 | type: "Scale" 6684 | bottom: "res_be6_branch2a" 6685 | top: "res_be6_branch2a" 6686 | param { 6687 | lr_mult: 0 6688 | decay_mult: 0 6689 | } 6690 | param { 6691 | lr_mult: 0 6692 | decay_mult: 0 6693 | } 6694 | scale_param { 6695 | bias_term: true 6696 | } 6697 | } 6698 | layer { 6699 | name: "res_be6_branch2a_relu" 6700 | type: "ReLU" 6701 | bottom: "res_be6_branch2a" 6702 | top: "res_be6_branch2a" 6703 | } 6704 | layer { 6705 | name: "res_be6conv1_2_p1" 6706 | type: "Convolution" 6707 | bottom: "res_be6_branch2a" 6708 | top: "res_be6conv1_2_p1" 6709 | param { 6710 | lr_mult: 1 6711 | decay_mult: 1 6712 | } 6713 | convolution_param { 6714 | num_output: 128 6715 | bias_term: false 6716 | pad: 2 6717 | kernel_size: 3 6718 | stride: 1 6719 | weight_filler { 6720 | type: "xavier" 6721 | } 6722 | engine: CAFFE 6723 | dilation: 2 6724 | } 6725 | } 6726 | layer { 6727 | name: "bn_be6_dil1" 6728 | type: "BatchNorm" 6729 | bottom: "res_be6conv1_2_p1" 6730 | top: "res_be6conv1_2_p1" 6731 | param { 6732 | lr_mult: 0 6733 | } 6734 | param { 6735 | lr_mult: 0 6736 | } 6737 | param { 6738 | lr_mult: 0 6739 | } 6740 | batch_norm_param { 6741 | use_global_stats: true 6742 | } 6743 | } 6744 | layer { 6745 | name: "scale_be6_dil1" 6746 | type: "Scale" 6747 | bottom: "res_be6conv1_2_p1" 6748 | top: "res_be6conv1_2_p1" 6749 | param { 6750 | lr_mult: 0 6751 | decay_mult: 0 6752 | } 6753 | param { 6754 | lr_mult: 0 6755 | decay_mult: 0 6756 | } 6757 | scale_param { 6758 | bias_term: true 6759 | } 6760 | } 6761 | layer { 6762 | name: "res_be6relu1_2" 6763 | type: "ReLU" 6764 | bottom: "res_be6conv1_2_p1" 6765 | top: "res_be6conv1_2_p1" 6766 | } 6767 | layer { 6768 | name: "res_be6conv1_2_p2" 6769 | type: "Convolution" 6770 | bottom: "res_be6_branch2a" 6771 | top: "res_be6conv1_2_p2" 6772 | param { 6773 | lr_mult: 1 6774 | decay_mult: 1 6775 | } 6776 | param { 6777 | lr_mult: 2 6778 | decay_mult: 0 6779 | } 6780 | convolution_param { 6781 | num_output: 128 6782 | pad: 8 6783 | kernel_size: 3 6784 | weight_filler { 6785 | type: "xavier" 6786 | } 6787 | engine: CAFFE 6788 | dilation: 8 6789 | } 6790 | } 6791 | layer { 6792 | name: "bn_be6_dil2" 6793 | type: "BatchNorm" 6794 | bottom: "res_be6conv1_2_p2" 6795 | top: "res_be6conv1_2_p2" 6796 | param { 6797 | lr_mult: 0 6798 | } 6799 | param { 6800 | lr_mult: 0 6801 | } 6802 | param { 6803 | lr_mult: 0 6804 | } 6805 | batch_norm_param { 6806 | use_global_stats: true 6807 | } 6808 | } 6809 | layer { 6810 | name: "scale_be6_dil2" 6811 | type: "Scale" 6812 | bottom: "res_be6conv1_2_p2" 6813 | top: "res_be6conv1_2_p2" 6814 | param { 6815 | lr_mult: 0 6816 | decay_mult: 0 6817 | } 6818 | param { 6819 | lr_mult: 0 6820 | decay_mult: 0 6821 | } 6822 | scale_param { 6823 | bias_term: true 6824 | } 6825 | } 6826 | layer { 6827 | name: "res_be6relu1_2_p2" 6828 | type: "ReLU" 6829 | bottom: "res_be6conv1_2_p2" 6830 | top: "res_be6conv1_2_p2" 6831 | } 6832 | layer { 6833 | name: "_be6dil_sum" 6834 | type: "Concat" 6835 | bottom: "res_be6conv1_2_p1" 6836 | bottom: "res_be6conv1_2_p2" 6837 | top: "_be6dil_sum" 6838 | } 6839 | layer { 6840 | name: "res_be6_branch2c" 6841 | type: "Convolution" 6842 | bottom: "_be6dil_sum" 6843 | top: "res_be6_branch2c" 6844 | param { 6845 | lr_mult: 1 6846 | decay_mult: 1 6847 | } 6848 | convolution_param { 6849 | num_output: 1024 6850 | bias_term: false 6851 | pad: 0 6852 | kernel_size: 1 6853 | stride: 1 6854 | weight_filler { 6855 | type: "xavier" 6856 | } 6857 | engine: CUDNN 6858 | } 6859 | } 6860 | layer { 6861 | name: "bn_be6_branch2c" 6862 | type: "BatchNorm" 6863 | bottom: "res_be6_branch2c" 6864 | top: "res_be6_branch2c" 6865 | param { 6866 | lr_mult: 0 6867 | } 6868 | param { 6869 | lr_mult: 0 6870 | } 6871 | param { 6872 | lr_mult: 0 6873 | } 6874 | batch_norm_param { 6875 | use_global_stats: true 6876 | } 6877 | } 6878 | layer { 6879 | name: "scale_be6_branch2c" 6880 | type: "Scale" 6881 | bottom: "res_be6_branch2c" 6882 | top: "res_be6_branch2c" 6883 | param { 6884 | lr_mult: 0 6885 | decay_mult: 0 6886 | } 6887 | param { 6888 | lr_mult: 0 6889 | decay_mult: 0 6890 | } 6891 | scale_param { 6892 | bias_term: true 6893 | } 6894 | } 6895 | layer { 6896 | name: "res_be6" 6897 | type: "Eltwise" 6898 | bottom: "res_be6_branch2c" 6899 | bottom: "res_be5" 6900 | top: "res_be6" 6901 | } 6902 | layer { 6903 | name: "res_be6_relu" 6904 | type: "ReLU" 6905 | bottom: "res_be6" 6906 | top: "res_be6" 6907 | } 6908 | layer { 6909 | name: "res_be7_branch2a" 6910 | type: "Convolution" 6911 | bottom: "res_be6" 6912 | top: "res_be7_branch2a" 6913 | param { 6914 | lr_mult: 1 6915 | decay_mult: 1 6916 | } 6917 | convolution_param { 6918 | num_output: 512 6919 | bias_term: false 6920 | pad: 0 6921 | kernel_size: 1 6922 | stride: 1 6923 | weight_filler { 6924 | type: "xavier" 6925 | } 6926 | engine: CUDNN 6927 | } 6928 | } 6929 | layer { 6930 | name: "bn_be7_branch2a" 6931 | type: "BatchNorm" 6932 | bottom: "res_be7_branch2a" 6933 | top: "res_be7_branch2a" 6934 | param { 6935 | lr_mult: 0 6936 | } 6937 | param { 6938 | lr_mult: 0 6939 | } 6940 | param { 6941 | lr_mult: 0 6942 | } 6943 | batch_norm_param { 6944 | use_global_stats: true 6945 | } 6946 | } 6947 | layer { 6948 | name: "scale_be7_branch2a" 6949 | type: "Scale" 6950 | bottom: "res_be7_branch2a" 6951 | top: "res_be7_branch2a" 6952 | param { 6953 | lr_mult: 0 6954 | decay_mult: 0 6955 | } 6956 | param { 6957 | lr_mult: 0 6958 | decay_mult: 0 6959 | } 6960 | scale_param { 6961 | bias_term: true 6962 | } 6963 | } 6964 | layer { 6965 | name: "res_be7_branch2a_relu" 6966 | type: "ReLU" 6967 | bottom: "res_be7_branch2a" 6968 | top: "res_be7_branch2a" 6969 | } 6970 | layer { 6971 | name: "res_be7conv1_2_p1" 6972 | type: "Convolution" 6973 | bottom: "res_be7_branch2a" 6974 | top: "res_be7conv1_2_p1" 6975 | param { 6976 | lr_mult: 1 6977 | decay_mult: 1 6978 | } 6979 | convolution_param { 6980 | num_output: 256 6981 | bias_term: false 6982 | pad: 4 6983 | kernel_size: 3 6984 | stride: 1 6985 | weight_filler { 6986 | type: "xavier" 6987 | } 6988 | engine: CAFFE 6989 | dilation: 4 6990 | } 6991 | } 6992 | layer { 6993 | name: "bn_be7_dil1" 6994 | type: "BatchNorm" 6995 | bottom: "res_be7conv1_2_p1" 6996 | top: "res_be7conv1_2_p1" 6997 | param { 6998 | lr_mult: 0 6999 | } 7000 | param { 7001 | lr_mult: 0 7002 | } 7003 | param { 7004 | lr_mult: 0 7005 | } 7006 | batch_norm_param { 7007 | use_global_stats: true 7008 | } 7009 | } 7010 | layer { 7011 | name: "scale_be7_dil1" 7012 | type: "Scale" 7013 | bottom: "res_be7conv1_2_p1" 7014 | top: "res_be7conv1_2_p1" 7015 | param { 7016 | lr_mult: 0 7017 | decay_mult: 0 7018 | } 7019 | param { 7020 | lr_mult: 0 7021 | decay_mult: 0 7022 | } 7023 | scale_param { 7024 | bias_term: true 7025 | } 7026 | } 7027 | layer { 7028 | name: "res_be7relu1_2" 7029 | type: "ReLU" 7030 | bottom: "res_be7conv1_2_p1" 7031 | top: "res_be7conv1_2_p1" 7032 | } 7033 | layer { 7034 | name: "res_be7conv1_2_p2" 7035 | type: "Convolution" 7036 | bottom: "res_be7_branch2a" 7037 | top: "res_be7conv1_2_p2" 7038 | param { 7039 | lr_mult: 1 7040 | decay_mult: 1 7041 | } 7042 | param { 7043 | lr_mult: 2 7044 | decay_mult: 0 7045 | } 7046 | convolution_param { 7047 | num_output: 256 7048 | pad: 16 7049 | kernel_size: 3 7050 | weight_filler { 7051 | type: "xavier" 7052 | } 7053 | engine: CAFFE 7054 | dilation: 16 7055 | } 7056 | } 7057 | layer { 7058 | name: "bn_be7_dil2" 7059 | type: "BatchNorm" 7060 | bottom: "res_be7conv1_2_p2" 7061 | top: "res_be7conv1_2_p2" 7062 | param { 7063 | lr_mult: 0 7064 | } 7065 | param { 7066 | lr_mult: 0 7067 | } 7068 | param { 7069 | lr_mult: 0 7070 | } 7071 | batch_norm_param { 7072 | use_global_stats: true 7073 | } 7074 | } 7075 | layer { 7076 | name: "scale_be7_dil2" 7077 | type: "Scale" 7078 | bottom: "res_be7conv1_2_p2" 7079 | top: "res_be7conv1_2_p2" 7080 | param { 7081 | lr_mult: 0 7082 | decay_mult: 0 7083 | } 7084 | param { 7085 | lr_mult: 0 7086 | decay_mult: 0 7087 | } 7088 | scale_param { 7089 | bias_term: true 7090 | } 7091 | } 7092 | layer { 7093 | name: "res_be7relu1_2_p2" 7094 | type: "ReLU" 7095 | bottom: "res_be7conv1_2_p2" 7096 | top: "res_be7conv1_2_p2" 7097 | } 7098 | layer { 7099 | name: "_be7dil_sum" 7100 | type: "Concat" 7101 | bottom: "res_be7conv1_2_p1" 7102 | bottom: "res_be7conv1_2_p2" 7103 | top: "_be7dil_sum" 7104 | } 7105 | layer { 7106 | name: "res_be7_branch2c" 7107 | type: "Convolution" 7108 | bottom: "_be7dil_sum" 7109 | top: "res_be7_branch2c" 7110 | param { 7111 | lr_mult: 1 7112 | decay_mult: 1 7113 | } 7114 | convolution_param { 7115 | num_output: 2048 7116 | bias_term: false 7117 | pad: 0 7118 | kernel_size: 1 7119 | stride: 1 7120 | weight_filler { 7121 | type: "xavier" 7122 | } 7123 | engine: CUDNN 7124 | } 7125 | } 7126 | layer { 7127 | name: "bn_be7_branch2c" 7128 | type: "BatchNorm" 7129 | bottom: "res_be7_branch2c" 7130 | top: "res_be7_branch2c" 7131 | param { 7132 | lr_mult: 0 7133 | } 7134 | param { 7135 | lr_mult: 0 7136 | } 7137 | param { 7138 | lr_mult: 0 7139 | } 7140 | batch_norm_param { 7141 | use_global_stats: true 7142 | } 7143 | } 7144 | layer { 7145 | name: "scale_be7_branch2c" 7146 | type: "Scale" 7147 | bottom: "res_be7_branch2c" 7148 | top: "res_be7_branch2c" 7149 | param { 7150 | lr_mult: 0 7151 | decay_mult: 0 7152 | } 7153 | param { 7154 | lr_mult: 0 7155 | decay_mult: 0 7156 | } 7157 | scale_param { 7158 | bias_term: true 7159 | } 7160 | } 7161 | layer { 7162 | name: "res_be7_branch1" 7163 | type: "Convolution" 7164 | bottom: "res_be6" 7165 | top: "res_be7_branch1" 7166 | param { 7167 | lr_mult: 0 7168 | decay_mult: 0 7169 | } 7170 | convolution_param { 7171 | num_output: 2048 7172 | bias_term: false 7173 | pad: 0 7174 | kernel_size: 1 7175 | stride: 1 7176 | weight_filler { 7177 | type: "xavier" 7178 | } 7179 | engine: CUDNN 7180 | } 7181 | } 7182 | layer { 7183 | name: "bn_be7_branch1" 7184 | type: "BatchNorm" 7185 | bottom: "res_be7_branch1" 7186 | top: "res_be7_branch1" 7187 | param { 7188 | lr_mult: 0 7189 | } 7190 | param { 7191 | lr_mult: 0 7192 | } 7193 | param { 7194 | lr_mult: 0 7195 | } 7196 | batch_norm_param { 7197 | use_global_stats: true 7198 | } 7199 | } 7200 | layer { 7201 | name: "scale_be7_branch1" 7202 | type: "Scale" 7203 | bottom: "res_be7_branch1" 7204 | top: "res_be7_branch1" 7205 | param { 7206 | lr_mult: 0 7207 | decay_mult: 0 7208 | } 7209 | param { 7210 | lr_mult: 0 7211 | decay_mult: 0 7212 | } 7213 | scale_param { 7214 | bias_term: true 7215 | } 7216 | } 7217 | layer { 7218 | name: "res_be7" 7219 | type: "Eltwise" 7220 | bottom: "res_be7_branch2c" 7221 | bottom: "res_be7_branch1" 7222 | top: "res_be7" 7223 | } 7224 | layer { 7225 | name: "res_be7_relu" 7226 | type: "ReLU" 7227 | bottom: "res_be7" 7228 | top: "res_be7" 7229 | } 7230 | layer { 7231 | name: "res_be8_branch2a" 7232 | type: "Convolution" 7233 | bottom: "res_be7" 7234 | top: "res_be8_branch2a" 7235 | param { 7236 | lr_mult: 1 7237 | decay_mult: 1 7238 | } 7239 | convolution_param { 7240 | num_output: 512 7241 | bias_term: false 7242 | pad: 0 7243 | kernel_size: 1 7244 | stride: 1 7245 | weight_filler { 7246 | type: "xavier" 7247 | } 7248 | engine: CUDNN 7249 | } 7250 | } 7251 | layer { 7252 | name: "bn_be8_branch2a" 7253 | type: "BatchNorm" 7254 | bottom: "res_be8_branch2a" 7255 | top: "res_be8_branch2a" 7256 | param { 7257 | lr_mult: 0 7258 | } 7259 | param { 7260 | lr_mult: 0 7261 | } 7262 | param { 7263 | lr_mult: 0 7264 | } 7265 | batch_norm_param { 7266 | use_global_stats: true 7267 | } 7268 | } 7269 | layer { 7270 | name: "scale_be8_branch2a" 7271 | type: "Scale" 7272 | bottom: "res_be8_branch2a" 7273 | top: "res_be8_branch2a" 7274 | param { 7275 | lr_mult: 0 7276 | decay_mult: 0 7277 | } 7278 | param { 7279 | lr_mult: 0 7280 | decay_mult: 0 7281 | } 7282 | scale_param { 7283 | bias_term: true 7284 | } 7285 | } 7286 | layer { 7287 | name: "res_be8_branch2a_relu" 7288 | type: "ReLU" 7289 | bottom: "res_be8_branch2a" 7290 | top: "res_be8_branch2a" 7291 | } 7292 | layer { 7293 | name: "res_be8conv1_2_p1" 7294 | type: "Convolution" 7295 | bottom: "res_be8_branch2a" 7296 | top: "res_be8conv1_2_p1" 7297 | param { 7298 | lr_mult: 1 7299 | decay_mult: 1 7300 | } 7301 | convolution_param { 7302 | num_output: 256 7303 | bias_term: false 7304 | pad: 4 7305 | kernel_size: 3 7306 | stride: 1 7307 | weight_filler { 7308 | type: "xavier" 7309 | } 7310 | engine: CAFFE 7311 | dilation: 4 7312 | } 7313 | } 7314 | layer { 7315 | name: "bn_be8_dil1" 7316 | type: "BatchNorm" 7317 | bottom: "res_be8conv1_2_p1" 7318 | top: "res_be8conv1_2_p1" 7319 | param { 7320 | lr_mult: 0 7321 | } 7322 | param { 7323 | lr_mult: 0 7324 | } 7325 | param { 7326 | lr_mult: 0 7327 | } 7328 | batch_norm_param { 7329 | use_global_stats: true 7330 | } 7331 | } 7332 | layer { 7333 | name: "scale_be8_dil1" 7334 | type: "Scale" 7335 | bottom: "res_be8conv1_2_p1" 7336 | top: "res_be8conv1_2_p1" 7337 | param { 7338 | lr_mult: 0 7339 | decay_mult: 0 7340 | } 7341 | param { 7342 | lr_mult: 0 7343 | decay_mult: 0 7344 | } 7345 | scale_param { 7346 | bias_term: true 7347 | } 7348 | } 7349 | layer { 7350 | name: "res_be8relu1_2" 7351 | type: "ReLU" 7352 | bottom: "res_be8conv1_2_p1" 7353 | top: "res_be8conv1_2_p1" 7354 | } 7355 | layer { 7356 | name: "res_be8conv1_2_p2" 7357 | type: "Convolution" 7358 | bottom: "res_be8_branch2a" 7359 | top: "res_be8conv1_2_p2" 7360 | param { 7361 | lr_mult: 1 7362 | decay_mult: 1 7363 | } 7364 | param { 7365 | lr_mult: 2 7366 | decay_mult: 0 7367 | } 7368 | convolution_param { 7369 | num_output: 256 7370 | pad: 16 7371 | kernel_size: 3 7372 | weight_filler { 7373 | type: "xavier" 7374 | } 7375 | engine: CAFFE 7376 | dilation: 16 7377 | } 7378 | } 7379 | layer { 7380 | name: "bn_be8_dil2" 7381 | type: "BatchNorm" 7382 | bottom: "res_be8conv1_2_p2" 7383 | top: "res_be8conv1_2_p2" 7384 | param { 7385 | lr_mult: 0 7386 | } 7387 | param { 7388 | lr_mult: 0 7389 | } 7390 | param { 7391 | lr_mult: 0 7392 | } 7393 | batch_norm_param { 7394 | use_global_stats: true 7395 | } 7396 | } 7397 | layer { 7398 | name: "scale_be8_dil2" 7399 | type: "Scale" 7400 | bottom: "res_be8conv1_2_p2" 7401 | top: "res_be8conv1_2_p2" 7402 | param { 7403 | lr_mult: 0 7404 | decay_mult: 0 7405 | } 7406 | param { 7407 | lr_mult: 0 7408 | decay_mult: 0 7409 | } 7410 | scale_param { 7411 | bias_term: true 7412 | } 7413 | } 7414 | layer { 7415 | name: "res_be8relu1_2_p2" 7416 | type: "ReLU" 7417 | bottom: "res_be8conv1_2_p2" 7418 | top: "res_be8conv1_2_p2" 7419 | } 7420 | layer { 7421 | name: "_be8dil_sum" 7422 | type: "Concat" 7423 | bottom: "res_be8conv1_2_p1" 7424 | bottom: "res_be8conv1_2_p2" 7425 | top: "_be8dil_sum" 7426 | } 7427 | layer { 7428 | name: "res_be8_branch2c" 7429 | type: "Convolution" 7430 | bottom: "_be8dil_sum" 7431 | top: "res_be8_branch2c" 7432 | param { 7433 | lr_mult: 1 7434 | decay_mult: 1 7435 | } 7436 | convolution_param { 7437 | num_output: 2048 7438 | bias_term: false 7439 | pad: 0 7440 | kernel_size: 1 7441 | stride: 1 7442 | weight_filler { 7443 | type: "xavier" 7444 | } 7445 | engine: CUDNN 7446 | } 7447 | } 7448 | layer { 7449 | name: "_be8dropout_2" 7450 | type: "Dropout" 7451 | bottom: "res_be8_branch2c" 7452 | top: "res_be8_branch2c" 7453 | dropout_param { 7454 | dropout_ratio: 0.4 7455 | } 7456 | } 7457 | layer { 7458 | name: "bn_be8_branch2c" 7459 | type: "BatchNorm" 7460 | bottom: "res_be8_branch2c" 7461 | top: "res_be8_branch2c" 7462 | param { 7463 | lr_mult: 0 7464 | } 7465 | param { 7466 | lr_mult: 0 7467 | } 7468 | param { 7469 | lr_mult: 0 7470 | } 7471 | batch_norm_param { 7472 | use_global_stats: true 7473 | } 7474 | } 7475 | layer { 7476 | name: "scale_be8_branch2c" 7477 | type: "Scale" 7478 | bottom: "res_be8_branch2c" 7479 | top: "res_be8_branch2c" 7480 | param { 7481 | lr_mult: 0 7482 | decay_mult: 0 7483 | } 7484 | param { 7485 | lr_mult: 0 7486 | decay_mult: 0 7487 | } 7488 | scale_param { 7489 | bias_term: true 7490 | } 7491 | } 7492 | layer { 7493 | name: "res_be8" 7494 | type: "Eltwise" 7495 | bottom: "res_be8_branch2c" 7496 | bottom: "res_be7" 7497 | top: "res_be8" 7498 | } 7499 | layer { 7500 | name: "res_be8_relu" 7501 | type: "ReLU" 7502 | bottom: "res_be8" 7503 | top: "res_be8" 7504 | } 7505 | layer { 7506 | name: "be_endconv" 7507 | type: "Convolution" 7508 | bottom: "res_be8" 7509 | top: "be_endconv" 7510 | param { 7511 | lr_mult: 1 7512 | decay_mult: 1 7513 | } 7514 | param { 7515 | lr_mult: 2 7516 | decay_mult: 0 7517 | } 7518 | convolution_param { 7519 | num_output: 4 7520 | pad: 0 7521 | kernel_size: 1 7522 | stride: 1 7523 | weight_filler { 7524 | type: "xavier" 7525 | } 7526 | engine: CUDNN 7527 | } 7528 | } 7529 | layer { 7530 | name: "bnbe_end_bn" 7531 | type: "BatchNorm" 7532 | bottom: "be_endconv" 7533 | top: "be_endconv" 7534 | param { 7535 | lr_mult: 0 7536 | } 7537 | param { 7538 | lr_mult: 0 7539 | } 7540 | param { 7541 | lr_mult: 0 7542 | } 7543 | batch_norm_param { 7544 | use_global_stats: true 7545 | } 7546 | } 7547 | layer { 7548 | name: "scalebe_end_bn" 7549 | type: "Scale" 7550 | bottom: "be_endconv" 7551 | top: "be_endconv" 7552 | param { 7553 | lr_mult: 0 7554 | decay_mult: 0 7555 | } 7556 | param { 7557 | lr_mult: 0 7558 | decay_mult: 0 7559 | } 7560 | scale_param { 7561 | bias_term: true 7562 | } 7563 | } 7564 | layer { 7565 | name: "out" 7566 | type: "Deconvolution" 7567 | bottom: "be_endconv" 7568 | top: "out" 7569 | param { 7570 | lr_mult: 1 7571 | decay_mult: 1 7572 | } 7573 | param { 7574 | lr_mult: 2 7575 | decay_mult: 0 7576 | } 7577 | convolution_param { 7578 | num_output: 4 7579 | pad: 8 7580 | kernel_size: 32 7581 | stride: 16 7582 | weight_filler { 7583 | type: "bilinear" 7584 | } 7585 | } 7586 | } 7587 | 7588 | --------------------------------------------------------------------------------