├── Extract_FCN_features ├── .gitattributes ├── .gitignore ├── .gitmodules ├── COPYING ├── Makefile ├── README.md ├── doc │ ├── Makefile │ ├── blocks.tex │ ├── figures │ │ ├── imnet.pdf │ │ ├── pepper.pdf │ │ └── svg │ │ │ ├── conv.svg │ │ │ ├── convt.svg │ │ │ ├── matconvnet-blue.svg │ │ │ └── matconvnet-white.svg │ ├── fundamentals.tex │ ├── geometry.tex │ ├── impl.tex │ ├── intro.tex │ ├── matconvnet-manual.tex │ ├── matdoc.py │ ├── matdocparser.py │ ├── references.bib │ ├── site │ │ ├── docs │ │ │ ├── about.md │ │ │ ├── css │ │ │ │ └── fixes.css │ │ │ ├── developers.md │ │ │ ├── faq.md │ │ │ ├── figures │ │ │ │ ├── stn-perf.png │ │ │ │ └── stn-samples.png │ │ │ ├── functions.md │ │ │ ├── gpu.md │ │ │ ├── index.md │ │ │ ├── install-alt.md │ │ │ ├── install.md │ │ │ ├── js │ │ │ │ ├── mathjaxhelper.js │ │ │ │ └── toggle.js │ │ │ ├── pretrained.md │ │ │ ├── quick.md │ │ │ ├── spatial-transformer.md │ │ │ ├── training.md │ │ │ └── wrappers.md │ │ ├── mkdocs.yml │ │ └── theme │ │ │ ├── base.html │ │ │ ├── content.html │ │ │ ├── css │ │ │ └── base.css │ │ │ ├── js │ │ │ └── base.js │ │ │ ├── matconvnet-blue.svg │ │ │ ├── nav.html │ │ │ └── toc.html │ └── wrappers.tex ├── examples │ ├── cifar │ │ ├── cnn_cifar.m │ │ ├── cnn_cifar_init.m │ │ └── cnn_cifar_init_nin.m │ ├── cnn_train.m │ ├── cnn_train_dag.m │ ├── imagenet │ │ ├── cnn_imagenet.m │ │ ├── cnn_imagenet_camdemo.m │ │ ├── cnn_imagenet_deploy.m │ │ ├── cnn_imagenet_evaluate.m │ │ ├── cnn_imagenet_get_batch.m │ │ ├── cnn_imagenet_googlenet.m │ │ ├── cnn_imagenet_init.m │ │ ├── cnn_imagenet_minimal.m │ │ ├── cnn_imagenet_setup_data.m │ │ └── cnn_imagenet_sync_labels.m │ ├── mnist │ │ ├── cnn_mnist.m │ │ ├── cnn_mnist_experiments.m │ │ └── cnn_mnist_init.m │ ├── spatial_transformer │ │ ├── cnn_stn_cluttered_mnist.m │ │ ├── cnn_stn_cluttered_mnist_init.m │ │ └── readme.txt │ └── vggfaces │ │ └── cnn_vgg_faces.m ├── get_features_inception.m ├── main.m ├── matconvnet.sln ├── matconvnet.vcxproj ├── matconvnet.vcxproj.filters ├── matconvnet.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ ├── matconv CPU.xcscheme │ │ ├── matconv GPU.xcscheme │ │ └── matconv cuDNN.xcscheme ├── matlab │ ├── +dagnn │ │ ├── @DagNN │ │ │ ├── DagNN.m │ │ │ ├── addLayer.m │ │ │ ├── eval.m │ │ │ ├── fromSimpleNN.m │ │ │ ├── getVarReceptiveFields.m │ │ │ ├── getVarSizes.m │ │ │ ├── initParams.m │ │ │ ├── loadobj.m │ │ │ ├── move.m │ │ │ ├── print.m │ │ │ ├── rebuild.m │ │ │ ├── removeLayer.m │ │ │ ├── renameLayer.m │ │ │ ├── renameVar.m │ │ │ ├── reset.m │ │ │ ├── saveobj.m │ │ │ ├── setLayerInputs.m │ │ │ ├── setLayerOutputs.m │ │ │ └── setLayerParams.m │ │ ├── AffineGridGenerator.m │ │ ├── BatchNorm.m │ │ ├── BilinearSampler.m │ │ ├── Concat.m │ │ ├── Conv.m │ │ ├── ConvTranspose.m │ │ ├── Crop.m │ │ ├── DropOut.m │ │ ├── ElementWise.m │ │ ├── Filter.m │ │ ├── LRN.m │ │ ├── Layer.m │ │ ├── Loss.m │ │ ├── NormOffset.m │ │ ├── Pooling.m │ │ ├── ReLU.m │ │ ├── Scale.m │ │ ├── Sigmoid.m │ │ ├── SoftMax.m │ │ ├── SpatialNorm.m │ │ ├── Sum.m │ │ └── UniformScalingGridGenerator.m │ ├── Dist.m │ ├── PR-code │ │ ├── Curve_BenchCode │ │ │ ├── Fmeasure_calu.m │ │ │ ├── Fmeasure_calu_Rect.m │ │ │ ├── Pre_Recall_hitRate.m │ │ │ ├── base_pr_bar_fig │ │ │ │ ├── ASD_bar.fig │ │ │ │ ├── ASD_pr.fig │ │ │ │ ├── BKL.fig │ │ │ │ ├── BKL_pr.fig │ │ │ │ ├── SED1_bar.fig │ │ │ │ ├── SED1_pr.fig │ │ │ │ ├── SED2_bar.fig │ │ │ │ ├── SED2_pr.fig │ │ │ │ ├── base_ASD.mat │ │ │ │ ├── base_BKL.mat │ │ │ │ ├── base_SED1.mat │ │ │ │ ├── base_pr_bar_fig │ │ │ │ │ └── base_BKL.mat │ │ │ │ ├── msra_bar.fig │ │ │ │ └── msra_pr.fig │ │ │ ├── candidateAlgStructure.m │ │ │ ├── curve_bar_plot.m │ │ │ ├── datasetStructure.m │ │ │ ├── examp_asd_Compare.m │ │ │ ├── main_GT_comp.asv │ │ │ ├── main_GT_comp.m │ │ │ ├── main_Rect_comp_Omron.m │ │ │ ├── performBenchmark.m │ │ │ ├── performCalcu.m │ │ │ └── performCalcu_Rect.m │ │ └── PR.m │ ├── PR │ │ ├── AUCs.m │ │ ├── DRFI_ECSSD.mat │ │ ├── MR-DL36_ECSSD.mat │ │ ├── MR-DL_ECSSD.mat │ │ ├── New Folder │ │ │ ├── vgg36scapm_ECSSD.mat │ │ │ ├── vggfeat36labaddweight12_ECSSD.mat │ │ │ └── vggfeat36labaddweight21_ECSSD.mat │ │ ├── lab_ECSSD.mat │ │ ├── test_ECSSD.mat │ │ ├── vgg36216_ECSSD.mat │ │ ├── vgg366_ECSSD.mat │ │ ├── vgg36featrgbslic_ECSSD.mat │ │ ├── vggedge_ECSSD.mat │ │ ├── vggfeatlab12_ECSSD.mat │ │ └── vggfeatlab21_ECSSD.mat │ ├── SLIC-DBSCAN │ │ ├── 0_0_77.bmp │ │ ├── 2_72_72778.bmp │ │ ├── 2_72_72778.jpg │ │ ├── circularstruct.m │ │ ├── cleanupregions.m │ │ ├── dbscan.m │ │ ├── demo.m │ │ ├── drawregionboundaries.m │ │ ├── extract_su_feat.m │ │ ├── finddisconnected.m │ │ ├── makeregionsdistinct.m │ │ ├── maskimage.m │ │ ├── mcleanupregions.m │ │ ├── regionadjacency.m │ │ ├── renumberregions.m │ │ ├── rgb2lab.m │ │ ├── show.m │ │ ├── slic.m │ │ ├── spdbscan.m │ │ └── testdbscan.m │ ├── SLICSuperpixelSegmentation.exe │ ├── SLIC_Split.m │ ├── SLIC_mex.mexw64 │ ├── added │ │ ├── BoundaryConnectivity.m │ │ ├── Dist2WeightMatrix.m │ │ ├── EstimateBgProb.m │ │ ├── EstimateDynamicParas.m │ │ ├── GetAdjMatrix.m │ │ ├── GetBndPatchIds.m │ │ ├── GetDistanceMatrix.m │ │ ├── GetMeanColor.m │ │ ├── GetMeanMinAndMeanTop.m │ │ ├── GetNormedMeanPos.m │ │ ├── LinkBoundarySPs.m │ │ ├── myDrawBounderis.m │ │ └── test_myDrawBounderis.m │ ├── compatibility │ │ └── parallel │ │ │ ├── gather.m │ │ │ ├── labindex.m │ │ │ └── numlabs.m │ ├── demo_SCA1layer.m │ ├── demo_SCAfcn632.m │ ├── findSameEdgeInd.m │ ├── findSupBoundaries.m │ ├── findneighboredge.m │ ├── get_feature_map.m │ ├── get_features_inception.m │ ├── histDist.m │ ├── imResampleMex.mexw64 │ ├── makeEdgeWeights.m │ ├── minmax_demo_SCA1layer.m │ ├── my_makeweights.m │ ├── my_makeweights3.m │ ├── others │ │ ├── AdjcProcloop.m │ │ ├── RGB2Lab.m │ │ ├── ReadDAT.m │ │ ├── adjacency.m │ │ ├── calculateRegionProps.m │ │ ├── colorspace.m │ │ ├── extractSupfeat.m │ │ ├── extract_bg_sp.m │ │ ├── form_codebook.m │ │ ├── labelCluster.m │ │ ├── makeweights.m │ │ ├── mexLasso.m │ │ ├── normalization.m │ │ ├── normalize.m │ │ ├── normalize_1.m │ │ ├── removeframe.m │ │ ├── vgg_argparse.m │ │ ├── vgg_kmeans.m │ │ ├── vgg_kmiter.cxx │ │ ├── vgg_kmiter.dll │ │ ├── vgg_kmiter.mexglx │ │ └── vgg_kmiter.mexw64 │ ├── simplenn │ │ ├── vl_simplenn.m │ │ ├── vl_simplenn_diagnose.m │ │ ├── vl_simplenn_display.m │ │ ├── vl_simplenn_move.m │ │ └── vl_simplenn_tidy.m │ ├── src │ │ ├── bits │ │ │ ├── data.cpp │ │ │ ├── data.cu │ │ │ ├── data.hpp │ │ │ ├── datacu.cu │ │ │ ├── datacu.hpp │ │ │ ├── datamex.cpp │ │ │ ├── datamex.cu │ │ │ ├── datamex.hpp │ │ │ ├── impl │ │ │ │ ├── bilinearsampler.hpp │ │ │ │ ├── bilinearsampler_cpu.cpp │ │ │ │ ├── bilinearsampler_gpu.cu │ │ │ │ ├── blashelper.hpp │ │ │ │ ├── bnorm.hpp │ │ │ │ ├── bnorm_cpu.cpp │ │ │ │ ├── bnorm_gpu.cu │ │ │ │ ├── copy.hpp │ │ │ │ ├── copy_cpu.cpp │ │ │ │ ├── copy_gpu.cu │ │ │ │ ├── cudnnhelper.hpp │ │ │ │ ├── fast_mutex.h │ │ │ │ ├── im2row.hpp │ │ │ │ ├── im2row_cpu.cpp │ │ │ │ ├── im2row_gpu.cu │ │ │ │ ├── imread_gdiplus.cpp │ │ │ │ ├── imread_helpers.hpp │ │ │ │ ├── imread_libjpeg.cpp │ │ │ │ ├── imread_quartz.cpp │ │ │ │ ├── nnbias_blas.hpp │ │ │ │ ├── nnbias_cudnn.cu │ │ │ │ ├── nnbias_cudnn.hpp │ │ │ │ ├── nnbilinearsampler_cudnn.cu │ │ │ │ ├── nnbilinearsampler_cudnn.hpp │ │ │ │ ├── nnconv_blas.hpp │ │ │ │ ├── nnconv_cudnn.cu │ │ │ │ ├── nnconv_cudnn.hpp │ │ │ │ ├── nnpooling_cudnn.cu │ │ │ │ ├── nnpooling_cudnn.hpp │ │ │ │ ├── normalize.hpp │ │ │ │ ├── normalize_cpu.cpp │ │ │ │ ├── normalize_gpu.cu │ │ │ │ ├── pooling.hpp │ │ │ │ ├── pooling_cpu.cpp │ │ │ │ ├── pooling_gpu.cu │ │ │ │ ├── sharedmem.cuh │ │ │ │ ├── subsample.hpp │ │ │ │ ├── subsample_cpu.cpp │ │ │ │ ├── subsample_gpu.cu │ │ │ │ ├── tinythread.cpp │ │ │ │ └── tinythread.h │ │ │ ├── imread.cpp │ │ │ ├── imread.hpp │ │ │ ├── mexutils.h │ │ │ ├── nnbias.cpp │ │ │ ├── nnbias.cu │ │ │ ├── nnbias.hpp │ │ │ ├── nnbilinearsampler.cpp │ │ │ ├── nnbilinearsampler.cu │ │ │ ├── nnbilinearsampler.hpp │ │ │ ├── nnbnorm.cpp │ │ │ ├── nnbnorm.cu │ │ │ ├── nnbnorm.hpp │ │ │ ├── nnconv.cpp │ │ │ ├── nnconv.cu │ │ │ ├── nnconv.hpp │ │ │ ├── nnfullyconnected.cpp │ │ │ ├── nnfullyconnected.cu │ │ │ ├── nnfullyconnected.hpp │ │ │ ├── nnnormalize.cpp │ │ │ ├── nnnormalize.cu │ │ │ ├── nnnormalize.hpp │ │ │ ├── nnpooling.cpp │ │ │ ├── nnpooling.cu │ │ │ ├── nnpooling.hpp │ │ │ ├── nnsubsample.cpp │ │ │ ├── nnsubsample.cu │ │ │ └── nnsubsample.hpp │ │ ├── config │ │ │ ├── mex_CUDA_glnxa64.sh │ │ │ ├── mex_CUDA_glnxa64.xml │ │ │ ├── mex_CUDA_maci64.sh │ │ │ └── mex_CUDA_maci64.xml │ │ ├── vl_imreadjpeg.cpp │ │ ├── vl_imreadjpeg.cu │ │ ├── vl_nnbilinearsampler.cpp │ │ ├── vl_nnbilinearsampler.cu │ │ ├── vl_nnbnorm.cpp │ │ ├── vl_nnbnorm.cu │ │ ├── vl_nnconv.cpp │ │ ├── vl_nnconv.cu │ │ ├── vl_nnconvt.cpp │ │ ├── vl_nnconvt.cu │ │ ├── vl_nnnormalize.cpp │ │ ├── vl_nnnormalize.cu │ │ ├── vl_nnpool.cpp │ │ └── vl_nnpool.cu │ ├── test │ │ ├── 2 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 3 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 4 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 5 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 6 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 7 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 8 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 9 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 10 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 11 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 12 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 13 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 14 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 15 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 16 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 17 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 18 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 19 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 20 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 21 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 22 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 23 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 24 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 25 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 26 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 27 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 28 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 29 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 30 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ ├── 31 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ │ └── 32 │ │ │ ├── 0001.png │ │ │ ├── 0002.png │ │ │ ├── 0003.png │ │ │ ├── 0004.png │ │ │ ├── 0005.png │ │ │ ├── 0006.png │ │ │ └── 0007.png │ ├── twotimes_demo_SCA1layer.m │ ├── vl_argparse.m │ ├── vl_compilenn.m │ ├── vl_imreadjpeg.m │ ├── vl_nnbilinearsampler.m │ ├── vl_nnbnorm.m │ ├── vl_nnconcat.m │ ├── vl_nnconv.m │ ├── vl_nnconvt.m │ ├── vl_nncrop.m │ ├── vl_nndropout.m │ ├── vl_nnloss.m │ ├── vl_nnnoffset.m │ ├── vl_nnnormalize.m │ ├── vl_nnnormalizelp.m │ ├── vl_nnpdist.m │ ├── vl_nnpool.m │ ├── vl_nnrelu.m │ ├── vl_nnsigmoid.m │ ├── vl_nnsoftmax.m │ ├── vl_nnsoftmaxloss.m │ ├── vl_nnspnorm.m │ ├── vl_rootnn.m │ ├── vl_setupnn.m │ └── xtest │ │ ├── suite │ │ ├── Scale.m │ │ ├── nnbilinearsampler.m │ │ ├── nnbnorm.m │ │ ├── nnconcat.m │ │ ├── nnconv.m │ │ ├── nnconvt.m │ │ ├── nndagnn.m │ │ ├── nndropout.m │ │ ├── nnloss.m │ │ ├── nnmnist.m │ │ ├── nnnormalize.m │ │ ├── nnnormalizelp.m │ │ ├── nnoffset.m │ │ ├── nnpdist.m │ │ ├── nnpool.m │ │ ├── nnrelu.m │ │ ├── nnsigmoid.m │ │ ├── nnsimplenn.m │ │ ├── nnsoftmax.m │ │ ├── nnsoftmaxloss.m │ │ ├── nnspnorm.m │ │ └── nntest.m │ │ ├── vl_bench_bnorm.m │ │ ├── vl_bench_imreadjpeg.m │ │ ├── vl_nnbnorm_old.m │ │ ├── vl_test_bnorm.m │ │ ├── vl_test_economic_relu.m │ │ ├── vl_test_gpureset.m │ │ ├── vl_test_imreadjpeg.m │ │ └── vl_testnn.m └── utils │ ├── evaluate_ref_models.m │ ├── get-file.sh │ ├── import-caffe.py │ ├── import-fcn.sh │ ├── import-googlenet.sh │ ├── import-ref-models.sh │ ├── import-resnet.sh │ ├── layers.py │ ├── model2dot.m │ ├── preprocess-imagenet.sh │ ├── proto │ ├── __init__.py │ ├── caffe.proto │ ├── caffe_0115.proto │ ├── caffe_0115_pb2.py │ ├── caffe_6e3916.proto │ ├── caffe_6e3916_pb2.py │ ├── caffe_b590f1d.proto │ ├── caffe_b590f1d_pb2.py │ ├── caffe_old.proto │ ├── caffe_old_pb2.py │ ├── caffe_pb2.py │ ├── get-protos.sh │ ├── googlenet_prototxt_patch.diff │ ├── vgg_caffe.proto │ ├── vgg_caffe_pb2.py │ └── vgg_synset_words.txt │ ├── test_examples.m │ └── tidy_ref_models.m ├── README.md └── Use_FCN_Features ├── DeepFeat32and6.m └── GetMeanColor.m /Extract_FCN_features/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.vcxproj text merge=union eol=crlf 3 | *.vcxproj.filters merge=union eol=crlf 4 | *.sln text merge=union eol=crlf 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/.gitignore: -------------------------------------------------------------------------------- 1 | *.xcodeproj/*xcuserdata* 2 | *.xcodeproj/project.xcworkspace/*xcuserdata* 3 | *.xcodeproj/project.xcworkspace/xcshareddata/ 4 | mex/* 5 | mex 6 | data 7 | *.o 8 | *.pyc 9 | *~ 10 | index.html 11 | matconvnet-*.tar.gz 12 | local 13 | 14 | # Documentation 15 | doc/figures/svg/*.pdf 16 | doc/figures/*.idraw 17 | doc/.texpadtmp/* 18 | doc/*.pdf 19 | doc/.build 20 | 21 | # Website 22 | doc/site/docs/mfiles 23 | doc/site/site 24 | doc/site/.build 25 | doc/site/theme/css/bootstrap.min.css 26 | doc/site/theme/css/bootstrap.min.css.map 27 | doc/site/theme/css/font-awesome.min.css 28 | doc/site/theme/fonts/fontawesome-webfont.eot 29 | doc/site/theme/fonts/fontawesome-webfont.svg 30 | doc/site/theme/fonts/fontawesome-webfont.ttf 31 | doc/site/theme/fonts/fontawesome-webfont.woff 32 | doc/site/theme/fonts/fontawesome-webfont.woff2 33 | doc/site/theme/js/bootstrap.min.js 34 | doc/site/theme/js/jquery.min.js 35 | doc/site/theme/js/jquery.min.map 36 | doc/site/theme/js/npm.js 37 | 38 | # Visual C 39 | *.suo 40 | *.user 41 | *.sdf 42 | *.opensdf 43 | doc/figures/svg/*.idraw 44 | 45 | -------------------------------------------------------------------------------- /Extract_FCN_features/.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/.gitmodules -------------------------------------------------------------------------------- /Extract_FCN_features/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 The MatConvNet team. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms are permitted 5 | provided that the above copyright notice and this paragraph are 6 | duplicated in all such forms and that any documentation, 7 | advertising materials, and other materials related to such 8 | distribution and use acknowledge that the software was developed 9 | by the . The name of the 10 | may not be used to endorse or promote products derived 11 | from this software without specific prior written permission. 12 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -------------------------------------------------------------------------------- /Extract_FCN_features/README.md: -------------------------------------------------------------------------------- 1 | # MatConvNet: CNNs for MATLAB 2 | 3 | **MatConvNet** is a MATLAB toolbox implementing *Convolutional Neural 4 | Networks* (CNNs) for computer vision applications. It is simple, 5 | efficient, and can run and learn state-of-the-art CNNs. Several 6 | example CNNs are included to classify and encode images. Please visit 7 | the [homepage](http://www.vlfeat.org/matconvnet) to know more. 8 | 9 | In case of compilation issues, please read first the 10 | [Installation](http://www.vlfeat.org/matconvnet/install/) and 11 | [FAQ](http://www.vlfeat.org/matconvnet/faq/) section before creating an GitHub 12 | issue. For general inquiries regarding network design and training 13 | related questions, please use the 14 | [Discussion forum](https://groups.google.com/d/forum/matconvnet). 15 | 16 | Fang Xiang Tip: 17 | 18 | Please open the main.cpp to see the process of FCN features extraction -------------------------------------------------------------------------------- /Extract_FCN_features/doc/figures/imnet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/doc/figures/imnet.pdf -------------------------------------------------------------------------------- /Extract_FCN_features/doc/figures/pepper.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/doc/figures/pepper.pdf -------------------------------------------------------------------------------- /Extract_FCN_features/doc/site/docs/figures/stn-perf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/doc/site/docs/figures/stn-perf.png -------------------------------------------------------------------------------- /Extract_FCN_features/doc/site/docs/figures/stn-samples.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/doc/site/docs/figures/stn-samples.png -------------------------------------------------------------------------------- /Extract_FCN_features/doc/site/docs/gpu.md: -------------------------------------------------------------------------------- 1 | # Using GPU acceleration 2 | 3 | GPU support in MatConvNet builds on top of MATLAB GPU support in the 4 | [Parallel Computing Toolbox](http://www.mathworks.com/products/parallel-computing/). This 5 | toolbox requires CUDA-compatible cards, and you will need a copy of 6 | the corresponding 7 | [CUDA devkit](https://developer.nvidia.com/cuda-toolkit-archive) to 8 | compile GPU support in MatConvNet (see 9 | [compiling](install#compiling)). 10 | 11 | All the core computational functions (e.g. `vl_nnconv`) in the toolbox 12 | can work with either MATLAB arrays or MATLAB GPU arrays. Therefore, 13 | switching to use the GPU is as simple as converting the input CPU 14 | arrays in GPU arrays. 15 | 16 | In order to make the very best of powerful GPUs, it is important to 17 | balance the load between CPU and GPU in order to avoid starving the 18 | latter. In training on a problem like ImageNet, the CPU(s) in your 19 | system will be busy loading data from disk and streaming it to the GPU 20 | to evaluate the CNN and its derivative. MatConvNet includes the 21 | utility `vl_imreadjpeg` to accelerate and parallelize loading images 22 | into memory (this function is currently a bottleneck will be made more 23 | powerful in future releases). 24 | -------------------------------------------------------------------------------- /Extract_FCN_features/doc/site/docs/js/mathjaxhelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | #if false 3 | Prevent Unity to try compiling this js 4 | */ 5 | MathJax.Hub.Config({ 6 | "tex2jax": { inlineMath: [ [ '$', '$' ] ] } 7 | }); 8 | /* 9 | #endif 10 | */ -------------------------------------------------------------------------------- /Extract_FCN_features/doc/site/docs/js/toggle.js: -------------------------------------------------------------------------------- 1 | function toggle_visibility(id) { 2 | var e = document.getElementById(id); 3 | if(e.style.display == 'block') 4 | e.style.display = 'none'; 5 | else 6 | e.style.display = 'block'; 7 | } 8 | -------------------------------------------------------------------------------- /Extract_FCN_features/doc/site/docs/spatial-transformer.md: -------------------------------------------------------------------------------- 1 | # Spatial Transformer Networks 2 | 3 | This example demonstrates the use of a Spatial Transformer Network 4 | for classifying distorted MNIST digits in clutter. 5 | The source files used in this examples can be found in the 6 | `examples/spatial_transformer` directory. 7 | 8 | The spatial transformer network is defined in the `cnn_stn_cluttered_mnist.m` 9 | file. It has three components: (1) a localization network which 10 | predicts six affine transformation parameters for an input image, 11 | (2) a bilinear sampler which applies the above transformation 12 | to the input image, and (3) a classification network which classifies the 13 | output of the bilinear sampler. 14 | 15 | The picture below shows input images and their transformed versions as determined 16 | by the STN. Note how the STN has learned to rectify the input image. 17 | 18 | ![Transformations inferred by the Spatial Transformer Network for images from a cluttered MNIST dataset.](figures/stn-samples.png) 19 | 20 | The following graph compares the training and test errors of two CNNs: 21 | a STN and, a plain classification CNN (with the same configuration as the 22 | classification component of the STN). We note that the STN performs significantly 23 | better (STN test-error = 5.7%, CNN test-error = 14.2%). 24 | 25 | ![Classification error comparison between a STN and a CNN.](figures/stn-perf.png) 26 | -------------------------------------------------------------------------------- /Extract_FCN_features/doc/site/docs/training.md: -------------------------------------------------------------------------------- 1 | ## Using MatConvNet to train convnets 2 | 3 | MatConvNet can be used to train models, typically by using a form of 4 | stochastic gradient descent (SGD) and back-propagation. 5 | 6 | The following learning demonstrators are provided in the MatConvNet 7 | package: 8 | 9 | - **MNIST**. See `examples/mnist/cnn_mnist.m`. 10 | - **CIFAR**. See `examples/cifar/cnn_cifar.m`. 11 | - **ImageNet**. See `examples/imagenet/cnn_imagenet.m`. 12 | 13 | These demos are self-contained; MNIST and CIFAR, in particular, 14 | automatically download and unpack the required data, so that they 15 | should work out-of-the-box. 16 | 17 | While MNIST and CIFAR are small datasets (by today's standard) and 18 | training is feasible on a CPU, ImageNet requires a powerful GPU to 19 | complete in a reasonable time (a few days!). It also requires the 20 | `vl_imreadjpeg()` command in the toolbox to be compiled in order to 21 | accelerate reading large batches of JPEG images and avoid starving the 22 | GPU. 23 | 24 | All these demos use the `example/cnn_train.m` and 25 | `example/cnn_train_dag.m` SGD drivers, which are simple 26 | implementations of the standard SGD with momentum, done directly in 27 | MATLAB code. However, it should be easy to implement your own 28 | specialized or improved solver. 29 | -------------------------------------------------------------------------------- /Extract_FCN_features/doc/site/theme/content.html: -------------------------------------------------------------------------------- 1 | {% if meta.source %} 2 | 7 | {% endif %} 8 | 9 | {{ content }} 10 | -------------------------------------------------------------------------------- /Extract_FCN_features/doc/site/theme/js/base.js: -------------------------------------------------------------------------------- 1 | 2 | /* Highlight */ 3 | $( document ).ready(function() { 4 | hljs.initHighlightingOnLoad(); 5 | $('table').addClass('table table-striped table-hover'); 6 | }); 7 | 8 | 9 | $('body').scrollspy({ 10 | target: '.bs-sidebar', 11 | }); 12 | 13 | 14 | /* Prevent disabled links from causing a page reload */ 15 | $("li.disabled a").click(function() { 16 | event.preventDefault(); 17 | }); 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Extract_FCN_features/doc/site/theme/toc.html: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /Extract_FCN_features/examples/imagenet/cnn_imagenet_googlenet.m: -------------------------------------------------------------------------------- 1 | function cnn_imagenet_googlenet() 2 | %CNN_IMAGENET_GOOGLENET Demonstrates how to use GoogLeNet 3 | 4 | run matlab/vl_setupnn 5 | modelPath = 'data/models/imagenet-googlenet-dag.mat' ; 6 | 7 | if ~exist(modelPath) 8 | mkdir(fileparts(modelPath)) ; 9 | urlwrite(... 10 | 'http://www.vlfeat.org/matconvnet/models/imagenet-googlenet-dag.mat', ... 11 | modelPath) ; 12 | end 13 | 14 | net = dagnn.DagNN.loadobj(load(modelPath)) ; 15 | 16 | im = imread('peppers.png') ; 17 | im_ = single(im) ; % note: 255 range 18 | im_ = imresize(im_, net.meta.normalization.imageSize(1:2)) ; 19 | im_ = im_ - net.meta.normalization.averageImage ; 20 | net.eval({'data', im_}) ; 21 | 22 | % show the classification result 23 | scores = squeeze(gather(net.vars(end).value)) ; 24 | [bestScore, best] = max(scores) ; 25 | figure(1) ; clf ; imagesc(im) ; 26 | title(sprintf('%s (%d), score %.3f',... 27 | net.meta.classes.description{best}, best, bestScore)) ; 28 | -------------------------------------------------------------------------------- /Extract_FCN_features/examples/imagenet/cnn_imagenet_minimal.m: -------------------------------------------------------------------------------- 1 | function cnn_imagenet_minimal() 2 | % CNN_IMAGENET_MINIMAL Minimalistic demonstration of how to run an ImageNet CNN model 3 | 4 | % setup toolbox 5 | run(fullfile(fileparts(mfilename('fullpath')), ... 6 | '..', '..', 'matlab', 'vl_setupnn.m')) ; 7 | 8 | % download a pre-trained CNN from the web 9 | if ~exist('imagenet-vgg-f.mat', 'file') 10 | fprintf('Downloading a model ... this may take a while\n') ; 11 | urlwrite('http://www.vlfeat.org/matconvnet/models/imagenet-vgg-f.mat', ... 12 | 'imagenet-vgg-f.mat') ; 13 | end 14 | net = load('imagenet-vgg-f.mat') ; 15 | 16 | % obtain and preprocess an image 17 | im = imread('peppers.png') ; 18 | im_ = single(im) ; % note: 255 range 19 | im_ = imresize(im_, net.meta.normalization.imageSize(1:2)) ; 20 | im_ = im_ - net.meta.normalization.averageImage ; 21 | 22 | % run the CNN 23 | res = vl_simplenn(net, im_) ; 24 | 25 | % show the classification result 26 | scores = squeeze(gather(res(end).x)) ; 27 | [bestScore, best] = max(scores) ; 28 | figure(1) ; clf ; imagesc(im) ; 29 | title(sprintf('%s (%d), score %.3f',... 30 | net.meta.classes.description{best}, best, bestScore)) ; 31 | 32 | -------------------------------------------------------------------------------- /Extract_FCN_features/examples/imagenet/cnn_imagenet_sync_labels.m: -------------------------------------------------------------------------------- 1 | function imdb = cnn_imagenet_sync_labels(imdb, net) 2 | % CNN_IMAGENET_SYNC_LABELS Match CNN and database labels 3 | % A CNN NET and the image database IMDB may use a different label ordering. 4 | % This function matches classes by name and reorder the labels 5 | % in IMDB to match NET. 6 | 7 | [~,perm] = ismember(imdb.classes.name, net.meta.classes.name); 8 | assert(all(perm ~= 0)); 9 | 10 | imdb.classes.description = imdb.classes.description(perm) ; 11 | imdb.classes.name = imdb.classes.name(perm) ; 12 | ok = imdb.images.label > 0 ; 13 | iperm(perm) = 1:numel(perm) ; 14 | imdb.images.label(ok) = perm(imdb.images.label(ok)) ; 15 | 16 | 17 | -------------------------------------------------------------------------------- /Extract_FCN_features/examples/mnist/cnn_mnist_experiments.m: -------------------------------------------------------------------------------- 1 | %% Experiment with the cnn_mnist_fc_bnorm 2 | 3 | [net_bn, info_bn] = cnn_mnist(... 4 | 'expDir', 'data/mnist-bnorm', 'batchNormalization', true); 5 | 6 | [net_fc, info_fc] = cnn_mnist(... 7 | 'expDir', 'data/mnist-baseline', 'batchNormalization', false); 8 | 9 | figure(1) ; clf ; 10 | subplot(1,2,1) ; 11 | semilogy(info_fc.val.objective', 'o-') ; hold all ; 12 | semilogy(info_bn.val.objective', '+--') ; 13 | xlabel('Training samples [x 10^3]'); ylabel('energy') ; 14 | grid on ; 15 | h=legend('BSLN', 'BNORM') ; 16 | set(h,'color','none'); 17 | title('objective') ; 18 | subplot(1,2,2) ; 19 | plot(info_fc.val.error', 'o-') ; hold all ; 20 | plot(info_bn.val.error', '+--') ; 21 | h=legend('BSLN-val','BSLN-val-5','BNORM-val','BNORM-val-5') ; 22 | grid on ; 23 | xlabel('Training samples [x 10^3]'); ylabel('error') ; 24 | set(h,'color','none') ; 25 | title('error') ; 26 | drawnow ; -------------------------------------------------------------------------------- /Extract_FCN_features/examples/spatial_transformer/readme.txt: -------------------------------------------------------------------------------- 1 | Example scripts to train a spatial transformer network [1] 2 | for cluttered MNIST dataset. 3 | 4 | Demonstrates how to initialize and train the network. 5 | 6 | References: 7 | ----------- 8 | 1. Jaderberg, Max, Karen Simonyan, and Andrew Zisserman 9 | Spatial transformer networks 10 | Advances in Neural Information Processing Systems, 2015 11 | -------------------------------------------------------------------------------- /Extract_FCN_features/examples/vggfaces/cnn_vgg_faces.m: -------------------------------------------------------------------------------- 1 | function cnn_vgg_faces() 2 | %CNN_VGG_FACES Demonstrates how to use VGG-Face 3 | 4 | run matlab/vl_setupnn 5 | modelPath = 'data/models/vgg-face.mat' ; 6 | 7 | if ~exist(modelPath) 8 | mkdir(fileparts(modelPath)) ; 9 | urlwrite(... 10 | 'http://www.vlfeat.org/matconvnet/models/vgg-face.mat', ... 11 | modelPath) ; 12 | end 13 | 14 | net = load('data/models/vgg-face.mat') ; 15 | 16 | im = imread('https://upload.wikimedia.org/wikipedia/commons/4/4a/Aamir_Khan_March_2015.jpg') ; 17 | im = im(1:250,:,:) ; % crop 18 | im_ = single(im) ; % note: 255 range 19 | im_ = imresize(im_, net.meta.normalization.imageSize(1:2)) ; 20 | im_ = bsxfun(@minus,im_,net.meta.normalization.averageImage) ; 21 | res = vl_simplenn(net, im_) ; 22 | 23 | % show the classification result 24 | scores = squeeze(gather(res(end).x)) ; 25 | [bestScore, best] = max(scores) ; 26 | figure(1) ; clf ; imagesc(im) ; axis equal off ; 27 | title(sprintf('%s (%d), score %.3f',... 28 | net.meta.classes.description{best}, best, bestScore), ... 29 | 'Interpreter', 'none') ; 30 | -------------------------------------------------------------------------------- /Extract_FCN_features/get_features_inception.m: -------------------------------------------------------------------------------- 1 | % function feat = get_features_inception(im, cos_window, layers) 2 | %GET_FEATURES 3 | % Extracts dense features from image. 4 | % 5 | addpath('mex') 6 | img=imread('.\0001.jpg'); 7 | % if ~exist('net','var') 8 | % inital_net; 9 | % end 10 | global res; 11 | global net1; 12 | % 13 | % if isempty(net1), 14 | % initial_net_inception(); 15 | % end 16 | net1 = dagnn.DagNN.loadobj(load('.\FCN2015CVPR\pascal-fcn32s-dag.mat')) ; 17 | % net=vl_simplenn_move(net,'gpu'); 18 | % sz_window=size(cos_window); 19 | %net= load('/home/waynecool/imagenet_vgg_verydeep_19.mat') 20 | img = single(img); % note: 255 range 21 | % img = imResampleMex(img, net.normalization.imageSize(1:2)); 22 | img = imresize(img, [net1.meta.normalization.imageSize(1),net1.meta.normalization.imageSize(2)]); 23 | % img = img - net.normalization.averageImage; 24 | tmp=single(zeros(500,500,3)); 25 | tmp(:,:,1)=net1.meta.normalization.averageImage(:,:,1); 26 | tmp(:,:,2)=net1.meta.normalization.averageImage(:,:,2); 27 | tmp(:,:,3)=net1.meta.normalization.averageImage(:,:,3); 28 | img = img - tmp; 29 | % img = gpuArray(img); 30 | 31 | % run the CNN 32 | % res=vl_simplenn(net,img); 33 | net1.eval({'data', img}) ; 34 | % res=vl_simplenn(net,img); 35 | feat={}; 36 | 37 | 38 | -------------------------------------------------------------------------------- /Extract_FCN_features/main.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/main.m -------------------------------------------------------------------------------- /Extract_FCN_features/matconvnet.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "matconvnet", "matconvnet.vcxproj", "{B0BD9132-1D90-4267-A07A-B44DE497A9C7}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {B0BD9132-1D90-4267-A07A-B44DE497A9C7}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {B0BD9132-1D90-4267-A07A-B44DE497A9C7}.Debug|Win32.Build.0 = Debug|Win32 18 | {B0BD9132-1D90-4267-A07A-B44DE497A9C7}.Debug|x64.ActiveCfg = Debug|Win32 19 | {B0BD9132-1D90-4267-A07A-B44DE497A9C7}.Release|Win32.ActiveCfg = Release|Win32 20 | {B0BD9132-1D90-4267-A07A-B44DE497A9C7}.Release|Win32.Build.0 = Release|Win32 21 | {B0BD9132-1D90-4267-A07A-B44DE497A9C7}.Release|x64.ActiveCfg = Release|Win32 22 | EndGlobalSection 23 | GlobalSection(SolutionProperties) = preSolution 24 | HideSolutionNode = FALSE 25 | EndGlobalSection 26 | EndGlobal 27 | -------------------------------------------------------------------------------- /Extract_FCN_features/matconvnet.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/@DagNN/addLayer.m: -------------------------------------------------------------------------------- 1 | function addLayer(obj, name, block, inputs, outputs, params, varargin) 2 | %ADDLAYER Adds a layer to a DagNN 3 | % ADDLAYER(NAME, LAYER, INPUTS, OUTPUTS, PARAMS) adds the 4 | % specified layer to the network. NAME is a string with the layer 5 | % name, used as a unique indentifier. BLOCK is the object 6 | % implementing the layer, which should be a subclass of the 7 | % Layer. INPUTS, OUTPUTS are cell arrays of variable names, and 8 | % PARAMS of parameter names. 9 | % 10 | % See Also REMOVELAYER(). 11 | opts.skipRebuild = false; 12 | opts = vl_argparse(opts, varargin); 13 | 14 | index = find(strcmp(name, {obj.layers.name})) ; 15 | if ~isempty(index), error('There is already a layer with name ''%s''.', name), end 16 | index = numel(obj.layers) + 1 ; 17 | 18 | if nargin < 6, params = {} ; end 19 | if ischar(inputs), inputs = {inputs} ; end 20 | if ischar(outputs), outputs = {outputs} ; end 21 | if ischar(params), params = {params} ; end 22 | 23 | obj.layers(index) = struct(... 24 | 'name', {name}, ... 25 | 'inputs', {inputs}, ... 26 | 'outputs', {outputs}, ... 27 | 'params', {params}, ... 28 | 'inputIndexes', {[]}, ... 29 | 'outputIndexes', {[]}, ... 30 | 'paramIndexes', {[]}, ... 31 | 'forwardTime', {[]}, ... 32 | 'backwardTime', {[]}, ... 33 | 'block', {block}) ; 34 | obj.layers(index).block.attach(obj, index) ; 35 | if ~opts.skipRebuild, obj.rebuild() ; end; 36 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/@DagNN/initParams.m: -------------------------------------------------------------------------------- 1 | function initParams(obj) 2 | % INITPARAM Initialize the paramers of the DagNN 3 | % OBJ.INITPARAM() uses the INIT() method of each layer to initialize 4 | % the corresponding parameters (usually randomly). 5 | 6 | % Copyright (C) 2015 Karel Lenc and Andrea Vedaldi. 7 | % All rights reserved. 8 | % 9 | % This file is part of the VLFeat library and is made available under 10 | % the terms of the BSD license (see the COPYING file). 11 | 12 | for l = 1:numel(obj.layers) 13 | p = obj.getParamIndex(obj.layers(l).params) ; 14 | params = obj.layers(l).block.initParams() ; 15 | switch obj.device 16 | case 'cpu' 17 | params = cellfun(@gather, params, 'UniformOutput', false) ; 18 | case 'gpu' 19 | params = cellfun(@gpuArray, params, 'UniformOutput', false) ; 20 | end 21 | [obj.params(p).value] = deal(params{:}) ; 22 | end 23 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/@DagNN/move.m: -------------------------------------------------------------------------------- 1 | function move(obj, device) 2 | %MOVE Move the DagNN to either CPU or GPU 3 | % MOVE(obj, 'cpu') moves the DagNN obj to the CPU. 4 | % 5 | % MOVE(obj, 'gpu') moves the DagNN obj to the GPU. 6 | 7 | % Copyright (C) 2015 Karel Lenc and Andrea Vedaldi. 8 | % All rights reserved. 9 | % 10 | % This file is part of the VLFeat library and is made available under 11 | % the terms of the BSD license (see the COPYING file). 12 | 13 | obj.reset() ; 14 | obj.device = device ; 15 | switch device 16 | case 'gpu' 17 | for i=1:numel(obj.params) 18 | obj.params(i).value = gpuArray(obj.params(i).value) ; 19 | end 20 | case 'cpu' 21 | for i=1:numel(obj.params) 22 | obj.params(i).value = gather(obj.params(i).value) ; 23 | end 24 | otherwise 25 | error('DEVICE must be either ''cpu'' or ''gpu''.') ; 26 | end 27 | for l = 1:numel(obj.layers) 28 | obj.layers(l).block.move(device) ; 29 | end 30 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/@DagNN/removeLayer.m: -------------------------------------------------------------------------------- 1 | function removeLayer(obj, layerName) 2 | %REMOVELAYER Remove a layer from the network 3 | % REMOVELAYER(OBJ, NAME) removes the layer NAME from the DagNN object 4 | % OBJ. NAME can be a string or a cell array of strings. 5 | 6 | % Copyright (C) 2015 Karel Lenc and Andrea Vedaldi. 7 | % All rights reserved. 8 | % 9 | % This file is part of the VLFeat library and is made available under 10 | % the terms of the BSD license (see the COPYING file). 11 | 12 | if ischar(layerName), layerName = {layerName}; end; 13 | idxs = obj.getLayerIndex(layerName); 14 | if any(isnan(idxs)) 15 | error('Invalid layer name `%s`', ... 16 | strjoin(layerName(isnan(idxs)), ', ')); 17 | end 18 | obj.layers(idxs) = [] ; 19 | obj.rebuild() ; 20 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/@DagNN/renameLayer.m: -------------------------------------------------------------------------------- 1 | function renameLayer(obj, oldName, newName, varargin) 2 | %RENAMELAYER Rename a layer 3 | % RENAMELAYER(OLDNAME, NEWNAME) changes the name of the layer 4 | % OLDNAME into NEWNAME. NEWNAME should not be the name of an 5 | % existing layer. 6 | 7 | opts.quiet = false ; 8 | opts = vl_argparse(opts, varargin) ; 9 | 10 | % Find the layer to rename 11 | v = obj.getLayerIndex(oldName) ; 12 | if isnan(v) 13 | % There is no such layer, nothing to do 14 | if ~opts.quiet 15 | warning('There is no layer ''%s''.', oldName) ; 16 | end 17 | return ; 18 | end 19 | 20 | % Check if newName is an existing layer 21 | newNameExists = any(strcmp(newName, {obj.layers.name})) ; 22 | if newNameExists 23 | error('There is already a layer ''%s''.', newName) ; 24 | end 25 | 26 | % Replace oldName with newName in all the layers 27 | obj.layers(v).name = newName ; 28 | obj.rebuild() ; 29 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/@DagNN/reset.m: -------------------------------------------------------------------------------- 1 | function reset(obj) 2 | %RESET Reset the DagNN 3 | % RESET(obj) resets the DagNN obj. The function clears any intermediate value stored in the DagNN 4 | % object, including parameter gradients. It also calls the reset 5 | % function of every layer. 6 | 7 | [obj.vars.value] = deal([]) ; 8 | [obj.vars.der] = deal([]) ; 9 | [obj.params.der] = deal([]) ; 10 | for l = 1:numel(obj.layers) 11 | obj.layers(l).block.reset() ; 12 | end 13 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/@DagNN/setLayerInputs.m: -------------------------------------------------------------------------------- 1 | function v = setLayerInputs(obj, layer, inputs) 2 | %SETLAYERINPUTS Set or change the inputs to a layer 3 | % Example: NET.SETLAYERINPUTS('layerName', {'input1', 'input2', ...}) 4 | 5 | v = [] ; 6 | l = obj.getLayerIndex(layer) ; 7 | for input = inputs 8 | v(end+1) = obj.addVar(char(input)) ; 9 | end 10 | obj.layers(l).inputs = inputs ; 11 | obj.rebuild() ; 12 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/@DagNN/setLayerOutputs.m: -------------------------------------------------------------------------------- 1 | function v = setLayerOutputs(obj, layer, outputs) 2 | %SETLAYEROUTPUTS Set or change the outputs of a layer 3 | % Example: NET.SETLAYEROUTPUTS('layerName', {'output1', 'output2', ...}) 4 | 5 | v = [] ; 6 | l = obj.getLayerIndex(layer) ; 7 | for output = outputs 8 | v(end+1) = obj.addVar(char(output)) ; 9 | end 10 | obj.layers(l).outputs = outputs ; 11 | obj.rebuild() ; 12 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/@DagNN/setLayerParams.m: -------------------------------------------------------------------------------- 1 | function v = setLayerParams(obj, layer, params) 2 | %SETLAYEPARAMS Set or change the parameters of a layer 3 | % Example: NET.SETLAYERPARAMS('layerName', {'param1', 'param2', ...}) 4 | 5 | v = [] ; 6 | l = obj.getLayerIndex(layer) ; 7 | for param = params 8 | v(end+1) = obj.addParam(char(param)) ; 9 | end 10 | obj.layers(l).params = params ; 11 | obj.rebuild() ; 12 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/BilinearSampler.m: -------------------------------------------------------------------------------- 1 | % Wrapper for BilinearSampler block: 2 | % (c) 2016 Ankush Gupta 3 | 4 | classdef BilinearSampler < dagnn.Layer 5 | methods 6 | function outputs = forward(obj, inputs, params) 7 | outputs = vl_nnbilinearsampler(inputs{1}, inputs{2}); 8 | outputs = {outputs}; 9 | end 10 | 11 | function [derInputs, derParams] = backward(obj, inputs, param, derOutputs) 12 | [dX,dG] = vl_nnbilinearsampler(inputs{1}, inputs{2}, derOutputs{1}); 13 | derInputs = {dX,dG}; 14 | derParams = {}; 15 | end 16 | 17 | function outputSizes = getOutputSizes(obj, inputSizes) 18 | xSize = inputSizes{1}; 19 | gSize = inputSizes{2}; 20 | outputSizes = {[gSize(1), gSize(2), xSize(3), xSize(4)]}; 21 | end 22 | 23 | function obj = BilinearSampler(varargin) 24 | obj.load(varargin); 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/DropOut.m: -------------------------------------------------------------------------------- 1 | classdef DropOut < dagnn.ElementWise 2 | properties 3 | rate = 0.5 4 | frozen = false 5 | end 6 | 7 | properties (Transient) 8 | mask 9 | end 10 | 11 | methods 12 | function outputs = forward(obj, inputs, params) 13 | if strcmp(obj.net.mode, 'test') 14 | outputs = inputs ; 15 | return ; 16 | end 17 | if obj.frozen & ~isempty(obj.mask) 18 | outputs{1} = vl_nndropout(inputs{1}, 'maks', obj.mask) ; 19 | else 20 | [outputs{1}, obj.mask] = vl_nndropout(inputs{1}, 'rate', obj.rate) ; 21 | end 22 | end 23 | 24 | function [derInputs, derParams] = backward(obj, inputs, params, derOutputs) 25 | if strcmp(obj.net.mode, 'test') 26 | derInputs = derOutputs ; 27 | derParams = {} ; 28 | return ; 29 | end 30 | derInputs{1} = vl_nndropout(inputs{1}, derOutputs{1}, 'mask', obj.mask) ; 31 | derParams = {} ; 32 | end 33 | 34 | % --------------------------------------------------------------------- 35 | function obj = DropOut(varargin) 36 | obj.load(varargin{:}) ; 37 | end 38 | 39 | function obj = reset(obj) 40 | reset@dagnn.ElementWise(obj) ; 41 | obj.mask = [] ; 42 | obj.frozen = false ; 43 | end 44 | end 45 | end 46 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/ElementWise.m: -------------------------------------------------------------------------------- 1 | classdef ElementWise < dagnn.Layer 2 | %ELEMENTWISE DagNN layers that operate at individual spatial locations 3 | methods 4 | function [outputSizes, transforms] = forwardGeometry(self, inputSizes, paramSizes) 5 | outputSizes = inputSizes ; 6 | transforms = {eye(6)} ; 7 | end 8 | 9 | function rfs = getReceptiveFields(obj) 10 | rfs.size = [1 1] ; 11 | rfs.stride = [1 1] ; 12 | rfs.offset = [1 1] ; 13 | end 14 | 15 | function outputSizes = getOutputSizes(obj, inputSizes) 16 | outputSizes = inputSizes ; 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/Filter.m: -------------------------------------------------------------------------------- 1 | classdef Filter < dagnn.Layer 2 | properties 3 | pad = [0 0 0 0] 4 | stride = [1 1] 5 | end 6 | methods 7 | function set.pad(obj, pad) 8 | if numel(pad) == 1 9 | obj.pad = [pad pad pad pad] ; 10 | elseif numel(pad) == 2 11 | obj.pad = pad([1 1 2 2]) ; 12 | else 13 | obj.pad = pad ; 14 | end 15 | end 16 | 17 | function set.stride(obj, stride) 18 | if numel(stride) == 1 19 | obj.stride = [stride stride] ; 20 | else 21 | obj.stride = stride ; 22 | end 23 | end 24 | 25 | function kernelSize = getKernelSize(obj) 26 | kernelSize = [1 1] ; 27 | end 28 | 29 | function outputSizes = getOutputSizes(obj, inputSizes) 30 | ks = obj.getKernelSize() ; 31 | outputSizes{1} = [... 32 | fix((inputSizes{1}(1) + obj.pad(1) + obj.pad(2) - ks(1)) / obj.stride(1)) + 1, ... 33 | fix((inputSizes{1}(2) + obj.pad(3) + obj.pad(4) - ks(2)) / obj.stride(2)) + 1, ... 34 | 1, ... 35 | inputSizes{1}(4)] ; 36 | end 37 | 38 | function rfs = getReceptiveFields(obj) 39 | ks = obj.getKernelSize() ; 40 | y1 = 1 - obj.pad(1) ; 41 | y2 = 1 - obj.pad(1) + ks(1) - 1 ; 42 | x1 = 1 - obj.pad(3) ; 43 | x2 = 1 - obj.pad(3) + ks(2) - 1 ; 44 | h = y2 - y1 + 1 ; 45 | w = x2 - x1 + 1 ; 46 | rfs.size = [h, w] ; 47 | rfs.stride = obj.stride ; 48 | rfs.offset = [y1+y2, x1+x2]/2 ; 49 | end 50 | end 51 | end 52 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/LRN.m: -------------------------------------------------------------------------------- 1 | classdef LRN < dagnn.ElementWise 2 | properties 3 | param = [5 1 0.0001/5 0.75] 4 | end 5 | 6 | methods 7 | function outputs = forward(obj, inputs, params) 8 | outputs{1} = vl_nnnormalize(inputs{1}, obj.param) ; 9 | end 10 | 11 | function [derInputs, derParams] = backward(obj, inputs, param, derOutputs) 12 | derInputs{1} = vl_nnnormalize(inputs{1}, obj.param, derOutputs{1}) ; 13 | derParams = {} ; 14 | end 15 | 16 | function obj = LRN(varargin) 17 | obj.load(varargin) ; 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/Loss.m: -------------------------------------------------------------------------------- 1 | classdef Loss < dagnn.ElementWise 2 | properties 3 | loss = 'softmaxlog' 4 | opts = {} 5 | end 6 | 7 | properties (Transient) 8 | average = 0 9 | numAveraged = 0 10 | end 11 | 12 | methods 13 | function outputs = forward(obj, inputs, params) 14 | outputs{1} = vl_nnloss(inputs{1}, inputs{2}, [], 'loss', obj.loss, obj.opts{:}) ; 15 | n = obj.numAveraged ; 16 | m = n + size(inputs{1},4) ; 17 | obj.average = (n * obj.average + gather(outputs{1})) / m ; 18 | obj.numAveraged = m ; 19 | end 20 | 21 | function [derInputs, derParams] = backward(obj, inputs, params, derOutputs) 22 | derInputs{1} = vl_nnloss(inputs{1}, inputs{2}, derOutputs{1}, 'loss', obj.loss, obj.opts{:}) ; 23 | derInputs{2} = [] ; 24 | derParams = {} ; 25 | end 26 | 27 | function reset(obj) 28 | obj.average = 0 ; 29 | obj.numAveraged = 0 ; 30 | end 31 | 32 | function outputSizes = getOutputSizes(obj, inputSizes, paramSizes) 33 | outputSizes{1} = [1 1 1 inputSizes{1}(4)] ; 34 | end 35 | 36 | function rfs = getReceptiveFields(obj) 37 | % the receptive field depends on the dimension of the variables 38 | % which is not known until the network is run 39 | rfs(1,1).size = [NaN NaN] ; 40 | rfs(1,1).stride = [NaN NaN] ; 41 | rfs(1,1).offset = [NaN NaN] ; 42 | rfs(2,1) = rfs(1,1) ; 43 | end 44 | 45 | function obj = Loss(varargin) 46 | obj.load(varargin) ; 47 | end 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/NormOffset.m: -------------------------------------------------------------------------------- 1 | classdef NormOffset < dagnn.ElementWise 2 | properties 3 | param = [1 0.5] 4 | end 5 | 6 | methods 7 | function outputs = forward(obj, inputs, params) 8 | outputs{1} = vl_nnnoffset(inputs{1}, obj.param) ; 9 | end 10 | 11 | function [derInputs, derParams] = backward(obj, inputs, param, derOutputs) 12 | derInputs{1} = vl_nnnoffset(inputs{1}, obj.param, derOutputs{1}) ; 13 | derParams = {} ; 14 | end 15 | 16 | function obj = NormOffset(varargin) 17 | obj.load(varargin) ; 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/Pooling.m: -------------------------------------------------------------------------------- 1 | classdef Pooling < dagnn.Filter 2 | properties 3 | method = 'max' 4 | poolSize = [1 1] 5 | opts = {'cuDNN'} 6 | end 7 | 8 | methods 9 | function outputs = forward(self, inputs, params) 10 | outputs{1} = vl_nnpool(inputs{1}, self.poolSize, ... 11 | 'pad', self.pad, ... 12 | 'stride', self.stride, ... 13 | 'method', self.method, ... 14 | self.opts{:}) ; 15 | end 16 | 17 | function [derInputs, derParams] = backward(self, inputs, params, derOutputs) 18 | derInputs{1} = vl_nnpool(inputs{1}, self.poolSize, derOutputs{1}, ... 19 | 'pad', self.pad, ... 20 | 'stride', self.stride, ... 21 | 'method', self.method, ... 22 | self.opts{:}) ; 23 | derParams = {} ; 24 | end 25 | 26 | function kernelSize = getKernelSize(obj) 27 | kernelSize = obj.poolSize ; 28 | end 29 | 30 | function outputSizes = getOutputSizes(obj, inputSizes) 31 | outputSizes = getOutputSizes@dagnn.Filter(obj, inputSizes) ; 32 | outputSizes{1}(3) = inputSizes{1}(3) ; 33 | end 34 | 35 | function obj = Pooling(varargin) 36 | obj.load(varargin) ; 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/Scale.m: -------------------------------------------------------------------------------- 1 | classdef Scale < dagnn.ElementWise 2 | properties 3 | size 4 | hasBias = true 5 | end 6 | 7 | methods 8 | 9 | function outputs = forward(obj, inputs, params) 10 | args = horzcat(inputs, params) ; 11 | outputs{1} = bsxfun(@times, args{1}, args{2}) ; 12 | if obj.hasBias 13 | outputs{1} = bsxfun(@plus, outputs{1}, args{3}) ; 14 | end 15 | end 16 | 17 | function [derInputs, derParams] = backward(obj, inputs, params, derOutputs) 18 | args = horzcat(inputs, params) ; 19 | sz = [size(args{2}) 1 1 1 1] ; 20 | sz = sz(1:4) ; 21 | dargs{1} = bsxfun(@times, derOutputs{1}, args{2}) ; 22 | dargs{2} = derOutputs{1} .* args{1} ; 23 | for k = find(sz == 1) 24 | dargs{2} = sum(dargs{2}, k) ; 25 | end 26 | if obj.hasBias 27 | dargs{3} = derOutputs{1} ; 28 | for k = find(sz == 1) 29 | dargs{3} = sum(dargs{3}, k) ; 30 | end 31 | end 32 | derInputs = dargs(1:numel(inputs)) ; 33 | derParams = dargs(numel(inputs)+(1:numel(params))) ; 34 | end 35 | 36 | function obj = Scale(varargin) 37 | obj.load(varargin) ; 38 | end 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/Sigmoid.m: -------------------------------------------------------------------------------- 1 | classdef Sigmoid < dagnn.ElementWise 2 | methods 3 | function outputs = forward(obj, inputs, params) 4 | outputs{1} = vl_nnsigmoid(inputs{1}) ; 5 | end 6 | 7 | function [derInputs, derParams] = backward(obj, inputs, params, derOutputs) 8 | derInputs{1} = vl_nnsigmoid(inputs{1}, derOutputs{1}) ; 9 | derParams = {} ; 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/SoftMax.m: -------------------------------------------------------------------------------- 1 | classdef SoftMax < dagnn.ElementWise 2 | methods 3 | function outputs = forward(self, inputs, params) 4 | outputs{1} = vl_nnsoftmax(inputs{1}) ; 5 | end 6 | 7 | function [derInputs, derParams] = backward(self, inputs, params, derOutputs) 8 | derInputs{1} = vl_nnsoftmax(inputs{1}, derOutputs{1}) ; 9 | derParams = {} ; 10 | end 11 | 12 | function obj = SoftMax(varargin) 13 | obj.load(varargin) ; 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/SpatialNorm.m: -------------------------------------------------------------------------------- 1 | classdef SpatialNorm < dagnn.ElementWise 2 | properties 3 | param = [2 2 10 2] 4 | end 5 | 6 | methods 7 | function outputs = forward(obj, inputs, params) 8 | outputs{1} = vl_nnspnorm(inputs{1}, obj.param) ; 9 | end 10 | 11 | function [derInputs, derParams] = backward(obj, inputs, param, derOutputs) 12 | derInputs{1} = vl_nnspnorm(inputs{1}, obj.param, derOutputs{1}) ; 13 | derParams = {} ; 14 | end 15 | 16 | function obj = SpatialNorm(varargin) 17 | obj.load(varargin) ; 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/+dagnn/Sum.m: -------------------------------------------------------------------------------- 1 | classdef Sum < dagnn.ElementWise 2 | %SUM DagNN sum layer 3 | % The SUM layer takes the sum of all its inputs and store the result 4 | % as its only output. 5 | 6 | properties (Transient) 7 | numInputs 8 | end 9 | 10 | methods 11 | function outputs = forward(obj, inputs, params) 12 | obj.numInputs = numel(inputs) ; 13 | outputs{1} = inputs{1} ; 14 | for k = 2:obj.numInputs 15 | outputs{1} = outputs{1} + inputs{k} ; 16 | end 17 | end 18 | 19 | function [derInputs, derParams] = backward(obj, inputs, params, derOutputs) 20 | for k = 1:obj.numInputs 21 | derInputs{k} = derOutputs{1} ; 22 | end 23 | derParams = {} ; 24 | end 25 | 26 | function outputSizes = getOutputSizes(obj, inputSizes) 27 | outputSizes{1} = inputSizes{1} ; 28 | for k = 2:numel(inputSizes) 29 | if all(~isnan(inputSizes{k})) && all(~isnan(outputSizes{1})) 30 | if ~isequal(inputSizes{k}, outputSizes{1}) 31 | warning('Sum layer: the dimensions of the input variables is not the same.') ; 32 | end 33 | end 34 | end 35 | end 36 | 37 | function rfs = getReceptiveFields(obj) 38 | numInputs = numel(obj.net.layers(obj.layerIndex).inputs) ; 39 | rfs.size = [1 1] ; 40 | rfs.stride = [1 1] ; 41 | rfs.offset = [1 1] ; 42 | rfs = repmat(rfs, numInputs, 1) ; 43 | end 44 | 45 | function obj = Sum(varargin) 46 | obj.load(varargin) ; 47 | end 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/Dist.m: -------------------------------------------------------------------------------- 1 | function valDistances = Dist(vals,edges,method) 2 | 3 | if strcmp(method,'L2') 4 | valDistances = sqrt(sum((vals(edges(:,1),:)-vals(edges(:,2),:)).^2,2)); 5 | % valDistances = sum((vals(edges(:,1),:)-vals(edges(:,2),:)).^2,2); 6 | % valDistances1=histDist(vals1(edges(:,1),:),vals1(edges(:,2),:)); 7 | valDistances = normalize(valDistances); %Normalize to [0,1] 8 | elseif strcmp(method,'X2') 9 | valDistances = histDist(vals(edges(:,1),:),vals(edges(:,2),:)); 10 | valDistances = normalize(valDistances); %Normalize to [0,1] 11 | elseif strcmp(method,'L1') 12 | valDistances = sum(vals(edges(:,1),:)-vals(edges(:,2),:),2); 13 | valDistances = normalize(valDistances); %Normalize to [0,1] 14 | end -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/Fmeasure_calu.m: -------------------------------------------------------------------------------- 1 | %% 2 | function Fmeasure = Fmeasure_calu(sMap,gtMap,gtsize) 3 | sumLabel = 2* mean(sMap(:)) ; 4 | if ( sumLabel > 1 ) 5 | sumLabel = 1; 6 | end 7 | 8 | Label3 = zeros( gtsize ); 9 | Label3( sMap>=sumLabel ) = 1; 10 | 11 | NumRec = length( find( Label3==1 ) ); 12 | LabelAnd = Label3 & gtMap; 13 | NumAnd = length( find ( LabelAnd==1 ) ); 14 | num_obj = sum(sum(gtMap)); 15 | 16 | if NumAnd == 0 17 | PreFtem = 0; 18 | RecallFtem = 0; 19 | FmeasureF = 0; 20 | else 21 | PreFtem = NumAnd/NumRec; 22 | RecallFtem = NumAnd/num_obj; 23 | FmeasureF = ( ( 1.3* PreFtem * RecallFtem ) / ( .3 * PreFtem + RecallFtem ) ); 24 | end 25 | 26 | Fmeasure = [PreFtem, RecallFtem, FmeasureF]; 27 | 28 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/Fmeasure_calu_Rect.m: -------------------------------------------------------------------------------- 1 | %% 2 | function Fmeasure = Fmeasure_calu_Rect(sMap,gtMap,gtsize) 3 | sumLabel = 2* mean(sMap(:)) ; 4 | if ( sumLabel > 1 ) 5 | sumLabel = 1; 6 | end 7 | STATS = regionprops(uint8(sMap>=sumLabel),'BoundingBox'); 8 | Label3 = zeros( gtsize ); 9 | bbox = round([STATS.BoundingBox]); 10 | if (numel(bbox)>0) 11 | Label3(bbox(2):(bbox(2)+bbox(4)-1),bbox(1):(bbox(1)+bbox(3)-1))=1; 12 | end 13 | 14 | NumRec = length( find( Label3==1 ) ); 15 | LabelAnd = Label3 & gtMap; 16 | NumAnd = length( find ( LabelAnd==1 ) ); 17 | num_obj = sum(sum(gtMap)); 18 | 19 | if NumAnd == 0 20 | PreFtem = 0; 21 | RecallFtem = 0; 22 | FmeasureF = 0; 23 | else 24 | PreFtem = NumAnd/NumRec; 25 | RecallFtem = NumAnd/num_obj; 26 | FmeasureF = ( ( 1.3* PreFtem * RecallFtem ) / ( .3 * PreFtem + RecallFtem ) ); 27 | end 28 | 29 | Fmeasure = [PreFtem, RecallFtem, FmeasureF]; 30 | 31 | 32 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/Pre_Recall_hitRate.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/Pre_Recall_hitRate.m -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/ASD_bar.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/ASD_bar.fig -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/ASD_pr.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/ASD_pr.fig -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/BKL.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/BKL.fig -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/BKL_pr.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/BKL_pr.fig -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/SED1_bar.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/SED1_bar.fig -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/SED1_pr.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/SED1_pr.fig -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/SED2_bar.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/SED2_bar.fig -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/SED2_pr.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/SED2_pr.fig -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/base_ASD.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/base_ASD.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/base_BKL.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/base_BKL.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/base_SED1.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/base_SED1.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/base_pr_bar_fig/base_BKL.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/base_pr_bar_fig/base_BKL.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/msra_bar.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/msra_bar.fig -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/msra_pr.fig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/base_pr_bar_fig/msra_pr.fig -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/candidateAlgStructure.m: -------------------------------------------------------------------------------- 1 | %% 2 | function result = candidateAlgStructure( alg ) 3 | % Function creates the struct needed to evaluate algorithm 4 | % Input: 5 | % name - name of algorithm 6 | % dir - directory of algorithm output 7 | % prefix - prefix of saliency files - can be empty. (e.g. saliency_); 8 | % postfix - postif of saliency files - can be empty. (e.g. _saleincy); 9 | % ext - extension of saliency files (e.g. jpg,png) 10 | 11 | len = length( alg ); 12 | result5 = cell( len, 1 ); 13 | for j = 1:len 14 | tem = alg{j}; 15 | result5{j} = struct( 'name', tem(1), 'dir', tem(2), 'prefix', tem(3), ... 16 | 'postfix', tem(4), 'ext', tem(5) ); 17 | end 18 | result = result5; -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/curve_bar_plot.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/curve_bar_plot.m -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/datasetStructure.m: -------------------------------------------------------------------------------- 1 | function result = datasetStructure(datasetName,GTdir) 2 | % Function creates the struct of dataset to which evaluate on 3 | % Input: 4 | % datasetName - name of dataset testing on. Possible inputs: 5 | % ASD,MSRA,SED1,SED2,SOD. 6 | % GTdir - directory of dataset's ground-truth images 7 | result = struct('datasetName',datasetName,'GTdir', GTdir); 8 | end -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/main_GT_comp.asv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/main_GT_comp.asv -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/main_GT_comp.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/main_GT_comp.m -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/main_Rect_comp_Omron.m: -------------------------------------------------------------------------------- 1 | %% 2 | % DUT_OMRON 3 | clear all; 4 | close all; 5 | gt_dir = { 'DUT_OMRON', 'E:\yuanxz\binarymasks\' }; 6 | alg_dir = ... 7 | {{'Ours', 'E:\yuanxz\cvprcode\saliencymap\', [], [], 'png'} 8 | {'CB', 'E:\MapOmron\Omron-CB\', [], [], 'jpg'} 9 | {'SVO', 'E:\MapOmron\Omron-SVO\', [], [], 'jpg'} 10 | {'RC', 'E:\MapOmron\Omron-RC\', [], [], 'jpg'} 11 | {'CA', 'E:\MapOmron\Omron-CA\', [], [], 'jpg'} 12 | {'FT', 'E:\MapOmron\Omron-FT\', [], [], 'jpg'} 13 | {'GB', 'E:\MapOmron\Omron-GB\', [], [], 'jpg'} 14 | {'SR', 'E:\MapOmron\Omron-SR\', [], [], 'jpg'} 15 | {'IT', 'E:\MapOmron\Omron-ITTI\', [], [], 'jpg'} }; 16 | 17 | alg_dir_FF = candidateAlgStructure( alg_dir ); 18 | dataset = datasetStructure( gt_dir(1), gt_dir(2) ); 19 | 20 | [ mPre, mRecall, mFmeasure, mHitRate , mFalseAlarm, AUC ] = ... 21 | performCalcu_Rect(dataset,alg_dir_FF); 22 | 23 | basedir = './base_pr_bar_fig/'; 24 | mkdir(basedir); 25 | save( [ basedir 'base_Omron'], 'mPre', 'mRecall', 'mFmeasure', 'mHitRate', 'mFalseAlarm', 'AUC' ); 26 | 27 | curve_bar_plot( basedir, gt_dir, alg_dir, mPre, mRecall, mFmeasure, AUC ); 28 | 29 | clear all; 30 | close all; 31 | % system('shutdown -s') 32 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/Curve_BenchCode/performCalcu.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/Curve_BenchCode/performCalcu.m -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR-code/PR.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR-code/PR.m -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR/DRFI_ECSSD.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR/DRFI_ECSSD.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR/MR-DL36_ECSSD.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR/MR-DL36_ECSSD.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR/MR-DL_ECSSD.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR/MR-DL_ECSSD.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR/New Folder/vgg36scapm_ECSSD.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR/New Folder/vgg36scapm_ECSSD.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR/New Folder/vggfeat36labaddweight12_ECSSD.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR/New Folder/vggfeat36labaddweight12_ECSSD.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR/New Folder/vggfeat36labaddweight21_ECSSD.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR/New Folder/vggfeat36labaddweight21_ECSSD.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR/lab_ECSSD.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR/lab_ECSSD.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR/test_ECSSD.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR/test_ECSSD.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR/vgg36216_ECSSD.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR/vgg36216_ECSSD.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR/vgg366_ECSSD.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR/vgg366_ECSSD.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR/vgg36featrgbslic_ECSSD.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR/vgg36featrgbslic_ECSSD.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR/vggedge_ECSSD.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR/vggedge_ECSSD.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR/vggfeatlab12_ECSSD.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR/vggfeatlab12_ECSSD.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/PR/vggfeatlab21_ECSSD.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/PR/vggfeatlab21_ECSSD.mat -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/SLIC-DBSCAN/0_0_77.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/SLIC-DBSCAN/0_0_77.bmp -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/SLIC-DBSCAN/2_72_72778.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/SLIC-DBSCAN/2_72_72778.bmp -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/SLIC-DBSCAN/2_72_72778.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/SLIC-DBSCAN/2_72_72778.jpg -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/SLIC-DBSCAN/circularstruct.m: -------------------------------------------------------------------------------- 1 | % CIRCULARSTRUCT 2 | % 3 | % Function to construct a circular structuring element 4 | % for morphological operations. 5 | % 6 | % function strel = circularstruct(radius) 7 | % 8 | % Note radius can be a floating point value though the resulting 9 | % circle will be a discrete approximation 10 | % 11 | % Peter Kovesi March 2000 12 | 13 | function strel = circularstruct(radius) 14 | 15 | if radius < 1 16 | error('radius must be >= 1'); 17 | end 18 | 19 | dia = ceil(2*radius); % Diameter of structuring element 20 | 21 | if mod(dia,2) == 0 % If diameter is a odd value 22 | dia = dia + 1; % add 1 to generate a `centre pixel' 23 | end 24 | 25 | r = fix(dia/2); 26 | [x,y] = meshgrid(-r:r); 27 | rad = sqrt(x.^2 + y.^2); 28 | strel = rad <= radius; 29 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/SLIC-DBSCAN/dbscan.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/SLIC-DBSCAN/dbscan.m -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/SLIC-DBSCAN/demo.m: -------------------------------------------------------------------------------- 1 | % clc;clear;close all; 2 | im = imread('2_72_72778.jpg'); 3 | [l, Am, C] = slic(im, 200, 18, 1.5, 'median'); 4 | show(drawregionboundaries(l, im, [255 255 255])); 5 | tic(); 6 | lc = spdbscan(l, C, Am, 5); 7 | toc(); 8 | show(drawregionboundaries(lc, im, [255 255 255])) -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/SLIC-DBSCAN/maskimage.m: -------------------------------------------------------------------------------- 1 | % MASKIMAGE Apply mask to image 2 | % 3 | % Usage: maskedim = maskimage(im, mask, col) 4 | % 5 | % Arguments: im - Image to be masked 6 | % mask - Binary masking image 7 | % col - Value/colour to be applied to regions where mask == 1 8 | % If im is a colour image col can be a 3-vector 9 | % specifying the colour values to be applied. 10 | % 11 | % Returns: maskedim - The masked image 12 | % 13 | % See also; DRAWREGIONBOUNDARIES 14 | 15 | % Peter Kovesi 16 | % Centre for Exploration Targeting 17 | % School of Earth and Environment 18 | % The University of Western Australia 19 | % peter.kovesi at uwa edu au 20 | % 21 | % Feb 2013 22 | 23 | function maskedim = maskimage(im, mask, col) 24 | 25 | [rows,cols, chan] = size(im); 26 | 27 | % Set default colour to 0 (black) 28 | if ~exist('col', 'var'), col = 0; end 29 | 30 | % Ensure col has same length as image depth. 31 | if length(col) == 1 32 | col = repmat(col, [chan 1]); 33 | else 34 | assert(length(col) == chan); 35 | end 36 | 37 | % Perform masking 38 | maskedim = im; 39 | for n = 1:chan 40 | tmp = maskedim(:,:,n); 41 | tmp(mask) = col(n); 42 | maskedim(:,:,n) = tmp; 43 | end 44 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/SLIC-DBSCAN/rgb2lab.m: -------------------------------------------------------------------------------- 1 | % RGB2LAB - RGB to L*a*b* colour space 2 | % 3 | % Usage: Lab = rgb2lab(im, wp) 4 | % 5 | % Arguments: im - RGB image or Nx3 colourmap for conversion 6 | % wp - Optional string specifying the adapted white point. 7 | % This defaults to 'D65'. 8 | % 9 | % Returns: Lab - The converted image or colourmap. 10 | % 11 | % This function wraps up calls to MAKECFORM and APPLYCFORM in a convenient 12 | % form. Note that if the image is of type uint8 this function casts it to 13 | % double and divides by 255 so that RGB values are in the range 0-1 and the 14 | % transformed image can have the proper negative values for a and b. 15 | % 16 | % See also: LAB2RGB, RGB2NRGB, RGB2CMYK 17 | 18 | % Peter Kovesi 19 | % Centre for Exploration Targeting 20 | % The University of Western Australia 21 | % peter.kovesi at uwa edu au 22 | 23 | % PK May 2009 24 | 25 | function Lab = rgb2lab(im, wp) 26 | 27 | if ~exist('wp', 'var'), wp = 'D65'; end 28 | 29 | cform = makecform('srgb2lab',... 30 | 'adaptedwhitepoint', whitepoint(wp)); 31 | if strcmp(class(im),'uint8') 32 | im = double(im)/255; 33 | end 34 | Lab = applycform(im, cform); -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/SLIC-DBSCAN/spdbscan.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/SLIC-DBSCAN/spdbscan.m -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/SLICSuperpixelSegmentation.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/SLICSuperpixelSegmentation.exe -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/SLIC_Split.m: -------------------------------------------------------------------------------- 1 | function [idxImg,adjcMatrix8, pixelList] = SLIC_Split(noFrameImg, spnumber, spPath, srcName) 2 | % Segment rgb image into super-pixels using SLIC algorithm: 3 | 4 | % R.Achanta, A.Shaji, K.Smith, A.Lucchi, P.Fua, and S.Susstrunk. Slic 5 | % superpixels compared to state-of-the-art superpixel methods. IEEE 6 | % Transactions on Pattern Analysis and Machine Intelligence, 2012. 7 | 8 | % Author: Wangjiang Zhu 9 | % Email: wangjiang88119@gmail.com 10 | % Date: 3/24/2014 11 | 12 | %% Segment using SLIC: 13 | compactness = 20; %the larger compactness is, the more regular superpixels will be 14 | % The logic in SLIC_mex: 15 | % 1.If spPath or srcName are NOT specified: 16 | % SLIC_mex run segmentation algorithm 17 | % 2.If spPath and srcName are specified: 18 | % SLIC_mex will check if index image file is already exists under 19 | % spPath: 20 | % 2.1 If so, just load it. 21 | % 2.2 If not, run segmentation algorithm, save index image and mean color 22 | % image 23 | noFrameImg = uint8(noFrameImg*255); 24 | if 2 == nargin 25 | [idxImg, spNum] = SLIC_mex(noFrameImg, spnumber, compactness); 26 | elseif 4 == nargin 27 | [idxImg, spNum] = SLIC_mex(noFrameImg, spnumber, compactness, spPath, srcName); 28 | else 29 | error('wrong input para number'); 30 | end 31 | %% 32 | adjcMatrix8 = AdjcProcloop(idxImg, spNum); 33 | 34 | %% 35 | pixelList = cell(spNum, 1); 36 | for n = 1:spNum 37 | pixelList{n} = find(idxImg == n); 38 | end 39 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/SLIC_mex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/SLIC_mex.mexw64 -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/added/BoundaryConnectivity.m: -------------------------------------------------------------------------------- 1 | function [bdCon, Len_bnd, Area] = BoundaryConnectivity(adjcMatrix, weightMatrix, bdIds, clipVal, geo_sigma, link_boundary) 2 | % Compute boundary connecity values for all superpixels 3 | 4 | % Code Author: Wangjiang Zhu 5 | % Email: wangjiang88119@gmail.com 6 | % Date: 3/24/2014 7 | if (nargin < 6) 8 | link_boundary = true; 9 | end 10 | if (link_boundary) 11 | adjcMatrix = LinkBoundarySPs(adjcMatrix, bdIds); 12 | end 13 | 14 | adjcMatrix = tril(adjcMatrix, -1); 15 | edgeWeight = weightMatrix(adjcMatrix > 0); 16 | edgeWeight = max(0, edgeWeight - clipVal); 17 | 18 | % Cal pair-wise shortest path cost (geodesic distance) 19 | geoDistMatrix = graphallshortestpaths(sparse(adjcMatrix), 'directed', false, 'Weights', edgeWeight); 20 | 21 | Wgeo = Dist2WeightMatrix(geoDistMatrix, geo_sigma); 22 | Len_bnd = sum( Wgeo(:, bdIds), 2); %length of perimeters on boundary 23 | Area = sum(Wgeo, 2); %soft area 24 | bdCon = Len_bnd ./ sqrt(Area); -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/added/Dist2WeightMatrix.m: -------------------------------------------------------------------------------- 1 | function weightMatrix = Dist2WeightMatrix(distMatrix, distSigma) 2 | % Transform pair-wise distance to pair-wise weight using 3 | % exp(-d^2/(2*sigma^2)); 4 | 5 | % Code Author: Wangjiang Zhu 6 | % Email: wangjiang88119@gmail.com 7 | % Date: 3/24/2014 8 | 9 | spNum = size(distMatrix, 1); 10 | 11 | distMatrix(distMatrix > 3 * distSigma) = Inf; %cut off > 3 * sigma distances 12 | weightMatrix = exp(-distMatrix.^2 ./ (2 * distSigma * distSigma)); 13 | 14 | if any(1 ~= weightMatrix(1:spNum+1:end)) 15 | error('Diagonal elements in the weight matrix should be 1'); 16 | end -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/added/EstimateBgProb.m: -------------------------------------------------------------------------------- 1 | function [bgProb, bdCon, bgWeight] = EstimateBgProb(colDistM, adjcMatrix, bdIds, clipVal, geoSigma) 2 | % Estimate background probability using boundary connectivity 3 | 4 | % Code Author: Wangjiang Zhu 5 | % Email: wangjiang88119@gmail.com 6 | % Date: 3/24/2014 7 | 8 | bdCon = BoundaryConnectivity(adjcMatrix, colDistM, bdIds, clipVal, geoSigma, true); 9 | 10 | bdConSigma = 1; %sigma for converting bdCon value to background probability 11 | fgProb = exp(-bdCon.^2 / (2 * bdConSigma * bdConSigma)); %Estimate bg probability 12 | bgProb = 1 - fgProb; 13 | 14 | bgWeight = bgProb; 15 | % Give a very large weight for very confident bg sps can get slightly 16 | % better saliency maps, you can turn it off. 17 | fixHighBdConSP = true; 18 | highThresh = 3; 19 | if fixHighBdConSP 20 | bgWeight(bdCon > highThresh) = 1000; 21 | end -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/added/EstimateDynamicParas.m: -------------------------------------------------------------------------------- 1 | function [clipVal, geoSigma, neiSigma] = EstimateDynamicParas(adjcMatrix, colDistM) 2 | % Estimate dynamic paras can slightly improve overall performance, but in 3 | % fact, influence of those paras is very small, you can just use fixed 4 | % paras, and we suggest you to set geoSigma = 7, neiSigma = 10. 5 | 6 | % Code Author: Wangjiang Zhu 7 | % Email: wangjiang88119@gmail.com 8 | % Date: 3/24/2014 9 | 10 | [meanMin1, meanTop, meanMin2] = GetMeanMinAndMeanTop(adjcMatrix, colDistM, 0.01); 11 | clipVal = meanMin2; 12 | 13 | % Emperically choose adaptive sigma for converting geodesic distance to 14 | % weight 15 | geoSigma = min([10, meanMin1 * 3, meanTop / 10]); 16 | geoSigma = max(geoSigma, 5); 17 | 18 | % Emperically choose adaptive sigma for smoothness term in Equa(9) of our 19 | % paper. 20 | neiSigma = min([3 * meanMin1, 0.2 * meanTop, 20]); -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/added/GetAdjMatrix.m: -------------------------------------------------------------------------------- 1 | function adjMatrix = GetAdjMatrix(idxImg, spNum) 2 | % Get adjacent matrix of super-pixels 3 | % idxImg is an integer image, values in [1..spNum] 4 | 5 | % Code Author: Wangjiang Zhu 6 | % Email: wangjiang88119@gmail.com 7 | % Date: 3/24/2014 8 | 9 | [h, w] = size(idxImg); 10 | 11 | %Get edge pixel locations (4-neighbor) 12 | topbotDiff = diff(idxImg, 1, 1) ~= 0; 13 | topEdgeIdx = find( padarray(topbotDiff, [1 0], false, 'post') ); %those pixels on the top of an edge 14 | botEdgeIdx = topEdgeIdx + 1; 15 | 16 | leftrightDiff = diff(idxImg, 1, 2) ~= 0; 17 | leftEdgeIdx = find( padarray(leftrightDiff, [0 1], false, 'post') ); %those pixels on the left of an edge 18 | rightEdgeIdx = leftEdgeIdx + h; 19 | 20 | %Get adjacent matrix of super-pixels 21 | adjMatrix = zeros(spNum, spNum); 22 | adjMatrix( sub2ind([spNum, spNum], idxImg(topEdgeIdx), idxImg(botEdgeIdx)) ) = 1; 23 | adjMatrix( sub2ind([spNum, spNum], idxImg(leftEdgeIdx), idxImg(rightEdgeIdx)) ) = 1; 24 | adjMatrix = adjMatrix + adjMatrix'; 25 | adjMatrix(1:spNum+1:end) = 1;%set diagonal elements to 1 26 | adjMatrix = sparse(adjMatrix); -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/added/GetBndPatchIds.m: -------------------------------------------------------------------------------- 1 | function bdIds = GetBndPatchIds(idxImg, thickness) 2 | % Get super-pixels on image boundary 3 | % idxImg is an integer image, values in [1..spNum] 4 | % thickness means boundary band width 5 | 6 | % Code Author: Wangjiang Zhu 7 | % Email: wangjiang88119@gmail.com 8 | % Date: 3/24/2014 9 | 10 | if nargin < 2 11 | thickness = 8; 12 | end 13 | 14 | bdIds=unique([ 15 | unique( idxImg(1:thickness,:) ); 16 | unique( idxImg(end-thickness+1:end,:) ); 17 | unique( idxImg(:,1:thickness) ); 18 | unique( idxImg(:,end-thickness+1:end) ) 19 | ]); -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/added/GetDistanceMatrix.m: -------------------------------------------------------------------------------- 1 | function distM = GetDistanceMatrix(feature) 2 | % Get pair-wise distance matrix between each rows in feature 3 | % Each row of feature correspond to a sample 4 | 5 | % Code Author: Wangjiang Zhu 6 | % Email: wangjiang88119@gmail.com 7 | % Date: 3/24/2014 8 | 9 | spNum = size(feature, 1); 10 | DistM2 = zeros(spNum, spNum); 11 | 12 | for n = 1:size(feature, 2) 13 | DistM2 = DistM2 + ( repmat(feature(:,n), [1, spNum]) - repmat(feature(:,n)', [spNum, 1]) ).^2; 14 | end 15 | distM = sqrt(DistM2); -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/added/GetMeanColor.m: -------------------------------------------------------------------------------- 1 | function meanCol = GetMeanColor(image, pixelList,feat_type) 2 | % Code Author: Wangjiang Zhu 3 | % Email: wangjiang88119@gmail.com 4 | % Date: 3/24/2014 5 | 6 | [h, w, chn] = size(image); 7 | if ~strcmp(feat_type,'vgg') 8 | image = uint8(image*255); 9 | end 10 | tmpImg=reshape(image, h*w, chn); 11 | spNum = length(pixelList); 12 | meanCol=zeros(spNum, chn); 13 | for i=1:spNum 14 | meanCol(i, :)=mean(tmpImg(pixelList{i},:), 1); 15 | end 16 | if chn ==1 %for gray images 17 | meanCol = repmat(meanCol, [1, 3]); 18 | end -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/added/GetNormedMeanPos.m: -------------------------------------------------------------------------------- 1 | function meanPos = GetNormedMeanPos(pixelList, height, width) 2 | % averaged x(y) coordinates of each superpixel, normalized with respect to 3 | % image dimension 4 | % return N*2 vector, row i is superpixel i's coordinate [y x] 5 | 6 | % Code Author: Wangjiang Zhu 7 | % Email: wangjiang88119@gmail.com 8 | % Date: 3/24/2014 9 | 10 | spNum = length(pixelList); 11 | meanPos = zeros(spNum, 2); 12 | 13 | for n = 1 : spNum 14 | [rows, cols] = ind2sub([height, width], pixelList{n}); 15 | meanPos(n,1) = mean(rows) / height; 16 | meanPos(n,2) = mean(cols) / width; 17 | end -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/added/LinkBoundarySPs.m: -------------------------------------------------------------------------------- 1 | function adjcMatrix = LinkBoundarySPs(adjcMatrix, bdIds) 2 | % Code Author: Wangjiang Zhu 3 | % Email: wangjiang88119@gmail.com 4 | % Date: 3/24/2014 5 | 6 | adjcMatrix(bdIds, bdIds) = 1; -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/added/myDrawBounderis.m: -------------------------------------------------------------------------------- 1 | 2 | 3 | function [IM_B,subw]= myDrawBounderis(superpixel_labels,im) 4 | 5 | % input_im = (imread(input_im)); 6 | [m,n,~] = size(im); 7 | su = filter2(fspecial('average',3),superpixel_labels); 8 | bw = su - superpixel_labels; 9 | bw(abs(bw)<1e-4) = 0; 10 | bw(1:end,1) = 0; 11 | bw(1:end,end) = 0; 12 | bw(1,1:end) = 0; 13 | bw(end,1:end) = 0; 14 | bw(bw~=0) = 1; 15 | index = find(bw == 1); 16 | inner_index = setdiff([1:m*n],index); 17 | subw = superpixel_labels; 18 | subw(inner_index) = 0; 19 | imR = im(1:m,1:n,1); 20 | imG = im(1:m,1:n,2); 21 | imB = im(1:m,1:n,3); 22 | imR(index) = 255; 23 | imG(index) = 0; 24 | imB(index) = 0; 25 | IM_B = cat(3,imR,imG,imB); 26 | % imwrite(IM_B,'segim.png'); -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/added/test_myDrawBounderis.m: -------------------------------------------------------------------------------- 1 | 2 | 3 | impath = '/media/iiau/linux_file/kyq/retrivel_saliency/ASD_codenew/figre/0271.bmp'; 4 | IM_B = myDrawBounderis(segim,impath); 5 | seednum = length(seedlabel); 6 | for ii = 1 : seednum 7 | ind = find(segim == seedlabel(ii)); 8 | temp1 = IM_B(:,:,1); 9 | temp2 = IM_B(:,:,2); 10 | temp3 = IM_B(:,:,3); 11 | temp1(ind) = 255; 12 | temp2(ind) = 255; 13 | temp3(ind) = 0; 14 | IM_B = cat(3,temp1,temp2,temp3); 15 | end 16 | imshow(IM_B) 17 | outname = './segsup.jpg'; 18 | imwrite(IM_B,outname); -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/compatibility/parallel/gather.m: -------------------------------------------------------------------------------- 1 | function x=gather(x) 2 | % GATHER Compatibility stub for the GATHER() function 3 | % GATHER() is a function in the Parallel MATLAB toolbox. MATCONVNET 4 | % can work without it. 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/compatibility/parallel/labindex.m: -------------------------------------------------------------------------------- 1 | function i = labindex() 2 | i = 1 ; 3 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/compatibility/parallel/numlabs.m: -------------------------------------------------------------------------------- 1 | function n = numlabs() 2 | n = 1 ; 3 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/findSameEdgeInd.m: -------------------------------------------------------------------------------- 1 | function index = findSameEdgeInd(edges,edges8); 2 | num = length(edges8); 3 | index = zeros(num,1); 4 | 5 | for i = 1 : num 6 | ind1 = find(edges(:,1)==edges8(i,1)); 7 | ind2 = find(edges(:,2)==edges8(i,2)); 8 | index(i) = intersect(ind1,ind2); 9 | end -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/findSupBoundaries.m: -------------------------------------------------------------------------------- 1 | function subw = findSupBoundaries(sulabel) 2 | 3 | [m,n] = size(sulabel); 4 | su = filter2(fspecial('average',3),sulabel); 5 | bw = su - sulabel; 6 | bw(abs(bw)<1e-4) = 0; 7 | bw(1:end,1) = 0; 8 | bw(1:end,end) = 0; 9 | bw(1,1:end) = 0; 10 | bw(end,1:end) = 0; 11 | bw(bw~=0) = 1; 12 | index = find(bw == 1); 13 | inner_index = setdiff([1:m*n],index); 14 | subw = sulabel; 15 | subw(inner_index) = 0; 16 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/findneighboredge.m: -------------------------------------------------------------------------------- 1 | function IND = findneighboredge(edges,SupBound) 2 | [m,n] = size(SupBound); 3 | num = length(edges); 4 | IND = cell(num,1); 5 | for i = 1 : num 6 | % disp(i); 7 | temp = edges(i,:); 8 | index1 = SupBound==temp(1); 9 | index2 = SupBound==temp(2); 10 | SupBound1 = zeros(m,n); 11 | SupBound1(index1) = temp(1); 12 | SupBound2 = zeros(m,n); 13 | SupBound2(index2) = temp(2); 14 | % index = intersect(index1,index2); 15 | % SupBound(index) = 0; 16 | se = strel('disk',1); 17 | SupBound1 = imdilate(SupBound1,se); 18 | SupBound2 = imdilate(SupBound2,se); 19 | SupBound3 = SupBound1 + SupBound2; 20 | index = find(SupBound3 == sum(temp(:))); 21 | % ww = zeros(m,n); 22 | % ww(index)=1; 23 | IND{i} = index; 24 | end -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/get_features_inception.m: -------------------------------------------------------------------------------- 1 | % function feat = get_features_inception(im, cos_window, layers) 2 | %GET_FEATURES 3 | % Extracts dense features from image. 4 | % 5 | addpath('mex') 6 | img=imread(['E:\MyWorkOnSaliency\matconvnet-1.0-beta19\0001.jpg']); 7 | % if ~exist('net','var') 8 | % inital_net; 9 | % end 10 | global res; 11 | global net1; 12 | % 13 | % if isempty(net1), 14 | % initial_net_inception(); 15 | % end 16 | net1 = dagnn.DagNN.loadobj(load('E:\MyWorkOnSaliency\matconvnet-1.0-beta19\Data\pascal-fcn32s-dag.mat')) ; 17 | % net=vl_simplenn_move(net,'gpu'); 18 | % sz_window=size(cos_window); 19 | %net= load('/home/waynecool/imagenet_vgg_verydeep_19.mat') 20 | img = single(img); % note: 255 range 21 | % img = imResampleMex(img, net.normalization.imageSize(1:2)); 22 | img = imresize(img, [net1.meta.normalization.imageSize(1),net1.meta.normalization.imageSize(2)]); 23 | % img = img - net.normalization.averageImage; 24 | tmp=single(zeros(500,500,3)); 25 | tmp(:,:,1)=net1.meta.normalization.averageImage(:,:,1); 26 | tmp(:,:,2)=net1.meta.normalization.averageImage(:,:,2); 27 | tmp(:,:,3)=net1.meta.normalization.averageImage(:,:,3); 28 | img = img - tmp; 29 | % img = gpuArray(img); 30 | 31 | % run the CNN 32 | % res=vl_simplenn(net,img); 33 | net1.eval({'data', img}) ; 34 | % res=vl_simplenn(net,img); 35 | feat={}; 36 | 37 | 38 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/histDist.m: -------------------------------------------------------------------------------- 1 | function dist = histDist(h1, h2, method) 2 | if nargin == 2 3 | method = 'x2'; 4 | end 5 | % normalize 6 | h1 = h1 / (sum(h1(:)) + eps); 7 | h2 = h2 / (sum(h2(:)) + eps); 8 | dist = 0; 9 | switch method 10 | case 'x2' 11 | dist = sum((h1-h2).^2 ./ (h2+h1+eps),2) / 2; 12 | end 13 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/imResampleMex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/imResampleMex.mexw64 -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/makeEdgeWeights.m: -------------------------------------------------------------------------------- 1 | function edges_weights = makeEdgeWeights(edges,imedge,SupBound,theta) 2 | num = length(edges); 3 | IND = findneighboredge(edges,SupBound); 4 | edge_grade = zeros(num,1); 5 | for i = 1 : num 6 | edge_grade(i) = sum(imedge(IND{i})); 7 | end 8 | ind0 = find(edge_grade==0); 9 | ind = setdiff([1:num],ind0); 10 | edge_grade(ind) = normalize(edge_grade(ind)); 11 | edges_weights = edge_grade; 12 | % edges_weights=exp(-theta*edge_grade); 13 | % edges_weights = 1./(edge_grade+1); 14 | 15 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/my_makeweights.m: -------------------------------------------------------------------------------- 1 | function weights=my_makeweights(edges,vals1,vals2,valScale,alpha,edges_weights) 2 | if nargin <6 3 | edges_weights = 1; 4 | end 5 | 6 | valDistances1 = Dist(vals1,edges,'L2'); 7 | valDistances2 = Dist(vals2,edges,'L2'); 8 | %% 9 | valDistances = alpha(1)*valDistances1 + alpha(2)*valDistances2; 10 | % valDistances = valDistances1.*(valDistances2+1); 11 | valDistances = normalize(valDistances).*edges_weights; 12 | weights=exp(-valScale*valDistances); 13 | %% 14 | % weights1 = exp(-valScale*valDistances1); 15 | % weights2 = exp(-valScale*valDistances2); 16 | % weights = weights1*alpha + weights2; 17 | % weights = (alpha+weights1) .* weights2; 18 | % weights = normalize(weights); -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/my_makeweights3.m: -------------------------------------------------------------------------------- 1 | function weights=my_makeweights3(edges,vals1,vals2,vals3,valScale,alpha) 2 | 3 | valDistances1 = Dist(vals1,edges,'L2'); 4 | valDistances2 = Dist(vals2,edges,'L2'); 5 | valDistances3 = Dist(vals3,edges,'L2'); 6 | 7 | %% 8 | valDistances = alpha(1)*valDistances1 + alpha(2)*valDistances2 + alpha(3)*valDistances3; 9 | % valDistances = sqrt(valDistances); 10 | valDistances = normalize(valDistances); 11 | weights=exp(-valScale*valDistances); 12 | %% 13 | % weights1 = exp(-valScale*valDistances1); 14 | % weights2 = exp(-valScale*valDistances2); 15 | % weights = weights1*alpha + weights2; 16 | % weights = (alpha+weights1) .* weights2; 17 | % weights = normalize(weights); -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/others/AdjcProcloop.m: -------------------------------------------------------------------------------- 1 | function adjcMerge8= AdjcProcloop(M,N) 2 | % $Description: 3 | % -compute the adjacent matrix 4 | % $Agruments 5 | % Input; 6 | % -M: superpixel label matrix 7 | % -N: superpixel number 8 | % Output: 9 | % -adjcMerge: adjacent matrix 10 | 11 | % adjcMerge = zeros(N,N); 12 | [m, n] = size(M); 13 | adjcMerge = full(regionadjacency(M)); 14 | 15 | % for i = 1:m-1 16 | % for j = 1:n-1 17 | % if(M(i,j)~=M(i,j+1)) 18 | % adjcMerge(M(i,j),M(i,j+1)) = 1; 19 | % adjcMerge(M(i,j+1),M(i,j)) = 1; 20 | % end; 21 | % if(M(i,j)~=M(i+1,j)) 22 | % adjcMerge(M(i,j),M(i+1,j)) = 1; 23 | % adjcMerge(M(i+1,j),M(i,j)) = 1; 24 | % end; 25 | % if(M(i,j)~=M(i+1,j+1)) 26 | % adjcMerge(M(i,j),M(i+1,j+1)) = 1; 27 | % adjcMerge(M(i+1,j+1),M(i,j)) = 1; 28 | % end; 29 | % if(M(i+1,j)~=M(i,j+1)) 30 | % adjcMerge(M(i+1,j),M(i,j+1)) = 1; 31 | % adjcMerge(M(i,j+1),M(i+1,j)) = 1; 32 | % end; 33 | % end; 34 | % end; 35 | 36 | adjcMerge8 = adjcMerge; 37 | % bd=unique([M(1,:),M(m,:),M(:,1)',M(:,n)']); 38 | % for i=1:length(bd) 39 | % for j=i+1:length(bd) 40 | % adjcMerge(bd(i),bd(j))=1; 41 | % adjcMerge(bd(j),bd(i))=1; 42 | % end 43 | % end 44 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/others/ReadDAT.m: -------------------------------------------------------------------------------- 1 | function B = ReadDAT(image_size,data_path) 2 | 3 | row = image_size(1); 4 | colomn = image_size(2); 5 | fid = fopen(data_path,'r'); 6 | A = fread(fid, row * colomn, 'uint32')'; 7 | A = A + 1; 8 | B = reshape(A,[colomn, row]); 9 | B = B'; 10 | fclose(fid); -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/others/calculateRegionProps.m: -------------------------------------------------------------------------------- 1 | function regions = calculateRegionProps(sup_num,sulabel_im) 2 | % function regions = calculateRegionProps(sup_num,sulabel_im) can 3 | % calculate the region pixel index for each superpixel. 4 | % 5 | % Input: sup_num - the number of superpixels 6 | % sublabel_im - the superpixel labels for all pixels 7 | % 8 | % Output: regions - the region pixel index for each superpixel 9 | regions = cell(sup_num,1); 10 | for su_ind = 1:sup_num 11 | indxy = find(sulabel_im==su_ind); 12 | [indx, indy] = find(sulabel_im==su_ind); 13 | regions{su_ind}.pixelInd = indxy; 14 | regions{su_ind}.pixelIndxy = [indx indy]; 15 | end -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/others/extractSupfeat.m: -------------------------------------------------------------------------------- 1 | function [sup_feat] = extractSupfeat(input_imlab,regions,sup_num) 2 | % The function can extract the LAB features of each superpixel. 3 | % 4 | % Input; 5 | % input_imlab - the input image with LAB information 6 | % regions - the region pixel index for each superpixel 7 | % sup_num - the number of superpixels 8 | % 9 | % Output: sup_feat - the normalized LAB features of 10 | % each superpixel 11 | 12 | L = input_imlab(:,:,1); 13 | A = input_imlab(:,:,2); 14 | B = input_imlab(:,:,3); 15 | 16 | % normalize the LAB color feature 17 | L = (L-min(L(:)))/(max(L(:))-min(L(:))); 18 | A = (A-min(A(:)))/(max(A(:))-min(A(:))); 19 | B = (B-min(B(:)))/(max(B(:))-min(B(:))); 20 | 21 | sup_feat = zeros(sup_num,3); 22 | for r = 1:sup_num 23 | ind = regions{r}.pixelInd; 24 | meanall = [mean(L(ind)),mean(A(ind)),mean(B(ind))]; 25 | sup_feat(r,:) = meanall; 26 | end 27 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/others/extract_bg_sp.m: -------------------------------------------------------------------------------- 1 | function boundary_sp = extract_bg_sp(sulabel,r,c) 2 | % function bg_sp = extract_bg_sp(sulabel,r,c) can find the label 3 | % for each boundary superpixels. 4 | % 5 | % Input: sulabel - the superpixel label for all pixels 6 | % r - the number of pixel rows 7 | % c - the number of pixel columns 8 | % 9 | % Output:boundary_sp - the labels for boundary superpixels 10 | 11 | r1=unique(sulabel(1,:)); 12 | rend=unique(sulabel(r,:)); 13 | c1=unique(sulabel(:,1)); 14 | cend=unique(sulabel(:,c)); 15 | boundary_sp=[r1 rend c1' cend']; 16 | boundary_sp = unique(boundary_sp); -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/others/form_codebook.m: -------------------------------------------------------------------------------- 1 | function centers = form_codebook(descriptors, codebook_size, Max_Iterations) 2 | %% function centers = form_codebook(descriptors, codebook_size) 3 | %% 4 | %% This function uses input features to form a codebook by k-means clustering 5 | %% algorithm. The code is modified from part of R. Fergus's bag of features code. 6 | %% The clustering is performed using VGG code from Oxford written by Mark 7 | %% Everingham. The source is provided, which must be compiled to a MEX file 8 | %% for your given platform. 9 | %% 10 | %% Function specification: 11 | %% Input 12 | %% descriptors : input features [dim x num] 13 | %% codebook_size : size of codebook 14 | %% Max_Iterations : Max number of k-means iterations 15 | %% Output 16 | %% centers : formed codebook [dim x codebook size] 17 | 18 | Verbosity = 0; %% Verbsoity of Mark's code 19 | 20 | %% form options structure for clustering 21 | cluster_options.maxiters = Max_Iterations; 22 | cluster_options.verbose = Verbosity; 23 | 24 | %% call kmeans clustering routine by Mark Everingham 25 | [centers,sse] = vgg_kmeans(double(descriptors), codebook_size, cluster_options); -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/others/labelCluster.m: -------------------------------------------------------------------------------- 1 | function [ featLabel ] = labelCluster( centers, LAB_feature, N_sample, K ) 2 | % function [ featLabel ] sort the input superpixels into K clusters based on 3 | % the their CIE LAB color features. 4 | % 5 | % Input; 6 | % -centers: formed codebook 7 | % -LAB_feature: the LAB features of the boundary superpixels 8 | % -N_sample: the number of the boundary superpixels 9 | % -K: the number of clusters 10 | % Output: 11 | % -featLabel: a row vector of the boundary superpixels' cluster label 12 | 13 | 14 | distance = zeros(K,N_sample); 15 | 16 | for i = 1 : K 17 | temp = repmat(centers(:,i),[1 N_sample]); 18 | distance(i,:) = sum((LAB_feature-temp).^2); 19 | end 20 | % 21 | % for i=1:K 22 | % for j=1:N_sample 23 | % distance(i,j) = norm(LAB_feature(:,j)-centers(:,i)); 24 | % end 25 | % end 26 | 27 | [~ , featLabel] = min(distance); -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/others/makeweights.m: -------------------------------------------------------------------------------- 1 | function weights=makeweights(edges,vals,valScale) 2 | valDistances=sqrt(sum((vals(edges(:,1),:)-vals(edges(:,2),:)).^2,2)); 3 | % valDistances=histDist(vals(edges(:,1),:),vals(edges(:,2),:)); 4 | valDistances=normalize(valDistances); %Normalize to [0,1] 5 | weights=exp(-valScale*valDistances); 6 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/others/normalization.m: -------------------------------------------------------------------------------- 1 | function matrix = normalization(mat, flag) 2 | % INPUT : 3 | % flag: 1 denotes that the mat is a cell; 4 | % 0 denotes that the mat is a matrix; 5 | % 6 | if flag ~= 0 7 | dim = length(mat); 8 | for i = 1:dim 9 | matrix{i} = ( mat{i} - min(min(mat{i}))) / ( max(max(mat{i})) - min(min( mat{i}))); 10 | end 11 | else 12 | matrix = ( mat - repmat(min(min(mat)),[size(mat,1),size(mat,2)]))./... 13 | ( repmat(max(max(mat)),[size(mat,1),size(mat,2)])... 14 | - repmat(min(min(mat)),[size(mat,1),size(mat,2)])); 15 | end -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/others/normalize_1.m: -------------------------------------------------------------------------------- 1 | function matrix = normalize_1(mat, flag) 2 | % INPUT : 3 | % mat 4 | % flag: 1 denotes that the mat is a cell; 5 | % 0 denotes that the mat is a matrix; 6 | % OUTPUT: 7 | % matrix 8 | % 9 | if flag ~= 0 10 | dim = length(mat); 11 | for i = 1:dim 12 | matrix{i} = ( mat{i} - min(min(mat{i})) +0.001) / ( max(max(mat{i})) - min(min( mat{i}))+0.002 ); 13 | end 14 | else 15 | matrix = ( mat - min(min(mat))+0.001 )/( max(max(mat)) - min(min(mat))+0.002 ); 16 | end -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/others/vgg_kmeans.m: -------------------------------------------------------------------------------- 1 | function [CX, sse] = vgg_kmeans(X, nclus, varargin) 2 | 3 | % VGG_KMEANS initialize K-means clustering 4 | % [CX, sse] = vgg_kmeans(X, nclus, optname, optval, ...) 5 | % 6 | % - X: input points (one per column) 7 | % - nclus: number of clusters 8 | % - opts (defaults): 9 | % maxiters (inf): maxmimum number of iterations 10 | % mindelta (eps): minimum change in SSE per iteration 11 | % verbose (1): 1=print progress 12 | % 13 | % - CX: cluster centers 14 | % - sse: SSE 15 | 16 | % Author: Mark Everingham 17 | % Date: 13 Jan 03 18 | % Modified by wanghe 2014/08/24 19 | opts = struct('maxiters', inf, 'mindelta', eps, 'verbose', 1); 20 | if nargin > 2 21 | opts=vgg_argparse(opts,varargin); 22 | end 23 | 24 | % perm=randperm(size(X,2)); 25 | % CX=X(:,perm(1:nclus)); 26 | if nclus==3 27 | perm= size(X,2); 28 | CX=X(:,[2 round(perm/2) perm-1]); 29 | end 30 | if nclus==2 31 | perm= size(X,2); 32 | CX=X(:,[2 perm-1]); 33 | end 34 | sse0 = inf; 35 | iter = 0; 36 | while iter < opts.maxiters 37 | 38 | tic; 39 | [CX, sse] = vgg_kmiter(X, CX); 40 | t=toc; 41 | 42 | if opts.verbose 43 | fprintf('iter %d: sse = %g (%g secs)\n', iter, sse, t) 44 | end 45 | 46 | if sse0-sse < opts.mindelta 47 | break 48 | end 49 | 50 | sse0=sse; 51 | iter=iter+1; 52 | 53 | end 54 | 55 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/others/vgg_kmiter.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/others/vgg_kmiter.dll -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/others/vgg_kmiter.mexglx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/others/vgg_kmiter.mexglx -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/others/vgg_kmiter.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/others/vgg_kmiter.mexw64 -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/simplenn/vl_simplenn_move.m: -------------------------------------------------------------------------------- 1 | function net = vl_simplenn_move(net, destination) 2 | %VL_SIMPLENN_MOVE Move a SimpleNN network between CPU and GPU. 3 | % NET = VL_SIMPLENN_MOVE(NET, 'gpu') moves the network to the 4 | % current GPU device. NET = VL_SIMPLENN_MOVE(NET, 'cpu') moves the 5 | % network to the CPU. 6 | % 7 | % See also: VL_SIMPLENN(). 8 | 9 | % Copyright (C) 2014-15 Andrea Vedaldi. 10 | % All rights reserved. 11 | % 12 | % This file is part of the VLFeat library and is made available under 13 | % the terms of the BSD license (see the COPYING file). 14 | 15 | switch destination 16 | case 'gpu', moveop = @(x) gpuArray(x) ; 17 | case 'cpu', moveop = @(x) gather(x) ; 18 | otherwise, error('Unknown destination ''%s''.', destination) ; 19 | end 20 | for l=1:numel(net.layers) 21 | switch net.layers{l}.type 22 | case {'conv', 'convt', 'bnorm'} 23 | for f = {'filters', 'biases', 'filtersMomentum', 'biasesMomentum'} 24 | f = char(f) ; 25 | if isfield(net.layers{l}, f) 26 | net.layers{l}.(f) = moveop(net.layers{l}.(f)) ; 27 | end 28 | end 29 | for f = {'weights', 'momentum'} 30 | f = char(f) ; 31 | if isfield(net.layers{l}, f) 32 | for j=1:numel(net.layers{l}.(f)) 33 | net.layers{l}.(f){j} = moveop(net.layers{l}.(f){j}) ; 34 | end 35 | end 36 | end 37 | otherwise 38 | % nothing to do ? 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/data.cpp: -------------------------------------------------------------------------------- 1 | #if ENABLE_GPU 2 | #error This file should not be compiled with GPU support enabled 3 | #endif 4 | #include "data.cu" 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/datamex.cpp: -------------------------------------------------------------------------------- 1 | #if ENABLE_GPU 2 | #error This file should not be compiled with GPU support enabled 3 | #endif 4 | #include "datamex.cu" 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/impl/bilinearsampler.hpp: -------------------------------------------------------------------------------- 1 | // @file bilinearsampler.hpp 2 | // @brief Bilinear sampler implementation 3 | // @author Ankush Gupta 4 | // @author Andrea Vedaldi 5 | 6 | /* 7 | Copyright (C) 2016- Ankush Gupta and Andrea Vedaldi. 8 | All rights reserved. 9 | 10 | This file is part of the VLFeat library and is made available under 11 | the terms of the BSD license (see the COPYING file). 12 | */ 13 | 14 | #ifndef VL_BILINEARSAMPLER_H 15 | #define VL_BILINEARSAMPLER_H 16 | 17 | #include "../data.hpp" 18 | #include 19 | 20 | // defines the dispatcher for CUDA kernels: 21 | namespace vl { namespace impl { 22 | 23 | template 24 | struct bilinearsampler { 25 | 26 | static vl::Error 27 | forward(Context& context, 28 | type* output, 29 | type const* data, 30 | type const* grid, 31 | size_t outHeight, size_t outWidth, size_t outDepth, size_t outCardinality, 32 | size_t inHeight, size_t inWidth, size_t inCardinality) ; 33 | 34 | 35 | static vl::Error 36 | backward(Context& context, 37 | type* derData, 38 | type* derGrid, 39 | type const* data, 40 | type const* grid, 41 | type const* derOutput, 42 | size_t outHeight, size_t outWidth, size_t outDepth, size_t outCardinality, 43 | size_t inHeight, size_t inWidth, size_t inCardinality) ; 44 | } ; 45 | 46 | } } 47 | 48 | #endif /* defined(VL_BILINEARSAMPLER_H) */ 49 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/impl/copy.hpp: -------------------------------------------------------------------------------- 1 | // @file copy.hpp 2 | // @brief Copy and other data operations 3 | // @author Andrea Vedaldi 4 | 5 | /* 6 | Copyright (C) 2015-16 Andrea Vedaldi. 7 | All rights reserved. 8 | 9 | This file is part of the VLFeat library and is made available under 10 | the terms of the BSD license (see the COPYING file). 11 | */ 12 | 13 | #ifndef __vl__copy__ 14 | #define __vl__copy__ 15 | 16 | #include "../data.hpp" 17 | 18 | namespace vl { namespace impl { 19 | 20 | template 21 | struct operations 22 | { 23 | typedef type data_type ; 24 | static vl::Error copy(data_type * dest, data_type const * src, size_t numElements) ; 25 | static vl::Error fill(data_type * dest, size_t numElements, data_type value) ; 26 | } ; 27 | } } 28 | 29 | #endif /* defined(__vl__copy__) */ 30 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/impl/copy_cpu.cpp: -------------------------------------------------------------------------------- 1 | // @file copy_cpu.cpp 2 | // @brief Copy and other data operations (CPU) 3 | // @author Andrea Vedaldi 4 | 5 | /* 6 | Copyright (C) 2015-16 Andrea Vedaldi. 7 | All rights reserved. 8 | 9 | This file is part of the VLFeat library and is made available under 10 | the terms of the BSD license (see the COPYING file). 11 | */ 12 | 13 | #include "copy.hpp" 14 | #include 15 | 16 | namespace vl { namespace impl { 17 | 18 | template 19 | struct operations 20 | { 21 | typedef type data_type ; 22 | 23 | static vl::Error 24 | copy(data_type * dest, 25 | data_type const * src, 26 | size_t numElements) 27 | { 28 | memcpy(dest, src, numElements * sizeof(data_type)) ; 29 | return vlSuccess ; 30 | } 31 | 32 | static vl::Error 33 | fill(data_type * dest, 34 | size_t numElements, 35 | data_type value) 36 | { 37 | for (size_t k = 0 ; k < numElements ; ++k) { 38 | dest[k] = value ; 39 | } 40 | return vlSuccess ; 41 | } 42 | } ; 43 | 44 | } } 45 | 46 | template struct vl::impl::operations ; 47 | 48 | #ifdef ENABLE_DOUBLE 49 | template struct vl::impl::operations ; 50 | #endif 51 | 52 | 53 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/impl/im2row.hpp: -------------------------------------------------------------------------------- 1 | // @file im2row.hpp 2 | // @brief Stack image patches as matrix rows 3 | // @author Andrea Vedaldi 4 | 5 | /* 6 | Copyright (C) 2014-16 Andrea Vedaldi. 7 | All rights reserved. 8 | 9 | This file is part of the VLFeat library and is made available under 10 | the terms of the BSD license (see the COPYING file). 11 | */ 12 | 13 | #ifndef __vl__im2row__ 14 | #define __vl__im2row__ 15 | 16 | #include "../data.hpp" 17 | #include 18 | 19 | namespace vl { namespace impl { 20 | 21 | template 22 | struct im2row { 23 | 24 | static vl::Error 25 | forward(vl::Context& context, 26 | type* stacked, 27 | type const* data, 28 | size_t height, size_t width, size_t depth, 29 | size_t windowHeight, size_t windowWidth, 30 | size_t strideY, size_t strideX, 31 | size_t padTop, size_t padBottom, size_t padLeft, size_t padRight) ; 32 | 33 | static vl::Error 34 | backward(vl::Context& context, 35 | type* data, 36 | type const* stacked, 37 | size_t height, size_t width, size_t depth, 38 | size_t windowHeight, size_t windowWidth, 39 | size_t strideY, size_t strideX, 40 | size_t padTop, size_t padBottom, size_t padLeft, size_t padRight) ; 41 | } ; 42 | 43 | } } 44 | 45 | #endif /* defined(__vl__im2row__) */ 46 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/impl/nnbias_cudnn.hpp: -------------------------------------------------------------------------------- 1 | // @file nnbias_blas.hpp 2 | // @brief biasolution block CuDNN-based implementation. 3 | // @author Andrea Vedaldi 4 | 5 | /* 6 | Copyright (C) 2015 Andrea Vedaldi. 7 | All rights reserved. 8 | 9 | This file is part of the VLFeat library and is made available under 10 | the terms of the BSD license (see the COPYING file). 11 | */ 12 | 13 | #ifndef __vl__nnbias_cudnn__ 14 | #define __vl__nnbias_cudnn__ 15 | 16 | #include "../data.hpp" 17 | #include "cudnn.h" 18 | 19 | namespace vl { namespace impl { 20 | 21 | // todo: data type should be handled internally? 22 | 23 | template 24 | struct nnbias_cudnn 25 | { 26 | static vl::Error 27 | forward(vl::Context& context, 28 | vl::Tensor output, double outputMult, 29 | vl::Tensor data, double dataMult, 30 | vl::Tensor biases, double biasesMult) ; 31 | 32 | static vl::Error 33 | backward(vl::Context& context, 34 | vl::Tensor derData, double derDataMult, 35 | vl::Tensor derBiases, double derBiasesMult, 36 | vl::Tensor derOutput, double derOutputMult) ; 37 | } ; 38 | 39 | } } 40 | 41 | #endif /* defined(__vl__nnbias_cudnn__) */ 42 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/impl/nnbilinearsampler_cudnn.hpp: -------------------------------------------------------------------------------- 1 | // @file nnbilinearsampler_cudnn.hpp 2 | // @brief BilinearSampler CuDNN-based implementation. 3 | // @author Ankush Gupta, Andrea Vedaldi 4 | 5 | /* 6 | Copyright (C) 2016 Ankush Gupta and Andrea Vedaldi. 7 | All rights reserved. 8 | 9 | This file is part of the VLFeat library and is made available under 10 | the terms of the BSD license (see the COPYING file). 11 | */ 12 | 13 | #ifndef __vl__bilinearsampler_cudnn__ 14 | #define __vl__bilinearsampler_cudnn__ 15 | 16 | #include "../data.hpp" 17 | #include "cudnn.h" 18 | 19 | namespace vl { namespace impl { 20 | 21 | template 22 | struct nnbilinearsampler_cudnn 23 | { 24 | static vl::Error 25 | forward(Context& context, 26 | Tensor output, 27 | Tensor data, 28 | Tensor grid) ; 29 | 30 | static vl::Error 31 | backward(Context& context, 32 | Tensor derData, 33 | Tensor derGrid, 34 | Tensor data, 35 | Tensor grid, 36 | Tensor derOutput) ; 37 | } ; 38 | 39 | } } 40 | 41 | #endif /* defined(__vl__nnbilinearsampler_cudnn__) */ 42 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/impl/nnconv_cudnn.hpp: -------------------------------------------------------------------------------- 1 | // @file nnconv_blas.hpp 2 | // @brief Convolution block CuDNN-based implementation. 3 | // @author Andrea Vedaldi 4 | 5 | /* 6 | Copyright (C) 2015-16 Andrea Vedaldi. 7 | All rights reserved. 8 | 9 | This file is part of the VLFeat library and is made available under 10 | the terms of the BSD license (see the COPYING file). 11 | */ 12 | 13 | #ifndef __vl__nnconv_cudnn__ 14 | #define __vl__nnconv_cudnn__ 15 | 16 | #include "../data.hpp" 17 | #include "cudnn.h" 18 | 19 | namespace vl { namespace impl { 20 | 21 | template 22 | struct nnconv_cudnn 23 | { 24 | static vl::Error 25 | forward(Context& context, 26 | Tensor output, double outputMult, 27 | Tensor data, double dataMult, 28 | Tensor filters, 29 | Tensor biases, 30 | int strideX, int strideY, 31 | int padLeft, int padRight, 32 | int padTop, int padBottom) ; 33 | 34 | static vl::Error 35 | backward(Context& context, 36 | Tensor derData, 37 | Tensor derFilters, 38 | Tensor derBiases, 39 | Tensor data, 40 | Tensor filters, 41 | Tensor derOutput, 42 | int strideX, int strideY, 43 | int padLeft, int padRight, 44 | int padTop, int padBottom) ; 45 | } ; 46 | 47 | } } 48 | #endif /* defined(__vl__nnconv_cudnn__) */ 49 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/impl/normalize.hpp: -------------------------------------------------------------------------------- 1 | // @file normalize.hpp 2 | // @brief Normalize block implementation 3 | // @author Andrea Vedaldi 4 | 5 | /* 6 | Copyright (C) 2014-16 Andrea Vedaldi. 7 | All rights reserved. 8 | 9 | This file is part of the VLFeat library and is made available under 10 | the terms of the BSD license (see the COPYING file). 11 | */ 12 | 13 | #ifndef __vl__normalize__ 14 | #define __vl__normalize__ 15 | 16 | #include "../data.hpp" 17 | #include 18 | 19 | namespace vl { namespace impl { 20 | 21 | template 22 | struct lrn 23 | { 24 | static vl::Error 25 | forward(type* output, 26 | type const* data, 27 | size_t height, size_t width, size_t depth, size_t size, 28 | size_t normDetph, 29 | type kappa, type alpha, type beta) ; 30 | 31 | static vl::Error 32 | backward(type* derData, 33 | type const* data, 34 | type const* derOutput, 35 | size_t height, size_t width, size_t depth, size_t size, 36 | size_t normDetph, 37 | type kappa, type alpha, type beta) ; 38 | } ; 39 | 40 | } } 41 | 42 | #endif /* __vl__normalize__ */ 43 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/impl/subsample.hpp: -------------------------------------------------------------------------------- 1 | // @file subsampling.hpp 2 | // @brief Subsampling block implementation 3 | // @author Andrea Vedaldi 4 | // @author Karel Lenc 5 | 6 | /* 7 | Copyright (C) 2014-16 Andrea Vedaldi and Karel Lenc. 8 | All rights reserved. 9 | 10 | This file is part of the VLFeat library and is made available under 11 | the terms of the BSD license (see the COPYING file). 12 | */ 13 | 14 | #ifndef VL_NNSUBSAMPLE_H 15 | #define VL_NNSUBSAMPLE_H 16 | 17 | #include "../data.hpp" 18 | #include 19 | 20 | namespace vl { namespace impl { 21 | 22 | template 23 | struct subsample { 24 | 25 | static vl::Error 26 | forward(vl::Context& context, 27 | type* output, 28 | type const* data, 29 | size_t height, size_t width, size_t depth, 30 | size_t strideY, size_t strideX, 31 | size_t padTop, size_t padBottom, size_t padLeft, size_t padRight) ; 32 | 33 | static vl::Error 34 | backward(vl::Context& context, 35 | type* derData, 36 | type const* derOutput, 37 | size_t height, size_t width, size_t depth, 38 | size_t strideY, size_t strideX, 39 | size_t padTop, size_t padBottom, size_t padLeft, size_t padRight) ; 40 | } ; 41 | 42 | } } 43 | 44 | #endif /* defined(VL_NNSUBSAMPLE_H) */ 45 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/nnbias.cpp: -------------------------------------------------------------------------------- 1 | #ifdef ENABLE_GPU 2 | #error "The file nnsubsample.cu should be compiled instead" 3 | #endif 4 | #include "nnbias.cu" 5 | 6 | /** 7 | @brief nnbias_forward 8 | @param context context. 9 | @param output output tensor $\by$ [output]. 10 | @param outputMult output tensor multiplier $\alpha$. 11 | @param data data tensor $\bx$. 12 | @param dataMult data tensor multiplier $\beta$. 13 | @param biases biases tensor $\bb$. 14 | @param biasesMult biases tensor multiplier $\gamma$. 15 | 16 | The function computes 17 | @f[ 18 | y_{ijkd} \leftarrow 19 | \alpha y_{ijkd} + 20 | \beta x_{ijkd} + 21 | \gamma b_k. 22 | @f] 23 | 24 | @a data can be the null tensor, in which case this tensor 25 | is dropped in the summation. 26 | */ 27 | 28 | /** 29 | @brief nnbias_backward 30 | @param context context. 31 | @param derData data derivative tensor $d\bx$ [output]. 32 | @param derDataMult data derivative tensor multiplier $\eta$. 33 | @param derBiases biases derivative tensor $d\bb$ [output]. 34 | @param derBiasesMult biased derivative tensor multiplier $\tau$. 35 | @param data data tensor $\bx$. 36 | @param dataMult data tensor multiplier $\beta$. 37 | @param biases biases tensor $\bb$. 38 | @param biasesMult biases tensor multiplier $\gamma$. 39 | 40 | If @a derData is the null tensor, this derivative is not comptued and 41 | @param biases can also be null. 42 | 43 | If @a derBiases is the null tensor, this derivative is not computed and 44 | @param data can also be null. 45 | */ 46 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/nnbias.hpp: -------------------------------------------------------------------------------- 1 | // @file nnbias.hpp 2 | // @brief Bias block 3 | // @author Andrea Vedaldi 4 | 5 | /* 6 | Copyright (C) 2015 Andrea Vedaldi. 7 | All rights reserved. 8 | 9 | This file is part of the VLFeat library and is made available under 10 | the terms of the BSD license (see the COPYING file). 11 | */ 12 | 13 | #ifndef __vl__nnbias__ 14 | #define __vl__nnbias__ 15 | 16 | #include "data.hpp" 17 | 18 | namespace vl { 19 | 20 | vl::Error 21 | nnbias_forward(vl::Context& context, 22 | vl::Tensor output, double outputMult, 23 | vl::Tensor data, double dataMult, 24 | vl::Tensor biases, double biasesMult) ; 25 | 26 | vl::Error 27 | nnbias_backward(vl::Context& context, 28 | vl::Tensor derData, double derDataMult, 29 | vl::Tensor derBiases, double derBiasesMult, 30 | vl::Tensor derOutput, double derOutputMult) ; 31 | } 32 | 33 | #endif /* defined(__vl__nnbias__) */ 34 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/nnbilinearsampler.cpp: -------------------------------------------------------------------------------- 1 | #ifdef ENABLE_GPU 2 | #error "The file nnbnorm.cu should be compiled instead" 3 | #endif 4 | #include "nnbilinearsampler.cu" 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/nnbilinearsampler.hpp: -------------------------------------------------------------------------------- 1 | // @file nnbilinearsampler.hpp 2 | // @brief Bilinear sampler block 3 | // @author Ankush Gupta 4 | // @author Andrea Vedaldi 5 | 6 | /* 7 | Copyright (C) 2016- Ankush Gupta and Andrea Vedaldi. 8 | All rights reserved. 9 | This file is part of the VLFeat library and is made available under 10 | the terms of the BSD license (see the COPYING file). 11 | */ 12 | 13 | #ifndef __vl__nnbilinearsampler__ 14 | #define __vl__nnbilinearsampler__ 15 | 16 | #include "data.hpp" 17 | #include 18 | 19 | namespace vl { 20 | vl::Error 21 | nnbilinearsampler_forward(vl::Context& context, 22 | vl::Tensor output, 23 | vl::Tensor data, 24 | vl::Tensor grid) ; 25 | 26 | vl::Error 27 | nnbilinearsampler_backward(vl::Context& context, 28 | vl::Tensor derData, 29 | vl::Tensor derGrid, 30 | vl::Tensor data, 31 | vl::Tensor grid, 32 | vl::Tensor derOutput) ; 33 | } 34 | 35 | #endif /* defined(__vl__nnbilinearsampler__) */ 36 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/nnbnorm.cpp: -------------------------------------------------------------------------------- 1 | #ifdef ENABLE_GPU 2 | #error "The file nnbnorm.cu should be compiled instead" 3 | #endif 4 | #include "nnbnorm.cu" 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/nnconv.cpp: -------------------------------------------------------------------------------- 1 | #ifdef ENABLE_GPU 2 | #error "The file nnconv.cu should be compiled instead" 3 | #endif 4 | #include "nnconv.cu" 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/nnfullyconnected.cpp: -------------------------------------------------------------------------------- 1 | #ifdef ENABLE_GPU 2 | #error "The file nnfullyconnected.cu should be compiled instead" 3 | #endif 4 | #include "nnfullyconnected.cu" 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/nnfullyconnected.hpp: -------------------------------------------------------------------------------- 1 | // @file nnfullyconnected.hpp 2 | // @brief Fully-connected block 3 | // @author Andrea Vedaldi 4 | 5 | /* 6 | Copyright (C) 2014-16 Andrea Vedaldi. 7 | All rights reserved. 8 | 9 | This file is part of the VLFeat library and is made available under 10 | the terms of the BSD license (see the COPYING file). 11 | */ 12 | 13 | 14 | #ifndef __vl__nnfullyconnected__ 15 | #define __vl__nnfullyconnected__ 16 | 17 | #include "data.hpp" 18 | 19 | namespace vl { 20 | 21 | vl::Error 22 | nnfullyconnected_forward(vl::Context& context, 23 | vl::Tensor output, 24 | vl::Tensor data, 25 | vl::Tensor filters, 26 | vl::Tensor biases) ; 27 | 28 | vl::Error 29 | nnfullyconnected_backward(vl::Context& context, 30 | vl::Tensor derData, 31 | vl::Tensor derFilters, 32 | vl::Tensor derBiases, 33 | vl::Tensor data, 34 | vl::Tensor filters, 35 | vl::Tensor derOutput) ; 36 | } 37 | 38 | 39 | #endif /* defined(__vl__nnfullyconnected__) */ 40 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/nnnormalize.cpp: -------------------------------------------------------------------------------- 1 | #ifdef ENABLE_GPU 2 | #error "The file nnnormalize.cu should be compiled instead" 3 | #endif 4 | #include "nnnormalize.cu" 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/nnnormalize.hpp: -------------------------------------------------------------------------------- 1 | // @file nnnormalize.hpp 2 | // @brief Normalization block 3 | // @author Andrea Vedaldi 4 | 5 | /* 6 | Copyright (C) 2014-16 Andrea Vedaldi. 7 | All rights reserved. 8 | 9 | This file is part of the VLFeat library and is made available under 10 | the terms of the BSD license (see the COPYING file). 11 | */ 12 | 13 | #ifndef __vl__nnnormalize__ 14 | #define __vl__nnnormalize__ 15 | 16 | #include "data.hpp" 17 | #include 18 | 19 | namespace vl { 20 | 21 | vl::Error 22 | nnlrn_forward(vl::Context& context, 23 | vl::Tensor output, 24 | vl::Tensor data, 25 | size_t normDetph, 26 | double kappa, double alpha, double beta) ; 27 | 28 | vl::Error 29 | nnlrn_backward(vl::Context& context, 30 | vl::Tensor derData, 31 | vl::Tensor data, 32 | vl::Tensor derOutput, 33 | size_t normDetph, 34 | double kappa, double alpha, double beta) ; 35 | } 36 | 37 | #endif /* defined(__vl__nnnormalize__) */ 38 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/nnpooling.cpp: -------------------------------------------------------------------------------- 1 | #ifdef ENABLE_GPU 2 | #error "The file nnpooling.cu should be compiled instead" 3 | #endif 4 | #include "nnpooling.cu" 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/nnpooling.hpp: -------------------------------------------------------------------------------- 1 | // @file nnpooling.hpp 2 | // @brief Pooling block 3 | // @author Andrea Vedaldi 4 | 5 | /* 6 | Copyright (C) 2014-16 Andrea Vedaldi and Karel Lenc. 7 | All rights reserved. 8 | 9 | This file is part of the VLFeat library and is made available under 10 | the terms of the BSD license (see the COPYING file). 11 | */ 12 | 13 | #ifndef __vl__nnpooling__ 14 | #define __vl__nnpooling__ 15 | 16 | #include "data.hpp" 17 | #include 18 | 19 | namespace vl { 20 | 21 | enum PoolingMethod { vlPoolingMax, vlPoolingAverage } ; 22 | 23 | vl::Error 24 | nnpooling_forward(vl::Context& context, 25 | vl::Tensor output, 26 | vl::Tensor data, 27 | PoolingMethod method, 28 | int poolHeight, int poolWidth, 29 | int strideY, int strideX, 30 | int padTop, int padBottom, 31 | int padLeft, int padRight) ; 32 | 33 | vl::Error 34 | nnpooling_backward(vl::Context& context, 35 | vl::Tensor derData, 36 | vl::Tensor data, 37 | vl::Tensor derOutput, 38 | PoolingMethod method, 39 | int poolHeight, int poolWidth, 40 | int strideY, int strideX, 41 | int padTop, int padBottom, 42 | int padLeft, int padRight) ; 43 | } 44 | 45 | #endif /* defined(__vl__nnpooling__) */ 46 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/nnsubsample.cpp: -------------------------------------------------------------------------------- 1 | #ifdef ENABLE_GPU 2 | #error "The file nnsubsample.cu should be compiled instead" 3 | #endif 4 | #include "nnsubsample.cu" 5 | 6 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/bits/nnsubsample.hpp: -------------------------------------------------------------------------------- 1 | // @file nnsubsample.hpp 2 | // @brief Subsamping block 3 | // @author Andrea Vedaldi 4 | 5 | /* 6 | Copyright (C) 2014-16 Andrea Vedaldi and Karel Lenc. 7 | All rights reserved. 8 | 9 | This file is part of the VLFeat library and is made available under 10 | the terms of the BSD license (see the COPYING file). 11 | */ 12 | 13 | #ifndef __vl__nnsubsample__ 14 | #define __vl__nnsubsample__ 15 | 16 | #include "data.hpp" 17 | 18 | namespace vl { 19 | 20 | vl::Error 21 | nnsubsample_forward(vl::Context& context, 22 | vl::Tensor output, 23 | vl::Tensor data, 24 | vl::Tensor biases, 25 | int strideY, int strideX, 26 | int padTop, int padBottom, 27 | int padLeft, int padRight) ; 28 | 29 | vl::Error 30 | nnsubsample_backward(vl::Context& context, 31 | vl::Tensor derData, 32 | vl::Tensor derBiases, 33 | vl::Tensor derOutput, 34 | int strideY, int strideX, 35 | int padTop, int padBottom, 36 | int padLeft, int padRight) ; 37 | } 38 | 39 | #endif /* defined(__vl__nnsubsample__) */ 40 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/vl_imreadjpeg.cpp: -------------------------------------------------------------------------------- 1 | #if ENABLE_GPU 2 | #error This file should not be compiled with GPU support enabled 3 | #endif 4 | #include "vl_imreadjpeg.cu" 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/vl_nnbilinearsampler.cpp: -------------------------------------------------------------------------------- 1 | #if ENABLE_GPU 2 | #error This file should not be compiled with GPU support enabled 3 | #endif 4 | #include "vl_nnbilinearsampler.cu" 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/vl_nnbnorm.cpp: -------------------------------------------------------------------------------- 1 | #if ENABLE_GPU 2 | #error This file should not be compiled with GPU support enabled 3 | #endif 4 | #include "vl_nnbnorm.cu" 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/vl_nnconv.cpp: -------------------------------------------------------------------------------- 1 | #if ENABLE_GPU 2 | #error This file should not be compiled with GPU support enabled 3 | #endif 4 | #include "vl_nnconv.cu" 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/vl_nnconvt.cpp: -------------------------------------------------------------------------------- 1 | #if ENABLE_GPU 2 | #error This file should not be compiled with GPU support enabled 3 | #endif 4 | #include "vl_nnconvt.cu" 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/vl_nnnormalize.cpp: -------------------------------------------------------------------------------- 1 | #if ENABLE_GPU 2 | #error This file should not be compiled with GPU support enabled 3 | #endif 4 | #include "vl_nnnormalize.cu" 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/src/vl_nnpool.cpp: -------------------------------------------------------------------------------- 1 | #if ENABLE_GPU 2 | #error This file should not be compiled with GPU support enabled 3 | #endif 4 | #include "vl_nnpool.cu" 5 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/10/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/10/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/10/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/10/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/10/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/10/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/10/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/10/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/10/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/10/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/10/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/10/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/10/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/10/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/11/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/11/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/11/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/11/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/11/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/11/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/11/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/11/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/11/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/11/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/11/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/11/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/11/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/11/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/12/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/12/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/12/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/12/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/12/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/12/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/12/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/12/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/12/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/12/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/12/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/12/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/12/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/12/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/13/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/13/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/13/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/13/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/13/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/13/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/13/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/13/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/13/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/13/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/13/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/13/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/13/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/13/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/14/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/14/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/14/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/14/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/14/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/14/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/14/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/14/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/14/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/14/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/14/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/14/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/14/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/14/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/15/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/15/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/15/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/15/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/15/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/15/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/15/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/15/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/15/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/15/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/15/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/15/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/15/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/15/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/16/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/16/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/16/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/16/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/16/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/16/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/16/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/16/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/16/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/16/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/16/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/16/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/16/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/16/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/17/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/17/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/17/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/17/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/17/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/17/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/17/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/17/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/17/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/17/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/17/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/17/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/17/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/17/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/18/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/18/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/18/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/18/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/18/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/18/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/18/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/18/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/18/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/18/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/18/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/18/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/18/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/18/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/19/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/19/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/19/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/19/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/19/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/19/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/19/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/19/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/19/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/19/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/19/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/19/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/19/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/19/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/2/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/2/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/2/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/2/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/2/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/2/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/2/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/2/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/2/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/2/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/2/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/2/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/2/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/2/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/20/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/20/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/20/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/20/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/20/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/20/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/20/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/20/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/20/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/20/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/20/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/20/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/20/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/20/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/21/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/21/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/21/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/21/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/21/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/21/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/21/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/21/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/21/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/21/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/21/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/21/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/21/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/21/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/22/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/22/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/22/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/22/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/22/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/22/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/22/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/22/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/22/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/22/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/22/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/22/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/22/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/22/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/23/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/23/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/23/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/23/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/23/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/23/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/23/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/23/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/23/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/23/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/23/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/23/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/23/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/23/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/24/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/24/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/24/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/24/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/24/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/24/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/24/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/24/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/24/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/24/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/24/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/24/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/24/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/24/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/25/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/25/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/25/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/25/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/25/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/25/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/25/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/25/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/25/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/25/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/25/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/25/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/25/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/25/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/26/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/26/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/26/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/26/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/26/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/26/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/26/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/26/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/26/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/26/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/26/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/26/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/26/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/26/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/27/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/27/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/27/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/27/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/27/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/27/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/27/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/27/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/27/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/27/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/27/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/27/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/27/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/27/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/28/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/28/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/28/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/28/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/28/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/28/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/28/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/28/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/28/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/28/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/28/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/28/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/28/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/28/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/29/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/29/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/29/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/29/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/29/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/29/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/29/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/29/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/29/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/29/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/29/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/29/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/29/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/29/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/3/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/3/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/3/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/3/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/3/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/3/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/3/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/3/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/3/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/3/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/3/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/3/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/3/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/3/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/30/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/30/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/30/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/30/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/30/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/30/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/30/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/30/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/30/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/30/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/30/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/30/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/30/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/30/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/31/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/31/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/31/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/31/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/31/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/31/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/31/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/31/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/31/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/31/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/31/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/31/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/31/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/31/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/32/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/32/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/32/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/32/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/32/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/32/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/32/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/32/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/32/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/32/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/32/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/32/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/32/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/32/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/4/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/4/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/4/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/4/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/4/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/4/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/4/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/4/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/4/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/4/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/4/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/4/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/4/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/4/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/5/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/5/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/5/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/5/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/5/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/5/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/5/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/5/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/5/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/5/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/5/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/5/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/5/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/5/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/6/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/6/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/6/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/6/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/6/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/6/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/6/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/6/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/6/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/6/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/6/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/6/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/6/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/6/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/7/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/7/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/7/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/7/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/7/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/7/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/7/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/7/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/7/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/7/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/7/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/7/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/7/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/7/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/8/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/8/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/8/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/8/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/8/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/8/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/8/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/8/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/8/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/8/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/8/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/8/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/8/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/8/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/9/0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/9/0001.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/9/0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/9/0002.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/9/0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/9/0003.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/9/0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/9/0004.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/9/0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/9/0005.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/9/0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/9/0006.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/test/9/0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/matlab/test/9/0007.png -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/vl_nnconcat.m: -------------------------------------------------------------------------------- 1 | function y = vl_nnconcat(inputs, dim, dzdy, varargin) 2 | %VL_NNCONCAT CNN concatenate multiple inputs. 3 | % Y = VL_NNCONCAT(INPUTS, DIM) concatenates the inputs in the cell 4 | % array INPUTS along dimension DIM generating an output Y. 5 | % 6 | % DZDINPUTS = VL_NNCONCAT(INPUTS, DIM, DZDY) computes the derivatives 7 | % of the block projected onto DZDY. DZDINPUTS has one element for 8 | % each element of INPUTS, each of which is an array that has the same 9 | % dimensions of the corresponding array in INPUTS. 10 | 11 | % Copyright (C) 2015 Karel Lenc and Andrea Vedaldi. 12 | % All rights reserved. 13 | % 14 | % This file is part of the VLFeat library and is made available under 15 | % the terms of the BSD license (see the COPYING file). 16 | 17 | opts.inputSizes = [] ; 18 | opts = vl_argparse(opts, varargin, 'nonrecursive') ; 19 | 20 | if nargin < 2, dim = 3; end; 21 | if nargin < 3, dzdy = []; end; 22 | 23 | if isempty(dzdy) 24 | y = cat(dim, inputs{:}); 25 | else 26 | if isempty(opts.inputSizes) 27 | opts.inputSizes = cellfun(@size, inputs, 'UniformOutput', false) ; 28 | end 29 | start = 1 ; 30 | y = cell(1, numel(opts.inputSizes)) ; 31 | s.type = '()' ; 32 | s.subs = {':', ':', ':', ':'} ; 33 | for i = 1:numel(opts.inputSizes) 34 | stop = start + opts.inputSizes{i}(dim) ; 35 | s.subs{dim} = start:stop-1 ; ; 36 | y{i} = subsref(dzdy,s) ; 37 | start = stop ; 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/vl_nncrop.m: -------------------------------------------------------------------------------- 1 | function y = vl_nncrop(x, crop, dzdy, inputSize) 2 | %VL_NNCROP CNN crop. 3 | % Y = VL_NNCROP(X, CROP) crops the input X spatially. CROP specifies the 4 | % amount of cropping as [TOP, BOTTOM, LEFT, RIGHT]. 5 | % 6 | % DZDX = VL_NNCROP(X, CROP, DZDY) computes the derivative DZDX of the 7 | % function projected on the output derivative DZDY. DZDX has the same 8 | % dimension as X and DZDY the same dimension as Y. 9 | % 10 | % DZDX = VL_NNCROP([], CROP, DZDY, INPUTSIZE) is an alternative to 11 | % the previous call in which X is omitted and its size is passed as 12 | % INPUTSIZE. 13 | 14 | % Copyright (C) 2015 Sebastien Ehrhardt and Andrea Vedaldi. 15 | % All rights reserved. 16 | % 17 | % This file is part of the VLFeat library and is made available under 18 | % the terms of the BSD license (see the COPYING file). 19 | 20 | if nargin < 4 21 | sz = [size(x,1) size(x,2) size(x,3) size(x,4)] ; 22 | else 23 | sz = inputSize ; 24 | end 25 | 26 | sv = 1 + crop(1) : sz(1) - crop(2) ; 27 | su = 1 + crop(3) : sz(2) - crop(4) ; 28 | 29 | if nargin <= 2 || isempty(dzdy) 30 | y = x(sv, su, :, :) ; 31 | else 32 | if isa(dzdy, 'gpuArray') 33 | y = gpuArray.zeros(sz, classUnderlying(dzdy)) ; 34 | else 35 | y = zeros(sz, class(dzdy)) ; 36 | end 37 | y(sv, su, :, :) = dzdy ; 38 | end 39 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/vl_nnnoffset.m: -------------------------------------------------------------------------------- 1 | function y = vl_nnnoffset(x, param, dzdy) 2 | %VL_NNNOFFSET CNN norm-dependent offset. 3 | % Y = VL_NNNOFFSET(X, PARAM) subtracts from each element of X the 4 | % weighted norm of the feature channels: 5 | % 6 | % X(i,j,k) = X(i,j,k) - PARAM(1) * L(i,j) ^ PARAM(2) 7 | % 8 | % where 9 | % 10 | % L(i,j) = sum_K X(i,j,k)^2 11 | % 12 | % DZDX = VL_NNNOFFSET(X, PARAM, DZDY) computes the derivative of the 13 | % block projected onto DZDY. DZDX and DZDY have the same dimensions 14 | % as X and Y respectively. 15 | 16 | % Copyright (C) 2014 Andrea Vedaldi. 17 | % All rights reserved. 18 | % 19 | % This file is part of the VLFeat library and is made available under 20 | % the terms of the BSD license (see the COPYING file). 21 | 22 | L = sum(x.^2,3) ; 23 | L = max(L, 1e-8) ; 24 | 25 | if nargin <= 2 26 | y = bsxfun(@minus, x, param(1)*L.^param(2)) ; 27 | else 28 | y = dzdy - bsxfun(@times, (2*param(1)*param(2))* x, sum(dzdy,3) .* (L.^(param(2)-1))) ; 29 | end 30 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/vl_nnnormalizelp.m: -------------------------------------------------------------------------------- 1 | function y = vl_nnnormalizelp(x,dzdy,varargin) 2 | %VL_NNNORMALIZELP CNN Lp normalization 3 | % Y = VL_NNNORMALIZELP(X) normalizes in Lp norm each spatial 4 | % location in the array X: 5 | % 6 | % Y(i,j,k) = X(i,j,k) / sum_q (X(i,j,q).^p + epsilon)^(1/p) 7 | % 8 | % DZDX = VL_NNNORMALIZELP(X, DZDY) computes the derivative of the 9 | % function with respect to X projected onto DZDY. 10 | % 11 | % VL_NNNORMALIZE(___, 'opts', val, ...) takes the following options: 12 | % 13 | % `p`:: 2 14 | % The exponent of the Lp norm. Warning: currently only even 15 | % exponents are supported. 16 | % 17 | % `epsilon`: 0.01 18 | % The constant added to the sum of p-powers before taking the 19 | % 1/p square root (see the formula above). 20 | % 21 | % See also: VL_NNNORMALIZE(). 22 | 23 | opts.epsilon = 1e-2 ; 24 | opts.p = 2 ; 25 | opts = vl_argparse(opts, varargin, 'nonrecursive') ; 26 | 27 | massp = (sum(x.^opts.p,3) + opts.epsilon) ; 28 | mass = massp.^(1/opts.p) ; 29 | y = bsxfun(@rdivide, x, mass) ; 30 | 31 | if nargin < 2 || isempty(dzdy) 32 | return ; 33 | else 34 | dzdy = bsxfun(@rdivide, dzdy, mass) ; 35 | y = dzdy - bsxfun(@times, sum(dzdy .* x, 3), bsxfun(@rdivide, x.^(opts.p-1), massp)) ; 36 | end 37 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/vl_nnsigmoid.m: -------------------------------------------------------------------------------- 1 | function out = vl_nnsigmoid(x,dzdy) 2 | %VL_NNSIGMOID CNN sigmoid nonlinear unit. 3 | % Y = VL_NNSIGMOID(X) computes the sigmoid of the data X. X can 4 | % have an arbitrary size. The sigmoid is defined as follows: 5 | % 6 | % SIGMOID(X) = 1 / (1 + EXP(-X)). 7 | % 8 | % DZDX = VL_NNSIGMOID(X, DZDY) computes the derivative of the 9 | % block projected onto DZDY. DZDX and DZDY have the same 10 | % dimensions as X and Y respectively. 11 | 12 | % Copyright (C) 2015 Karel Lenc. 13 | % All rights reserved. 14 | % 15 | % This file is part of the VLFeat library and is made available under 16 | % the terms of the BSD license (see the COPYING file). 17 | 18 | y = 1 ./ (1 + exp(-x)); 19 | 20 | if nargin <= 1 || isempty(dzdy) 21 | out = y ; 22 | else 23 | out = dzdy .* (y .* (1 - y)) ; 24 | end 25 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/vl_nnsoftmax.m: -------------------------------------------------------------------------------- 1 | function Y = vl_nnsoftmax(X,dzdY) 2 | %VL_NNSOFTMAX CNN softmax. 3 | % Y = VL_NNSOFTMAX(X) applies the softmax operator the data X. X 4 | % has dimension H x W x D x N, packing N arrays of W x H 5 | % D-dimensional vectors. 6 | % 7 | % D can be thought of as the number of possible classes and the 8 | % function computes the softmax along the D dimension. Often W=H=1, 9 | % but this is not a requirement, as the operator is applied 10 | % convolutionally at all spatial locations. 11 | % 12 | % DZDX = VL_NNSOFTMAX(X, DZDY) computes the derivative of the block 13 | % projected onto DZDY. DZDX and DZDY have the same dimensions as 14 | % X and Y respectively. 15 | 16 | % Copyright (C) 2014 Andrea Vedaldi. 17 | % All rights reserved. 18 | % 19 | % This file is part of the VLFeat library and is made available under 20 | % the terms of the BSD license (see the COPYING file). 21 | 22 | E = exp(bsxfun(@minus, X, max(X,[],3))) ; 23 | L = sum(E,3) ; 24 | Y = bsxfun(@rdivide, E, L) ; 25 | 26 | if nargin <= 1, return ; end 27 | 28 | % backward 29 | Y = Y .* bsxfun(@minus, dzdY, sum(dzdY .* Y, 3)) ; 30 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/vl_nnspnorm.m: -------------------------------------------------------------------------------- 1 | function y = vl_nnspnorm(x, param, dzdy) 2 | %VL_NNSPNORM CNN spatial normalization. 3 | % Y = VL_NNSPNORM(X, PARAM) computes the spatial normalization of 4 | % the data X with parameters PARAM = [PH PW ALPHA BETA]. Here PH and 5 | % PW define the size of the spatial neighbourhood used for 6 | % nomalization. 7 | % 8 | % For each feature channel, the function computes the sum of squares 9 | % of X inside each rectangle, N2(i,j). It then divides each element 10 | % of X as follows: 11 | % 12 | % Y(i,j) = X(i,j) / (1 + ALPHA * N2(i,j))^BETA. 13 | % 14 | % DZDX = VL_NNSPNORM(X, PARAM, DZDY) computes the derivative of the 15 | % block projected onto DZDY. DZDX and DZDY have the same dimensions 16 | % as X and Y respectively. 17 | 18 | % Copyright (C) 2015 Karel Lenc and Andrea Vedaldi. 19 | % All rights reserved. 20 | % 21 | % This file is part of the VLFeat library and is made available under 22 | % the terms of the BSD license (see the COPYING file). 23 | 24 | pad = floor((param(1:2)-1)/2) ; 25 | pad = [pad ; param(1:2)-1-pad] ; 26 | 27 | n2 = vl_nnpool(x.*x, param(1:2), 'method', 'avg', 'pad', pad) ; 28 | f = 1 + param(3) * n2 ; 29 | 30 | if nargin <= 2 || isempty(dzdy) 31 | y = f.^(-param(4)) .* x ; 32 | else 33 | t = vl_nnpool(x.*x, param(1:2), f.^(-param(4)-1) .* dzdy .* x, 'method', 'avg', 'pad', pad) ; 34 | y = f.^(-param(4)) .* dzdy - 2 * param(3)*param(4) * x .* t ; 35 | end -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/vl_rootnn.m: -------------------------------------------------------------------------------- 1 | function root = vl_rootnn() 2 | %VL_ROOTNN Get the root path of the MatConvNet toolbox. 3 | % VL_ROOTNN() returns the path to the MatConvNet toolbox. 4 | 5 | % Copyright (C) 2014 Andrea Vedaldi. 6 | % All rights reserved. 7 | % 8 | % This file is part of the VLFeat library and is made available under 9 | % the terms of the BSD license (see the COPYING file). 10 | 11 | root = fileparts(fileparts(mfilename('fullpath'))) ; 12 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/vl_setupnn.m: -------------------------------------------------------------------------------- 1 | function vl_setupnn() 2 | %VL_SETUPNN Setup the MatConvNet toolbox. 3 | % VL_SETUPNN() function adds the MatConvNet toolbox to MATLAB path. 4 | 5 | % Copyright (C) 2014-15 Andrea Vedaldi. 6 | % All rights reserved. 7 | % 8 | % This file is part of the VLFeat library and is made available under 9 | % the terms of the BSD license (see the COPYING file). 10 | 11 | root = vl_rootnn() ; 12 | addpath(fullfile(root, 'matlab')) ; 13 | addpath(fullfile(root, 'matlab', 'mex')) ; 14 | addpath(fullfile(root, 'matlab', 'simplenn')) ; 15 | addpath(fullfile(root, 'matlab', 'xtest')) ; 16 | addpath(fullfile(root, 'examples')) ; 17 | 18 | if ~exist('gather') 19 | warning('The MATLAB Parallel Toolbox does not seem to be installed. Activating compatibility functions.') ; 20 | addpath(fullfile(root, 'matlab', 'compatibility', 'parallel')) ; 21 | end 22 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/xtest/suite/nnbnorm.m: -------------------------------------------------------------------------------- 1 | classdef nnbnorm < nntest 2 | properties (TestParameter) 3 | rows = {2 8 13} 4 | cols = {2 8 17} 5 | numDims = {1 3 4} 6 | batchSize = {2 7} 7 | end 8 | methods (Test) 9 | function basic(test, rows, cols, numDims, batchSize) 10 | r = rows ; 11 | c = cols ; 12 | nd = numDims ; 13 | bs = batchSize ; 14 | x = test.randn(r, c, nd, bs) ; 15 | g = test.randn(1, 1, nd, 1) ; 16 | b = test.randn(1, 1, nd, 1) ; 17 | g = test.randn(nd, 1) ; 18 | b = test.randn(nd, 1) ; 19 | 20 | y = vl_nnbnorm(x,g,b) ; 21 | dzdy = test.randn(size(y)) ; 22 | [dzdx,dzdg,dzdb] = vl_nnbnorm(x,g,b,dzdy) ; 23 | 24 | test.der(@(x) vl_nnbnorm(x,g,b), x, dzdy, dzdx, test.range * 1e-2, -1e-3) ; 25 | test.der(@(g) vl_nnbnorm(x,g,b), g, dzdy, dzdg, test.range * 1e-2, -1e-3) ; 26 | test.der(@(b) vl_nnbnorm(x,g,b), b, dzdy, dzdb, test.range * 1e-2, -1e-3) ; 27 | end 28 | end 29 | end -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/xtest/suite/nndropout.m: -------------------------------------------------------------------------------- 1 | classdef nndropout < nntest 2 | methods (Test) 3 | function basic(test) 4 | x = test.randn(4,5,10,3) ; 5 | [y,mask] = vl_nndropout(x) ; 6 | dzdy = test.randn(size(y)) ; 7 | dzdx = vl_nndropout(x,dzdy,'mask',mask) ; 8 | test.der(@(x) vl_nndropout(x,'mask',mask), x, dzdy, dzdx, 1e-3*test.range) ; 9 | end 10 | end 11 | end 12 | 13 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/xtest/suite/nnmnist.m: -------------------------------------------------------------------------------- 1 | classdef nnmnist < nntest 2 | properties (TestParameter) 3 | networkType = {'dagnn', 'simplenn'} 4 | end 5 | 6 | methods (TestClassSetup) 7 | function init(test) 8 | addpath(fullfile(vl_rootnn, 'examples', 'mnist')); 9 | end 10 | end 11 | 12 | methods (Test) 13 | function valErrorRate(test, networkType) 14 | clear mex ; % will reset GPU, remove MCN to avoid crashing 15 | % MATLAB on exit (BLAS issues?) 16 | if strcmp(test.dataType, 'double'), return ; end 17 | switch test.currentDevice 18 | case 'cpu' 19 | gpus = []; 20 | case 'gpu' 21 | gpus = 1; 22 | end 23 | trainOpts = struct('numEpochs', 1, 'continue', false, 'gpus', gpus, ... 24 | 'plotStatistics', false); 25 | if strcmp(networkType, 'simplenn') 26 | trainOpts.errorLabels = {'error', 'top5err'} ; 27 | end 28 | [~, info] = cnn_mnist('train', trainOpts, 'networkType', networkType); 29 | test.verifyLessThan(info.train.error, 0.08); 30 | test.verifyLessThan(info.val.error, 0.025); 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/xtest/suite/nnnormalize.m: -------------------------------------------------------------------------------- 1 | classdef nnnormalize < nntest 2 | properties (TestParameter) 3 | group = {2 3 4 5 6 8 9 10 11 12 13 14 15 16 17} 4 | sgroup = {2 3 4 5 6 7} 5 | end 6 | 7 | methods (Test) 8 | function basic(test, group) 9 | param = [group, .1, .5, .75] ; 10 | x = test.randn(3,2,10,4) ; 11 | y = vl_nnnormalize(x,param) ; 12 | dzdy = test.rand(size(y))-0.5 ; 13 | dzdx = vl_nnnormalize(x,param,dzdy) ; 14 | test.der(@(x) vl_nnnormalize(x,param), x, dzdy, dzdx, test.range * 1e-3, 0.3) ; 15 | end 16 | 17 | function compare_to_naive(test, sgroup) 18 | param = [sgroup, .1, .5, .75] ; 19 | x = test.randn(3,2,10,4) ; 20 | y = vl_nnnormalize(gather(x),param) ; 21 | y_ = test.zeros(size(y)) ; 22 | x_ = gather(x) ; 23 | for i=1:size(x,1) 24 | for j=1:size(x,2) 25 | for n=1:size(x,4) 26 | t = test.zeros(1,1,size(x,3),1) ; 27 | t(1,1,:,1) = (param(2) + param(3)*conv(squeeze(x_(i,j,:,n)).^2, ... 28 | ones(param(1),1), 'same')).^(-param(4)) ; 29 | y_(i,j,:,n) = x_(i,j,:,n) .* t ; 30 | end 31 | end 32 | end 33 | test.eq(y,y_) ; 34 | end 35 | 36 | function l2(test) 37 | x = test.randn(1,1,10,1) ; 38 | y = vl_nnnormalize(x, [20, 0, 1, .5]) ; 39 | test.eq(sum(y(:).^2), test.toDataType(1), 1e-2) ; 40 | end 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/xtest/suite/nnnormalizelp.m: -------------------------------------------------------------------------------- 1 | classdef nnnormalizelp < nntest 2 | properties (TestParameter) 3 | h = {1 2 3 4} 4 | w = {1 2 3 4} 5 | d = {2 3 4} 6 | p = {2 4} 7 | end 8 | 9 | methods (Test) 10 | function basicl2(test, h,w,d) 11 | x = test.randn(h,w,d,3) ; 12 | y = vl_nnnormalizelp(x) ; 13 | dzdy = test.rand(size(y))-0.5 ; 14 | dzdx = vl_nnnormalizelp(x,dzdy) ; 15 | test.der(@(x) vl_nnnormalizelp(x), x, dzdy, dzdx, 1e-4, 0.3) ; 16 | end 17 | 18 | function lp(test, p) 19 | x = test.randn(2,3,5,3) / test.range ; 20 | y = vl_nnnormalizelp(x, [], 'p', p) ; 21 | dzdy = test.rand(size(y))-0.5 ; 22 | dzdx = vl_nnnormalizelp(x,dzdy, 'p', p) ; 23 | test.der(@(x) vl_nnnormalizelp(x,[],'p',p), x, dzdy, dzdx, 1e-4, 0.3) ; 24 | end 25 | 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/xtest/suite/nnoffset.m: -------------------------------------------------------------------------------- 1 | classdef nnoffset < nntest 2 | methods (Test) 3 | function basic(test) 4 | param = [.34, .5] ; 5 | x = test.randn(4,5,10,3) ; 6 | y = vl_nnnoffset(x,param) ; 7 | dzdy = test.randn(size(y)) ; 8 | dzdx = vl_nnnoffset(x,param,dzdy) ; 9 | test.der(@(x) vl_nnnoffset(x,param), x, dzdy, dzdx, 1e-3*test.range) ; 10 | end 11 | end 12 | end -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/xtest/suite/nnrelu.m: -------------------------------------------------------------------------------- 1 | classdef nnrelu < nntest 2 | properties 3 | x 4 | end 5 | 6 | methods (TestClassSetup) 7 | function data(test,device) 8 | % make sure that all elements in x are different. in this way, 9 | % we can compute numerical derivatives reliably by adding a delta < .5. 10 | x = test.randn(15,14,3,2) ; 11 | x(:) = randperm(numel(x))' ; 12 | % avoid non-diff value for test 13 | x(x==0)=1 ; 14 | test.x = x ; 15 | test.range = 10 ; 16 | if strcmp(device,'gpu'), test.x = gpuArray(test.x) ; end 17 | end 18 | end 19 | 20 | methods (Test) 21 | function basic(test) 22 | x = test.x ; 23 | y = vl_nnrelu(x) ; 24 | dzdy = test.randn(size(y)) ; 25 | dzdx = vl_nnrelu(x,dzdy) ; 26 | test.der(@(x) vl_nnrelu(x), x, dzdy, dzdx, 1e-2 * test.range) ; 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/xtest/suite/nnsigmoid.m: -------------------------------------------------------------------------------- 1 | classdef nnsigmoid < nntest 2 | methods (Test) 3 | function basic(test) 4 | x = test.randn(5,5,1,1)/test.range ; 5 | y = vl_nnsigmoid(x) ; 6 | dzdy = test.randn(size(y)) ; 7 | dzdx = vl_nnsigmoid(x,dzdy) ; 8 | test.der(@(x) vl_nnsigmoid(x), x, dzdy, dzdx, 1e-3) ; 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/xtest/suite/nnsoftmax.m: -------------------------------------------------------------------------------- 1 | classdef nnsoftmax < nntest 2 | properties (TestParameter) 3 | h = {1 2 3} 4 | w = {1 2} 5 | end 6 | methods (Test) 7 | function basic(test,h,w) 8 | d = 10 ; 9 | n = 3 ; 10 | x = test.randn(h,w,d,n)/test.range ; 11 | y = vl_nnsoftmax(x) ; 12 | dzdy = test.randn(size(y)) ; 13 | dzdx = vl_nnsoftmax(x, dzdy) ; 14 | test.der(@(x) vl_nnsoftmax(x), x, dzdy, dzdx, 1e-2) ; 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/xtest/suite/nnspnorm.m: -------------------------------------------------------------------------------- 1 | classdef nnspnorm < nntest 2 | methods (Test) 3 | function basic(test) 4 | h = 13 ; 5 | w = 17 ; 6 | d = 4 ; 7 | n = 5 ; 8 | param = [3, 3, 0.1, 0.75] ; 9 | x = test.randn(h,w,d,n) ; 10 | y = vl_nnspnorm(x, param) ; 11 | dzdy = test.rand(h, w, d, n) ; 12 | dzdx = vl_nnspnorm(x, param, dzdy) ; 13 | test.der(@(x) vl_nnspnorm(x,param), x, dzdy, dzdx, test.range * 1e-3) ; 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/xtest/vl_bench_bnorm.m: -------------------------------------------------------------------------------- 1 | function vl_bench_bnorm(gpu) 2 | if nargin < 1 3 | gpu = false ; 4 | end 5 | 6 | T = 100 ; 7 | x = randn(64,64,32,32,'single') ; 8 | g = randn(32,1,'single') ; 9 | b = randn(32,1,'single') ; 10 | 11 | if gpu 12 | x = gpuArray(x) ; 13 | g = gpuArray(g) ; 14 | b = gpuArray(b) ; 15 | end 16 | 17 | tic 18 | for t=1:T 19 | y = vl_nnbnorm(x,g,b) ; 20 | end 21 | if gpu, wait(gpuDevice) ; end 22 | fprintf('new: %f\n',toc); 23 | 24 | tic 25 | for t=1:T 26 | y_ = vl_nnbnorm_old(x,g,b) ; 27 | end 28 | if gpu, wait(gpuDevice) ; end 29 | fprintf('old: %f\n',toc); 30 | 31 | dzdy = randn(size(y),'single') ; 32 | if gpu 33 | dzdy = gpuArray(dzdy) ; 34 | end 35 | 36 | tic 37 | for t=1:T 38 | [a,b,c] = vl_nnbnorm(x,g,b,dzdy) ; 39 | end 40 | if gpu, wait(gpuDevice) ; end 41 | fprintf('new deriv: %f\n',toc); 42 | 43 | tic 44 | for t=1:T 45 | [a_,b_,c_] = vl_nnbnorm_old(x,g,b,dzdy) ; 46 | end 47 | if gpu, wait(gpuDevice) ; end 48 | fprintf('old deriv: %f\n',toc); 49 | 50 | vl_testsim(y,y_); 51 | vl_testsim(a,a_); 52 | vl_testsim(b,b_); 53 | vl_testsim(c,c_); 54 | end 55 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/xtest/vl_test_bnorm.m: -------------------------------------------------------------------------------- 1 | %% 2 | % Test function to compare nn_bnorm and its GPU/CPU implementation with 3 | % using VLFEAT 4 | %% 5 | 6 | gpu = false; 7 | gpu = true ; 8 | 9 | T = 1 ; 10 | x = randn(64,64,32,32,'single') ; 11 | g = randn(32,1,'single') ; 12 | b = randn(32,1,'single') ; 13 | 14 | if gpu 15 | x = gpuArray(x) ; 16 | g = gpuArray(g) ; 17 | b = gpuArray(b) ; 18 | end 19 | 20 | a=vl_nnbnorm(x,g,b); 21 | a_=vl_nnbnorm_old(x,g,b); 22 | 23 | vl_testsim(a,a_) 24 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/xtest/vl_test_economic_relu.m: -------------------------------------------------------------------------------- 1 | % VL_TEST_ECONOMIC_RELU 2 | function vl_test_economic_relu() 3 | 4 | x = randn(11,12,8,'single'); 5 | w = randn(5,6,8,9,'single'); 6 | b = randn(1,9,'single') ; 7 | 8 | net.layers{1} = struct('type', 'conv', ... 9 | 'filters', w, ... 10 | 'biases', b, ... 11 | 'stride', 1, ... 12 | 'pad', 0); 13 | net.layers{2} = struct('type', 'relu') ; 14 | 15 | res = vl_simplenn(net, x) ; 16 | dzdy = randn(size(res(end).x), 'like', res(end).x) ; 17 | clear res ; 18 | 19 | res_ = vl_simplenn(net, x, dzdy) ; 20 | res__ = vl_simplenn(net, x, dzdy, [], 'conserveMemory', true) ; 21 | 22 | a=whos('res_') ; 23 | b=whos('res__') ; 24 | assert(a.bytes > b.bytes) ; 25 | vl_testsim(res_(1).dzdx,res__(1).dzdx,1e-4) ; 26 | vl_testsim(res_(1).dzdw{1},res__(1).dzdw{1},1e-4) ; 27 | vl_testsim(res_(1).dzdw{2},res__(1).dzdw{2},1e-4) ; 28 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/xtest/vl_test_gpureset.m: -------------------------------------------------------------------------------- 1 | for explictMexReset = [false] 2 | 3 | % reset the same GPU device 4 | for t = 1:6 5 | if explictMexReset, clear mex ; end 6 | if mod(t-1,2) == 0 7 | disp('vl_test_gpureset: resetting GPU') ; 8 | gpuDevice(1) ; 9 | else 10 | disp('vl_test_gpureset: not resetting GPU') ; 11 | end 12 | if t > 1, disp(a) ; end 13 | a = gpuArray(single(ones(10))) ; 14 | b = gpuArray(single(ones(5))) ; 15 | c = vl_nnconv(a,b,[],'nocudnn') ; 16 | end 17 | 18 | % resetting GPU arguments to a MEX file should fail properly 19 | a = gpuArray(single(ones(10))) ; 20 | b = gpuArray(single(ones(5))) ; 21 | c = vl_nnconv(a,b,[],'nocudnn') ; 22 | 23 | gpuDevice(1) ; 24 | disp(a) ; 25 | try 26 | c = vl_nnconv(a,b,[],'nocudnn') ; 27 | catch e 28 | assert(strcmp('parallel:gpu:array:InvalidData', e.identifier)) ; 29 | end 30 | 31 | % switch GPU devices 32 | if gpuDeviceCount > 1 33 | disp('vl_text_gpureset: test switching GPU device') ; 34 | for t = 1:gpuDeviceCount 35 | if explictMexReset, clear mex ; end 36 | fprintf('vl_test_gpureset: switching to gpu %d\n', t) ; 37 | gpuDevice(t) ; 38 | a = gpuArray(single(ones(10))) ; 39 | b = gpuArray(single(ones(5))) ; 40 | c = vl_nnconv(a,b,[],'nocudnn') ; 41 | end 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /Extract_FCN_features/matlab/xtest/vl_test_imreadjpeg.m: -------------------------------------------------------------------------------- 1 | function vl_test_imreadjpeg 2 | % VL_TEST_IMREADJPEG 3 | 4 | % Test basic file reading capability 5 | for t=1:6 6 | files{t} = which(sprintf('office_%d.jpg', t)) ; 7 | end 8 | ims = vl_imreadjpeg(files) ; 9 | 10 | % Test inserting a non-image file 11 | files_ = files ; 12 | files_{3} = [mfilename('fullpath') '.m']; 13 | ims_ = vl_imreadjpeg(files_) ; 14 | for t=setdiff(1:6,3) 15 | assert(isequal(ims{t},ims_{t})) ; 16 | end 17 | 18 | % Test inserting a non-esiting file 19 | files__ = files_ ; 20 | files__{4} = 'idontexist.jpg' ; 21 | ims__ = vl_imreadjpeg(files__) ; 22 | for t=setdiff(1:6,[3 4]) 23 | assert(isequal(ims{t},ims__{t})) ; 24 | end 25 | 26 | for n = 1:4 27 | % Test prefetching 28 | vl_imreadjpeg(files,'prefetch', 'numThreads', n) ; 29 | ims___ = vl_imreadjpeg(files) ; 30 | assert(isequal(ims,ims___)) ; 31 | 32 | % Hardening: test prefetching, clearing mex, fetching 33 | vl_imreadjpeg(files,'prefetch') ; 34 | clear mex ; 35 | ims___ = vl_imreadjpeg(files, 'numThreads', n) ; 36 | assert(isequal(ims,ims___)) ; 37 | end 38 | -------------------------------------------------------------------------------- /Extract_FCN_features/utils/get-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | local_dir="$1" 4 | url="$2" 5 | 6 | function get_filename_from_url() { 7 | regexp='^([^\/]*\/)+' 8 | echo -n "$1" | sed -r "s/$regexp//g" 9 | } 10 | 11 | function get_remote_file_size() { 12 | curl -sI "$1" | grep Content-Length | grep -o '[0-9][0-9]*' 13 | } 14 | 15 | filename=$(get_filename_from_url "$url") 16 | local_path="$local_dir/$filename" 17 | remote_size=$(get_remote_file_size "$url") 18 | 19 | echo "Getting: $url" 20 | echo " File: $filename" 21 | echo " Local file path: $local_path" 22 | echo " Remote file size: $remote_size" 23 | 24 | if [ -e "$local_path" ] 25 | then 26 | local_size=$(stat -c%s "$local_path") 27 | echo " Local file size: $local_size" 28 | if [[ "$local_size" -eq "$remote_size" ]] 29 | then 30 | echo " Local and remote file sizes match: not downloading" 31 | exit 0 32 | else 33 | echo " Trying to resume partial download" 34 | if curl -f -C - -o "$local_path" "$url" 35 | then 36 | echo " Download completed successfully" 37 | exit 0 38 | else 39 | echo " Could not resume" 40 | fi 41 | fi 42 | fi 43 | 44 | echo " Downloading the whole file" 45 | curl -f -o "$local_path" "$url" 46 | exit $? 47 | -------------------------------------------------------------------------------- /Extract_FCN_features/utils/proto/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DUTFangXiang/ExtractFCNFeature/b278a35fe80417ce468d4fc7b728f73ece0952c5/Extract_FCN_features/utils/proto/__init__.py -------------------------------------------------------------------------------- /Extract_FCN_features/utils/proto/get-protos.sh: -------------------------------------------------------------------------------- 1 | # FCN 2 | wget -nc "https://raw.githubusercontent.com/longjon/caffe/6e3916766c6b63bff07e2cfadf210ee5e46af807/src/caffe/proto/caffe.proto" --output-document=./caffe_6e3916.proto 3 | protoc ./caffe_6e3916.proto --python_out=./ 4 | 5 | # b590f1d (ResNet) 6 | wget -nc "https://raw.githubusercontent.com/BVLC/caffe/b590f1d27eb5cbd9bc7b9157d447706407c68682/src/caffe/proto/caffe.proto" --output-document=./caffe_b590f1d.proto 7 | protoc ./caffe_b590f1d.proto --python_out=./ 8 | -------------------------------------------------------------------------------- /Use_FCN_Features/GetMeanColor.m: -------------------------------------------------------------------------------- 1 | function meanCol = GetMeanColor(image, pixelList,feat_type) 2 | [h, w, chn] = size(image); 3 | if ~strcmp(feat_type,'vgg') 4 | image = uint8(image*255); 5 | end 6 | tmpImg=reshape(image, h*w, chn); 7 | spNum = length(pixelList); 8 | meanCol=zeros(spNum, chn); 9 | for i=1:spNum 10 | meanCol(i, :)=mean(tmpImg(pixelList{i},:), 1); 11 | end 12 | end --------------------------------------------------------------------------------