├── LICENSE.md ├── README.md ├── caffe_prototxt ├── AlexNetsolver.prototxt ├── AlexNettrain_val.prototxt ├── GoogleNetdeploy.prototxt ├── GoogleNetsolver.prototxt └── GoogleNettrain_val.prototxt ├── classification ├── LeNet_test.m ├── classification_demo.m ├── lsy_AlexNet_slide.m ├── lsy_caffe_classification.m └── lsy_slide.m ├── cmake ├── ConfigGen.cmake ├── Cuda.cmake ├── Dependencies.cmake ├── External │ ├── gflags.cmake │ └── glog.cmake ├── Misc.cmake ├── Modules │ ├── FindAtlas.cmake │ ├── FindGFlags.cmake │ ├── FindGlog.cmake │ ├── FindLAPACK.cmake │ ├── FindLMDB.cmake │ ├── FindLevelDB.cmake │ ├── FindMKL.cmake │ ├── FindMatlabMex.cmake │ ├── FindNCCL.cmake │ ├── FindNumPy.cmake │ ├── FindOpenBLAS.cmake │ ├── FindSnappy.cmake │ └── FindvecLib.cmake ├── ProtoBuf.cmake ├── Summary.cmake ├── Targets.cmake ├── Templates │ ├── CaffeConfig.cmake.in │ ├── CaffeConfigVersion.cmake.in │ └── caffe_config.h.in ├── Uninstall.cmake.in ├── Utils.cmake └── lint.cmake ├── data_sample ├── train │ ├── crack │ │ ├── 01.jpg │ │ ├── 01_07_43.jpg │ │ ├── 01_07_73.jpg │ │ ├── 01_07_77.jpg │ │ ├── 01_08_25.jpg │ │ ├── 01_08_67.jpg │ │ ├── 01_11_33.jpg │ │ ├── 01_14_18.jpg │ │ ├── 01_15_03.jpg │ │ ├── 01_17_15.jpg │ │ ├── 01_19_04.jpg │ │ ├── 01_19_15.jpg │ │ ├── 01_24_16.jpg │ │ ├── 02.jpg │ │ ├── 02_03_30.jpg │ │ ├── 02_03_40.jpg │ │ ├── 02_10_10.jpg │ │ ├── 02_11_49.jpg │ │ ├── 02_11_59.jpg │ │ ├── 02_15_46.jpg │ │ ├── 02_16_40.jpg │ │ ├── 02_17_24.jpg │ │ ├── 02_19_08.jpg │ │ ├── 02_19_15.jpg │ │ ├── 02_19_36.jpg │ │ ├── 03.jpg │ │ ├── 03_07_67.jpg │ │ ├── 03_07_74.jpg │ │ ├── 03_11_74.jpg │ │ ├── 03_12_31.jpg │ │ ├── 03_12_70.jpg │ │ ├── 04.jpg │ │ ├── 05.jpg │ │ ├── 06.jpg │ │ ├── 07.jpg │ │ ├── 1.jpg │ │ ├── 2.jpg │ │ ├── 3.jpg │ │ ├── 4.jpg │ │ ├── 5.jpg │ │ └── 6.jpg │ ├── efflorescence │ │ ├── 02_19_42.jpg │ │ ├── 02_22_15.jpg │ │ ├── 03_07_51.jpg │ │ ├── 03_07_66.jpg │ │ ├── 03_07_70.jpg │ │ ├── 03_09_22.jpg │ │ ├── 03_09_41.jpg │ │ ├── 03_10_01.jpg │ │ ├── 03_10_07.jpg │ │ ├── 03_10_23.jpg │ │ ├── 03_10_27.jpg │ │ ├── 03_10_30.jpg │ │ ├── 03_10_34.jpg │ │ └── 03_10_36.jpg │ ├── intact │ │ ├── 01_02_24.jpg │ │ ├── 01_02_34.jpg │ │ ├── 01_02_47.jpg │ │ ├── 01_02_59.jpg │ │ ├── 01_02_64.jpg │ │ ├── 01_06_05.jpg │ │ ├── 01_06_08.jpg │ │ ├── 01_06_17.jpg │ │ ├── 01_06_19.jpg │ │ ├── 01_06_23.jpg │ │ ├── 01_06_36.jpg │ │ ├── 01_06_42.jpg │ │ ├── 01_06_50.jpg │ │ ├── 01_06_52.jpg │ │ ├── 01_08_54.jpg │ │ ├── 10.jpg │ │ ├── 11.jpg │ │ ├── 12.jpg │ │ ├── 13.jpg │ │ ├── 14.jpg │ │ ├── 15.jpg │ │ ├── 16.jpg │ │ ├── 17.jpg │ │ ├── 18.jpg │ │ ├── 19.jpg │ │ ├── 20.jpg │ │ ├── 21.jpg │ │ ├── 22.jpg │ │ ├── 23.jpg │ │ ├── 24.jpg │ │ ├── 25.jpg │ │ ├── 26.jpg │ │ ├── 27.jpg │ │ ├── 28.jpg │ │ ├── 29.jpg │ │ ├── 30.jpg │ │ ├── 31.jpg │ │ ├── 32.jpg │ │ ├── 7.jpg │ │ ├── 8.jpg │ │ └── 9.jpg │ └── spalling │ │ ├── 01_02_04.jpg │ │ ├── 01_06_35.jpg │ │ ├── 01_06_37.jpg │ │ ├── 01_06_64.jpg │ │ ├── 01_08_06.jpg │ │ ├── 01_08_15.jpg │ │ ├── 01_08_26.jpg │ │ ├── 01_08_34.jpg │ │ ├── 01_08_38.jpg │ │ ├── 01_08_39.jpg │ │ ├── 02_07_03.jpg │ │ ├── 02_07_08.jpg │ │ ├── 02_07_14.jpg │ │ └── 02_07_25.jpg └── val │ ├── crack │ ├── 01.jpg │ ├── 01_07_73.jpg │ ├── 01_07_77.jpg │ ├── 01_08_25.jpg │ └── 01_08_67.jpg │ ├── efflorescence │ ├── 01_07_03.jpg │ ├── 01_07_08.jpg │ ├── 01_07_50.jpg │ ├── 01_10_45.jpg │ └── 01_11_08.jpg │ ├── intact │ ├── 01_06_29.jpg │ ├── 01_06_30.jpg │ ├── 01_06_32.jpg │ ├── 01_06_53.jpg │ └── 01_06_57.jpg │ └── spalling │ ├── 01_02_05.jpg │ ├── 01_02_12.jpg │ ├── 01_02_19.jpg │ ├── 01_02_21.jpg │ └── 01_02_35.jpg ├── docker ├── README.md ├── cpu │ └── Dockerfile └── gpu │ └── Dockerfile ├── docs ├── CMakeLists.txt ├── CNAME ├── README.md ├── _config.yml ├── _layouts │ └── default.html ├── development.md ├── images │ ├── GitHub-Mark-64px.png │ └── caffeine-icon.png ├── index.md ├── install_apt.md ├── install_apt_debian.md ├── install_osx.md ├── install_yum.md ├── installation.md ├── model_zoo.md ├── multigpu.md ├── stylesheets │ ├── pygment_trac.css │ ├── reset.css │ └── styles.css └── tutorial │ ├── convolution.md │ ├── data.md │ ├── fig │ ├── .gitignore │ ├── backward.jpg │ ├── forward.jpg │ ├── forward_backward.png │ ├── layer.jpg │ └── logreg.jpg │ ├── forward_backward.md │ ├── index.md │ ├── interfaces.md │ ├── layers.md │ ├── layers │ ├── absval.md │ ├── accuracy.md │ ├── argmax.md │ ├── batchnorm.md │ ├── batchreindex.md │ ├── bias.md │ ├── bnll.md │ ├── concat.md │ ├── contrastiveloss.md │ ├── convolution.md │ ├── crop.md │ ├── data.md │ ├── deconvolution.md │ ├── dropout.md │ ├── dummydata.md │ ├── eltwise.md │ ├── elu.md │ ├── embed.md │ ├── euclideanloss.md │ ├── exp.md │ ├── filter.md │ ├── flatten.md │ ├── hdf5data.md │ ├── hdf5output.md │ ├── hingeloss.md │ ├── im2col.md │ ├── imagedata.md │ ├── infogainloss.md │ ├── innerproduct.md │ ├── input.md │ ├── log.md │ ├── lrn.md │ ├── lstm.md │ ├── memorydata.md │ ├── multinomiallogisticloss.md │ ├── mvn.md │ ├── parameter.md │ ├── pooling.md │ ├── power.md │ ├── prelu.md │ ├── python.md │ ├── recurrent.md │ ├── reduction.md │ ├── relu.md │ ├── reshape.md │ ├── rnn.md │ ├── scale.md │ ├── sigmoid.md │ ├── sigmoidcrossentropyloss.md │ ├── silence.md │ ├── slice.md │ ├── softmax.md │ ├── softmaxwithloss.md │ ├── split.md │ ├── spp.md │ ├── tanh.md │ ├── threshold.md │ ├── tile.md │ └── windowdata.md │ ├── loss.md │ ├── net_layer_blob.md │ └── solver.md ├── faster-rcnn_data ├── script_fast_rcnn_VOC2007_ZF.m ├── test1 │ ├── faster-rcnn_ap_result.fig │ ├── faster-rcnn_ap_result_edited.fig │ ├── log.txt │ ├── original │ │ ├── 01.jpg │ │ ├── 02.jpg │ │ ├── 03.jpg │ │ ├── 04.jpg │ │ └── 05.jpg │ └── result │ │ ├── 1.fig │ │ ├── 2.fig │ │ ├── 3.fig │ │ ├── 4.fig │ │ └── 5.fig ├── test2 │ ├── log.txt │ ├── original │ │ ├── 01.jpg │ │ ├── 02.jpg │ │ ├── 03.jpg │ │ ├── 04.jpg │ │ ├── 05.jpg │ │ ├── 06.jpg │ │ ├── 07.jpg │ │ ├── 08.jpg │ │ └── 09.jpg │ └── result │ │ ├── 1.fig │ │ ├── 2.fig │ │ ├── 3.fig │ │ ├── 4.fig │ │ ├── 5.fig │ │ ├── 6.fig │ │ ├── 7.fig │ │ ├── 8.fig │ │ └── 9.fig ├── test3 │ ├── log.txt │ ├── original │ │ ├── 01.jpg │ │ ├── 02.jpg │ │ ├── 03.jpg │ │ ├── 04.jpg │ │ ├── 05.jpg │ │ ├── 06.jpg │ │ ├── 07.jpg │ │ ├── 08.jpg │ │ └── 09.jpg │ └── result │ │ ├── 1.fig │ │ ├── 2.fig │ │ ├── 3.fig │ │ ├── 4.fig │ │ ├── 5.fig │ │ ├── 6.fig │ │ ├── 7.fig │ │ ├── 8.fig │ │ └── 9.fig └── test_frcn_mobile │ ├── IMG_7204.JPG │ ├── IMG_7205.JPG │ ├── IMG_7206.JPG │ ├── IMG_7207.JPG │ ├── test1.fig │ ├── test2.fig │ ├── test3.fig │ └── test4.fig ├── faster-rcnn_preparation ├── data_set_tools │ ├── VOC2007xml │ │ ├── VOC2007xml.m │ │ ├── begin │ │ └── myxml.asv │ └── lbimg_ver2 │ │ ├── LabelPicture.exe │ │ ├── labelimg_ver1_api.dll │ │ └── manual.docx ├── imagesetbuilder.m └── rename.m ├── markdown_figures ├── fig1.png ├── fig10a.png ├── fig10b.png ├── fig10c.png ├── fig2.png ├── fig3.png ├── fig4a.png ├── fig4b.png ├── fig4c.png ├── fig4d.png ├── fig5.png ├── fig6a.png ├── fig6b.png ├── fig7a.png ├── fig7b.png ├── fig8.png └── fig9.png ├── matlab ├── +caffe │ ├── +test │ │ ├── test_io.m │ │ ├── test_net.m │ │ └── test_solver.m │ ├── Blob.m │ ├── Layer.m │ ├── Net.m │ ├── Solver.m │ ├── get_net.m │ ├── get_solver.m │ ├── imagenet │ │ └── ilsvrc_2012_mean.mat │ ├── io.m │ ├── private │ │ ├── CHECK.m │ │ ├── CHECK_FILE_EXIST.m │ │ ├── caffe_.cpp │ │ └── is_valid_handle.m │ ├── reset_all.m │ ├── run_tests.m │ ├── set_device.m │ ├── set_mode_cpu.m │ ├── set_mode_gpu.m │ └── version.m ├── CMakeLists.txt ├── demo │ └── classification_demo.m └── hdf5creation │ ├── .gitignore │ ├── demo.m │ └── store2hdf5.m ├── python ├── CMakeLists.txt ├── caffe │ ├── __init__.py │ ├── _caffe.cpp │ ├── classifier.py │ ├── coord_map.py │ ├── detector.py │ ├── draw.py │ ├── imagenet │ │ └── ilsvrc_2012_mean.npy │ ├── io.py │ ├── net_spec.py │ ├── pycaffe.py │ └── test │ │ ├── test_coord_map.py │ │ ├── test_draw.py │ │ ├── test_io.py │ │ ├── test_layer_type_list.py │ │ ├── test_nccl.py │ │ ├── test_net.py │ │ ├── test_net_spec.py │ │ ├── test_python_layer.py │ │ ├── test_python_layer_with_param_str.py │ │ └── test_solver.py ├── classify.py ├── detect.py ├── draw_net.py ├── pycaffe.py ├── requirements.txt └── train.py ├── results ├── 0418_Alex_4_76 │ ├── LR.pdf │ ├── accuracy.pdf │ ├── loss.pdf │ ├── solver.prototxt │ └── train_val.prototxt ├── 0419_Alex+_4_83 │ ├── LR.pdf │ ├── accuracy.pdf │ ├── loss.pdf │ ├── solver.prototxt │ └── train_val.prototxt ├── 0424_GoogLe+_4_91 │ ├── LR.pdf │ ├── accuracy.pdf │ ├── loss.pdf │ ├── solver.prototxt │ └── train_val.prototxt ├── 0427_GoogLe_4_77 │ ├── LR.pdf │ ├── accuracy.pdf │ ├── loss.pdf │ ├── solver.prototxt │ └── train_val.prototxt ├── 0428_Alex_2_94 │ ├── LR.pdf │ ├── accuracy.pdf │ ├── loss.pdf │ ├── solver.prototxt │ ├── train_label.m │ └── train_val.prototxt ├── 0429_Alex_2_96 │ ├── LR.pdf │ ├── accuracy.pdf │ ├── loss.pdf │ ├── solver.prototxt │ └── train_val.prototxt ├── raw image.jpg ├── result1.png └── result2.png ├── scripts ├── build_docs.sh ├── caffe ├── copy_notebook.py ├── cpp_lint.py ├── deploy_docs.sh ├── download_model_binary.py ├── download_model_from_gist.sh ├── gather_examples.sh ├── split_caffe_proto.py ├── travis │ ├── build.sh │ ├── configure-cmake.sh │ ├── configure-make.sh │ ├── configure.sh │ ├── defaults.sh │ ├── install-deps.sh │ ├── install-python-deps.sh │ ├── setup-venv.sh │ └── test.sh └── upload_model_to_gist.sh ├── sliding_code ├── z_slide.m ├── z_varslide.m └── zyp_slide.m └── tools ├── extract_seconds.py ├── launch_resize_and_crop_images.sh ├── parse_log.py ├── parse_log.sh ├── plot_log.gnuplot.example ├── plot_training_log.py.example ├── resize_and_crop_images.py └── summarize.py /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Qingan Zhao 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /caffe_prototxt/AlexNetsolver.prototxt: -------------------------------------------------------------------------------- 1 | net: "D:/caffe-master/project/20180316/train_val.prototxt" 2 | test_iter: 72 3 | test_interval: 500 4 | base_lr: 0.001 5 | lr_policy: "step" 6 | gamma: 0.1 7 | stepsize: 5000 8 | display: 20 9 | max_iter: 100000 10 | momentum: 0.9 11 | weight_decay: 0.0005 12 | snapshot: 5000 13 | snapshot_prefix: "D:/caffe-master/project/20180316" 14 | solver_mode: GPU 15 | -------------------------------------------------------------------------------- /caffe_prototxt/GoogleNetsolver.prototxt: -------------------------------------------------------------------------------- 1 | net: "D:/caffe-master/project/20180318/train_val.prototxt" 2 | test_iter: 52 3 | test_interval: 200 4 | test_initialization: true 5 | display: 40 6 | average_loss: 40 7 | base_lr: 0.001 8 | lr_policy: "step" 9 | stepsize: 2500 10 | gamma: 0.96 11 | max_iter: 100000 12 | momentum: 0.9 13 | weight_decay: 0.0002 14 | snapshot: 5000 15 | snapshot_prefix: "D:/caffe-master/project/20180318" 16 | solver_mode: GPU 17 | -------------------------------------------------------------------------------- /classification/LeNet_test.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/classification/LeNet_test.m -------------------------------------------------------------------------------- /classification/lsy_AlexNet_slide.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/classification/lsy_AlexNet_slide.m -------------------------------------------------------------------------------- /classification/lsy_caffe_classification.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/classification/lsy_caffe_classification.m -------------------------------------------------------------------------------- /classification/lsy_slide.m: -------------------------------------------------------------------------------- 1 | function [ out_image ] = lsy_slide( image, rows, cols, step_r, step_c) 2 | 3 | out_image = zeros(size(image,1),size(image,2),3); 4 | out_image = im2uint8(out_image); 5 | out_image(:,:,:)=255; 6 | 7 | for i =1:step_r:(size(image,1)-rows+1) 8 | for j=1:step_c:(size(image,2)-cols+1) 9 | im=image(i:i+rows-1, j:j+cols-1,:); 10 | imshow(im); 11 | [~, maxlabel] = lsy_caffe_classification(im,1); 12 | switch maxlabel 13 | case 1 14 | out_image(i:i+rows-1,j:j+cols-1,:)=im; 15 | end 16 | end 17 | end -------------------------------------------------------------------------------- /cmake/Misc.cmake: -------------------------------------------------------------------------------- 1 | # ---[ Configuration types 2 | set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Possible configurations" FORCE) 3 | mark_as_advanced(CMAKE_CONFIGURATION_TYPES) 4 | 5 | if(DEFINED CMAKE_BUILD_TYPE) 6 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES}) 7 | endif() 8 | 9 | # --[ If user doesn't specify build type then assume release 10 | if("${CMAKE_BUILD_TYPE}" STREQUAL "") 11 | set(CMAKE_BUILD_TYPE Release) 12 | endif() 13 | 14 | if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") 15 | set(CMAKE_COMPILER_IS_CLANGXX TRUE) 16 | endif() 17 | 18 | # ---[ Solution folders 19 | caffe_option(USE_PROJECT_FOLDERS "IDE Solution folders" (MSVC_IDE OR CMAKE_GENERATOR MATCHES Xcode) ) 20 | 21 | if(USE_PROJECT_FOLDERS) 22 | set_property(GLOBAL PROPERTY USE_FOLDERS ON) 23 | set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets") 24 | endif() 25 | 26 | # ---[ Install options 27 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 28 | set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/install" CACHE PATH "Default install path" FORCE) 29 | endif() 30 | 31 | # ---[ RPATH settings 32 | set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOLEAN "Use link paths for shared library rpath") 33 | set(CMAKE_MACOSX_RPATH TRUE) 34 | 35 | list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES ${CMAKE_INSTALL_PREFIX}/lib __is_systtem_dir) 36 | if(${__is_systtem_dir} STREQUAL -1) 37 | set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib) 38 | endif() 39 | 40 | # ---[ Funny target 41 | if(UNIX OR APPLE) 42 | add_custom_target(symlink_to_build COMMAND "ln" "-sf" "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/build" 43 | COMMENT "Adding symlink: /build -> ${PROJECT_BINARY_DIR}" ) 44 | endif() 45 | 46 | # ---[ Set debug postfix 47 | set(Caffe_DEBUG_POSTFIX "-d") 48 | 49 | set(Caffe_POSTFIX "") 50 | if(CMAKE_BUILD_TYPE MATCHES "Debug") 51 | set(Caffe_POSTFIX ${Caffe_DEBUG_POSTFIX}) 52 | endif() 53 | -------------------------------------------------------------------------------- /cmake/Modules/FindAtlas.cmake: -------------------------------------------------------------------------------- 1 | # Find the Atlas (and Lapack) libraries 2 | # 3 | # The following variables are optionally searched for defaults 4 | # Atlas_ROOT_DIR: Base directory where all Atlas components are found 5 | # 6 | # The following are set after configuration is done: 7 | # Atlas_FOUND 8 | # Atlas_INCLUDE_DIRS 9 | # Atlas_LIBRARIES 10 | # Atlas_LIBRARYRARY_DIRS 11 | 12 | set(Atlas_INCLUDE_SEARCH_PATHS 13 | /usr/include/atlas 14 | /usr/include/atlas-base 15 | $ENV{Atlas_ROOT_DIR} 16 | $ENV{Atlas_ROOT_DIR}/include 17 | ) 18 | 19 | set(Atlas_LIB_SEARCH_PATHS 20 | /usr/lib/atlas 21 | /usr/lib/atlas-base 22 | $ENV{Atlas_ROOT_DIR} 23 | $ENV{Atlas_ROOT_DIR}/lib 24 | ) 25 | 26 | find_path(Atlas_CBLAS_INCLUDE_DIR NAMES cblas.h PATHS ${Atlas_INCLUDE_SEARCH_PATHS}) 27 | find_path(Atlas_CLAPACK_INCLUDE_DIR NAMES clapack.h PATHS ${Atlas_INCLUDE_SEARCH_PATHS}) 28 | 29 | find_library(Atlas_CBLAS_LIBRARY NAMES ptcblas_r ptcblas cblas_r cblas PATHS ${Atlas_LIB_SEARCH_PATHS}) 30 | find_library(Atlas_BLAS_LIBRARY NAMES atlas_r atlas PATHS ${Atlas_LIB_SEARCH_PATHS}) 31 | find_library(Atlas_LAPACK_LIBRARY NAMES lapack alapack_r alapack lapack_atlas atllapack PATHS ${Atlas_LIB_SEARCH_PATHS}) 32 | 33 | set(LOOKED_FOR 34 | Atlas_CBLAS_INCLUDE_DIR 35 | Atlas_CLAPACK_INCLUDE_DIR 36 | 37 | Atlas_CBLAS_LIBRARY 38 | Atlas_BLAS_LIBRARY 39 | Atlas_LAPACK_LIBRARY 40 | ) 41 | 42 | include(FindPackageHandleStandardArgs) 43 | find_package_handle_standard_args(Atlas DEFAULT_MSG ${LOOKED_FOR}) 44 | 45 | if(ATLAS_FOUND) 46 | set(Atlas_INCLUDE_DIR ${Atlas_CBLAS_INCLUDE_DIR} ${Atlas_CLAPACK_INCLUDE_DIR}) 47 | set(Atlas_LIBRARIES ${Atlas_LAPACK_LIBRARY} ${Atlas_CBLAS_LIBRARY} ${Atlas_BLAS_LIBRARY}) 48 | mark_as_advanced(${LOOKED_FOR}) 49 | 50 | message(STATUS "Found Atlas (include: ${Atlas_CBLAS_INCLUDE_DIR} library: ${Atlas_BLAS_LIBRARY} lapack: ${Atlas_LAPACK_LIBRARY}") 51 | endif(ATLAS_FOUND) 52 | 53 | -------------------------------------------------------------------------------- /cmake/Modules/FindGFlags.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find GFLAGS 2 | # 3 | # The following variables are optionally searched for defaults 4 | # GFLAGS_ROOT_DIR: Base directory where all GFLAGS components are found 5 | # 6 | # The following are set after configuration is done: 7 | # GFLAGS_FOUND 8 | # GFLAGS_INCLUDE_DIRS 9 | # GFLAGS_LIBRARIES 10 | # GFLAGS_LIBRARYRARY_DIRS 11 | 12 | include(FindPackageHandleStandardArgs) 13 | 14 | set(GFLAGS_ROOT_DIR "" CACHE PATH "Folder contains Gflags") 15 | 16 | # We are testing only a couple of files in the include directories 17 | if(WIN32) 18 | find_path(GFLAGS_INCLUDE_DIR gflags/gflags.h 19 | PATHS ${GFLAGS_ROOT_DIR}/src/windows) 20 | else() 21 | find_path(GFLAGS_INCLUDE_DIR gflags/gflags.h 22 | PATHS ${GFLAGS_ROOT_DIR}) 23 | endif() 24 | 25 | if(MSVC) 26 | find_library(GFLAGS_LIBRARY_RELEASE 27 | NAMES libgflags 28 | PATHS ${GFLAGS_ROOT_DIR} 29 | PATH_SUFFIXES Release) 30 | 31 | find_library(GFLAGS_LIBRARY_DEBUG 32 | NAMES libgflags-debug 33 | PATHS ${GFLAGS_ROOT_DIR} 34 | PATH_SUFFIXES Debug) 35 | 36 | set(GFLAGS_LIBRARY optimized ${GFLAGS_LIBRARY_RELEASE} debug ${GFLAGS_LIBRARY_DEBUG}) 37 | else() 38 | find_library(GFLAGS_LIBRARY gflags) 39 | endif() 40 | 41 | find_package_handle_standard_args(GFlags DEFAULT_MSG GFLAGS_INCLUDE_DIR GFLAGS_LIBRARY) 42 | 43 | 44 | if(GFLAGS_FOUND) 45 | set(GFLAGS_INCLUDE_DIRS ${GFLAGS_INCLUDE_DIR}) 46 | set(GFLAGS_LIBRARIES ${GFLAGS_LIBRARY}) 47 | message(STATUS "Found gflags (include: ${GFLAGS_INCLUDE_DIR}, library: ${GFLAGS_LIBRARY})") 48 | mark_as_advanced(GFLAGS_LIBRARY_DEBUG GFLAGS_LIBRARY_RELEASE 49 | GFLAGS_LIBRARY GFLAGS_INCLUDE_DIR GFLAGS_ROOT_DIR) 50 | endif() 51 | -------------------------------------------------------------------------------- /cmake/Modules/FindGlog.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find Glog 2 | # 3 | # The following variables are optionally searched for defaults 4 | # GLOG_ROOT_DIR: Base directory where all GLOG components are found 5 | # 6 | # The following are set after configuration is done: 7 | # GLOG_FOUND 8 | # GLOG_INCLUDE_DIRS 9 | # GLOG_LIBRARIES 10 | # GLOG_LIBRARYRARY_DIRS 11 | 12 | include(FindPackageHandleStandardArgs) 13 | 14 | set(GLOG_ROOT_DIR "" CACHE PATH "Folder contains Google glog") 15 | 16 | if(WIN32) 17 | find_path(GLOG_INCLUDE_DIR glog/logging.h 18 | PATHS ${GLOG_ROOT_DIR}/src/windows) 19 | else() 20 | find_path(GLOG_INCLUDE_DIR glog/logging.h 21 | PATHS ${GLOG_ROOT_DIR}) 22 | endif() 23 | 24 | if(MSVC) 25 | find_library(GLOG_LIBRARY_RELEASE libglog_static 26 | PATHS ${GLOG_ROOT_DIR} 27 | PATH_SUFFIXES Release) 28 | 29 | find_library(GLOG_LIBRARY_DEBUG libglog_static 30 | PATHS ${GLOG_ROOT_DIR} 31 | PATH_SUFFIXES Debug) 32 | 33 | set(GLOG_LIBRARY optimized ${GLOG_LIBRARY_RELEASE} debug ${GLOG_LIBRARY_DEBUG}) 34 | else() 35 | find_library(GLOG_LIBRARY glog 36 | PATHS ${GLOG_ROOT_DIR} 37 | PATH_SUFFIXES lib lib64) 38 | endif() 39 | 40 | find_package_handle_standard_args(Glog DEFAULT_MSG GLOG_INCLUDE_DIR GLOG_LIBRARY) 41 | 42 | if(GLOG_FOUND) 43 | set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR}) 44 | set(GLOG_LIBRARIES ${GLOG_LIBRARY}) 45 | message(STATUS "Found glog (include: ${GLOG_INCLUDE_DIR}, library: ${GLOG_LIBRARY})") 46 | mark_as_advanced(GLOG_ROOT_DIR GLOG_LIBRARY_RELEASE GLOG_LIBRARY_DEBUG 47 | GLOG_LIBRARY GLOG_INCLUDE_DIR) 48 | endif() 49 | -------------------------------------------------------------------------------- /cmake/Modules/FindLMDB.cmake: -------------------------------------------------------------------------------- 1 | # Try to find the LMBD libraries and headers 2 | # LMDB_FOUND - system has LMDB lib 3 | # LMDB_INCLUDE_DIR - the LMDB include directory 4 | # LMDB_LIBRARIES - Libraries needed to use LMDB 5 | 6 | # FindCWD based on FindGMP by: 7 | # Copyright (c) 2006, Laurent Montel, 8 | # 9 | # Redistribution and use is allowed according to the terms of the BSD license. 10 | 11 | # Adapted from FindCWD by: 12 | # Copyright 2013 Conrad Steenberg 13 | # Aug 31, 2013 14 | 15 | find_path(LMDB_INCLUDE_DIR NAMES lmdb.h PATHS "$ENV{LMDB_DIR}/include") 16 | find_library(LMDB_LIBRARIES NAMES lmdb PATHS "$ENV{LMDB_DIR}/lib" ) 17 | 18 | include(FindPackageHandleStandardArgs) 19 | find_package_handle_standard_args(LMDB DEFAULT_MSG LMDB_INCLUDE_DIR LMDB_LIBRARIES) 20 | 21 | if(LMDB_FOUND) 22 | message(STATUS "Found lmdb (include: ${LMDB_INCLUDE_DIR}, library: ${LMDB_LIBRARIES})") 23 | mark_as_advanced(LMDB_INCLUDE_DIR LMDB_LIBRARIES) 24 | 25 | caffe_parse_header(${LMDB_INCLUDE_DIR}/lmdb.h 26 | LMDB_VERSION_LINES MDB_VERSION_MAJOR MDB_VERSION_MINOR MDB_VERSION_PATCH) 27 | set(LMDB_VERSION "${MDB_VERSION_MAJOR}.${MDB_VERSION_MINOR}.${MDB_VERSION_PATCH}") 28 | endif() 29 | -------------------------------------------------------------------------------- /cmake/Modules/FindLevelDB.cmake: -------------------------------------------------------------------------------- 1 | # - Find LevelDB 2 | # 3 | # LevelDB_INCLUDES - List of LevelDB includes 4 | # LevelDB_LIBRARIES - List of libraries when using LevelDB. 5 | # LevelDB_FOUND - True if LevelDB found. 6 | 7 | # Look for the header file. 8 | find_path(LevelDB_INCLUDE NAMES leveldb/db.h 9 | PATHS $ENV{LEVELDB_ROOT}/include /opt/local/include /usr/local/include /usr/include 10 | DOC "Path in which the file leveldb/db.h is located." ) 11 | 12 | # Look for the library. 13 | find_library(LevelDB_LIBRARY NAMES leveldb 14 | PATHS /usr/lib $ENV{LEVELDB_ROOT}/lib 15 | DOC "Path to leveldb library." ) 16 | 17 | include(FindPackageHandleStandardArgs) 18 | find_package_handle_standard_args(LevelDB DEFAULT_MSG LevelDB_INCLUDE LevelDB_LIBRARY) 19 | 20 | if(LEVELDB_FOUND) 21 | message(STATUS "Found LevelDB (include: ${LevelDB_INCLUDE}, library: ${LevelDB_LIBRARY})") 22 | set(LevelDB_INCLUDES ${LevelDB_INCLUDE}) 23 | set(LevelDB_LIBRARIES ${LevelDB_LIBRARY}) 24 | mark_as_advanced(LevelDB_INCLUDE LevelDB_LIBRARY) 25 | 26 | if(EXISTS "${LevelDB_INCLUDE}/leveldb/db.h") 27 | file(STRINGS "${LevelDB_INCLUDE}/leveldb/db.h" __version_lines 28 | REGEX "static const int k[^V]+Version[ \t]+=[ \t]+[0-9]+;") 29 | 30 | foreach(__line ${__version_lines}) 31 | if(__line MATCHES "[^k]+kMajorVersion[ \t]+=[ \t]+([0-9]+);") 32 | set(LEVELDB_VERSION_MAJOR ${CMAKE_MATCH_1}) 33 | elseif(__line MATCHES "[^k]+kMinorVersion[ \t]+=[ \t]+([0-9]+);") 34 | set(LEVELDB_VERSION_MINOR ${CMAKE_MATCH_1}) 35 | endif() 36 | endforeach() 37 | 38 | if(LEVELDB_VERSION_MAJOR AND LEVELDB_VERSION_MINOR) 39 | set(LEVELDB_VERSION "${LEVELDB_VERSION_MAJOR}.${LEVELDB_VERSION_MINOR}") 40 | endif() 41 | 42 | caffe_clear_vars(__line __version_lines) 43 | endif() 44 | endif() 45 | -------------------------------------------------------------------------------- /cmake/Modules/FindMatlabMex.cmake: -------------------------------------------------------------------------------- 1 | # This module looks for MatlabMex compiler 2 | # Defines variables: 3 | # Matlab_DIR - Matlab root dir 4 | # Matlab_mex - path to mex compiler 5 | # Matlab_mexext - path to mexext 6 | 7 | if(MSVC) 8 | foreach(__ver "9.30" "7.14" "7.11" "7.10" "7.9" "7.8" "7.7") 9 | get_filename_component(__matlab_root "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\${__ver};MATLABROOT]" ABSOLUTE) 10 | if(__matlab_root) 11 | break() 12 | endif() 13 | endforeach() 14 | endif() 15 | 16 | if(APPLE) 17 | foreach(__ver "R2014b" "R2014a" "R2013b" "R2013a" "R2012b" "R2012a" "R2011b" "R2011a" "R2010b" "R2010a") 18 | if(EXISTS /Applications/MATLAB_${__ver}.app) 19 | set(__matlab_root /Applications/MATLAB_${__ver}.app) 20 | break() 21 | endif() 22 | endforeach() 23 | endif() 24 | 25 | if(UNIX) 26 | execute_process(COMMAND which matlab OUTPUT_STRIP_TRAILING_WHITESPACE 27 | OUTPUT_VARIABLE __out RESULT_VARIABLE __res) 28 | 29 | if(__res MATCHES 0) # Suppress `readlink` warning if `which` returned nothing 30 | execute_process(COMMAND which matlab COMMAND xargs readlink 31 | COMMAND xargs dirname COMMAND xargs dirname COMMAND xargs echo -n 32 | OUTPUT_VARIABLE __matlab_root OUTPUT_STRIP_TRAILING_WHITESPACE) 33 | endif() 34 | endif() 35 | 36 | 37 | find_path(Matlab_DIR NAMES bin/mex bin/mexext PATHS ${__matlab_root} 38 | DOC "Matlab directory" NO_DEFAULT_PATH) 39 | 40 | find_program(Matlab_mex NAMES mex mex.bat HINTS ${Matlab_DIR} PATH_SUFFIXES bin NO_DEFAULT_PATH) 41 | find_program(Matlab_mexext NAMES mexext mexext.bat HINTS ${Matlab_DIR} PATH_SUFFIXES bin NO_DEFAULT_PATH) 42 | 43 | include(FindPackageHandleStandardArgs) 44 | find_package_handle_standard_args(MatlabMex DEFAULT_MSG Matlab_mex Matlab_mexext) 45 | 46 | if(MATLABMEX_FOUND) 47 | mark_as_advanced(Matlab_mex Matlab_mexext) 48 | endif() 49 | -------------------------------------------------------------------------------- /cmake/Modules/FindNCCL.cmake: -------------------------------------------------------------------------------- 1 | set(NCCL_INC_PATHS 2 | /usr/include 3 | /usr/local/include 4 | $ENV{NCCL_DIR}/include 5 | ) 6 | 7 | set(NCCL_LIB_PATHS 8 | /lib 9 | /lib64 10 | /usr/lib 11 | /usr/lib64 12 | /usr/local/lib 13 | /usr/local/lib64 14 | $ENV{NCCL_DIR}/lib 15 | ) 16 | 17 | find_path(NCCL_INCLUDE_DIR NAMES nccl.h PATHS ${NCCL_INC_PATHS}) 18 | find_library(NCCL_LIBRARIES NAMES nccl PATHS ${NCCL_LIB_PATHS}) 19 | 20 | include(FindPackageHandleStandardArgs) 21 | find_package_handle_standard_args(NCCL DEFAULT_MSG NCCL_INCLUDE_DIR NCCL_LIBRARIES) 22 | 23 | if (NCCL_FOUND) 24 | message(STATUS "Found NCCL (include: ${NCCL_INCLUDE_DIR}, library: ${NCCL_LIBRARIES})") 25 | mark_as_advanced(NCCL_INCLUDE_DIR NCCL_LIBRARIES) 26 | endif () 27 | -------------------------------------------------------------------------------- /cmake/Modules/FindOpenBLAS.cmake: -------------------------------------------------------------------------------- 1 | 2 | 3 | SET(Open_BLAS_INCLUDE_SEARCH_PATHS 4 | /usr/include 5 | /usr/include/openblas 6 | /usr/include/openblas-base 7 | /usr/local/include 8 | /usr/local/include/openblas 9 | /usr/local/include/openblas-base 10 | /opt/OpenBLAS/include 11 | $ENV{OpenBLAS_HOME} 12 | $ENV{OpenBLAS_HOME}/include 13 | ) 14 | 15 | SET(Open_BLAS_LIB_SEARCH_PATHS 16 | /lib/ 17 | /lib/openblas-base 18 | /lib64/ 19 | /usr/lib 20 | /usr/lib/openblas-base 21 | /usr/lib64 22 | /usr/local/lib 23 | /usr/local/lib64 24 | /opt/OpenBLAS/lib 25 | $ENV{OpenBLAS}cd 26 | $ENV{OpenBLAS}/lib 27 | $ENV{OpenBLAS_HOME} 28 | $ENV{OpenBLAS_HOME}/lib 29 | ) 30 | 31 | FIND_PATH(OpenBLAS_INCLUDE_DIR NAMES cblas.h PATHS ${Open_BLAS_INCLUDE_SEARCH_PATHS}) 32 | FIND_LIBRARY(OpenBLAS_LIB NAMES openblas PATHS ${Open_BLAS_LIB_SEARCH_PATHS}) 33 | 34 | SET(OpenBLAS_FOUND ON) 35 | 36 | # Check include files 37 | IF(NOT OpenBLAS_INCLUDE_DIR) 38 | SET(OpenBLAS_FOUND OFF) 39 | MESSAGE(STATUS "Could not find OpenBLAS include. Turning OpenBLAS_FOUND off") 40 | ENDIF() 41 | 42 | # Check libraries 43 | IF(NOT OpenBLAS_LIB) 44 | SET(OpenBLAS_FOUND OFF) 45 | MESSAGE(STATUS "Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off") 46 | ENDIF() 47 | 48 | IF (OpenBLAS_FOUND) 49 | IF (NOT OpenBLAS_FIND_QUIETLY) 50 | MESSAGE(STATUS "Found OpenBLAS libraries: ${OpenBLAS_LIB}") 51 | MESSAGE(STATUS "Found OpenBLAS include: ${OpenBLAS_INCLUDE_DIR}") 52 | ENDIF (NOT OpenBLAS_FIND_QUIETLY) 53 | ELSE (OpenBLAS_FOUND) 54 | IF (OpenBLAS_FIND_REQUIRED) 55 | MESSAGE(FATAL_ERROR "Could not find OpenBLAS") 56 | ENDIF (OpenBLAS_FIND_REQUIRED) 57 | ENDIF (OpenBLAS_FOUND) 58 | 59 | MARK_AS_ADVANCED( 60 | OpenBLAS_INCLUDE_DIR 61 | OpenBLAS_LIB 62 | OpenBLAS 63 | ) 64 | 65 | -------------------------------------------------------------------------------- /cmake/Modules/FindSnappy.cmake: -------------------------------------------------------------------------------- 1 | # Find the Snappy libraries 2 | # 3 | # The following variables are optionally searched for defaults 4 | # Snappy_ROOT_DIR: Base directory where all Snappy components are found 5 | # 6 | # The following are set after configuration is done: 7 | # SNAPPY_FOUND 8 | # Snappy_INCLUDE_DIR 9 | # Snappy_LIBRARIES 10 | 11 | find_path(Snappy_INCLUDE_DIR NAMES snappy.h 12 | PATHS ${SNAPPY_ROOT_DIR} ${SNAPPY_ROOT_DIR}/include) 13 | 14 | find_library(Snappy_LIBRARIES NAMES snappy 15 | PATHS ${SNAPPY_ROOT_DIR} ${SNAPPY_ROOT_DIR}/lib) 16 | 17 | include(FindPackageHandleStandardArgs) 18 | find_package_handle_standard_args(Snappy DEFAULT_MSG Snappy_INCLUDE_DIR Snappy_LIBRARIES) 19 | 20 | if(SNAPPY_FOUND) 21 | message(STATUS "Found Snappy (include: ${Snappy_INCLUDE_DIR}, library: ${Snappy_LIBRARIES})") 22 | mark_as_advanced(Snappy_INCLUDE_DIR Snappy_LIBRARIES) 23 | 24 | caffe_parse_header(${Snappy_INCLUDE_DIR}/snappy-stubs-public.h 25 | SNAPPY_VERION_LINES SNAPPY_MAJOR SNAPPY_MINOR SNAPPY_PATCHLEVEL) 26 | set(Snappy_VERSION "${SNAPPY_MAJOR}.${SNAPPY_MINOR}.${SNAPPY_PATCHLEVEL}") 27 | endif() 28 | 29 | -------------------------------------------------------------------------------- /cmake/Modules/FindvecLib.cmake: -------------------------------------------------------------------------------- 1 | # Find the vecLib libraries as part of Accelerate.framework or as standalon framework 2 | # 3 | # The following are set after configuration is done: 4 | # VECLIB_FOUND 5 | # vecLib_INCLUDE_DIR 6 | # vecLib_LINKER_LIBS 7 | 8 | 9 | if(NOT APPLE) 10 | return() 11 | endif() 12 | 13 | set(__veclib_include_suffix "Frameworks/vecLib.framework/Versions/Current/Headers") 14 | 15 | exec_program(xcode-select ARGS -print-path OUTPUT_VARIABLE CMAKE_XCODE_DEVELOPER_DIR) 16 | find_path(vecLib_INCLUDE_DIR vecLib.h 17 | DOC "vecLib include directory" 18 | PATHS /System/Library/Frameworks/Accelerate.framework/Versions/Current/${__veclib_include_suffix} 19 | /System/Library/${__veclib_include_suffix} 20 | ${CMAKE_XCODE_DEVELOPER_DIR}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/ 21 | NO_DEFAULT_PATH) 22 | 23 | include(FindPackageHandleStandardArgs) 24 | find_package_handle_standard_args(vecLib DEFAULT_MSG vecLib_INCLUDE_DIR) 25 | 26 | if(VECLIB_FOUND) 27 | if(vecLib_INCLUDE_DIR MATCHES "^/System/Library/Frameworks/vecLib.framework.*") 28 | set(vecLib_LINKER_LIBS -lcblas "-framework vecLib") 29 | message(STATUS "Found standalone vecLib.framework") 30 | else() 31 | set(vecLib_LINKER_LIBS -lcblas "-framework Accelerate") 32 | message(STATUS "Found vecLib as part of Accelerate.framework") 33 | endif() 34 | 35 | mark_as_advanced(vecLib_INCLUDE_DIR) 36 | endif() 37 | -------------------------------------------------------------------------------- /cmake/Templates/CaffeConfigVersion.cmake.in: -------------------------------------------------------------------------------- 1 | set(PACKAGE_VERSION "@Caffe_VERSION@") 2 | 3 | # Check whether the requested PACKAGE_FIND_VERSION is compatible 4 | if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") 5 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 6 | else() 7 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 8 | if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") 9 | set(PACKAGE_VERSION_EXACT TRUE) 10 | endif() 11 | endif() 12 | -------------------------------------------------------------------------------- /cmake/Templates/caffe_config.h.in: -------------------------------------------------------------------------------- 1 | /* Sources directory */ 2 | #define SOURCE_FOLDER "${PROJECT_SOURCE_DIR}" 3 | 4 | /* Binaries directory */ 5 | #define BINARY_FOLDER "${PROJECT_BINARY_DIR}" 6 | 7 | /* This is an absolute path so that we can run test from any build 8 | * directory */ 9 | #define ABS_TEST_DATA_DIR "${PROJECT_SOURCE_DIR}/src/caffe/test/test_data/" 10 | 11 | /* Test device */ 12 | #define CUDA_TEST_DEVICE ${CUDA_TEST_DEVICE} 13 | -------------------------------------------------------------------------------- /cmake/Uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 2 | message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 3 | endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 4 | 5 | if (NOT DEFINED CMAKE_INSTALL_PREFIX) 6 | set (CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@") 7 | endif () 8 | message(${CMAKE_INSTALL_PREFIX}) 9 | 10 | file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) 11 | string(REGEX REPLACE "\n" ";" files "${files}") 12 | foreach(file ${files}) 13 | message(STATUS "Uninstalling $ENV{DESTDIR}${file}") 14 | if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 15 | exec_program( 16 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 17 | OUTPUT_VARIABLE rm_out 18 | RETURN_VALUE rm_retval 19 | ) 20 | if(NOT "${rm_retval}" STREQUAL 0) 21 | message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") 22 | endif(NOT "${rm_retval}" STREQUAL 0) 23 | else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 24 | message(STATUS "File $ENV{DESTDIR}${file} does not exist.") 25 | endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 26 | endforeach(file) -------------------------------------------------------------------------------- /cmake/lint.cmake: -------------------------------------------------------------------------------- 1 | 2 | set(CMAKE_SOURCE_DIR ..) 3 | set(LINT_COMMAND ${CMAKE_SOURCE_DIR}/scripts/cpp_lint.py) 4 | set(SRC_FILE_EXTENSIONS h hpp hu c cpp cu cc) 5 | set(EXCLUDE_FILE_EXTENSTIONS pb.h pb.cc) 6 | set(LINT_DIRS include src/caffe examples tools python matlab) 7 | 8 | cmake_policy(SET CMP0009 NEW) # suppress cmake warning 9 | 10 | # find all files of interest 11 | foreach(ext ${SRC_FILE_EXTENSIONS}) 12 | foreach(dir ${LINT_DIRS}) 13 | file(GLOB_RECURSE FOUND_FILES ${CMAKE_SOURCE_DIR}/${dir}/*.${ext}) 14 | set(LINT_SOURCES ${LINT_SOURCES} ${FOUND_FILES}) 15 | endforeach() 16 | endforeach() 17 | 18 | # find all files that should be excluded 19 | foreach(ext ${EXCLUDE_FILE_EXTENSTIONS}) 20 | file(GLOB_RECURSE FOUND_FILES ${CMAKE_SOURCE_DIR}/*.${ext}) 21 | set(EXCLUDED_FILES ${EXCLUDED_FILES} ${FOUND_FILES}) 22 | endforeach() 23 | 24 | # exclude generated pb files 25 | list(REMOVE_ITEM LINT_SOURCES ${EXCLUDED_FILES}) 26 | 27 | execute_process( 28 | COMMAND ${LINT_COMMAND} ${LINT_SOURCES} 29 | ERROR_VARIABLE LINT_OUTPUT 30 | ERROR_STRIP_TRAILING_WHITESPACE 31 | ) 32 | 33 | string(REPLACE "\n" ";" LINT_OUTPUT ${LINT_OUTPUT}) 34 | 35 | list(GET LINT_OUTPUT -1 LINT_RESULT) 36 | list(REMOVE_AT LINT_OUTPUT -1) 37 | string(REPLACE " " ";" LINT_RESULT ${LINT_RESULT}) 38 | list(GET LINT_RESULT -1 NUM_ERRORS) 39 | if(NUM_ERRORS GREATER 0) 40 | foreach(msg ${LINT_OUTPUT}) 41 | string(FIND ${msg} "Done" result) 42 | if(result LESS 0) 43 | message(STATUS ${msg}) 44 | endif() 45 | endforeach() 46 | message(FATAL_ERROR "Lint found ${NUM_ERRORS} errors!") 47 | else() 48 | message(STATUS "Lint did not find any errors!") 49 | endif() 50 | 51 | -------------------------------------------------------------------------------- /data_sample/train/crack/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/01.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/01_07_43.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/01_07_43.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/01_07_73.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/01_07_73.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/01_07_77.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/01_07_77.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/01_08_25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/01_08_25.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/01_08_67.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/01_08_67.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/01_11_33.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/01_11_33.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/01_14_18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/01_14_18.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/01_15_03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/01_15_03.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/01_17_15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/01_17_15.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/01_19_04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/01_19_04.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/01_19_15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/01_19_15.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/01_24_16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/01_24_16.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/02.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/02_03_30.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/02_03_30.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/02_03_40.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/02_03_40.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/02_10_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/02_10_10.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/02_11_49.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/02_11_49.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/02_11_59.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/02_11_59.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/02_15_46.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/02_15_46.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/02_16_40.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/02_16_40.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/02_17_24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/02_17_24.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/02_19_08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/02_19_08.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/02_19_15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/02_19_15.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/02_19_36.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/02_19_36.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/03.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/03_07_67.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/03_07_67.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/03_07_74.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/03_07_74.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/03_11_74.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/03_11_74.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/03_12_31.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/03_12_31.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/03_12_70.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/03_12_70.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/04.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/05.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/06.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/07.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/1.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/2.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/3.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/4.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/5.jpg -------------------------------------------------------------------------------- /data_sample/train/crack/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/crack/6.jpg -------------------------------------------------------------------------------- /data_sample/train/efflorescence/02_19_42.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/efflorescence/02_19_42.jpg -------------------------------------------------------------------------------- /data_sample/train/efflorescence/02_22_15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/efflorescence/02_22_15.jpg -------------------------------------------------------------------------------- /data_sample/train/efflorescence/03_07_51.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/efflorescence/03_07_51.jpg -------------------------------------------------------------------------------- /data_sample/train/efflorescence/03_07_66.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/efflorescence/03_07_66.jpg -------------------------------------------------------------------------------- /data_sample/train/efflorescence/03_07_70.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/efflorescence/03_07_70.jpg -------------------------------------------------------------------------------- /data_sample/train/efflorescence/03_09_22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/efflorescence/03_09_22.jpg -------------------------------------------------------------------------------- /data_sample/train/efflorescence/03_09_41.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/efflorescence/03_09_41.jpg -------------------------------------------------------------------------------- /data_sample/train/efflorescence/03_10_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/efflorescence/03_10_01.jpg -------------------------------------------------------------------------------- /data_sample/train/efflorescence/03_10_07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/efflorescence/03_10_07.jpg -------------------------------------------------------------------------------- /data_sample/train/efflorescence/03_10_23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/efflorescence/03_10_23.jpg -------------------------------------------------------------------------------- /data_sample/train/efflorescence/03_10_27.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/efflorescence/03_10_27.jpg -------------------------------------------------------------------------------- /data_sample/train/efflorescence/03_10_30.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/efflorescence/03_10_30.jpg -------------------------------------------------------------------------------- /data_sample/train/efflorescence/03_10_34.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/efflorescence/03_10_34.jpg -------------------------------------------------------------------------------- /data_sample/train/efflorescence/03_10_36.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/efflorescence/03_10_36.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/01_02_24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/01_02_24.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/01_02_34.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/01_02_34.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/01_02_47.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/01_02_47.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/01_02_59.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/01_02_59.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/01_02_64.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/01_02_64.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/01_06_05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/01_06_05.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/01_06_08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/01_06_08.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/01_06_17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/01_06_17.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/01_06_19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/01_06_19.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/01_06_23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/01_06_23.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/01_06_36.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/01_06_36.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/01_06_42.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/01_06_42.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/01_06_50.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/01_06_50.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/01_06_52.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/01_06_52.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/01_08_54.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/01_08_54.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/10.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/11.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/12.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/13.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/14.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/15.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/16.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/17.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/18.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/19.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/20.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/21.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/22.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/23.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/24.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/25.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/26.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/26.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/27.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/27.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/28.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/28.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/29.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/29.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/30.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/30.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/31.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/31.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/32.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/32.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/7.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/8.jpg -------------------------------------------------------------------------------- /data_sample/train/intact/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/intact/9.jpg -------------------------------------------------------------------------------- /data_sample/train/spalling/01_02_04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/spalling/01_02_04.jpg -------------------------------------------------------------------------------- /data_sample/train/spalling/01_06_35.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/spalling/01_06_35.jpg -------------------------------------------------------------------------------- /data_sample/train/spalling/01_06_37.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/spalling/01_06_37.jpg -------------------------------------------------------------------------------- /data_sample/train/spalling/01_06_64.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/spalling/01_06_64.jpg -------------------------------------------------------------------------------- /data_sample/train/spalling/01_08_06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/spalling/01_08_06.jpg -------------------------------------------------------------------------------- /data_sample/train/spalling/01_08_15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/spalling/01_08_15.jpg -------------------------------------------------------------------------------- /data_sample/train/spalling/01_08_26.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/spalling/01_08_26.jpg -------------------------------------------------------------------------------- /data_sample/train/spalling/01_08_34.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/spalling/01_08_34.jpg -------------------------------------------------------------------------------- /data_sample/train/spalling/01_08_38.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/spalling/01_08_38.jpg -------------------------------------------------------------------------------- /data_sample/train/spalling/01_08_39.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/spalling/01_08_39.jpg -------------------------------------------------------------------------------- /data_sample/train/spalling/02_07_03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/spalling/02_07_03.jpg -------------------------------------------------------------------------------- /data_sample/train/spalling/02_07_08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/spalling/02_07_08.jpg -------------------------------------------------------------------------------- /data_sample/train/spalling/02_07_14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/spalling/02_07_14.jpg -------------------------------------------------------------------------------- /data_sample/train/spalling/02_07_25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/train/spalling/02_07_25.jpg -------------------------------------------------------------------------------- /data_sample/val/crack/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/crack/01.jpg -------------------------------------------------------------------------------- /data_sample/val/crack/01_07_73.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/crack/01_07_73.jpg -------------------------------------------------------------------------------- /data_sample/val/crack/01_07_77.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/crack/01_07_77.jpg -------------------------------------------------------------------------------- /data_sample/val/crack/01_08_25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/crack/01_08_25.jpg -------------------------------------------------------------------------------- /data_sample/val/crack/01_08_67.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/crack/01_08_67.jpg -------------------------------------------------------------------------------- /data_sample/val/efflorescence/01_07_03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/efflorescence/01_07_03.jpg -------------------------------------------------------------------------------- /data_sample/val/efflorescence/01_07_08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/efflorescence/01_07_08.jpg -------------------------------------------------------------------------------- /data_sample/val/efflorescence/01_07_50.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/efflorescence/01_07_50.jpg -------------------------------------------------------------------------------- /data_sample/val/efflorescence/01_10_45.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/efflorescence/01_10_45.jpg -------------------------------------------------------------------------------- /data_sample/val/efflorescence/01_11_08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/efflorescence/01_11_08.jpg -------------------------------------------------------------------------------- /data_sample/val/intact/01_06_29.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/intact/01_06_29.jpg -------------------------------------------------------------------------------- /data_sample/val/intact/01_06_30.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/intact/01_06_30.jpg -------------------------------------------------------------------------------- /data_sample/val/intact/01_06_32.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/intact/01_06_32.jpg -------------------------------------------------------------------------------- /data_sample/val/intact/01_06_53.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/intact/01_06_53.jpg -------------------------------------------------------------------------------- /data_sample/val/intact/01_06_57.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/intact/01_06_57.jpg -------------------------------------------------------------------------------- /data_sample/val/spalling/01_02_05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/spalling/01_02_05.jpg -------------------------------------------------------------------------------- /data_sample/val/spalling/01_02_12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/spalling/01_02_12.jpg -------------------------------------------------------------------------------- /data_sample/val/spalling/01_02_19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/spalling/01_02_19.jpg -------------------------------------------------------------------------------- /data_sample/val/spalling/01_02_21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/spalling/01_02_21.jpg -------------------------------------------------------------------------------- /data_sample/val/spalling/01_02_35.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/data_sample/val/spalling/01_02_35.jpg -------------------------------------------------------------------------------- /docker/README.md: -------------------------------------------------------------------------------- 1 | ### Running an official image 2 | 3 | You can run one of the automatic [builds](https://hub.docker.com/r/bvlc/caffe). E.g. for the CPU version: 4 | 5 | `docker run -ti bvlc/caffe:cpu caffe --version` 6 | 7 | or for GPU support (You need a CUDA 8.0 capable driver and 8 | [nvidia-docker](https://github.com/NVIDIA/nvidia-docker)): 9 | 10 | `nvidia-docker run -ti bvlc/caffe:gpu caffe --version` 11 | 12 | You might see an error about libdc1394, ignore it. 13 | 14 | ### Docker run options 15 | 16 | By default caffe runs as root, thus any output files, e.g. snapshots, will be owned 17 | by root. It also runs by default in a container-private folder. 18 | 19 | You can change this using flags, like user (-u), current directory, and volumes (-w and -v). 20 | E.g. this behaves like the usual caffe executable: 21 | 22 | `docker run --rm -u $(id -u):$(id -g) -v $(pwd):$(pwd) -w $(pwd) bvlc/caffe:cpu caffe train --solver=example_solver.prototxt` 23 | 24 | Containers can also be used interactively, specifying e.g. `bash` or `ipython` 25 | instead of `caffe`. 26 | 27 | ``` 28 | docker run -ti bvlc/caffe:cpu ipython 29 | import caffe 30 | ... 31 | ``` 32 | 33 | The caffe build requirements are included in the container, so this can be used to 34 | build and run custom versions of caffe. Also, `caffe/python` is in PATH, so python 35 | utilities can be used directly, e.g. `draw_net.py`, `classify.py`, or `detect.py`. 36 | 37 | ### Building images yourself 38 | 39 | Examples: 40 | 41 | `docker build -t caffe:cpu cpu` 42 | 43 | `docker build -t caffe:gpu gpu` 44 | 45 | You can also build Caffe and run the tests in the image: 46 | 47 | `docker run -ti caffe:cpu bash -c "cd /opt/caffe/build; make runtest"` 48 | -------------------------------------------------------------------------------- /docker/cpu/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | LABEL maintainer caffe-maint@googlegroups.com 3 | 4 | RUN apt-get update && apt-get install -y --no-install-recommends \ 5 | build-essential \ 6 | cmake \ 7 | git \ 8 | wget \ 9 | libatlas-base-dev \ 10 | libboost-all-dev \ 11 | libgflags-dev \ 12 | libgoogle-glog-dev \ 13 | libhdf5-serial-dev \ 14 | libleveldb-dev \ 15 | liblmdb-dev \ 16 | libopencv-dev \ 17 | libprotobuf-dev \ 18 | libsnappy-dev \ 19 | protobuf-compiler \ 20 | python-dev \ 21 | python-numpy \ 22 | python-pip \ 23 | python-setuptools \ 24 | python-scipy && \ 25 | rm -rf /var/lib/apt/lists/* 26 | 27 | ENV CAFFE_ROOT=/opt/caffe 28 | WORKDIR $CAFFE_ROOT 29 | 30 | # FIXME: use ARG instead of ENV once DockerHub supports this 31 | # https://github.com/docker/hub-feedback/issues/460 32 | ENV CLONE_TAG=1.0 33 | 34 | RUN git clone -b ${CLONE_TAG} --depth 1 https://github.com/BVLC/caffe.git . && \ 35 | pip install --upgrade pip && \ 36 | cd python && for req in $(cat requirements.txt) pydot; do pip install $req; done && cd .. && \ 37 | mkdir build && cd build && \ 38 | cmake -DCPU_ONLY=1 .. && \ 39 | make -j"$(nproc)" 40 | 41 | ENV PYCAFFE_ROOT $CAFFE_ROOT/python 42 | ENV PYTHONPATH $PYCAFFE_ROOT:$PYTHONPATH 43 | ENV PATH $CAFFE_ROOT/build/tools:$PYCAFFE_ROOT:$PATH 44 | RUN echo "$CAFFE_ROOT/build/lib" >> /etc/ld.so.conf.d/caffe.conf && ldconfig 45 | 46 | WORKDIR /workspace 47 | -------------------------------------------------------------------------------- /docker/gpu/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nvidia/cuda:8.0-cudnn6-devel-ubuntu16.04 2 | LABEL maintainer caffe-maint@googlegroups.com 3 | 4 | RUN apt-get update && apt-get install -y --no-install-recommends \ 5 | build-essential \ 6 | cmake \ 7 | git \ 8 | wget \ 9 | libatlas-base-dev \ 10 | libboost-all-dev \ 11 | libgflags-dev \ 12 | libgoogle-glog-dev \ 13 | libhdf5-serial-dev \ 14 | libleveldb-dev \ 15 | liblmdb-dev \ 16 | libopencv-dev \ 17 | libprotobuf-dev \ 18 | libsnappy-dev \ 19 | protobuf-compiler \ 20 | python-dev \ 21 | python-numpy \ 22 | python-pip \ 23 | python-setuptools \ 24 | python-scipy && \ 25 | rm -rf /var/lib/apt/lists/* 26 | 27 | ENV CAFFE_ROOT=/opt/caffe 28 | WORKDIR $CAFFE_ROOT 29 | 30 | # FIXME: use ARG instead of ENV once DockerHub supports this 31 | # https://github.com/docker/hub-feedback/issues/460 32 | ENV CLONE_TAG=1.0 33 | 34 | RUN git clone -b ${CLONE_TAG} --depth 1 https://github.com/BVLC/caffe.git . && \ 35 | pip install --upgrade pip && \ 36 | cd python && for req in $(cat requirements.txt) pydot; do pip install $req; done && cd .. && \ 37 | git clone https://github.com/NVIDIA/nccl.git && cd nccl && make -j install && cd .. && rm -rf nccl && \ 38 | mkdir build && cd build && \ 39 | cmake -DUSE_CUDNN=1 -DUSE_NCCL=1 .. && \ 40 | make -j"$(nproc)" 41 | 42 | ENV PYCAFFE_ROOT $CAFFE_ROOT/python 43 | ENV PYTHONPATH $PYCAFFE_ROOT:$PYTHONPATH 44 | ENV PATH $CAFFE_ROOT/build/tools:$PYCAFFE_ROOT:$PATH 45 | RUN echo "$CAFFE_ROOT/build/lib" >> /etc/ld.so.conf.d/caffe.conf && ldconfig 46 | 47 | WORKDIR /workspace 48 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | caffe.berkeleyvision.org 2 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Caffe Documentation 2 | 3 | To generate the documentation, run `$CAFFE_ROOT/scripts/build_docs.sh`. 4 | 5 | To push your changes to the documentation to the gh-pages branch of your or the BVLC repo, run `$CAFFE_ROOT/scripts/deploy_docs.sh `. 6 | -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - 3 | scope: 4 | path: "" # an empty string here means all files in the project 5 | values: 6 | layout: "default" 7 | 8 | -------------------------------------------------------------------------------- /docs/images/GitHub-Mark-64px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/docs/images/GitHub-Mark-64px.png -------------------------------------------------------------------------------- /docs/images/caffeine-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/docs/images/caffeine-icon.png -------------------------------------------------------------------------------- /docs/install_yum.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Installation: RHEL / Fedora / CentOS" 3 | --- 4 | 5 | # RHEL / Fedora / CentOS Installation 6 | 7 | **General dependencies** 8 | 9 | sudo yum install protobuf-devel leveldb-devel snappy-devel opencv-devel boost-devel hdf5-devel 10 | 11 | **Remaining dependencies, recent OS** 12 | 13 | sudo yum install gflags-devel glog-devel lmdb-devel 14 | 15 | **Remaining dependencies, if not found** 16 | 17 | # glog 18 | wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/google-glog/glog-0.3.3.tar.gz 19 | tar zxvf glog-0.3.3.tar.gz 20 | cd glog-0.3.3 21 | ./configure 22 | make && make install 23 | # gflags 24 | wget https://github.com/schuhschuh/gflags/archive/master.zip 25 | unzip master.zip 26 | cd gflags-master 27 | mkdir build && cd build 28 | export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1 29 | make && make install 30 | # lmdb 31 | git clone https://github.com/LMDB/lmdb 32 | cd lmdb/libraries/liblmdb 33 | make && make install 34 | 35 | Note that glog does not compile with the most recent gflags version (2.1), so before that is resolved you will need to build with glog first. 36 | 37 | **CUDA**: Install via the NVIDIA package instead of `yum` to be certain of the library and driver versions. 38 | Install the library and latest driver separately; the driver bundled with the library is usually out-of-date. 39 | + CentOS/RHEL/Fedora: 40 | 41 | **BLAS**: install ATLAS by `sudo yum install atlas-devel` or install OpenBLAS or MKL for better CPU performance. For the Makefile build, uncomment and set `BLAS_LIB` accordingly as ATLAS is usually installed under `/usr/lib[64]/atlas`). 42 | 43 | **Python** (optional): if you use the default Python you will need to `sudo yum install` the `python-devel` package to have the Python headers for building the pycaffe wrapper. 44 | 45 | Continue with [compilation](installation.html#compilation). 46 | -------------------------------------------------------------------------------- /docs/stylesheets/reset.css: -------------------------------------------------------------------------------- 1 | /* MeyerWeb Reset */ 2 | 3 | html, body, div, span, applet, object, iframe, 4 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 5 | a, abbr, acronym, address, big, cite, code, 6 | del, dfn, em, img, ins, kbd, q, s, samp, 7 | small, strike, strong, sub, sup, tt, var, 8 | b, u, i, center, 9 | dl, dt, dd, ol, ul, li, 10 | fieldset, form, label, legend, 11 | table, caption, tbody, tfoot, thead, tr, th, td, 12 | article, aside, canvas, details, embed, 13 | figure, figcaption, footer, header, hgroup, 14 | menu, nav, output, ruby, section, summary, 15 | time, mark, audio, video { 16 | margin: 0; 17 | padding: 0; 18 | border: 0; 19 | font: inherit; 20 | vertical-align: baseline; 21 | } 22 | -------------------------------------------------------------------------------- /docs/tutorial/convolution.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Convolution 3 | --- 4 | # Caffeinated Convolution 5 | 6 | The Caffe strategy for convolution is to reduce the problem to matrix-matrix multiplication. 7 | This linear algebra computation is highly-tuned in BLAS libraries and efficiently computed on GPU devices. 8 | 9 | For more details read Yangqing's [Convolution in Caffe: a memo](https://github.com/Yangqing/caffe/wiki/Convolution-in-Caffe:-a-memo). 10 | 11 | As it turns out, this same reduction was independently explored in the context of conv. nets by 12 | 13 | > K. Chellapilla, S. Puri, P. Simard, et al. High performance convolutional neural networks for document processing. In Tenth International Workshop on Frontiers in Handwriting Recognition, 2006. 14 | -------------------------------------------------------------------------------- /docs/tutorial/fig/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/docs/tutorial/fig/.gitignore -------------------------------------------------------------------------------- /docs/tutorial/fig/backward.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/docs/tutorial/fig/backward.jpg -------------------------------------------------------------------------------- /docs/tutorial/fig/forward.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/docs/tutorial/fig/forward.jpg -------------------------------------------------------------------------------- /docs/tutorial/fig/forward_backward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/docs/tutorial/fig/forward_backward.png -------------------------------------------------------------------------------- /docs/tutorial/fig/layer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/docs/tutorial/fig/layer.jpg -------------------------------------------------------------------------------- /docs/tutorial/fig/logreg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/docs/tutorial/fig/logreg.jpg -------------------------------------------------------------------------------- /docs/tutorial/layers/absval.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Absolute Value Layer 3 | --- 4 | 5 | # Absolute Value Layer 6 | 7 | * Layer type: `AbsVal` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1AbsValLayer.html) 9 | * Header: [`./include/caffe/layers/absval_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/absval_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/absval_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/absval_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/absval_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/absval_layer.cu) 12 | 13 | * Sample 14 | 15 | layer { 16 | name: "layer" 17 | bottom: "in" 18 | top: "out" 19 | type: "AbsVal" 20 | } 21 | 22 | The `AbsVal` layer computes the output as abs(x) for each input element x. 23 | -------------------------------------------------------------------------------- /docs/tutorial/layers/accuracy.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Accuracy and Top-k 3 | --- 4 | 5 | # Accuracy and Top-k 6 | 7 | `Accuracy` scores the output as the accuracy of output with respect to target -- it is not actually a loss and has no backward step. 8 | 9 | * Layer type: `Accuracy` 10 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1AccuracyLayer.html) 11 | * Header: [`./include/caffe/layers/accuracy_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/accuracy_layer.hpp) 12 | * CPU implementation: [`./src/caffe/layers/accuracy_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/accuracy_layer.cpp) 13 | 14 | ## Parameters 15 | * Parameters (`AccuracyParameter accuracy_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto)): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/AccuracyParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/argmax.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ArgMax Layer 3 | --- 4 | 5 | # ArgMax Layer 6 | 7 | * Layer type: `ArgMax` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1ArgMaxLayer.html) 9 | * Header: [`./include/caffe/layers/argmax_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/argmax_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/argmax_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/argmax_layer.cpp) 11 | 12 | ## Parameters 13 | * Parameters (`ArgMaxParameter argmax_param`) 14 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto)): 15 | 16 | {% highlight Protobuf %} 17 | {% include proto/ArgMaxParameter.txt %} 18 | {% endhighlight %} 19 | -------------------------------------------------------------------------------- /docs/tutorial/layers/batchnorm.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Batch Norm Layer 3 | --- 4 | 5 | # Batch Norm Layer 6 | 7 | * Layer type: `BatchNorm` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1BatchNormLayer.html) 9 | * Header: [`./include/caffe/layers/batch_norm_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/batch_norm_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/batch_norm_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/batch_norm_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/batch_norm_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/batch_norm_layer.cu) 12 | 13 | ## Parameters 14 | 15 | * Parameters (`BatchNormParameter batch_norm_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/BatchNormParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/batchreindex.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Batch Reindex Layer 3 | --- 4 | 5 | # Batch Reindex Layer 6 | 7 | * Layer type: `BatchReindex` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1BatchReindexLayer.html) 9 | * Header: [`./include/caffe/layers/batch_reindex_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/batch_reindex_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/batch_reindex_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/batch_reindex_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/batch_reindex_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/batch_reindex_layer.cu) 12 | 13 | 14 | ## Parameters 15 | 16 | No parameters. 17 | -------------------------------------------------------------------------------- /docs/tutorial/layers/bias.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bias Layer 3 | --- 4 | 5 | # Bias Layer 6 | 7 | * Layer type: `Bias` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1BiasLayer.html) 9 | * Header: [`./include/caffe/layers/bias_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/bias_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/bias_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/bias_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/bias_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/bias_layer.cu) 12 | 13 | ## Parameters 14 | * Parameters (`BiasParameter bias_param`) 15 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto)): 16 | 17 | {% highlight Protobuf %} 18 | {% include proto/BiasParameter.txt %} 19 | {% endhighlight %} 20 | -------------------------------------------------------------------------------- /docs/tutorial/layers/bnll.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: BNLL Layer 3 | --- 4 | 5 | # BNLL Layer 6 | 7 | * Layer type: `BNLL` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1BNLLLayer.html) 9 | * Header: [`./include/caffe/layers/bnll_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/bnll_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/bnll_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/bnll_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/bnll_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/bnll_layer.cu) 12 | 13 | The `BNLL` (binomial normal log likelihood) layer computes the output as log(1 + exp(x)) for each input element x. 14 | 15 | ## Parameters 16 | No parameters. 17 | 18 | ## Sample 19 | 20 | layer { 21 | name: "layer" 22 | bottom: "in" 23 | top: "out" 24 | type: BNLL 25 | } 26 | -------------------------------------------------------------------------------- /docs/tutorial/layers/concat.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Concat Layer 3 | --- 4 | 5 | # Concat Layer 6 | 7 | * Layer type: `Concat` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1ConcatLayer.html) 9 | * Header: [`./include/caffe/layers/concat_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/concat_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/concat_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/concat_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/concat_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/concat_layer.cu) 12 | * Input 13 | - `n_i * c_i * h * w` for each input blob i from 1 to K. 14 | * Output 15 | - if `axis = 0`: `(n_1 + n_2 + ... + n_K) * c_1 * h * w`, and all input `c_i` should be the same. 16 | - if `axis = 1`: `n_1 * (c_1 + c_2 + ... + c_K) * h * w`, and all input `n_i` should be the same. 17 | * Sample 18 | 19 | layer { 20 | name: "concat" 21 | bottom: "in1" 22 | bottom: "in2" 23 | top: "out" 24 | type: "Concat" 25 | concat_param { 26 | axis: 1 27 | } 28 | } 29 | 30 | The `Concat` layer is a utility layer that concatenates its multiple input blobs to one single output blob. 31 | 32 | ## Parameters 33 | * Parameters (`ConcatParameter concat_param`) 34 | - Optional 35 | - `axis` [default 1]: 0 for concatenation along num and 1 for channels. 36 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto)): 37 | 38 | {% highlight Protobuf %} 39 | {% include proto/ConcatParameter.txt %} 40 | {% endhighlight %} 41 | -------------------------------------------------------------------------------- /docs/tutorial/layers/contrastiveloss.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Contrastive Loss Layer 3 | --- 4 | 5 | # Contrastive Loss Layer 6 | 7 | * Layer type: `ContrastiveLoss` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1ContrastiveLossLayer.html) 9 | * Header: [`./include/caffe/layers/contrastive_loss_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/contrastive_loss_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/contrastive_loss_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/contrastive_loss_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/contrastive_loss_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/contrastive_loss_layer.cu) 12 | 13 | ## Parameters 14 | 15 | * Parameters (`ContrastiveLossParameter contrastive_loss_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto)): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/ContrastiveLossParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/crop.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Crop Layer 3 | --- 4 | 5 | # Crop Layer 6 | 7 | * Layer type: `Crop` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1CropLayer.html) 9 | * Header: [`./include/caffe/layers/crop_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/crop_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/crop_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/crop_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/crop_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/crop_layer.cu) 12 | 13 | ## Parameters 14 | 15 | * Parameters (`CropParameter crop_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto)): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/CropParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/data.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Database Layer 3 | --- 4 | 5 | # Database Layer 6 | 7 | * Layer type: `Data` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1DataLayer.html) 9 | * Header: [`./include/caffe/layers/data_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/data_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/data_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/data_layer.cpp) 11 | 12 | 13 | ## Parameters 14 | 15 | * Parameters (`DataParameter data_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto)): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/DataParameter.txt %} 20 | {% endhighlight %} 21 | 22 | * Parameters 23 | - Required 24 | - `source`: the name of the directory containing the database 25 | - `batch_size`: the number of inputs to process at one time 26 | - Optional 27 | - `rand_skip`: skip up to this number of inputs at the beginning; useful for asynchronous sgd 28 | - `backend` [default `LEVELDB`]: choose whether to use a `LEVELDB` or `LMDB` 29 | 30 | -------------------------------------------------------------------------------- /docs/tutorial/layers/deconvolution.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Deconvolution Layer 3 | --- 4 | 5 | # Deconvolution Layer 6 | 7 | * Layer type: `Deconvolution` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1DeconvolutionLayer.html) 9 | * Header: [`./include/caffe/layers/deconv_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/deconv_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/deconv_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/deconv_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/deconv_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/deconv_layer.cu) 12 | 13 | ## Parameters 14 | 15 | Uses the same parameters as the Convolution layer. 16 | 17 | * Parameters (`ConvolutionParameter convolution_param`) 18 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto)): 19 | 20 | {% highlight Protobuf %} 21 | {% include proto/ConvolutionParameter.txt %} 22 | {% endhighlight %} 23 | -------------------------------------------------------------------------------- /docs/tutorial/layers/dropout.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Dropout Layer 3 | --- 4 | 5 | # Dropout Layer 6 | 7 | * Layer type: `Dropout` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1DropoutLayer.html) 9 | * Header: [`./include/caffe/layers/dropout_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/dropout_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/dropout_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/dropout_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/dropout_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/dropout_layer.cu) 12 | 13 | ## Parameters 14 | 15 | * Parameters (`DropoutParameter dropout_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto)): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/DropoutParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/dummydata.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Dummy Data Layer 3 | --- 4 | 5 | # Dummy Data Layer 6 | 7 | * Layer type: `DummyData` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1DummyDataLayer.html) 9 | * Header: [`./include/caffe/layers/dummy_data_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/dummy_data_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/dummy_data_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/dummy_data_layer.cpp) 11 | 12 | 13 | ## Parameters 14 | 15 | * Parameters (`DummyDataParameter dummy_data_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto)): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/DummyDataParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/eltwise.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Eltwise Layer 3 | --- 4 | 5 | # Eltwise Layer 6 | 7 | * Layer type: `Eltwise` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1EltwiseLayer.html) 9 | * Header: [`./include/caffe/layers/eltwise_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/eltwise_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/eltwise_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/eltwise_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/eltwise_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/eltwise_layer.cu) 12 | 13 | ## Parameters 14 | 15 | * Parameters (`EltwiseParameter eltwise_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto)): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/EltwiseParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/elu.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ELU Layer 3 | --- 4 | 5 | # ELU Layer 6 | 7 | * Layer type: `ELU` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1ELULayer.html) 9 | * Header: [`./include/caffe/layers/elu_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/elu_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/elu_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/elu_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/elu_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/elu_layer.cu) 12 | 13 | ## References 14 | 15 | * Clevert, Djork-Arne, Thomas Unterthiner, and Sepp Hochreiter. 16 | "Fast and Accurate Deep Network Learning by Exponential Linear Units (ELUs)" [arXiv:1511.07289](https://arxiv.org/abs/1511.07289). (2015). 17 | 18 | ## Parameters 19 | 20 | * Parameters (`ELUParameter elu_param`) 21 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 22 | 23 | {% highlight Protobuf %} 24 | {% include proto/ELUParameter.txt %} 25 | {% endhighlight %} 26 | -------------------------------------------------------------------------------- /docs/tutorial/layers/embed.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Embed Layer 3 | --- 4 | 5 | # Embed Layer 6 | 7 | * Layer type: `Embed` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1EmbedLayer.html) 9 | * Header: [`./include/caffe/layers/embed_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/embed_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/embed_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/embed_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/embed_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/embed_layer.cu) 12 | 13 | ## Parameters 14 | 15 | * Parameters (`EmbedParameter embed_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/EmbedParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/euclideanloss.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Euclidean Loss Layer 3 | --- 4 | # Sum-of-Squares / Euclidean Loss Layer 5 | 6 | * Layer type: `EuclideanLoss` 7 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1EuclideanLossLayer.html) 8 | * Header: [`./include/caffe/layers/euclidean_loss_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/euclidean_loss_layer.hpp) 9 | * CPU implementation: [`./src/caffe/layers/euclidean_loss_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/euclidean_loss_layer.cpp) 10 | * CUDA GPU implementation: [`./src/caffe/layers/euclidean_loss_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/euclidean_loss_layer.cu) 11 | 12 | The Euclidean loss layer computes the sum of squares of differences of its two inputs, $$\frac 1 {2N} \sum_{i=1}^N \| x^1_i - x^2_i \|_2^2$$. 13 | 14 | ## Parameters 15 | 16 | Does not take any parameters. 17 | -------------------------------------------------------------------------------- /docs/tutorial/layers/exp.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Exponential Layer 3 | --- 4 | 5 | # Exponential Layer 6 | 7 | * Layer type: `Exp` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1ExpLayer.html) 9 | * Header: [`./include/caffe/layers/exp_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/exp_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/exp_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/exp_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/exp_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/exp_layer.cu) 12 | 13 | ## Parameters 14 | 15 | * Parameters (`Parameter exp_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/ExpParameter.txt %} 20 | {% endhighlight %} 21 | 22 | ## See also 23 | 24 | * [Power layer](power.html) 25 | -------------------------------------------------------------------------------- /docs/tutorial/layers/filter.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Filter Layer 3 | --- 4 | 5 | # Filter Layer 6 | 7 | * Layer type: `Filter` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1FilterLayer.html) 9 | * Header: [`./include/caffe/layers/filter_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/filter_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/filter_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/filter_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/filter_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/filter_layer.cu) 12 | 13 | ## Parameters 14 | 15 | Does not take any parameters. 16 | -------------------------------------------------------------------------------- /docs/tutorial/layers/flatten.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Flatten Layer 3 | --- 4 | 5 | # Flatten Layer 6 | 7 | * Layer type: `Flatten` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1FlattenLayer.html) 9 | * Header: [`./include/caffe/layers/flatten_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/flatten_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/flatten_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/flatten_layer.cpp) 11 | 12 | The `Flatten` layer is a utility layer that flattens an input of shape `n * c * h * w` to a simple vector output of shape `n * (c*h*w)`. 13 | 14 | ## Parameters 15 | 16 | * Parameters (`FlattenParameter flatten_param`) 17 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 18 | 19 | {% highlight Protobuf %} 20 | {% include proto/FlattenParameter.txt %} 21 | {% endhighlight %} 22 | -------------------------------------------------------------------------------- /docs/tutorial/layers/hdf5data.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: HDF5 Data Layer 3 | --- 4 | 5 | # HDF5 Data Layer 6 | 7 | * Layer type: `HDF5Data` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1HDF5DataLayer.html) 9 | * Header: [`./include/caffe/layers/hdf5_data_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/hdf5_data_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/hdf5_data_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/hdf5_data_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/hdf5_data_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/hdf5_data_layer.cu) 12 | 13 | ## Parameters 14 | 15 | * Parameters (`HDF5DataParameter hdf5_data_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/HDF5DataParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/hdf5output.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: HDF5 Output Layer 3 | --- 4 | 5 | # HDF5 Output Layer 6 | 7 | * Layer type: `HDF5Output` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1HDF5OutputLayer.html) 9 | * Header: [`./include/caffe/layers/hdf5_output_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/hdf5_output_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/hdf5_output_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/hdf5_output_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/hdf5_output_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/hdf5_output_layer.cu) 12 | 13 | The HDF5 output layer performs the opposite function of the other layers in this section: it writes its input blobs to disk. 14 | 15 | ## Parameters 16 | 17 | * Parameters (`HDF5OutputParameter hdf5_output_param`) 18 | - Required 19 | - `file_name`: name of file to write to 20 | 21 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 22 | 23 | {% highlight Protobuf %} 24 | {% include proto/HDF5OutputParameter.txt %} 25 | {% endhighlight %} 26 | -------------------------------------------------------------------------------- /docs/tutorial/layers/hingeloss.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Hinge Loss Layer 3 | --- 4 | 5 | # Hinge (L1, L2) Loss Layer 6 | 7 | * Layer type: `HingeLoss` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1HingeLossLayer.html) 9 | * Header: [`./include/caffe/layers/hinge_loss_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/hinge_loss_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/hinge_loss_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/hinge_loss_layer.cpp) 11 | 12 | ## Parameters 13 | 14 | * Parameters (`HingeLossParameter hinge_loss_param`) 15 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 16 | 17 | {% highlight Protobuf %} 18 | {% include proto/HingeLossParameter.txt %} 19 | {% endhighlight %} 20 | -------------------------------------------------------------------------------- /docs/tutorial/layers/im2col.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Im2col Layer 3 | --- 4 | 5 | # im2col 6 | 7 | * File type: `Im2col` 8 | * Header: [`./include/caffe/layers/im2col_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/im2col_layer.hpp) 9 | * CPU implementation: [`./src/caffe/layers/im2col_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/im2col_layer.cpp) 10 | * CUDA GPU implementation: [`./src/caffe/layers/im2col_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/im2col_layer.cu) 11 | 12 | `Im2col` is a helper for doing the image-to-column transformation that you most 13 | likely do not need to know about. This is used in Caffe's original convolution 14 | to do matrix multiplication by laying out all patches into a matrix. 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/tutorial/layers/imagedata.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ImageData Layer 3 | --- 4 | 5 | # ImageData Layer 6 | 7 | * Layer type: `ImageData` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1ImageDataLayer.html) 9 | * Header: [`./include/caffe/layers/image_data_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/image_data_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/image_data_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/image_data_layer.cpp) 11 | 12 | ## Parameters 13 | 14 | * Parameters (`ImageDataParameter image_data_parameter`) 15 | - Required 16 | - `source`: name of a text file, with each line giving an image filename and label 17 | - `batch_size`: number of images to batch together 18 | - Optional 19 | - `rand_skip` 20 | - `shuffle` [default false] 21 | - `new_height`, `new_width`: if provided, resize all images to this size 22 | 23 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 24 | 25 | {% highlight Protobuf %} 26 | {% include proto/ImageDataParameter.txt %} 27 | {% endhighlight %} 28 | -------------------------------------------------------------------------------- /docs/tutorial/layers/infogainloss.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Infogain Loss Layer 3 | --- 4 | 5 | # Infogain Loss Layer 6 | 7 | * Layer type: `InfogainLoss` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1InfogainLossLayer.html) 9 | * Header: [`./include/caffe/layers/infogain_loss_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/infogain_loss_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/infogain_loss_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/infogain_loss_layer.cpp) 11 | 12 | A generalization of [MultinomialLogisticLossLayer](multinomiallogisticloss.html) that takes an "information gain" (infogain) matrix specifying the "value" of all label pairs. 13 | 14 | Equivalent to the [MultinomialLogisticLossLayer](multinomiallogisticloss.html) if the infogain matrix is the identity. 15 | 16 | ## Parameters 17 | 18 | * Parameters (`Parameter infogain_param`) 19 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 20 | 21 | {% highlight Protobuf %} 22 | {% include proto/InfogainLossParameter.txt %} 23 | {% endhighlight %} 24 | -------------------------------------------------------------------------------- /docs/tutorial/layers/input.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Input Layer 3 | --- 4 | 5 | # Input Layer 6 | 7 | * Layer type: `Input` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1InputLayer.html) 9 | * Header: [`./include/caffe/layers/input_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/input_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/input_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/input_layer.cpp) 11 | 12 | ## Parameters 13 | 14 | * Parameters (`InputParameter input_param`) 15 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto)): 16 | 17 | {% highlight Protobuf %} 18 | {% include proto/InputParameter.txt %} 19 | {% endhighlight %} 20 | -------------------------------------------------------------------------------- /docs/tutorial/layers/log.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Log Layer 3 | --- 4 | 5 | # Log Layer 6 | 7 | * Layer type: `Log` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1LogLayer.html) 9 | * Header: [`./include/caffe/layers/log_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/log_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/log_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/log_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/log_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/log_layer.cu) 12 | 13 | ## Parameters 14 | 15 | * Parameters (`Parameter log_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/LogParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/lstm.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: LSTM Layer 3 | --- 4 | 5 | # LSTM Layer 6 | 7 | * Layer type: `LSTM` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1LSTMLayer.html) 9 | * Header: [`./include/caffe/layers/lstm_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/lstm_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/lstm_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/lstm_layer.cpp) 11 | * CPU implementation (helper): [`./src/caffe/layers/lstm_unit_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/lstm_unit_layer.cpp) 12 | * CUDA GPU implementation (helper): [`./src/caffe/layers/lstm_unit_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/lstm_unit_layer.cu) 13 | 14 | ## Parameters 15 | 16 | * Parameters (`Parameter recurrent_param`) 17 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 18 | 19 | {% highlight Protobuf %} 20 | {% include proto/RecurrentParameter.txt %} 21 | {% endhighlight %} 22 | -------------------------------------------------------------------------------- /docs/tutorial/layers/memorydata.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Memory Data Layer 3 | --- 4 | 5 | # Memory Data Layer 6 | 7 | * Layer type: `MemoryData` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1MemoryDataLayer.html) 9 | * Header: [`./include/caffe/layers/memory_data_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/memory_data_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/memory_data_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/memory_data_layer.cpp) 11 | 12 | The memory data layer reads data directly from memory, without copying it. In order to use it, one must call `MemoryDataLayer::Reset` (from C++) or `Net.set_input_arrays` (from Python) in order to specify a source of contiguous data (as 4D row major array), which is read one batch-sized chunk at a time. 13 | 14 | # Parameters 15 | 16 | * Parameters (`MemoryDataParameter memory_data_param`) 17 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 18 | 19 | {% highlight Protobuf %} 20 | {% include proto/MemoryDataParameter.txt %} 21 | {% endhighlight %} 22 | 23 | * Parameters 24 | - Required 25 | - `batch_size`, `channels`, `height`, `width`: specify the size of input chunks to read from memory 26 | -------------------------------------------------------------------------------- /docs/tutorial/layers/multinomiallogisticloss.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Multinomial Logistic Loss Layer 3 | --- 4 | 5 | # Multinomial Logistic Loss Layer 6 | 7 | * Layer type: `MultinomialLogisticLoss` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1MultinomialLogisticLossLayer.html) 9 | * Header: [`./include/caffe/layers/multinomial_logistic_loss_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/multinomial_logistic_loss_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/multinomial_logistic_loss_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/multinomial_logistic_loss_layer.cpp) 11 | 12 | ## Parameters 13 | 14 | * Parameters (`LossParameter loss_param`) 15 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 16 | 17 | {% highlight Protobuf %} 18 | {% include proto/LossParameter.txt %} 19 | {% endhighlight %} 20 | -------------------------------------------------------------------------------- /docs/tutorial/layers/mvn.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Mean-Variance Normalization (MVN) Layer 3 | --- 4 | 5 | # Mean-Variance Normalization (MVN) Layer 6 | 7 | * Layer type: `MVN` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1MVNLayer.html) 9 | * Header: [`./include/caffe/layers/mvn_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/mvn_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/mvn_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/mvn_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/mvn_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/mvn_layer.cu) 12 | 13 | ## Parameters 14 | 15 | * Parameters (`MVNParameter mvn_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/MVNParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/parameter.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Parameter Layer 3 | --- 4 | 5 | # Parameter Layer 6 | 7 | * Layer type: `Parameter` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1ParameterLayer.html) 9 | * Header: [`./include/caffe/layers/parameter_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/parameter_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/parameter_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/parameter_layer.cpp) 11 | 12 | See [https://github.com/BVLC/caffe/pull/2079](https://github.com/BVLC/caffe/pull/2079). 13 | 14 | ## Parameters 15 | 16 | * Parameters (`ParameterParameter parameter_param`) 17 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 18 | 19 | {% highlight Protobuf %} 20 | {% include proto/ParameterParameter.txt %} 21 | {% endhighlight %} 22 | -------------------------------------------------------------------------------- /docs/tutorial/layers/power.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Power Layer 3 | --- 4 | 5 | # Power Layer 6 | 7 | * Layer type: `Power` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1PowerLayer.html) 9 | * Header: [`./include/caffe/layers/power_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/power_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/power_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/power_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/power_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/power_layer.cu) 12 | 13 | The `Power` layer computes the output as (shift + scale * x) ^ power for each input element x. 14 | 15 | ## Parameters 16 | * Parameters (`PowerParameter power_param`) 17 | - Optional 18 | - `power` [default 1] 19 | - `scale` [default 1] 20 | - `shift` [default 0] 21 | 22 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 23 | 24 | {% highlight Protobuf %} 25 | {% include proto/PowerParameter.txt %} 26 | {% endhighlight %} 27 | 28 | 29 | 30 | ## Sample 31 | 32 | layer { 33 | name: "layer" 34 | bottom: "in" 35 | top: "out" 36 | type: "Power" 37 | power_param { 38 | power: 1 39 | scale: 1 40 | shift: 0 41 | } 42 | } 43 | 44 | ## See also 45 | 46 | * [Exponential layer](exp.html) 47 | -------------------------------------------------------------------------------- /docs/tutorial/layers/prelu.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: PReLU Layer 3 | --- 4 | 5 | # PReLU Layer 6 | 7 | * Layer type: `PReLU` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1PReLULayer.html) 9 | * Header: [`./include/caffe/layers/prelu_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/prelu_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/prelu_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/prelu_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/prelu_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/prelu_layer.cu) 12 | 13 | ## Parameters 14 | 15 | * Parameters (`PReLUParameter prelu_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/PReLUParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/python.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Python Layer 3 | --- 4 | 5 | # Python Layer 6 | 7 | * Layer type: `Python` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1PythonLayer.html) 9 | * Header: [`./include/caffe/layers/python_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/python_layer.hpp) 10 | 11 | The Python layer allows users to add customized layers without modifying the Caffe core code. 12 | 13 | ## Parameters 14 | 15 | * Parameters (`PythonParameter python_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/PythonParameter.txt %} 20 | {% endhighlight %} 21 | 22 | ## Examples and tutorials 23 | 24 | * Simple Euclidean loss example 25 | ** [Python code](https://github.com/BVLC/caffe/blob/master/examples/pycaffe/layers/pyloss.py) 26 | ** [Prototxt](https://github.com/BVLC/caffe/blob/master/examples/pycaffe/linreg.prototxt) 27 | * [Tutorial for writing Python layers with DIGITS](https://github.com/NVIDIA/DIGITS/tree/master/examples/python-layer) 28 | -------------------------------------------------------------------------------- /docs/tutorial/layers/recurrent.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Recurrent Layer 3 | --- 4 | 5 | # Recurrent Layer 6 | 7 | * Layer type: `Recurrent` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1RecurrentLayer.html) 9 | * Header: [`./include/caffe/layers/recurrent_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/recurrent_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/recurrent_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/recurrent_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/recurrent_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/recurrent_layer.cu) 12 | 13 | ## Parameters 14 | 15 | * Parameters (`RecurrentParameter recurrent_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/RecurrentParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/reduction.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Reduction Layer 3 | --- 4 | 5 | # Reduction Layer 6 | 7 | * Layer type: `Reduction` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1ReductionLayer.html) 9 | * Header: [`./include/caffe/layers/reduction_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/reduction_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/reduction_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/reduction_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/reduction_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/reduction_layer.cu) 12 | 13 | ## Parameters 14 | 15 | * Parameters (`ReductionParameter reduction_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/ReductionParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/relu.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ReLU / Rectified-Linear and Leaky-ReLU Layer 3 | --- 4 | 5 | # ReLU / Rectified-Linear and Leaky-ReLU Layer 6 | 7 | * Layer type: `ReLU` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1ReLULayer.html) 9 | * Header: [`./include/caffe/layers/relu_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/relu_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/relu_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/relu_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/relu_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/relu_layer.cu) 12 | * Sample (as seen in [`./models/bvlc_reference_caffenet/train_val.prototxt`](https://github.com/BVLC/caffe/blob/master/models/bvlc_reference_caffenet/train_val.prototxt)) 13 | 14 | layer { 15 | name: "relu1" 16 | type: "ReLU" 17 | bottom: "conv1" 18 | top: "conv1" 19 | } 20 | 21 | Given an input value x, The `ReLU` layer computes the output as x if x > 0 and negative_slope * x if x <= 0. When the negative slope parameter is not set, it is equivalent to the standard ReLU function of taking max(x, 0). It also supports in-place computation, meaning that the bottom and the top blob could be the same to preserve memory consumption. 22 | 23 | ## Parameters 24 | 25 | * Parameters (`ReLUParameter relu_param`) 26 | - Optional 27 | - `negative_slope` [default 0]: specifies whether to leak the negative part by multiplying it with the slope value rather than setting it to 0. 28 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 29 | 30 | {% highlight Protobuf %} 31 | {% include proto/ReLUParameter.txt %} 32 | {% endhighlight %} 33 | -------------------------------------------------------------------------------- /docs/tutorial/layers/rnn.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: RNN Layer 3 | --- 4 | 5 | # RNN Layer 6 | 7 | * Layer type: `RNN` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1RNNLayer.html) 9 | * Header: [`./include/caffe/layers/rnn_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/rnn_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/rnn_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/rnn_layer.cpp) 11 | 12 | ## Parameters 13 | 14 | * Parameters (`RecurrentParameter recurrent_param`) 15 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 16 | 17 | {% highlight Protobuf %} 18 | {% include proto/RecurrentParameter.txt %} 19 | {% endhighlight %} 20 | -------------------------------------------------------------------------------- /docs/tutorial/layers/scale.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Scale Layer 3 | --- 4 | 5 | # Scale Layer 6 | 7 | * Layer type: `Scale` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1ScaleLayer.html) 9 | * Header: [`./include/caffe/layers/scale_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/scale_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/scale_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/scale_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/scale_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/scale_layer.cu) 12 | 13 | ## Parameters 14 | 15 | * Parameters (`ScaleParameter scale_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/ScaleParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/sigmoid.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Sigmoid Layer 3 | --- 4 | 5 | # Sigmoid Layer 6 | 7 | * Layer type: `Sigmoid` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1SigmoidLayer.html) 9 | * Header: [`./include/caffe/layers/sigmoid_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/sigmoid_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/sigmoid_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/sigmoid_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/sigmoid_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/sigmoid_layer.cu) 12 | * Example (from [`./examples/mnist/mnist_autoencoder.prototxt`](https://github.com/BVLC/caffe/blob/master/examples/mnist/mnist_autoencoder.prototxt)): 13 | 14 | layer { 15 | name: "encode1neuron" 16 | bottom: "encode1" 17 | top: "encode1neuron" 18 | type: "Sigmoid" 19 | } 20 | 21 | The `Sigmoid` layer computes `sigmoid(x)` for each element `x` in the bottom blob. 22 | 23 | ## Parameters 24 | 25 | * Parameters (`SigmoidParameter sigmoid_param`) 26 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 27 | 28 | {% highlight Protobuf %} 29 | {% include proto/SigmoidParameter.txt %} 30 | {% endhighlight %} 31 | -------------------------------------------------------------------------------- /docs/tutorial/layers/sigmoidcrossentropyloss.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Sigmoid Cross-Entropy Loss Layer 3 | --- 4 | 5 | # Sigmoid Cross-Entropy Loss Layer 6 | 7 | * Layer type: `SigmoidCrossEntropyLoss` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1SigmoidCrossEntropyLossLayer.html) 9 | * Header: [`./include/caffe/layers/sigmoid_cross_entropy_loss_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/sigmoid_cross_entropy_loss_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/sigmoid_cross_entropy_loss_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/sigmoid_cross_entropy_loss_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cu) 12 | 13 | To-do. 14 | -------------------------------------------------------------------------------- /docs/tutorial/layers/silence.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Silence Layer 3 | --- 4 | 5 | # Silence Layer 6 | 7 | * Layer type: `Silence` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1SilenceLayer.html) 9 | * Header: [`./include/caffe/layers/silence_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/silence_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/silence_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/silence_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/silence_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/silence_layer.cu) 12 | 13 | Silences a blob, so that it is not printed. 14 | 15 | ## Parameters 16 | 17 | No parameters. 18 | -------------------------------------------------------------------------------- /docs/tutorial/layers/slice.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Slice Layer 3 | --- 4 | 5 | # Slice Layer 6 | 7 | * Layer type: `Slice` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1SliceLayer.html) 9 | * Header: [`./include/caffe/layers/slice_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/slice_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/slice_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/slice_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/slice_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/slice_layer.cu) 12 | 13 | The `Slice` layer is a utility layer that slices an input layer to multiple output layers along a given dimension (currently num or channel only) with given slice indices. 14 | 15 | * Sample 16 | 17 | layer { 18 | name: "slicer_label" 19 | type: "Slice" 20 | bottom: "label" 21 | ## Example of label with a shape N x 3 x 1 x 1 22 | top: "label1" 23 | top: "label2" 24 | top: "label3" 25 | slice_param { 26 | axis: 1 27 | slice_point: 1 28 | slice_point: 2 29 | } 30 | } 31 | 32 | `axis` indicates the target axis; `slice_point` indicates indexes in the selected dimension (the number of indices must be equal to the number of top blobs minus one). 33 | 34 | ## Parameters 35 | 36 | * Parameters (`SliceParameter slice_param`) 37 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 38 | 39 | {% highlight Protobuf %} 40 | {% include proto/SliceParameter.txt %} 41 | {% endhighlight %} 42 | 43 | -------------------------------------------------------------------------------- /docs/tutorial/layers/softmax.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Softmax Layer 3 | --- 4 | 5 | # Softmax Layer 6 | 7 | * Layer type: `Softmax` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1SoftmaxLayer.html) 9 | * Header: [`./include/caffe/layers/softmax_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/softmax_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/softmax_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/softmax_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/softmax_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/softmax_layer.cu) 12 | 13 | ## Parameters 14 | 15 | * Parameters (`SoftmaxParameter softmax_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/SoftmaxParameter.txt %} 20 | {% endhighlight %} 21 | 22 | ## See also 23 | 24 | * [Softmax loss layer](softmaxwithloss.html) 25 | -------------------------------------------------------------------------------- /docs/tutorial/layers/softmaxwithloss.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Softmax with Loss Layer 3 | --- 4 | 5 | # Softmax with Loss Layer 6 | 7 | * Layer type: `SoftmaxWithLoss` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1SoftmaxWithLossLayer.html) 9 | * Header: [`./include/caffe/layers/softmax_loss_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/softmax_loss_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/softmax_loss_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/softmax_loss_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/softmax_loss_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/softmax_loss_layer.cu) 12 | 13 | The softmax loss layer computes the multinomial logistic loss of the softmax of its inputs. It's conceptually identical to a softmax layer followed by a multinomial logistic loss layer, but provides a more numerically stable gradient. 14 | 15 | ## Parameters 16 | 17 | * Parameters (`SoftmaxParameter softmax_param`) 18 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 19 | 20 | {% highlight Protobuf %} 21 | {% include proto/SoftmaxParameter.txt %} 22 | {% endhighlight %} 23 | 24 | * Parameters (`LossParameter loss_param`) 25 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 26 | 27 | {% highlight Protobuf %} 28 | {% include proto/LossParameter.txt %} 29 | {% endhighlight %} 30 | 31 | ## See also 32 | 33 | * [Softmax layer](softmax.html) 34 | -------------------------------------------------------------------------------- /docs/tutorial/layers/split.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Split Layer 3 | --- 4 | 5 | # Split Layer 6 | 7 | * Layer type: `Split` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1SplitLayer.html) 9 | * Header: [`./include/caffe/layers/split_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/split_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/split_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/split_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/split_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/split_layer.cu) 12 | 13 | The `Split` layer is a utility layer that splits an input blob to multiple output blobs. This is used when a blob is fed into multiple output layers. 14 | 15 | ## Parameters 16 | 17 | Does not take any parameters. 18 | -------------------------------------------------------------------------------- /docs/tutorial/layers/spp.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Spatial Pyramid Pooling Layer 3 | --- 4 | 5 | # Spatial Pyramid Pooling Layer 6 | 7 | * Layer type: `SPP` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1SPPLayer.html) 9 | * Header: [`./include/caffe/layers/spp_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/spp_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/spp_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/spp_layer.cpp) 11 | 12 | 13 | ## Parameters 14 | 15 | * Parameters (`SPPParameter spp_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/SPPParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/tanh.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: TanH Layer 3 | --- 4 | 5 | # TanH Layer 6 | 7 | * Header: [`./include/caffe/layers/tanh_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/tanh_layer.hpp) 8 | * CPU implementation: [`./src/caffe/layers/tanh_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/tanh_layer.cpp) 9 | * CUDA GPU implementation: [`./src/caffe/layers/tanh_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/tanh_layer.cu) 10 | 11 | ## Parameters 12 | 13 | * Parameters (`TanHParameter tanh_param`) 14 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 15 | 16 | {% highlight Protobuf %} 17 | {% include proto/TanHParameter.txt %} 18 | {% endhighlight %} 19 | -------------------------------------------------------------------------------- /docs/tutorial/layers/threshold.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Threshold Layer 3 | --- 4 | 5 | # Threshold Layer 6 | 7 | * Header: [`./include/caffe/layers/threshold_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/threshold_layer.hpp) 8 | * CPU implementation: [`./src/caffe/layers/threshold_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/threshold_layer.cpp) 9 | * CUDA GPU implementation: [`./src/caffe/layers/threshold_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/threshold_layer.cu) 10 | 11 | ## Parameters 12 | 13 | * Parameters (`ThresholdParameter threshold_param`) 14 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 15 | 16 | {% highlight Protobuf %} 17 | {% include proto/ThresholdParameter.txt %} 18 | {% endhighlight %} 19 | -------------------------------------------------------------------------------- /docs/tutorial/layers/tile.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tile Layer 3 | --- 4 | 5 | # Tile Layer 6 | 7 | * Layer type: `Tile` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1TileLayer.html) 9 | * Header: [`./include/caffe/layers/tile_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/tile_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/tile_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/tile_layer.cpp) 11 | * CUDA GPU implementation: [`./src/caffe/layers/tile_layer.cu`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/tile_layer.cu) 12 | 13 | ## Parameters 14 | 15 | * Parameters (`TileParameter tile_param`) 16 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 17 | 18 | {% highlight Protobuf %} 19 | {% include proto/TileParameter.txt %} 20 | {% endhighlight %} 21 | -------------------------------------------------------------------------------- /docs/tutorial/layers/windowdata.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: WindowData Layer 3 | --- 4 | 5 | # WindowData Layer 6 | 7 | * Layer type: `WindowData` 8 | * [Doxygen Documentation](http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1WindowDataLayer.html) 9 | * Header: [`./include/caffe/layers/window_data_layer.hpp`](https://github.com/BVLC/caffe/blob/master/include/caffe/layers/window_data_layer.hpp) 10 | * CPU implementation: [`./src/caffe/layers/window_data_layer.cpp`](https://github.com/BVLC/caffe/blob/master/src/caffe/layers/window_data_layer.cpp) 11 | 12 | ## Parameters 13 | 14 | * Parameters (`WindowDataParameter`) 15 | * From [`./src/caffe/proto/caffe.proto`](https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto): 16 | 17 | {% highlight Protobuf %} 18 | {% include proto/WindowDataParameter.txt %} 19 | {% endhighlight %} 20 | -------------------------------------------------------------------------------- /faster-rcnn_data/test1/faster-rcnn_ap_result.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test1/faster-rcnn_ap_result.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test1/faster-rcnn_ap_result_edited.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test1/faster-rcnn_ap_result_edited.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test1/log.txt: -------------------------------------------------------------------------------- 1 | fast_rcnn startup done 2 | GPU 1: free memory 11223990272 3 | Use GPU 1 4 | 01.jpg (759x696): time 0.045s (resize+conv+proposal: 0.024s, nms+regionwise: 0.021s) 5 | 02.jpg (760x695): time 0.065s (resize+conv+proposal: 0.036s, nms+regionwise: 0.029s) 6 | 03.jpg (760x696): time 0.042s (resize+conv+proposal: 0.023s, nms+regionwise: 0.019s) 7 | 04.jpg (760x696): time 0.037s (resize+conv+proposal: 0.018s, nms+regionwise: 0.018s) 8 | 05.jpg (759x695): time 0.048s (resize+conv+proposal: 0.024s, nms+regionwise: 0.023s) 9 | mean time: 0.047s 10 | Cleared 0 solvers and 2 stand-alone nets -------------------------------------------------------------------------------- /faster-rcnn_data/test1/original/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test1/original/01.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test1/original/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test1/original/02.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test1/original/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test1/original/03.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test1/original/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test1/original/04.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test1/original/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test1/original/05.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test1/result/1.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test1/result/1.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test1/result/2.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test1/result/2.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test1/result/3.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test1/result/3.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test1/result/4.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test1/result/4.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test1/result/5.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test1/result/5.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test2/log.txt: -------------------------------------------------------------------------------- 1 | fast_rcnn startup done 2 | GPU 1: free memory 11091546112 3 | Use GPU 1 4 | 01.jpg (760x696): time 0.039s (resize+conv+proposal: 0.022s, nms+regionwise: 0.018s) 5 | 02.jpg (759x696): time 0.047s (resize+conv+proposal: 0.029s, nms+regionwise: 0.019s) 6 | 03.jpg (760x696): time 0.037s (resize+conv+proposal: 0.017s, nms+regionwise: 0.020s) 7 | 04.jpg (760x696): time 0.038s (resize+conv+proposal: 0.019s, nms+regionwise: 0.019s) 8 | 05.jpg (760x696): time 0.036s (resize+conv+proposal: 0.018s, nms+regionwise: 0.018s) 9 | 06.jpg (759x696): time 0.038s (resize+conv+proposal: 0.018s, nms+regionwise: 0.020s) 10 | 07.jpg (760x696): time 0.036s (resize+conv+proposal: 0.018s, nms+regionwise: 0.018s) 11 | 08.jpg (760x696): time 0.044s (resize+conv+proposal: 0.020s, nms+regionwise: 0.024s) 12 | 09.jpg (759x696): time 0.036s (resize+conv+proposal: 0.018s, nms+regionwise: 0.018s) 13 | mean time: 0.039s 14 | Cleared 0 solvers and 2 stand-alone nets -------------------------------------------------------------------------------- /faster-rcnn_data/test2/original/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/original/01.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test2/original/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/original/02.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test2/original/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/original/03.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test2/original/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/original/04.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test2/original/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/original/05.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test2/original/06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/original/06.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test2/original/07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/original/07.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test2/original/08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/original/08.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test2/original/09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/original/09.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test2/result/1.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/result/1.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test2/result/2.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/result/2.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test2/result/3.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/result/3.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test2/result/4.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/result/4.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test2/result/5.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/result/5.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test2/result/6.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/result/6.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test2/result/7.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/result/7.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test2/result/8.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/result/8.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test2/result/9.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test2/result/9.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test3/log.txt: -------------------------------------------------------------------------------- 1 | fast_rcnn startup done 2 | GPU 1: free memory 11229638656 3 | Use GPU 1 4 | 01.jpg (1245x1242): time 0.044s (resize+conv+proposal: 0.025s, nms+regionwise: 0.018s) 5 | 02.jpg (1244x1242): time 0.045s (resize+conv+proposal: 0.027s, nms+regionwise: 0.018s) 6 | 03.jpg (1245x1242): time 0.038s (resize+conv+proposal: 0.018s, nms+regionwise: 0.019s) 7 | 04.jpg (1244x1242): time 0.044s (resize+conv+proposal: 0.020s, nms+regionwise: 0.024s) 8 | 05.jpg (1244x1241): time 0.041s (resize+conv+proposal: 0.023s, nms+regionwise: 0.019s) 9 | 06.jpg (1244x1241): time 0.047s (resize+conv+proposal: 0.023s, nms+regionwise: 0.024s) 10 | 07.jpg (1244x1242): time 0.044s (resize+conv+proposal: 0.021s, nms+regionwise: 0.023s) 11 | 08.jpg (1245x1242): time 0.038s (resize+conv+proposal: 0.020s, nms+regionwise: 0.019s) 12 | 09.jpg (1244x1242): time 0.045s (resize+conv+proposal: 0.021s, nms+regionwise: 0.023s) 13 | mean time: 0.043s 14 | Cleared 0 solvers and 2 stand-alone nets -------------------------------------------------------------------------------- /faster-rcnn_data/test3/original/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/original/01.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test3/original/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/original/02.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test3/original/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/original/03.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test3/original/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/original/04.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test3/original/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/original/05.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test3/original/06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/original/06.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test3/original/07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/original/07.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test3/original/08.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/original/08.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test3/original/09.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/original/09.jpg -------------------------------------------------------------------------------- /faster-rcnn_data/test3/result/1.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/result/1.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test3/result/2.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/result/2.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test3/result/3.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/result/3.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test3/result/4.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/result/4.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test3/result/5.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/result/5.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test3/result/6.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/result/6.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test3/result/7.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/result/7.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test3/result/8.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/result/8.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test3/result/9.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test3/result/9.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test_frcn_mobile/IMG_7204.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test_frcn_mobile/IMG_7204.JPG -------------------------------------------------------------------------------- /faster-rcnn_data/test_frcn_mobile/IMG_7205.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test_frcn_mobile/IMG_7205.JPG -------------------------------------------------------------------------------- /faster-rcnn_data/test_frcn_mobile/IMG_7206.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test_frcn_mobile/IMG_7206.JPG -------------------------------------------------------------------------------- /faster-rcnn_data/test_frcn_mobile/IMG_7207.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test_frcn_mobile/IMG_7207.JPG -------------------------------------------------------------------------------- /faster-rcnn_data/test_frcn_mobile/test1.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test_frcn_mobile/test1.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test_frcn_mobile/test2.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test_frcn_mobile/test2.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test_frcn_mobile/test3.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test_frcn_mobile/test3.fig -------------------------------------------------------------------------------- /faster-rcnn_data/test_frcn_mobile/test4.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_data/test_frcn_mobile/test4.fig -------------------------------------------------------------------------------- /faster-rcnn_preparation/data_set_tools/VOC2007xml/VOC2007xml.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_preparation/data_set_tools/VOC2007xml/VOC2007xml.m -------------------------------------------------------------------------------- /faster-rcnn_preparation/data_set_tools/VOC2007xml/begin: -------------------------------------------------------------------------------- 1 | 2 | 3 | car 4 | 000006.jpg 5 | 6 | My Database 7 | VOC2007 8 | flickr 9 | NULL 10 | 11 | 12 | 0 13 | xiaoxianyu 14 | 15 | 16 | 449 17 | 220 18 | 3 19 | 20 | 0 21 | 22 | 1 23 | Unspecified 24 | 0 25 | 0 26 | 27 | 346 28 | 34 29 | 390 30 | 88 31 | 32 | 33 | 34 | 1 35 | Unspecified 36 | 0 37 | 0 38 | 39 | 183 40 | 23 41 | 247 42 | 106 43 | 44 | 45 | 46 | 1 47 | Unspecified 48 | 0 49 | 0 50 | 51 | 51 52 | 11 53 | 105 54 | 69 55 | 56 | 57 | -------------------------------------------------------------------------------- /faster-rcnn_preparation/data_set_tools/VOC2007xml/myxml.asv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_preparation/data_set_tools/VOC2007xml/myxml.asv -------------------------------------------------------------------------------- /faster-rcnn_preparation/data_set_tools/lbimg_ver2/LabelPicture.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_preparation/data_set_tools/lbimg_ver2/LabelPicture.exe -------------------------------------------------------------------------------- /faster-rcnn_preparation/data_set_tools/lbimg_ver2/labelimg_ver1_api.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_preparation/data_set_tools/lbimg_ver2/labelimg_ver1_api.dll -------------------------------------------------------------------------------- /faster-rcnn_preparation/data_set_tools/lbimg_ver2/manual.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_preparation/data_set_tools/lbimg_ver2/manual.docx -------------------------------------------------------------------------------- /faster-rcnn_preparation/imagesetbuilder.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_preparation/imagesetbuilder.m -------------------------------------------------------------------------------- /faster-rcnn_preparation/rename.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/faster-rcnn_preparation/rename.m -------------------------------------------------------------------------------- /markdown_figures/fig1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig1.png -------------------------------------------------------------------------------- /markdown_figures/fig10a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig10a.png -------------------------------------------------------------------------------- /markdown_figures/fig10b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig10b.png -------------------------------------------------------------------------------- /markdown_figures/fig10c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig10c.png -------------------------------------------------------------------------------- /markdown_figures/fig2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig2.png -------------------------------------------------------------------------------- /markdown_figures/fig3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig3.png -------------------------------------------------------------------------------- /markdown_figures/fig4a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig4a.png -------------------------------------------------------------------------------- /markdown_figures/fig4b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig4b.png -------------------------------------------------------------------------------- /markdown_figures/fig4c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig4c.png -------------------------------------------------------------------------------- /markdown_figures/fig4d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig4d.png -------------------------------------------------------------------------------- /markdown_figures/fig5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig5.png -------------------------------------------------------------------------------- /markdown_figures/fig6a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig6a.png -------------------------------------------------------------------------------- /markdown_figures/fig6b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig6b.png -------------------------------------------------------------------------------- /markdown_figures/fig7a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig7a.png -------------------------------------------------------------------------------- /markdown_figures/fig7b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig7b.png -------------------------------------------------------------------------------- /markdown_figures/fig8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig8.png -------------------------------------------------------------------------------- /markdown_figures/fig9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/markdown_figures/fig9.png -------------------------------------------------------------------------------- /matlab/+caffe/+test/test_io.m: -------------------------------------------------------------------------------- 1 | classdef test_io < matlab.unittest.TestCase 2 | methods (Test) 3 | function test_read_write_mean(self) 4 | % randomly generate mean data 5 | width = 200; 6 | height = 300; 7 | channels = 3; 8 | mean_data_write = 255 * rand(width, height, channels, 'single'); 9 | % write mean data to binary proto 10 | mean_proto_file = tempname(); 11 | caffe.io.write_mean(mean_data_write, mean_proto_file); 12 | % read mean data from saved binary proto and test whether they are equal 13 | mean_data_read = caffe.io.read_mean(mean_proto_file); 14 | self.verifyEqual(mean_data_write, mean_data_read) 15 | delete(mean_proto_file); 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /matlab/+caffe/+test/test_solver.m: -------------------------------------------------------------------------------- 1 | classdef test_solver < matlab.unittest.TestCase 2 | 3 | properties 4 | num_output 5 | solver 6 | end 7 | 8 | methods 9 | function self = test_solver() 10 | self.num_output = 13; 11 | model_file = caffe.test.test_net.simple_net_file(self.num_output); 12 | solver_file = tempname(); 13 | 14 | fid = fopen(solver_file, 'w'); 15 | fprintf(fid, [ ... 16 | 'net: "' model_file '"\n' ... 17 | 'test_iter: 10 test_interval: 10 base_lr: 0.01 momentum: 0.9\n' ... 18 | 'weight_decay: 0.0005 lr_policy: "inv" gamma: 0.0001 power: 0.75\n' ... 19 | 'display: 100 max_iter: 100 snapshot_after_train: false\n' ]); 20 | fclose(fid); 21 | 22 | self.solver = caffe.Solver(solver_file); 23 | % also make sure get_solver runs 24 | caffe.get_solver(solver_file); 25 | caffe.set_mode_cpu(); 26 | % fill in valid labels 27 | self.solver.net.blobs('label').set_data(randi( ... 28 | self.num_output - 1, self.solver.net.blobs('label').shape)); 29 | self.solver.test_nets(1).blobs('label').set_data(randi( ... 30 | self.num_output - 1, self.solver.test_nets(1).blobs('label').shape)); 31 | 32 | delete(solver_file); 33 | delete(model_file); 34 | end 35 | end 36 | methods (Test) 37 | function test_solve(self) 38 | self.verifyEqual(self.solver.iter(), 0) 39 | self.solver.step(30); 40 | self.verifyEqual(self.solver.iter(), 30) 41 | self.solver.solve() 42 | self.verifyEqual(self.solver.iter(), 100) 43 | end 44 | end 45 | end 46 | -------------------------------------------------------------------------------- /matlab/+caffe/Layer.m: -------------------------------------------------------------------------------- 1 | classdef Layer < handle 2 | % Wrapper class of caffe::Layer in matlab 3 | 4 | properties (Access = private) 5 | hLayer_self 6 | attributes 7 | % attributes fields: 8 | % hBlob_blobs 9 | end 10 | properties (SetAccess = private) 11 | params 12 | end 13 | 14 | methods 15 | function self = Layer(hLayer_layer) 16 | CHECK(is_valid_handle(hLayer_layer), 'invalid Layer handle'); 17 | 18 | % setup self handle and attributes 19 | self.hLayer_self = hLayer_layer; 20 | self.attributes = caffe_('layer_get_attr', self.hLayer_self); 21 | 22 | % setup weights 23 | self.params = caffe.Blob.empty(); 24 | for n = 1:length(self.attributes.hBlob_blobs) 25 | self.params(n) = caffe.Blob(self.attributes.hBlob_blobs(n)); 26 | end 27 | end 28 | function layer_type = type(self) 29 | layer_type = caffe_('layer_get_type', self.hLayer_self); 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /matlab/+caffe/get_net.m: -------------------------------------------------------------------------------- 1 | function net = get_net(varargin) 2 | % net = get_net(model_file, phase_name) or 3 | % net = get_net(model_file, weights_file, phase_name) 4 | % Construct a net from model_file, and load weights from weights_file 5 | % phase_name can only be 'train' or 'test' 6 | 7 | CHECK(nargin == 2 || nargin == 3, ['usage: ' ... 8 | 'net = get_net(model_file, phase_name) or ' ... 9 | 'net = get_net(model_file, weights_file, phase_name)']); 10 | if nargin == 3 11 | model_file = varargin{1}; 12 | weights_file = varargin{2}; 13 | phase_name = varargin{3}; 14 | elseif nargin == 2 15 | model_file = varargin{1}; 16 | phase_name = varargin{2}; 17 | end 18 | 19 | CHECK(ischar(model_file), 'model_file must be a string'); 20 | CHECK(ischar(phase_name), 'phase_name must be a string'); 21 | CHECK_FILE_EXIST(model_file); 22 | CHECK(strcmp(phase_name, 'train') || strcmp(phase_name, 'test'), ... 23 | sprintf('phase_name can only be %strain%s or %stest%s', ... 24 | char(39), char(39), char(39), char(39))); 25 | 26 | % construct caffe net from model_file 27 | hNet = caffe_('get_net', model_file, phase_name); 28 | net = caffe.Net(hNet); 29 | 30 | % load weights from weights_file 31 | if nargin == 3 32 | CHECK(ischar(weights_file), 'weights_file must be a string'); 33 | CHECK_FILE_EXIST(weights_file); 34 | net.copy_from(weights_file); 35 | end 36 | 37 | end 38 | -------------------------------------------------------------------------------- /matlab/+caffe/get_solver.m: -------------------------------------------------------------------------------- 1 | function solver = get_solver(solver_file) 2 | % solver = get_solver(solver_file) 3 | % Construct a Solver object from solver_file 4 | 5 | CHECK(ischar(solver_file), 'solver_file must be a string'); 6 | CHECK_FILE_EXIST(solver_file); 7 | pSolver = caffe_('get_solver', solver_file); 8 | solver = caffe.Solver(pSolver); 9 | 10 | end 11 | -------------------------------------------------------------------------------- /matlab/+caffe/imagenet/ilsvrc_2012_mean.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/matlab/+caffe/imagenet/ilsvrc_2012_mean.mat -------------------------------------------------------------------------------- /matlab/+caffe/io.m: -------------------------------------------------------------------------------- 1 | classdef io 2 | % a class for input and output functions 3 | 4 | methods (Static) 5 | function im_data = load_image(im_file) 6 | % im_data = load_image(im_file) 7 | % load an image from disk into Caffe-supported data format 8 | % switch channels from RGB to BGR, make width the fastest dimension 9 | % and convert to single 10 | % returns im_data in W x H x C. For colored images, C = 3 in BGR 11 | % channels, and for grayscale images, C = 1 12 | CHECK(ischar(im_file), 'im_file must be a string'); 13 | CHECK_FILE_EXIST(im_file); 14 | im_data = imread(im_file); 15 | % permute channels from RGB to BGR for colored images 16 | if size(im_data, 3) == 3 17 | im_data = im_data(:, :, [3, 2, 1]); 18 | end 19 | % flip width and height to make width the fastest dimension 20 | im_data = permute(im_data, [2, 1, 3]); 21 | % convert from uint8 to single 22 | im_data = single(im_data); 23 | end 24 | function mean_data = read_mean(mean_proto_file) 25 | % mean_data = read_mean(mean_proto_file) 26 | % read image mean data from binaryproto file 27 | % returns mean_data in W x H x C with BGR channels 28 | CHECK(ischar(mean_proto_file), 'mean_proto_file must be a string'); 29 | CHECK_FILE_EXIST(mean_proto_file); 30 | mean_data = caffe_('read_mean', mean_proto_file); 31 | end 32 | function write_mean(mean_data, mean_proto_file) 33 | % write_mean(mean_data, mean_proto_file) 34 | % write image mean data to binaryproto file 35 | % mean_data should be W x H x C with BGR channels 36 | CHECK(ischar(mean_proto_file), 'mean_proto_file must be a string'); 37 | CHECK(isa(mean_data, 'single'), 'mean_data must be a SINGLE matrix'); 38 | caffe_('write_mean', mean_data, mean_proto_file); 39 | end 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /matlab/+caffe/private/CHECK.m: -------------------------------------------------------------------------------- 1 | function CHECK(expr, error_msg) 2 | 3 | if ~expr 4 | error(error_msg); 5 | end 6 | 7 | end 8 | -------------------------------------------------------------------------------- /matlab/+caffe/private/CHECK_FILE_EXIST.m: -------------------------------------------------------------------------------- 1 | function CHECK_FILE_EXIST(filename) 2 | 3 | if exist(filename, 'file') == 0 4 | error('%s does not exist', filename); 5 | end 6 | 7 | end 8 | -------------------------------------------------------------------------------- /matlab/+caffe/private/is_valid_handle.m: -------------------------------------------------------------------------------- 1 | function valid = is_valid_handle(hObj) 2 | % valid = is_valid_handle(hObj) or is_valid_handle('get_new_init_key') 3 | % Check if a handle is valid (has the right data type and init_key matches) 4 | % Use is_valid_handle('get_new_init_key') to get new init_key from C++; 5 | 6 | % a handle is a struct array with the following fields 7 | % (uint64) ptr : the pointer to the C++ object 8 | % (double) init_key : caffe initialization key 9 | 10 | persistent init_key; 11 | if isempty(init_key) 12 | init_key = caffe_('get_init_key'); 13 | end 14 | 15 | % is_valid_handle('get_new_init_key') to get new init_key from C++; 16 | if ischar(hObj) && strcmp(hObj, 'get_new_init_key') 17 | init_key = caffe_('get_init_key'); 18 | return 19 | else 20 | % check whether data types are correct and init_key matches 21 | valid = isstruct(hObj) ... 22 | && isscalar(hObj.ptr) && isa(hObj.ptr, 'uint64') ... 23 | && isscalar(hObj.init_key) && isa(hObj.init_key, 'double') ... 24 | && hObj.init_key == init_key; 25 | end 26 | 27 | end 28 | -------------------------------------------------------------------------------- /matlab/+caffe/reset_all.m: -------------------------------------------------------------------------------- 1 | function reset_all() 2 | % reset_all() 3 | % clear all solvers and stand-alone nets and reset Caffe to initial status 4 | 5 | caffe_('reset'); 6 | is_valid_handle('get_new_init_key'); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /matlab/+caffe/run_tests.m: -------------------------------------------------------------------------------- 1 | function results = run_tests() 2 | % results = run_tests() 3 | % run all tests in this caffe matlab wrapper package 4 | 5 | % use CPU for testing 6 | caffe.set_mode_cpu(); 7 | 8 | % reset caffe before testing 9 | caffe.reset_all(); 10 | 11 | % put all test cases here 12 | results = [... 13 | run(caffe.test.test_net) ... 14 | run(caffe.test.test_solver) ... 15 | run(caffe.test.test_io) ]; 16 | 17 | % reset caffe after testing 18 | caffe.reset_all(); 19 | 20 | end 21 | -------------------------------------------------------------------------------- /matlab/+caffe/set_device.m: -------------------------------------------------------------------------------- 1 | function set_device(device_id) 2 | % set_device(device_id) 3 | % set Caffe's GPU device ID 4 | 5 | CHECK(isscalar(device_id) && device_id >= 0, ... 6 | 'device_id must be non-negative integer'); 7 | device_id = double(device_id); 8 | 9 | caffe_('set_device', device_id); 10 | 11 | end 12 | -------------------------------------------------------------------------------- /matlab/+caffe/set_mode_cpu.m: -------------------------------------------------------------------------------- 1 | function set_mode_cpu() 2 | % set_mode_cpu() 3 | % set Caffe to CPU mode 4 | 5 | caffe_('set_mode_cpu'); 6 | 7 | end 8 | -------------------------------------------------------------------------------- /matlab/+caffe/set_mode_gpu.m: -------------------------------------------------------------------------------- 1 | function set_mode_gpu() 2 | % set_mode_gpu() 3 | % set Caffe to GPU mode 4 | 5 | caffe_('set_mode_gpu'); 6 | 7 | end 8 | -------------------------------------------------------------------------------- /matlab/+caffe/version.m: -------------------------------------------------------------------------------- 1 | function version_str = version() 2 | % version() 3 | % show Caffe's version. 4 | 5 | version_str = caffe_('version'); 6 | 7 | end 8 | -------------------------------------------------------------------------------- /matlab/hdf5creation/.gitignore: -------------------------------------------------------------------------------- 1 | *.h5 2 | list.txt 3 | -------------------------------------------------------------------------------- /python/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(NOT HAVE_PYTHON) 2 | message(STATUS "Python interface is disabled or not all required dependencies found. Building without it...") 3 | return() 4 | endif() 5 | 6 | file(GLOB_RECURSE python_srcs ${PROJECT_SOURCE_DIR}/python/*.cpp) 7 | 8 | add_library(pycaffe SHARED ${python_srcs}) 9 | caffe_default_properties(pycaffe) 10 | set_target_properties(pycaffe PROPERTIES PREFIX "" OUTPUT_NAME "_caffe") 11 | target_include_directories(pycaffe PUBLIC ${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIR}) 12 | target_link_libraries(pycaffe PUBLIC ${Caffe_LINK} ${PYTHON_LIBRARIES}) 13 | 14 | if(UNIX OR APPLE) 15 | set(__linkname "${PROJECT_SOURCE_DIR}/python/caffe/_caffe.so") 16 | add_custom_command(TARGET pycaffe POST_BUILD 17 | COMMAND ln -sf $ "${__linkname}" 18 | COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_SOURCE_DIR}/python/caffe/proto 19 | COMMAND touch ${PROJECT_SOURCE_DIR}/python/caffe/proto/__init__.py 20 | COMMAND cp ${proto_gen_folder}/*.py ${PROJECT_SOURCE_DIR}/python/caffe/proto/ 21 | COMMENT "Creating symlink ${__linkname} -> ${PROJECT_BINARY_DIR}/lib/_caffe${Caffe_POSTFIX}.so") 22 | endif() 23 | 24 | # ---[ Install 25 | # scripts 26 | file(GLOB python_files *.py requirements.txt) 27 | install(FILES ${python_files} DESTINATION python) 28 | 29 | # module 30 | install(DIRECTORY caffe 31 | DESTINATION python 32 | FILES_MATCHING 33 | PATTERN "*.py" 34 | PATTERN "ilsvrc_2012_mean.npy" 35 | PATTERN "test" EXCLUDE 36 | ) 37 | 38 | # _caffe.so 39 | install(TARGETS pycaffe DESTINATION python/caffe) 40 | 41 | -------------------------------------------------------------------------------- /python/caffe/__init__.py: -------------------------------------------------------------------------------- 1 | from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer 2 | from ._caffe import init_log, log, set_mode_cpu, set_mode_gpu, set_device, Layer, get_solver, layer_type_list, set_random_seed, solver_count, set_solver_count, solver_rank, set_solver_rank, set_multiprocess, has_nccl 3 | from ._caffe import __version__ 4 | from .proto.caffe_pb2 import TRAIN, TEST 5 | from .classifier import Classifier 6 | from .detector import Detector 7 | from . import io 8 | from .net_spec import layers, params, NetSpec, to_proto 9 | -------------------------------------------------------------------------------- /python/caffe/imagenet/ilsvrc_2012_mean.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/python/caffe/imagenet/ilsvrc_2012_mean.npy -------------------------------------------------------------------------------- /python/caffe/test/test_draw.py: -------------------------------------------------------------------------------- 1 | import os 2 | import unittest 3 | 4 | from google.protobuf import text_format 5 | 6 | import caffe.draw 7 | from caffe.proto import caffe_pb2 8 | 9 | def getFilenames(): 10 | """Yields files in the source tree which are Net prototxts.""" 11 | result = [] 12 | 13 | root_dir = os.path.abspath(os.path.join( 14 | os.path.dirname(__file__), '..', '..', '..')) 15 | assert os.path.exists(root_dir) 16 | 17 | for dirname in ('models', 'examples'): 18 | dirname = os.path.join(root_dir, dirname) 19 | assert os.path.exists(dirname) 20 | for cwd, _, filenames in os.walk(dirname): 21 | for filename in filenames: 22 | filename = os.path.join(cwd, filename) 23 | if filename.endswith('.prototxt') and 'solver' not in filename: 24 | yield os.path.join(dirname, filename) 25 | 26 | 27 | class TestDraw(unittest.TestCase): 28 | def test_draw_net(self): 29 | for filename in getFilenames(): 30 | net = caffe_pb2.NetParameter() 31 | with open(filename) as infile: 32 | text_format.Merge(infile.read(), net) 33 | caffe.draw.draw_net(net, 'LR') 34 | 35 | 36 | if __name__ == "__main__": 37 | unittest.main() 38 | -------------------------------------------------------------------------------- /python/caffe/test/test_io.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import unittest 3 | 4 | import caffe 5 | 6 | class TestBlobProtoToArray(unittest.TestCase): 7 | 8 | def test_old_format(self): 9 | data = np.zeros((10,10)) 10 | blob = caffe.proto.caffe_pb2.BlobProto() 11 | blob.data.extend(list(data.flatten())) 12 | shape = (1,1,10,10) 13 | blob.num, blob.channels, blob.height, blob.width = shape 14 | 15 | arr = caffe.io.blobproto_to_array(blob) 16 | self.assertEqual(arr.shape, shape) 17 | 18 | def test_new_format(self): 19 | data = np.zeros((10,10)) 20 | blob = caffe.proto.caffe_pb2.BlobProto() 21 | blob.data.extend(list(data.flatten())) 22 | blob.shape.dim.extend(list(data.shape)) 23 | 24 | arr = caffe.io.blobproto_to_array(blob) 25 | self.assertEqual(arr.shape, data.shape) 26 | 27 | def test_no_shape(self): 28 | data = np.zeros((10,10)) 29 | blob = caffe.proto.caffe_pb2.BlobProto() 30 | blob.data.extend(list(data.flatten())) 31 | 32 | with self.assertRaises(ValueError): 33 | caffe.io.blobproto_to_array(blob) 34 | 35 | def test_scalar(self): 36 | data = np.ones((1)) * 123 37 | blob = caffe.proto.caffe_pb2.BlobProto() 38 | blob.data.extend(list(data.flatten())) 39 | 40 | arr = caffe.io.blobproto_to_array(blob) 41 | self.assertEqual(arr, 123) 42 | 43 | 44 | class TestArrayToDatum(unittest.TestCase): 45 | 46 | def test_label_none_size(self): 47 | # Set label 48 | d1 = caffe.io.array_to_datum( 49 | np.ones((10,10,3)), label=1) 50 | # Don't set label 51 | d2 = caffe.io.array_to_datum( 52 | np.ones((10,10,3))) 53 | # Not setting the label should result in a smaller object 54 | self.assertGreater( 55 | len(d1.SerializeToString()), 56 | len(d2.SerializeToString())) 57 | -------------------------------------------------------------------------------- /python/caffe/test/test_layer_type_list.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | import caffe 4 | 5 | class TestLayerTypeList(unittest.TestCase): 6 | 7 | def test_standard_types(self): 8 | #removing 'Data' from list 9 | for type_name in ['Data', 'Convolution', 'InnerProduct']: 10 | self.assertIn(type_name, caffe.layer_type_list(), 11 | '%s not in layer_type_list()' % type_name) 12 | -------------------------------------------------------------------------------- /python/caffe/test/test_nccl.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import unittest 3 | 4 | import caffe 5 | 6 | 7 | class TestNCCL(unittest.TestCase): 8 | 9 | def test_newuid(self): 10 | """ 11 | Test that NCCL uids are of the proper type 12 | according to python version 13 | """ 14 | if caffe.has_nccl(): 15 | uid = caffe.NCCL.new_uid() 16 | if sys.version_info.major >= 3: 17 | self.assertTrue(isinstance(uid, bytes)) 18 | else: 19 | self.assertTrue(isinstance(uid, str)) 20 | -------------------------------------------------------------------------------- /python/requirements.txt: -------------------------------------------------------------------------------- 1 | Cython>=0.19.2 2 | numpy>=1.7.1 3 | scipy>=0.13.2 4 | scikit-image>=0.9.3 5 | matplotlib>=1.3.1 6 | ipython>=3.0.0 7 | h5py>=2.2.0 8 | leveldb>=0.191 9 | networkx>=1.8.1 10 | nose>=1.3.0 11 | pandas>=0.12.0 12 | python-dateutil>=1.4,<2 13 | protobuf>=2.5.0 14 | python-gflags>=2.0 15 | pyyaml>=3.10 16 | Pillow>=2.3.0 17 | six>=1.1.0 -------------------------------------------------------------------------------- /results/0418_Alex_4_76/LR.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0418_Alex_4_76/LR.pdf -------------------------------------------------------------------------------- /results/0418_Alex_4_76/accuracy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0418_Alex_4_76/accuracy.pdf -------------------------------------------------------------------------------- /results/0418_Alex_4_76/loss.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0418_Alex_4_76/loss.pdf -------------------------------------------------------------------------------- /results/0418_Alex_4_76/solver.prototxt: -------------------------------------------------------------------------------- 1 | net: "D:/caffe-master/projects/20170418/train_val.prototxt" 2 | test_iter: 4 3 | test_interval: 500 4 | base_lr: 0.001 5 | lr_policy: "step" 6 | gamma: 0.1 7 | stepsize: 5000 8 | display: 20 9 | max_iter: 100000 10 | momentum: 0.9 11 | weight_decay: 0.0005 12 | snapshot: 5000 13 | snapshot_prefix: "D:/caffe-master/projects/20170418" 14 | solver_mode: GPU 15 | -------------------------------------------------------------------------------- /results/0419_Alex+_4_83/LR.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0419_Alex+_4_83/LR.pdf -------------------------------------------------------------------------------- /results/0419_Alex+_4_83/accuracy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0419_Alex+_4_83/accuracy.pdf -------------------------------------------------------------------------------- /results/0419_Alex+_4_83/loss.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0419_Alex+_4_83/loss.pdf -------------------------------------------------------------------------------- /results/0419_Alex+_4_83/solver.prototxt: -------------------------------------------------------------------------------- 1 | net: "D:/caffe-master/projects/20170419/train_val.prototxt" 2 | test_iter: 10 3 | test_interval: 500 4 | base_lr: 0.001 5 | lr_policy: "step" 6 | gamma: 0.1 7 | stepsize: 5000 8 | display: 20 9 | max_iter: 200000 10 | momentum: 0.9 11 | weight_decay: 0.0005 12 | snapshot: 5000 13 | snapshot_prefix: "D:/caffe-master/projects/20170419" 14 | solver_mode: GPU 15 | -------------------------------------------------------------------------------- /results/0424_GoogLe+_4_91/LR.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0424_GoogLe+_4_91/LR.pdf -------------------------------------------------------------------------------- /results/0424_GoogLe+_4_91/accuracy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0424_GoogLe+_4_91/accuracy.pdf -------------------------------------------------------------------------------- /results/0424_GoogLe+_4_91/loss.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0424_GoogLe+_4_91/loss.pdf -------------------------------------------------------------------------------- /results/0424_GoogLe+_4_91/solver.prototxt: -------------------------------------------------------------------------------- 1 | net: "D:/caffe-master/projects/20170424/train_val.prototxt" 2 | test_iter: 40 3 | test_interval: 200 4 | test_initialization: true 5 | display: 40 6 | average_loss: 40 7 | base_lr: 0.001 8 | lr_policy: "step" 9 | stepsize: 5000 10 | gamma: 0.96 11 | max_iter: 100000 12 | momentum: 0.9 13 | weight_decay: 0.0002 14 | snapshot: 5000 15 | snapshot_prefix: "D:/caffe-master/projects/20170424" 16 | solver_mode: GPU 17 | -------------------------------------------------------------------------------- /results/0427_GoogLe_4_77/LR.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0427_GoogLe_4_77/LR.pdf -------------------------------------------------------------------------------- /results/0427_GoogLe_4_77/accuracy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0427_GoogLe_4_77/accuracy.pdf -------------------------------------------------------------------------------- /results/0427_GoogLe_4_77/loss.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0427_GoogLe_4_77/loss.pdf -------------------------------------------------------------------------------- /results/0427_GoogLe_4_77/solver.prototxt: -------------------------------------------------------------------------------- 1 | net: "D:/caffe-master/projects/20170427/train_val.prototxt" 2 | test_iter: 4 3 | test_interval: 200 4 | test_initialization: true 5 | display: 40 6 | average_loss: 40 7 | base_lr: 0.001 8 | lr_policy: "step" 9 | stepsize: 5000 10 | gamma: 0.96 11 | max_iter: 100000 12 | momentum: 0.9 13 | weight_decay: 0.0002 14 | snapshot: 5000 15 | snapshot_prefix: "D:/caffe-master/projects/20170427" 16 | solver_mode: GPU 17 | -------------------------------------------------------------------------------- /results/0428_Alex_2_94/LR.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0428_Alex_2_94/LR.pdf -------------------------------------------------------------------------------- /results/0428_Alex_2_94/accuracy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0428_Alex_2_94/accuracy.pdf -------------------------------------------------------------------------------- /results/0428_Alex_2_94/loss.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0428_Alex_2_94/loss.pdf -------------------------------------------------------------------------------- /results/0428_Alex_2_94/solver.prototxt: -------------------------------------------------------------------------------- 1 | net: "D:/caffe-master/projects/20170428/train_val.prototxt" 2 | test_iter: 4 3 | test_interval: 500 4 | base_lr: 0.001 5 | lr_policy: "step" 6 | gamma: 0.1 7 | stepsize: 5000 8 | display: 20 9 | max_iter: 100000 10 | momentum: 0.9 11 | weight_decay: 0.0005 12 | snapshot: 5000 13 | snapshot_prefix: "D:/caffe-master/projects/20170428" 14 | solver_mode: GPU 15 | -------------------------------------------------------------------------------- /results/0428_Alex_2_94/train_label.m: -------------------------------------------------------------------------------- 1 | clear all 2 | clc 3 | foodDir='D:\caffe-master\projects\20170428\train' 4 | numClasses=2 5 | classes=dir(foodDir) 6 | classes=classes([classes.isdir]) 7 | classes={classes(3:numClasses+2).name} 8 | imageName={} 9 | fp=fopen('train.txt','a') 10 | for ci=1:length(classes) 11 | ims=dir(fullfile(foodDir,classes{ci},'*.jpg'))' 12 | for ii=1:length(ims) 13 | fprintf(fp,classes{ci}) 14 | fprintf(fp,'/'); 15 | fprintf(fp,ims(ii).name); 16 | fprintf(fp,' ') 17 | fprintf(fp,'%d',ci-1) 18 | fprintf(fp,'\r\n') 19 | end 20 | end 21 | fclose(fp) -------------------------------------------------------------------------------- /results/0429_Alex_2_96/LR.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0429_Alex_2_96/LR.pdf -------------------------------------------------------------------------------- /results/0429_Alex_2_96/accuracy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0429_Alex_2_96/accuracy.pdf -------------------------------------------------------------------------------- /results/0429_Alex_2_96/loss.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/0429_Alex_2_96/loss.pdf -------------------------------------------------------------------------------- /results/0429_Alex_2_96/solver.prototxt: -------------------------------------------------------------------------------- 1 | net: "D:/caffe-master/projects/20170429/train_val.prototxt" 2 | test_iter: 20 3 | test_interval: 500 4 | base_lr: 0.001 5 | lr_policy: "step" 6 | gamma: 0.1 7 | stepsize: 2500 8 | display: 20 9 | max_iter: 100000 10 | momentum: 0.9 11 | weight_decay: 0.0005 12 | snapshot: 5000 13 | snapshot_prefix: "D:/caffe-master/projects/20170429" 14 | solver_mode: GPU 15 | -------------------------------------------------------------------------------- /results/raw image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/raw image.jpg -------------------------------------------------------------------------------- /results/result1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/result1.png -------------------------------------------------------------------------------- /results/result2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/results/result2.png -------------------------------------------------------------------------------- /scripts/build_docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Build documentation for display in web browser. 3 | 4 | PORT=${1:-4000} 5 | 6 | echo "usage: build_docs.sh [port]" 7 | 8 | # Find the docs dir, no matter where the script is called 9 | ROOT_DIR="$( cd "$(dirname "$0")"/.. ; pwd -P )" 10 | cd $ROOT_DIR 11 | 12 | # Gather docs. 13 | scripts/gather_examples.sh 14 | 15 | # Split caffe.proto for inclusion by layer catalogue. 16 | scripts/split_caffe_proto.py 17 | 18 | # Generate developer docs. 19 | make docs 20 | 21 | # Display docs using web server. 22 | cd docs 23 | jekyll serve -w -s . -d _site --port=$PORT 24 | -------------------------------------------------------------------------------- /scripts/caffe: -------------------------------------------------------------------------------- 1 | # bash completion for Caffe's command line utility -*- shell-script -*- 2 | # COPYRIGHT (C) 2015,2016 Zhou Mo 3 | # License: BSD-2-Clause 4 | # Originally appeard at https://github.com/BVLC/caffe/issues/3149 5 | 6 | # Updated for caffe (1.0.0~rc3+20160715-g42cd785) 7 | _caffe() 8 | { 9 | local cur prev words cword 10 | _init_completion -s || return 11 | 12 | local prototxts='@(prototxt)' 13 | local caffemodels='@(caffemodel,binaryproto)' 14 | local solverstates='@(solverstate)' 15 | local caffefiles='@(prototxt|caffemodel|solverstate)' 16 | 17 | local flags='-gpu -iterations -model -snapshot -solver -weights -sighup_effect -sigint_effect -level -stage -phase' 18 | 19 | if [[ $cword -eq 1 ]]; then 20 | COMPREPLY=( $( compgen -W 'train test time device_query' -- "$cur" ) ) 21 | return 0 22 | fi 23 | 24 | if [[ $cword -eq 2 ]]; then 25 | case ${words[1]} in 26 | train|test|device_query|time) 27 | COMPREPLY=( $( compgen -W "$flags" -- "$cur") ) 28 | return 0 29 | ;; 30 | *) 31 | return 0 32 | ;; 33 | esac 34 | fi 35 | 36 | case $prev in 37 | -gpu|-iterations|-version|-level|-stage) 38 | return 0 39 | ;; 40 | -solver|-model) 41 | _filedir $prototxts 42 | return 0 43 | ;; 44 | -weights) 45 | _filedir $caffemodels 46 | return 0 47 | ;; 48 | -snapshot) 49 | _filedir $solverstates 50 | return 0 51 | ;; 52 | -sighup_effect|-sigint_effect) 53 | COMPREPLY=( $( compgen -W 'snapshot stop none' -- "$cur") ) 54 | return 0 55 | ;; 56 | -phase) 57 | COMPREPLY=( $( compgen -W 'TRAIN TEST' -- "$cur") ) 58 | return 0 59 | ;; 60 | *) 61 | COMPREPLY=( $( compgen -W "$flags" -- "$cur") ) 62 | return 0 63 | ;; 64 | esac 65 | 66 | # file completion on relevant files 67 | _filedir "$caffefiles" 68 | 69 | return 0 70 | } 71 | complete -F _caffe caffe 72 | 73 | # vim 74 | -------------------------------------------------------------------------------- /scripts/copy_notebook.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """ 3 | Takes as arguments: 4 | 1. the path to a JSON file (such as an IPython notebook). 5 | 2. the path to output file 6 | 7 | If 'metadata' dict in the JSON file contains 'include_in_docs': true, 8 | then copies the file to output file, appending the 'metadata' property 9 | as YAML front-matter, adding the field 'category' with value 'notebook'. 10 | """ 11 | import os 12 | import sys 13 | import json 14 | 15 | filename = sys.argv[1] 16 | output_filename = sys.argv[2] 17 | content = json.load(open(filename)) 18 | 19 | if 'include_in_docs' in content['metadata'] and content['metadata']['include_in_docs']: 20 | yaml_frontmatter = ['---'] 21 | for key, val in content['metadata'].iteritems(): 22 | if key == 'example_name': 23 | key = 'title' 24 | if val == '': 25 | val = os.path.basename(filename) 26 | yaml_frontmatter.append('{}: {}'.format(key, val)) 27 | yaml_frontmatter += ['category: notebook'] 28 | yaml_frontmatter += ['original_path: ' + filename] 29 | 30 | with open(output_filename, 'w') as fo: 31 | fo.write('\n'.join(yaml_frontmatter + ['---']) + '\n') 32 | fo.write(open(filename).read()) 33 | -------------------------------------------------------------------------------- /scripts/deploy_docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Publish documentation to the gh-pages site. 3 | 4 | # The remote for pushing the docs (defaults to origin). 5 | # This is where you will submit the PR to BVLC:gh-pages from. 6 | REMOTE=${1:-origin} 7 | 8 | echo "Generating docs and pushing to $REMOTE:gh-pages..." 9 | echo "To build and view docs when not on master, simply do 'jekyll serve -s docs'." 10 | echo 11 | 12 | REMOTE_URL=`git config --get remote.${REMOTE}.url` 13 | BRANCH=`git rev-parse --abbrev-ref HEAD` 14 | MSG=`git log --oneline -1` 15 | 16 | if [[ $BRANCH = 'master' ]]; then 17 | # Find the docs dir, no matter where the script is called 18 | DIR="$( cd "$(dirname "$0")" ; pwd -P )" 19 | DOCS_SITE_DIR=$DIR/../docs/_site 20 | 21 | # Make sure that docs/_site tracks remote:gh-pages. 22 | # If not, then we make a new repo and check out just that branch. 23 | mkdir -p $DOCS_SITE_DIR 24 | cd $DOCS_SITE_DIR 25 | SITE_REMOTE_URL=`git config --get remote.${REMOTE}.url` 26 | SITE_BRANCH=`git rev-parse --abbrev-ref HEAD` 27 | 28 | echo $SITE_REMOTE_URL 29 | echo $SITE_BRANCH 30 | echo `pwd` 31 | 32 | if [[ ( $SITE_REMOTE_URL = $REMOTE_URL ) && ( $SITE_BRANCH = 'gh-pages' ) ]]; then 33 | echo "Confirmed that docs/_site has same remote as main repo, and is on gh-pages." 34 | else 35 | echo "Checking out $REMOTE:gh-pages into docs/_site (will take a little time)." 36 | git init . 37 | git remote add -t gh-pages -f $REMOTE $REMOTE_URL 38 | git checkout gh-pages 39 | fi 40 | 41 | echo "Building the site into docs/_site, and committing the changes." 42 | jekyll build -s .. -d . 43 | git add --all . 44 | git commit -m "$MSG" 45 | git push $REMOTE gh-pages 46 | 47 | echo "All done!" 48 | cd ../.. 49 | else echo "You must run this deployment script from the 'master' branch." 50 | fi 51 | -------------------------------------------------------------------------------- /scripts/download_model_from_gist.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | GIST=$1 4 | DIRNAME=${2:-./models} 5 | 6 | if [ -z $GIST ]; then 7 | echo "usage: download_model_from_gist.sh " 8 | exit 9 | fi 10 | 11 | GIST_DIR=$(echo $GIST | tr '/' '-') 12 | MODEL_DIR="$DIRNAME/$GIST_DIR" 13 | 14 | if [ -d $MODEL_DIR ]; then 15 | echo "$MODEL_DIR already exists! Please make sure you're not overwriting anything important!" 16 | exit 17 | fi 18 | 19 | echo "Downloading Caffe model info to $MODEL_DIR ..." 20 | mkdir -p $MODEL_DIR 21 | wget https://gist.github.com/$GIST/download -O $MODEL_DIR/gist.zip 22 | unzip -j $MODEL_DIR/gist.zip -d $MODEL_DIR 23 | rm $MODEL_DIR/gist.zip 24 | echo "Done" 25 | -------------------------------------------------------------------------------- /scripts/gather_examples.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Assemble documentation for the project into one directory via symbolic links. 3 | 4 | # Find the docs dir, no matter where the script is called 5 | ROOT_DIR="$( cd "$(dirname "$0")"/.. ; pwd -P )" 6 | cd $ROOT_DIR 7 | 8 | # Gather docs from examples/**/readme.md 9 | GATHERED_DIR=docs/gathered 10 | rm -r $GATHERED_DIR 11 | mkdir $GATHERED_DIR 12 | for README_FILENAME in $(find examples -iname "readme.md"); do 13 | # Only use file if it is to be included in docs. 14 | if grep -Fxq "include_in_docs: true" $README_FILENAME; then 15 | # Make link to readme.md in docs/gathered/. 16 | # Since everything is called readme.md, rename it by its dirname. 17 | README_DIRNAME=`dirname $README_FILENAME` 18 | DOCS_FILENAME=$GATHERED_DIR/$README_DIRNAME.md 19 | mkdir -p `dirname $DOCS_FILENAME` 20 | ln -s $ROOT_DIR/$README_FILENAME $DOCS_FILENAME 21 | fi 22 | done 23 | 24 | # Gather docs from examples/*.ipynb and add YAML front-matter. 25 | for NOTEBOOK_FILENAME in $(find examples -depth -iname "*.ipynb"); do 26 | DOCS_FILENAME=$GATHERED_DIR/$NOTEBOOK_FILENAME 27 | mkdir -p `dirname $DOCS_FILENAME` 28 | python scripts/copy_notebook.py $NOTEBOOK_FILENAME $DOCS_FILENAME 29 | done 30 | -------------------------------------------------------------------------------- /scripts/split_caffe_proto.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import mmap 3 | import re 4 | import os 5 | import errno 6 | 7 | script_path = os.path.dirname(os.path.realpath(__file__)) 8 | 9 | # a regex to match the parameter definitions in caffe.proto 10 | r = re.compile(r'(?://.*\n)*message ([^ ]*) \{\n(?: .*\n|\n)*\}') 11 | 12 | # create directory to put caffe.proto fragments 13 | try: 14 | os.mkdir( 15 | os.path.join(script_path, 16 | '../docs/_includes/')) 17 | os.mkdir( 18 | os.path.join(script_path, 19 | '../docs/_includes/proto/')) 20 | except OSError as exception: 21 | if exception.errno != errno.EEXIST: 22 | raise 23 | 24 | caffe_proto_fn = os.path.join( 25 | script_path, 26 | '../src/caffe/proto/caffe.proto') 27 | 28 | with open(caffe_proto_fn, 'r') as fin: 29 | 30 | for m in r.finditer(fin.read(), re.MULTILINE): 31 | fn = os.path.join( 32 | script_path, 33 | '../docs/_includes/proto/%s.txt' % m.group(1)) 34 | with open(fn, 'w') as fout: 35 | fout.write(m.group(0)) 36 | -------------------------------------------------------------------------------- /scripts/travis/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # build the project 3 | 4 | BASEDIR=$(dirname $0) 5 | source $BASEDIR/defaults.sh 6 | 7 | if ! $WITH_CMAKE ; then 8 | make --jobs $NUM_THREADS all test pycaffe warn 9 | else 10 | cd build 11 | make --jobs $NUM_THREADS all test.testbin 12 | fi 13 | make lint 14 | -------------------------------------------------------------------------------- /scripts/travis/configure-cmake.sh: -------------------------------------------------------------------------------- 1 | # CMake configuration 2 | 3 | mkdir -p build 4 | cd build 5 | 6 | ARGS="-DCMAKE_BUILD_TYPE=Release -DBLAS=Open" 7 | 8 | if $WITH_PYTHON3 ; then 9 | ARGS="$ARGS -Dpython_version=3" 10 | fi 11 | 12 | if $WITH_IO ; then 13 | ARGS="$ARGS -DUSE_OPENCV=On -DUSE_LMDB=On -DUSE_LEVELDB=On" 14 | else 15 | ARGS="$ARGS -DUSE_OPENCV=Off -DUSE_LMDB=Off -DUSE_LEVELDB=Off" 16 | fi 17 | 18 | if $WITH_CUDA ; then 19 | # Only build SM50 20 | ARGS="$ARGS -DCPU_ONLY=Off -DCUDA_ARCH_NAME=Manual -DCUDA_ARCH_BIN=\"50\" -DCUDA_ARCH_PTX=\"\"" 21 | else 22 | ARGS="$ARGS -DCPU_ONLY=On" 23 | fi 24 | 25 | if $WITH_CUDNN ; then 26 | ARGS="$ARGS -DUSE_CUDNN=On" 27 | else 28 | ARGS="$ARGS -DUSE_CUDNN=Off" 29 | fi 30 | 31 | cmake .. $ARGS 32 | 33 | -------------------------------------------------------------------------------- /scripts/travis/configure-make.sh: -------------------------------------------------------------------------------- 1 | # raw Makefile configuration 2 | 3 | LINE () { 4 | echo "$@" >> Makefile.config 5 | } 6 | 7 | cp Makefile.config.example Makefile.config 8 | 9 | LINE "BLAS := open" 10 | LINE "WITH_PYTHON_LAYER := 1" 11 | 12 | if $WITH_PYTHON3 ; then 13 | # TODO(lukeyeager) this path is currently disabled because of test errors like: 14 | # ImportError: dynamic module does not define init function (PyInit__caffe) 15 | LINE "PYTHON_LIBRARIES := python3.4m boost_python-py34" 16 | LINE "PYTHON_INCLUDE := /usr/include/python3.4 /usr/lib/python3/dist-packages/numpy/core/include" 17 | LINE "INCLUDE_DIRS := \$(INCLUDE_DIRS) \$(PYTHON_INCLUDE)" 18 | fi 19 | 20 | if ! $WITH_IO ; then 21 | LINE "USE_OPENCV := 0" 22 | LINE "USE_LEVELDB := 0" 23 | LINE "USE_LMDB := 0" 24 | fi 25 | 26 | if $WITH_CUDA ; then 27 | # Only build SM50 28 | LINE "CUDA_ARCH := -gencode arch=compute_50,code=sm_50" 29 | else 30 | LINE "CPU_ONLY := 1" 31 | fi 32 | 33 | if $WITH_CUDNN ; then 34 | LINE "USE_CUDNN := 1" 35 | fi 36 | 37 | -------------------------------------------------------------------------------- /scripts/travis/configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # configure the project 3 | 4 | BASEDIR=$(dirname $0) 5 | source $BASEDIR/defaults.sh 6 | 7 | if ! $WITH_CMAKE ; then 8 | source $BASEDIR/configure-make.sh 9 | else 10 | source $BASEDIR/configure-cmake.sh 11 | fi 12 | -------------------------------------------------------------------------------- /scripts/travis/defaults.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # set default environment variables 3 | 4 | set -e 5 | 6 | WITH_CMAKE=${WITH_CMAKE:-false} 7 | WITH_PYTHON3=${WITH_PYTHON3:-false} 8 | WITH_IO=${WITH_IO:-true} 9 | WITH_CUDA=${WITH_CUDA:-false} 10 | WITH_CUDNN=${WITH_CUDNN:-false} 11 | -------------------------------------------------------------------------------- /scripts/travis/install-python-deps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # install extra Python dependencies 3 | # (must come after setup-venv) 4 | 5 | BASEDIR=$(dirname $0) 6 | source $BASEDIR/defaults.sh 7 | 8 | if ! $WITH_PYTHON3 ; then 9 | # Python2 10 | : 11 | else 12 | # Python3 13 | pip install --pre protobuf==3.0.0b3 14 | pip install pydot 15 | fi 16 | -------------------------------------------------------------------------------- /scripts/travis/setup-venv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # setup a Python virtualenv 3 | # (must come after install-deps) 4 | 5 | BASEDIR=$(dirname $0) 6 | source $BASEDIR/defaults.sh 7 | 8 | VENV_DIR=${1:-~/venv} 9 | 10 | # setup our own virtualenv 11 | if $WITH_PYTHON3; then 12 | PYTHON_EXE='/usr/bin/python3' 13 | else 14 | PYTHON_EXE='/usr/bin/python2' 15 | fi 16 | 17 | # use --system-site-packages so that Python will use deb packages 18 | virtualenv $VENV_DIR -p $PYTHON_EXE --system-site-packages 19 | -------------------------------------------------------------------------------- /scripts/travis/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # test the project 3 | 4 | BASEDIR=$(dirname $0) 5 | source $BASEDIR/defaults.sh 6 | 7 | if $WITH_CUDA ; then 8 | echo "Skipping tests for CUDA build" 9 | exit 0 10 | fi 11 | 12 | if ! $WITH_CMAKE ; then 13 | make runtest 14 | make pytest 15 | else 16 | cd build 17 | make runtest 18 | make pytest 19 | fi 20 | -------------------------------------------------------------------------------- /scripts/upload_model_to_gist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check for valid directory 4 | DIRNAME=$1 5 | if [ ! -f $DIRNAME/readme.md ]; then 6 | echo "usage: upload_model_to_gist.sh " 7 | echo " /readme.md must exist" 8 | fi 9 | cd $DIRNAME 10 | FILES=`find . -maxdepth 1 -type f ! -name "*.caffemodel*" | xargs echo` 11 | 12 | # Check for gist tool. 13 | gist -v >/dev/null 2>&1 || { echo >&2 "I require 'gist' but it's not installed. Do 'gem install gist'."; exit 1; } 14 | 15 | NAME=`sed -n 's/^name:[[:space:]]*//p' readme.md` 16 | if [ -z "$NAME" ]; then 17 | echo " /readme.md must contain name field in the front-matter." 18 | fi 19 | 20 | GIST=`sed -n 's/^gist_id:[[:space:]]*//p' readme.md` 21 | if [ -z "$GIST" ]; then 22 | echo "Uploading new Gist" 23 | gist -p -d "$NAME" $FILES 24 | else 25 | echo "Updating existing Gist, id $GIST" 26 | gist -u $GIST -d "$NAME" $FILES 27 | fi 28 | 29 | RESULT=$? 30 | if [ $RESULT -eq 0 ]; then 31 | echo "You've uploaded your model!" 32 | echo "Don't forget to add the gist_id field to your /readme.md now!" 33 | echo "Run the command again after you do that, to make sure the Gist id propagates." 34 | echo "" 35 | echo "And do share your model over at https://github.com/BVLC/caffe/wiki/Model-Zoo" 36 | else 37 | echo "Something went wrong!" 38 | fi 39 | -------------------------------------------------------------------------------- /sliding_code/z_slide.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/sliding_code/z_slide.m -------------------------------------------------------------------------------- /sliding_code/z_varslide.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/sliding_code/z_varslide.m -------------------------------------------------------------------------------- /sliding_code/zyp_slide.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/QinganZhao/Deep-Learning-Based-Structural-Damage-Detection/806f0c3648fb7f3b86181247758386b1538d2394/sliding_code/zyp_slide.m -------------------------------------------------------------------------------- /tools/launch_resize_and_crop_images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #### https://github.com/Yangqing/mincepie/wiki/Launch-Your-Mapreducer 3 | 4 | # If you encounter error that the address already in use, kill the process. 5 | # 11235 is the port of server process 6 | # https://github.com/Yangqing/mincepie/blob/master/mincepie/mince.py 7 | # sudo netstat -ap | grep 11235 8 | # The last column of the output is PID/Program name 9 | # kill -9 PID 10 | # Second solution: 11 | # nmap localhost 12 | # fuser -k 11235/tcp 13 | # Or just wait a few seconds. 14 | 15 | ## Launch your Mapreduce locally 16 | # num_clients: number of processes 17 | # image_lib: OpenCV or PIL, case insensitive. The default value is the faster OpenCV. 18 | # input: the file containing one image path relative to input_folder each line 19 | # input_folder: where are the original images 20 | # output_folder: where to save the resized and cropped images 21 | ./resize_and_crop_images.py --num_clients=8 --image_lib=opencv --input=/home/user/Datasets/ImageNet/ILSVRC2010/ILSVRC2010_images.txt --input_folder=/home/user/Datasets/ImageNet/ILSVRC2010/ILSVRC2010_images_train/ --output_folder=/home/user/Datasets/ImageNet/ILSVRC2010/ILSVRC2010_images_train_resized/ 22 | 23 | ## Launch your Mapreduce with MPI 24 | # mpirun -n 8 --launch=mpi resize_and_crop_images.py --image_lib=opencv --input=/home/user/Datasets/ImageNet/ILSVRC2010/ILSVRC2010_images.txt --input_folder=/home/user/Datasets/ImageNet/ILSVRC2010/ILSVRC2010_images_train/ --output_folder=/home/user/Datasets/ImageNet/ILSVRC2010/ILSVRC2010_images_train_resized/ 25 | --------------------------------------------------------------------------------