├── CMakeLists.txt ├── Makefile ├── Makefile.config ├── README.md ├── caffe.cloc ├── cmake ├── ConfigGen.cmake ├── Cuda.cmake ├── Dependencies.cmake ├── External │ ├── gflags.cmake │ └── glog.cmake ├── Misc.cmake ├── Modules │ ├── FindAtlas.cmake │ ├── FindGFlags.cmake │ ├── FindGlog.cmake │ ├── FindLAPACK.cmake │ ├── FindLMDB.cmake │ ├── FindLevelDB.cmake │ ├── FindMKL.cmake │ ├── FindMatlabMex.cmake │ ├── FindNumPy.cmake │ ├── FindOpenBLAS.cmake │ ├── FindSnappy.cmake │ └── FindvecLib.cmake ├── ProtoBuf.cmake ├── Summary.cmake ├── Targets.cmake ├── Templates │ ├── CaffeConfig.cmake.in │ ├── CaffeConfigVersion.cmake.in │ └── caffe_config.h.in ├── Utils.cmake └── lint.cmake ├── docs ├── CMakeLists.txt ├── CNAME ├── README.md ├── _config.yml ├── _layouts │ └── default.html ├── development.md ├── images │ ├── GitHub-Mark-64px.png │ └── caffeine-icon.png ├── index.md ├── install_apt.md ├── install_osx.md ├── install_yum.md ├── installation.md ├── model_zoo.md ├── performance_hardware.md ├── stylesheets │ ├── pygment_trac.css │ ├── reset.css │ └── styles.css └── tutorial │ ├── convolution.md │ ├── data.md │ ├── fig │ ├── .gitignore │ ├── backward.jpg │ ├── forward.jpg │ ├── forward_backward.png │ ├── layer.jpg │ └── logreg.jpg │ ├── forward_backward.md │ ├── index.md │ ├── interfaces.md │ ├── layers.md │ ├── loss.md │ ├── net_layer_blob.md │ └── solver.md ├── eval_tool ├── crack_AIU.m ├── crack_eval.m ├── crack_nms.m └── edges │ ├── .gitignore │ ├── Contents.m │ ├── boxesData.m │ ├── boxesEval.m │ ├── edgeBoxes.m │ ├── edgeBoxesDemo.m │ ├── edgeBoxesSweeps.m │ ├── edgesChns.m │ ├── edgesDemo.m │ ├── edgesDemoRgbd.m │ ├── edgesDetect.m │ ├── edgesEval.m │ ├── edgesEvalDir.m │ ├── edgesEvalDir_crack.m │ ├── edgesEvalImg.m │ ├── edgesEvalImgCrack.m │ ├── edgesEvalImgEdge.m │ ├── edgesEvalPlot.m │ ├── edgesSweeps.m │ ├── edgesTrain.m │ ├── license.txt │ ├── privated │ ├── correspondPixels.mexa64 │ ├── correspondPixels.mexmaci64 │ ├── correspondPixels.mexw64 │ ├── edgeBoxesMex.cpp │ ├── edgeBoxesMex.mexa64 │ ├── edgeBoxesMex.mexmaci64 │ ├── edgeBoxesMex.mexw64 │ ├── edgesDetectMex.cpp │ ├── edgesDetectMex.mexa64 │ ├── edgesDetectMex.mexmaci64 │ ├── edgesDetectMex.mexw64 │ ├── edgesNmsMex.cpp │ ├── edgesNmsMex.mexa64 │ ├── edgesNmsMex.mexmaci64 │ ├── edgesNmsMex.mexw64 │ ├── spDetectMex.cpp │ ├── spDetectMex.mexa64 │ ├── spDetectMex.mexmaci64 │ ├── spDetectMex.mexw64 │ ├── ucm_mean_pb.mexa64 │ ├── ucm_mean_pb.mexmaci64 │ └── ucm_mean_pb.mexw64 │ ├── readme.txt │ ├── spAffinities.m │ ├── spDemo.m │ ├── spDetect.m │ └── toolbox │ ├── .gitignore │ ├── README.md │ ├── channels │ ├── Contents.m │ ├── chnsCompute.m │ ├── chnsPyramid.m │ ├── chnsScaling.m │ ├── convBox.m │ ├── convMax.m │ ├── convTri.m │ ├── fhog.m │ ├── gradient2.m │ ├── gradientHist.m │ ├── gradientMag.m │ ├── hog.m │ ├── hogDraw.m │ ├── imPad.m │ ├── imResample.m │ ├── private │ │ ├── chnsTestCpp.cpp │ │ ├── convConst.cpp │ │ ├── convConst.mexa64 │ │ ├── convConst.mexmaci64 │ │ ├── convConst.mexw64 │ │ ├── gradientMex.cpp │ │ ├── gradientMex.mexa64 │ │ ├── gradientMex.mexmaci64 │ │ ├── gradientMex.mexw64 │ │ ├── gradientMexNew.mexmaci64 │ │ ├── imPadMex.cpp │ │ ├── imPadMex.mexa64 │ │ ├── imPadMex.mexmaci64 │ │ ├── imPadMex.mexw64 │ │ ├── imResampleMex.cpp │ │ ├── imResampleMex.mexa64 │ │ ├── imResampleMex.mexmaci64 │ │ ├── imResampleMex.mexw64 │ │ ├── rgbConvertMex.cpp │ │ ├── rgbConvertMex.mexa64 │ │ ├── rgbConvertMex.mexmaci64 │ │ ├── rgbConvertMex.mexw64 │ │ ├── sse.hpp │ │ └── wrappers.hpp │ └── rgbConvert.m │ ├── classify │ ├── Contents.m │ ├── adaBoostApply.m │ ├── adaBoostTrain.m │ ├── binaryTreeApply.m │ ├── binaryTreeTrain.m │ ├── confMatrix.m │ ├── confMatrixShow.m │ ├── demoCluster.m │ ├── demoGenData.m │ ├── distMatrixShow.m │ ├── fernsClfApply.m │ ├── fernsClfTrain.m │ ├── fernsInds.m │ ├── fernsRegApply.m │ ├── fernsRegTrain.m │ ├── forestApply.m │ ├── forestTrain.m │ ├── kmeans2.m │ ├── meanShift.m │ ├── meanShiftIm.m │ ├── meanShiftImExplore.m │ ├── pca.m │ ├── pcaApply.m │ ├── pcaData.mat │ ├── pcaRandVec.m │ ├── pcaVisualize.m │ ├── pdist2.m │ ├── private │ │ ├── IDX2order.m │ │ ├── binaryTreeTrain1.cpp │ │ ├── binaryTreeTrain1.mexa64 │ │ ├── binaryTreeTrain1.mexmaci64 │ │ ├── binaryTreeTrain1.mexw64 │ │ ├── fernsInds1.c │ │ ├── fernsInds1.mexa64 │ │ ├── fernsInds1.mexmaci64 │ │ ├── fernsInds1.mexw64 │ │ ├── forestFindThr.cpp │ │ ├── forestFindThr.mexa64 │ │ ├── forestFindThr.mexmaci64 │ │ ├── forestFindThr.mexw64 │ │ ├── forestInds.cpp │ │ ├── forestInds.mexa64 │ │ ├── forestInds.mexmaci64 │ │ ├── forestInds.mexw64 │ │ ├── meanShift1.c │ │ ├── meanShift1.mexa64 │ │ ├── meanShift1.mexmaci64 │ │ ├── meanShift1.mexw64 │ │ └── meanShiftPost.m │ ├── rbfComputeBasis.m │ ├── rbfComputeFtrs.m │ ├── rbfDemo.m │ ├── softMin.m │ └── visualizeData.m │ ├── detector │ ├── Contents.m │ ├── acfDemoCal.m │ ├── acfDemoInria.m │ ├── acfDetect.m │ ├── acfModify.m │ ├── acfReadme.m │ ├── acfSweeps.m │ ├── acfTest.m │ ├── acfTrain.m │ ├── bbApply.m │ ├── bbGt.m │ ├── bbLabeler.m │ ├── bbNms.m │ ├── models │ │ ├── AcfCaltech+Detector.mat │ │ ├── AcfCaltech+Log.txt │ │ ├── AcfCaltech+Roc.png │ │ ├── AcfInriaDetector.mat │ │ ├── AcfInriaLog.txt │ │ ├── AcfInriaRoc.png │ │ ├── LdcfCaltechDetector.mat │ │ ├── LdcfCaltechLog.txt │ │ ├── LdcfCaltechRoc.png │ │ ├── LdcfInriaDetector.mat │ │ ├── LdcfInriaLog.txt │ │ └── LdcfInriaRoc.png │ └── private │ │ ├── acfDetect1.cpp │ │ ├── acfDetect1.mexa64 │ │ ├── acfDetect1.mexmaci64 │ │ └── acfDetect1.mexw64 │ ├── doc │ ├── alpha.png │ ├── c++.png │ ├── c.png │ ├── channels │ │ ├── Contents.html │ │ ├── chnsCompute.html │ │ ├── chnsPyramid.html │ │ ├── chnsScaling.html │ │ ├── convBox.html │ │ ├── convMax.html │ │ ├── convTri.html │ │ ├── fhog.html │ │ ├── gradient2.html │ │ ├── gradientHist.html │ │ ├── gradientMag.html │ │ ├── hog.html │ │ ├── hogDraw.html │ │ ├── imPad.html │ │ ├── imResample.html │ │ ├── menu.html │ │ └── rgbConvert.html │ ├── classify │ │ ├── Contents.html │ │ ├── adaBoostApply.html │ │ ├── adaBoostTrain.html │ │ ├── binaryTreeApply.html │ │ ├── binaryTreeTrain.html │ │ ├── confMatrix.html │ │ ├── confMatrixShow.html │ │ ├── demoCluster.html │ │ ├── demoGenData.html │ │ ├── distMatrixShow.html │ │ ├── fernsClfApply.html │ │ ├── fernsClfTrain.html │ │ ├── fernsInds.html │ │ ├── fernsRegApply.html │ │ ├── fernsRegTrain.html │ │ ├── forestApply.html │ │ ├── forestTrain.html │ │ ├── kmeans2.html │ │ ├── meanShift.html │ │ ├── meanShiftIm.html │ │ ├── meanShiftImExplore.html │ │ ├── menu.html │ │ ├── pca.html │ │ ├── pcaApply.html │ │ ├── pcaRandVec.html │ │ ├── pcaVisualize.html │ │ ├── pdist2.html │ │ ├── rbfComputeBasis.html │ │ ├── rbfComputeFtrs.html │ │ ├── rbfDemo.html │ │ ├── softMin.html │ │ └── visualizeData.html │ ├── demoicon.gif │ ├── detector │ │ ├── Contents.html │ │ ├── acfDemoCal.html │ │ ├── acfDemoInria.html │ │ ├── acfDetect.html │ │ ├── acfModify.html │ │ ├── acfReadme.html │ │ ├── acfSweeps.html │ │ ├── acfTest.html │ │ ├── acfTrain.html │ │ ├── bbApply.html │ │ ├── bbGt.html │ │ ├── bbLabeler.html │ │ ├── bbNms.html │ │ └── menu.html │ ├── down.png │ ├── favicon.ico │ ├── filters │ │ ├── Contents.html │ │ ├── FbApply2d.html │ │ ├── FbCrop.html │ │ ├── FbMake.html │ │ ├── FbReconstruct2d.html │ │ ├── FbVisualize.html │ │ ├── filterBinomial1d.html │ │ ├── filterDog2d.html │ │ ├── filterDoog.html │ │ ├── filterGabor1d.html │ │ ├── filterGabor2d.html │ │ ├── filterGauss.html │ │ ├── filterSteerable.html │ │ ├── filterVisualize.html │ │ ├── medfilt1m.html │ │ ├── menu.html │ │ └── modefilt1.html │ ├── fortran.png │ ├── history.txt │ ├── hp.png │ ├── images │ │ ├── Contents.html │ │ ├── assignToBins.html │ │ ├── clusterMontage.html │ │ ├── convnFast.html │ │ ├── filmStrip.html │ │ ├── gaussSmooth.html │ │ ├── histMontage.html │ │ ├── histc2.html │ │ ├── histcImLoc.html │ │ ├── histcImWin.html │ │ ├── im.html │ │ ├── imMlGauss.html │ │ ├── imNormalize.html │ │ ├── imRectRot.html │ │ ├── imShrink.html │ │ ├── imtransform2.html │ │ ├── imwrite2.html │ │ ├── jitterImage.html │ │ ├── localSum.html │ │ ├── makeGif.html │ │ ├── maskCircle.html │ │ ├── maskEllipse.html │ │ ├── maskGaussians.html │ │ ├── maskSphere.html │ │ ├── menu.html │ │ ├── montage2.html │ │ ├── movieToImages.html │ │ ├── nonMaxSupr.html │ │ ├── nonMaxSuprList.html │ │ ├── nonMaxSuprWin.html │ │ ├── normxcorrn.html │ │ ├── playMovie.html │ │ ├── textureMap.html │ │ ├── xcorrn.html │ │ └── xeucn.html │ ├── index.html │ ├── left.png │ ├── linux.png │ ├── m2html.css │ ├── matlab │ │ ├── Contents.html │ │ ├── arrayCrop.html │ │ ├── arrayToDims.html │ │ ├── c.html │ │ ├── cc.html │ │ ├── ccc.html │ │ ├── cell2array.html │ │ ├── char2img.html │ │ ├── checkNumArgs.html │ │ ├── dijkstra.html │ │ ├── dirSynch.html │ │ ├── diskFill.html │ │ ├── dispMatrixIm.html │ │ ├── fevalArrays.html │ │ ├── fevalDistr.html │ │ ├── fevalDistrDisk.html │ │ ├── fevalImages.html │ │ ├── fevalMats.html │ │ ├── figureResized.html │ │ ├── gauss2ellipse.html │ │ ├── getPrmDflt.html │ │ ├── imLabel.html │ │ ├── ind2sub2.html │ │ ├── int2str2.html │ │ ├── isfield2.html │ │ ├── mat2cell2.html │ │ ├── medianw.html │ │ ├── menu.html │ │ ├── multiDiv.html │ │ ├── multiTimes.html │ │ ├── normpdf2.html │ │ ├── num2strs.html │ │ ├── plotEllipse.html │ │ ├── plotGaussEllipses.html │ │ ├── plotRoc.html │ │ ├── randSample.html │ │ ├── randint2.html │ │ ├── rotationMatrix.html │ │ ├── simpleCache.html │ │ ├── spBlkDiag.html │ │ ├── sub2ind2.html │ │ ├── subsToArray.html │ │ ├── text2.html │ │ ├── ticStatus.html │ │ ├── tocStatus.html │ │ ├── tpsGetWarp.html │ │ ├── tpsInterpolate.html │ │ ├── tpsInterpolateIm.html │ │ ├── tpsRandom.html │ │ ├── txt2img.html │ │ └── uniqueColors.html │ ├── matlabicon.gif │ ├── menu.html │ ├── mex.png │ ├── new.gif │ ├── overview.html │ ├── right.png │ ├── sgi.png │ ├── simulinkicon.gif │ ├── solaris.png │ ├── up.png │ ├── videos │ │ ├── Contents.html │ │ ├── behaviorAnnotator.html │ │ ├── behaviorData.html │ │ ├── imagesAlign.html │ │ ├── imagesAlignSeq.html │ │ ├── kernelTracker.html │ │ ├── menu.html │ │ ├── opticalFlow.html │ │ ├── seqIo.html │ │ ├── seqPlayer.html │ │ ├── seqReaderPlugin.html │ │ └── seqWriterPlugin.html │ └── windows.png │ ├── external │ ├── bsd.txt │ ├── deprecated │ │ ├── apply_homography.m │ │ ├── clfData.mat │ │ ├── clfDecTree.m │ │ ├── clfDecTreeFwd.m │ │ ├── clfDecTreeTrain.m │ │ ├── clfEcoc.m │ │ ├── clfEcocCode.m │ │ ├── clfKnn.m │ │ ├── clfKnnDist.m │ │ ├── clfKnnFwd.m │ │ ├── clfKnnTrain.m │ │ ├── clfLda.m │ │ ├── clfLdaFwd.m │ │ ├── clfLdaTrain.m │ │ ├── clfSvm.m │ │ ├── demoClassify.m │ │ ├── diffTracker.m │ │ ├── filter_gauss_1D.m │ │ ├── getargs.m │ │ ├── imRectLite.m │ │ ├── imSubsResize.m │ │ ├── imrotate2.m │ │ ├── imtranslate.m │ │ ├── imwrite2split.m │ │ ├── localsum_block.m │ │ ├── makemovie.m │ │ ├── mode2.m │ │ ├── montages2.m │ │ ├── nfoldxval.m │ │ ├── normxcorrn_fg.m │ │ ├── pca_apply.m │ │ ├── pca_apply_large.m │ │ ├── playmovies.m │ │ ├── randperm2.m │ │ └── subsampleMatrix.m │ ├── history.txt │ ├── m2html │ │ ├── @template │ │ │ ├── char.m │ │ │ ├── display.m │ │ │ ├── get.m │ │ │ ├── parse.m │ │ │ ├── private │ │ │ │ ├── finish.m │ │ │ │ ├── loadtpl.m │ │ │ │ └── subst.m │ │ │ ├── set.m │ │ │ └── template.m │ │ ├── Changelog │ │ ├── Contents.m │ │ ├── GPL │ │ ├── INSTALL │ │ ├── LICENSE │ │ ├── README │ │ ├── TODO │ │ ├── m2html.m │ │ ├── mdot.m │ │ ├── mwizard.m │ │ ├── mwizard2.m │ │ ├── private │ │ │ ├── doxyread.m │ │ │ ├── doxysearch.m │ │ │ ├── doxywrite.m │ │ │ ├── m2htmltoolbarimages.mat │ │ │ ├── mexexts.m │ │ │ ├── mfileparse.m │ │ │ ├── openfile.m │ │ │ ├── searchindex.m │ │ │ ├── splitcode.m │ │ │ └── strtok.m │ │ └── templates │ │ │ ├── blue │ │ │ ├── Thumbs.db │ │ │ ├── alpha.png │ │ │ ├── c++.png │ │ │ ├── c.png │ │ │ ├── demoicon.gif │ │ │ ├── down.png │ │ │ ├── doxysearch.php │ │ │ ├── fortran.png │ │ │ ├── graph.tpl │ │ │ ├── hp.png │ │ │ ├── left.png │ │ │ ├── linux.png │ │ │ ├── m2html.css │ │ │ ├── master.tpl │ │ │ ├── matlabicon.gif │ │ │ ├── mdir.tpl │ │ │ ├── mex.png │ │ │ ├── mfile.tpl │ │ │ ├── pcode.png │ │ │ ├── right.png │ │ │ ├── search.tpl │ │ │ ├── sgi.png │ │ │ ├── simulinkicon.gif │ │ │ ├── solaris.png │ │ │ ├── todo.tpl │ │ │ ├── up.png │ │ │ └── windows.png │ │ │ ├── brain │ │ │ ├── alpha.png │ │ │ ├── brain.png │ │ │ ├── c++.png │ │ │ ├── c.png │ │ │ ├── demoicon.gif │ │ │ ├── down.png │ │ │ ├── doxysearch.php │ │ │ ├── fortran.png │ │ │ ├── graph.tpl │ │ │ ├── hp.png │ │ │ ├── index.html │ │ │ ├── left.png │ │ │ ├── linux.png │ │ │ ├── m2html.css │ │ │ ├── master.tpl │ │ │ ├── matlabicon.gif │ │ │ ├── mdir.tpl │ │ │ ├── menu.css │ │ │ ├── mex.png │ │ │ ├── mfile.tpl │ │ │ ├── pcode.png │ │ │ ├── right.png │ │ │ ├── search.tpl │ │ │ ├── sgi.png │ │ │ ├── simulinkicon.gif │ │ │ ├── solaris.png │ │ │ ├── todo.tpl │ │ │ ├── up.png │ │ │ └── windows.png │ │ │ ├── frame-piotr │ │ │ ├── alpha.png │ │ │ ├── c++.png │ │ │ ├── c.png │ │ │ ├── demoicon.gif │ │ │ ├── down.png │ │ │ ├── favicon.ico │ │ │ ├── fortran.png │ │ │ ├── graph.tpl │ │ │ ├── hp.png │ │ │ ├── index.html │ │ │ ├── left.png │ │ │ ├── linux.png │ │ │ ├── m2html.css │ │ │ ├── master.tpl │ │ │ ├── matlabicon.gif │ │ │ ├── mdir.tpl │ │ │ ├── mex.png │ │ │ ├── mfile.tpl │ │ │ ├── new.gif │ │ │ ├── overview.html │ │ │ ├── right.png │ │ │ ├── sgi.png │ │ │ ├── simulinkicon.gif │ │ │ ├── solaris.png │ │ │ ├── todo.tpl │ │ │ ├── up.png │ │ │ └── windows.png │ │ │ ├── frame │ │ │ ├── alpha.png │ │ │ ├── c++.png │ │ │ ├── c.png │ │ │ ├── demoicon.gif │ │ │ ├── down.png │ │ │ ├── doxysearch.php │ │ │ ├── fortran.png │ │ │ ├── graph.tpl │ │ │ ├── hp.png │ │ │ ├── index.html │ │ │ ├── left.png │ │ │ ├── linux.png │ │ │ ├── m2html.css │ │ │ ├── master.tpl │ │ │ ├── matlabicon.gif │ │ │ ├── mdir.tpl │ │ │ ├── mex.png │ │ │ ├── mfile.tpl │ │ │ ├── pcode.png │ │ │ ├── right.png │ │ │ ├── search.tpl │ │ │ ├── sgi.png │ │ │ ├── simulinkicon.gif │ │ │ ├── solaris.png │ │ │ ├── todo.tpl │ │ │ ├── up.png │ │ │ └── windows.png │ │ │ └── menu-for-frame-piotr.html │ ├── other │ │ ├── compareStructs.m │ │ ├── matrix2latex.m │ │ ├── multiprod.m │ │ └── savefig.m │ ├── toolboxCompile.m │ ├── toolboxGenDoc.m │ ├── toolboxHeader.m │ └── toolboxUpdateHeader.m │ ├── filters │ ├── Contents.m │ ├── FbApply2d.m │ ├── FbCrop.m │ ├── FbDoG.mat │ ├── FbGabor.mat │ ├── FbMake.m │ ├── FbReconstruct2d.m │ ├── FbVisualize.m │ ├── filterBinomial1d.m │ ├── filterDog2d.m │ ├── filterDoog.m │ ├── filterGabor1d.m │ ├── filterGabor2d.m │ ├── filterGauss.m │ ├── filterSteerable.m │ ├── filterVisualize.m │ ├── medfilt1m.m │ └── modefilt1.m │ ├── images │ ├── Contents.m │ ├── assignToBins.m │ ├── clusterMontage.m │ ├── convnFast.m │ ├── filmStrip.m │ ├── gaussSmooth.m │ ├── histMontage.m │ ├── histc2.m │ ├── histcImLoc.m │ ├── histcImWin.m │ ├── im.m │ ├── imMlGauss.m │ ├── imNormalize.m │ ├── imRectRot.m │ ├── imShrink.m │ ├── images.mat │ ├── imtransform2.m │ ├── imwrite2.m │ ├── jitterImage.m │ ├── localSum.m │ ├── makeGif.m │ ├── maskCircle.m │ ├── maskEllipse.m │ ├── maskGaussians.m │ ├── maskSphere.m │ ├── montage2.m │ ├── movieToImages.m │ ├── nonMaxSupr.m │ ├── nonMaxSuprList.m │ ├── nonMaxSuprWin.m │ ├── normxcorrn.m │ ├── playMovie.m │ ├── private │ │ ├── assignToBins1.c │ │ ├── assignToBins1.mexa64 │ │ ├── assignToBins1.mexmaci64 │ │ ├── assignToBins1.mexw64 │ │ ├── histc2c.c │ │ ├── histc2c.mexa64 │ │ ├── histc2c.mexmaci64 │ │ ├── histc2c.mexw64 │ │ ├── imtransform2_c.c │ │ ├── imtransform2_c.mexa64 │ │ ├── imtransform2_c.mexmaci64 │ │ ├── imtransform2_c.mexw64 │ │ ├── nlfiltersep.m │ │ ├── nlfiltersep_max.c │ │ ├── nlfiltersep_max.mexa64 │ │ ├── nlfiltersep_max.mexmaci64 │ │ ├── nlfiltersep_max.mexw64 │ │ ├── nlfiltersep_sum.c │ │ ├── nlfiltersep_sum.mexa64 │ │ ├── nlfiltersep_sum.mexmaci64 │ │ └── nlfiltersep_sum.mexw64 │ ├── textureMap.m │ ├── xcorrn.m │ └── xeucn.m │ ├── matlab │ ├── Contents.m │ ├── arrayCrop.m │ ├── arrayToDims.m │ ├── c.m │ ├── cc.m │ ├── ccc.m │ ├── cell2array.m │ ├── char2img.m │ ├── checkNumArgs.m │ ├── dijkstra.m │ ├── dirSynch.m │ ├── diskFill.m │ ├── dispMatrixIm.m │ ├── fevalArrays.m │ ├── fevalDistr.m │ ├── fevalDistrDisk.m │ ├── fevalImages.m │ ├── fevalMats.m │ ├── figureResized.m │ ├── gauss2ellipse.m │ ├── getPrmDflt.m │ ├── imLabel.m │ ├── ind2sub2.m │ ├── int2str2.m │ ├── isfield2.m │ ├── mat2cell2.m │ ├── medianw.m │ ├── multiDiv.m │ ├── multiTimes.m │ ├── normpdf2.m │ ├── num2strs.m │ ├── plotEllipse.m │ ├── plotGaussEllipses.m │ ├── plotRoc.m │ ├── private │ │ ├── char2img_h015.mat │ │ ├── char2img_h020.mat │ │ ├── char2img_h025.mat │ │ ├── char2img_h030.mat │ │ ├── char2img_h035.mat │ │ ├── char2img_h050.mat │ │ ├── dijkstra1.cpp │ │ ├── dijkstra1.mexa64 │ │ ├── dijkstra1.mexmaci64 │ │ ├── dijkstra1.mexw64 │ │ ├── fibheap.cpp │ │ └── fibheap.h │ ├── randSample.m │ ├── randint2.m │ ├── rotationMatrix.m │ ├── simpleCache.m │ ├── spBlkDiag.m │ ├── sub2ind2.m │ ├── subsToArray.m │ ├── text2.m │ ├── ticStatus.m │ ├── tocStatus.m │ ├── tpsGetWarp.m │ ├── tpsInterpolate.m │ ├── tpsInterpolateIm.m │ ├── tpsRandom.m │ ├── txt2img.m │ └── uniqueColors.m │ └── videos │ ├── Contents.m │ ├── behaviorAnnotator.m │ ├── behaviorData.m │ ├── imagesAlign.m │ ├── imagesAlignSeq.m │ ├── kernelTracker.m │ ├── opticalFlow.m │ ├── opticalFlowTest.mat │ ├── peds30-seek.mat │ ├── peds30.seq │ ├── private │ ├── ktComputeW_c.c │ ├── ktComputeW_c.mexa64 │ ├── ktComputeW_c.mexmaci64 │ ├── ktComputeW_c.mexw64 │ ├── ktHistcRgb_c.c │ ├── ktHistcRgb_c.mexa64 │ ├── ktHistcRgb_c.mexmaci64 │ ├── ktHistcRgb_c.mexw64 │ ├── opticalFlowHsMex.cpp │ ├── opticalFlowHsMex.mexa64 │ ├── opticalFlowHsMex.mexmaci64 │ └── opticalFlowHsMex.mexw64 │ ├── seqIo.m │ ├── seqPlayer.m │ ├── seqReaderPlugin.m │ └── seqWriterPlugin.m ├── examples └── fphb │ ├── CustomSigmoidCrossEntropyLossLayer.py │ ├── FPHB-tutorial.ipynb │ ├── solve_fphb_crack.py │ ├── solve_fpn_crack.py │ ├── solver_fphb_crack.prototxt │ ├── solver_fpn_crack.prototxt │ ├── test_fphb_crack.prototxt │ ├── test_fpn_crack.prototxt │ ├── train.txt │ ├── train_fphb_crack.prototxt │ └── train_fpn_crack.prototxt ├── include └── caffe │ ├── blob.hpp │ ├── caffe.hpp │ ├── common.hpp │ ├── common_layers.hpp │ ├── data_layers.hpp │ ├── data_reader.hpp │ ├── data_transformer.hpp │ ├── filler.hpp │ ├── internal_thread.hpp │ ├── layer.hpp │ ├── layer_factory.hpp │ ├── loss_layers.hpp │ ├── net.hpp │ ├── neuron_layers.hpp │ ├── parallel.hpp │ ├── python_layer.hpp │ ├── solver.hpp │ ├── syncedmem.hpp │ ├── test │ ├── test_caffe_main.hpp │ └── test_gradient_check_util.hpp │ ├── util │ ├── benchmark.hpp │ ├── blocking_queue.hpp │ ├── coords.hpp │ ├── cudnn.hpp │ ├── db.hpp │ ├── db_leveldb.hpp │ ├── db_lmdb.hpp │ ├── device_alternate.hpp │ ├── gpu_util.cuh │ ├── hdf5.hpp │ ├── im2col.hpp │ ├── insert_splits.hpp │ ├── io.hpp │ ├── math_functions.hpp │ ├── mkl_alternate.hpp │ ├── rng.hpp │ ├── signal_handler.h │ └── upgrade_proto.hpp │ └── vision_layers.hpp ├── matlab ├── +caffe │ ├── +test │ │ ├── test_net.m │ │ └── test_solver.m │ ├── Blob.m │ ├── Layer.m │ ├── Net.m │ ├── Solver.m │ ├── get_net.m │ ├── get_solver.m │ ├── imagenet │ │ └── ilsvrc_2012_mean.mat │ ├── io.m │ ├── private │ │ ├── CHECK.m │ │ ├── CHECK_FILE_EXIST.m │ │ ├── caffe_.cpp │ │ └── is_valid_handle.m │ ├── reset_all.m │ ├── run_tests.m │ ├── set_device.m │ ├── set_mode_cpu.m │ └── set_mode_gpu.m ├── CMakeLists.txt ├── demo │ └── classification_demo.m └── hdf5creation │ ├── .gitignore │ ├── demo.m │ └── store2hdf5.m ├── python ├── CMakeLists.txt ├── caffe │ ├── __init__.py │ ├── __init__.pyc │ ├── _caffe.cpp │ ├── _caffe.so │ ├── classifier.py │ ├── classifier.pyc │ ├── detector.py │ ├── detector.pyc │ ├── draw.py │ ├── imagenet │ │ └── ilsvrc_2012_mean.npy │ ├── io.py │ ├── io.pyc │ ├── net_spec.py │ ├── net_spec.pyc │ ├── proto │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── caffe_pb2.py │ │ └── caffe_pb2.pyc │ ├── pycaffe.py │ ├── pycaffe.pyc │ └── test │ │ ├── test_layer_type_list.py │ │ ├── test_net.py │ │ ├── test_net_spec.py │ │ ├── test_python_layer.py │ │ ├── test_python_layer_with_param_str.py │ │ └── test_solver.py ├── classify.py ├── detect.py ├── draw_net.py └── requirements.txt ├── scripts ├── build_docs.sh ├── copy_notebook.py ├── cpp_lint.py ├── deploy_docs.sh ├── download_model_binary.py ├── download_model_from_gist.sh ├── gather_examples.sh ├── travis │ ├── travis_build_and_test.sh │ ├── travis_install.sh │ └── travis_setup_makefile_config.sh └── upload_model_to_gist.sh ├── src ├── caffe │ ├── CMakeLists.txt │ ├── blob.cpp │ ├── common.cpp │ ├── data_reader.cpp │ ├── data_transformer.cpp │ ├── internal_thread.cpp │ ├── layer.cpp │ ├── layer_factory.cpp │ ├── layers │ │ ├── absval_layer.cpp │ │ ├── absval_layer.cu │ │ ├── accuracy_layer.cpp │ │ ├── argmax_layer.cpp │ │ ├── base_conv_layer.cpp │ │ ├── base_data_layer.cpp │ │ ├── base_data_layer.cu │ │ ├── bnll_layer.cpp │ │ ├── bnll_layer.cu │ │ ├── concat_layer.cpp │ │ ├── concat_layer.cu │ │ ├── contrastive_loss_layer.cpp │ │ ├── contrastive_loss_layer.cu │ │ ├── conv_layer.cpp │ │ ├── conv_layer.cu │ │ ├── crop_layer.cpp │ │ ├── crop_layer.cu │ │ ├── cudnn_conv_layer.cpp │ │ ├── cudnn_conv_layer.cu │ │ ├── cudnn_pooling_layer.cpp │ │ ├── cudnn_pooling_layer.cu │ │ ├── cudnn_relu_layer.cpp │ │ ├── cudnn_relu_layer.cu │ │ ├── cudnn_sigmoid_layer.cpp │ │ ├── cudnn_sigmoid_layer.cu │ │ ├── cudnn_softmax_layer.cpp │ │ ├── cudnn_softmax_layer.cu │ │ ├── cudnn_tanh_layer.cpp │ │ ├── cudnn_tanh_layer.cu │ │ ├── data_layer.cpp │ │ ├── deconv_layer.cpp │ │ ├── deconv_layer.cu │ │ ├── dropout_layer.cpp │ │ ├── dropout_layer.cu │ │ ├── dummy_data_layer.cpp │ │ ├── eltwise_layer.cpp │ │ ├── eltwise_layer.cu │ │ ├── embed_layer.cpp │ │ ├── embed_layer.cu │ │ ├── euclidean_loss_layer.cpp │ │ ├── euclidean_loss_layer.cu │ │ ├── exp_layer.cpp │ │ ├── exp_layer.cu │ │ ├── filter_layer.cpp │ │ ├── filter_layer.cu │ │ ├── flatten_layer.cpp │ │ ├── hdf5_data_layer.cpp │ │ ├── hdf5_data_layer.cu │ │ ├── hdf5_output_layer.cpp │ │ ├── hdf5_output_layer.cu │ │ ├── hinge_loss_layer.cpp │ │ ├── im2col_layer.cpp │ │ ├── im2col_layer.cu │ │ ├── image_data_layer.cpp │ │ ├── image_labelmap_data_layer.cpp │ │ ├── infogain_loss_layer.cpp │ │ ├── inner_product_layer.cpp │ │ ├── inner_product_layer.cu │ │ ├── log_layer.cpp │ │ ├── log_layer.cu │ │ ├── loss_layer.cpp │ │ ├── lrn_layer.cpp │ │ ├── lrn_layer.cu │ │ ├── memory_data_layer.cpp │ │ ├── multinomial_logistic_loss_layer.cpp │ │ ├── mvn_layer.cpp │ │ ├── mvn_layer.cu │ │ ├── neuron_layer.cpp │ │ ├── pooling_layer.cpp │ │ ├── pooling_layer.cu │ │ ├── power_layer.cpp │ │ ├── power_layer.cu │ │ ├── prelu_layer.cpp │ │ ├── prelu_layer.cu │ │ ├── reduction_layer.cpp │ │ ├── reduction_layer.cu │ │ ├── relu_layer.cpp │ │ ├── relu_layer.cu │ │ ├── reshape_layer.cpp │ │ ├── sigmoid_cross_entropy_loss_layer.cpp │ │ ├── sigmoid_layer.cpp │ │ ├── sigmoid_layer.cu │ │ ├── silence_layer.cpp │ │ ├── silence_layer.cu │ │ ├── slice_layer.cpp │ │ ├── slice_layer.cu │ │ ├── softmax_layer.cpp │ │ ├── softmax_layer.cu │ │ ├── softmax_loss_layer.cpp │ │ ├── softmax_loss_layer.cu │ │ ├── split_layer.cpp │ │ ├── split_layer.cu │ │ ├── spp_layer.cpp │ │ ├── tanh_layer.cpp │ │ ├── tanh_layer.cu │ │ ├── threshold_layer.cpp │ │ ├── threshold_layer.cu │ │ ├── tile_layer.cpp │ │ ├── tile_layer.cu │ │ └── window_data_layer.cpp │ ├── net.cpp │ ├── parallel.cpp │ ├── proto │ │ └── caffe.proto │ ├── solver.cpp │ ├── syncedmem.cpp │ ├── test │ │ ├── CMakeLists.txt │ │ ├── test_accuracy_layer.cpp │ │ ├── test_argmax_layer.cpp │ │ ├── test_benchmark.cpp │ │ ├── test_blob.cpp │ │ ├── test_caffe_main.cpp │ │ ├── test_common.cpp │ │ ├── test_concat_layer.cpp │ │ ├── test_contrastive_loss_layer.cpp │ │ ├── test_convolution_layer.cpp │ │ ├── test_data │ │ │ ├── generate_sample_data.py │ │ │ ├── sample_data.h5 │ │ │ ├── sample_data_2_gzip.h5 │ │ │ ├── sample_data_list.txt │ │ │ ├── solver_data.h5 │ │ │ └── solver_data_list.txt │ │ ├── test_data_layer.cpp │ │ ├── test_data_transformer.cpp │ │ ├── test_db.cpp │ │ ├── test_deconvolution_layer.cpp │ │ ├── test_dummy_data_layer.cpp │ │ ├── test_eltwise_layer.cpp │ │ ├── test_embed_layer.cpp │ │ ├── test_euclidean_loss_layer.cpp │ │ ├── test_filler.cpp │ │ ├── test_filter_layer.cpp │ │ ├── test_flatten_layer.cpp │ │ ├── test_gradient_based_solver.cpp │ │ ├── test_hdf5_output_layer.cpp │ │ ├── test_hdf5data_layer.cpp │ │ ├── test_hinge_loss_layer.cpp │ │ ├── test_im2col_kernel.cu │ │ ├── test_im2col_layer.cpp │ │ ├── test_image_data_layer.cpp │ │ ├── test_infogain_loss_layer.cpp │ │ ├── test_inner_product_layer.cpp │ │ ├── test_internal_thread.cpp │ │ ├── test_io.cpp │ │ ├── test_layer_factory.cpp │ │ ├── test_lrn_layer.cpp │ │ ├── test_math_functions.cpp │ │ ├── test_maxpool_dropout_layers.cpp │ │ ├── test_memory_data_layer.cpp │ │ ├── test_multinomial_logistic_loss_layer.cpp │ │ ├── test_mvn_layer.cpp │ │ ├── test_net.cpp │ │ ├── test_neuron_layer.cpp │ │ ├── test_platform.cpp │ │ ├── test_pooling_layer.cpp │ │ ├── test_power_layer.cpp │ │ ├── test_protobuf.cpp │ │ ├── test_random_number_generator.cpp │ │ ├── test_reduction_layer.cpp │ │ ├── test_reshape_layer.cpp │ │ ├── test_sigmoid_cross_entropy_loss_layer.cpp │ │ ├── test_slice_layer.cpp │ │ ├── test_softmax_layer.cpp │ │ ├── test_softmax_with_loss_layer.cpp │ │ ├── test_solver.cpp │ │ ├── test_split_layer.cpp │ │ ├── test_spp_layer.cpp │ │ ├── test_stochastic_pooling.cpp │ │ ├── test_syncedmem.cpp │ │ ├── test_tanh_layer.cpp │ │ ├── test_threshold_layer.cpp │ │ ├── test_tile_layer.cpp │ │ ├── test_upgrade_proto.cpp │ │ └── test_util_blas.cpp │ └── util │ │ ├── benchmark.cpp │ │ ├── blocking_queue.cpp │ │ ├── cudnn.cpp │ │ ├── db.cpp │ │ ├── db_leveldb.cpp │ │ ├── db_lmdb.cpp │ │ ├── hdf5.cpp │ │ ├── im2col.cpp │ │ ├── im2col.cu │ │ ├── insert_splits.cpp │ │ ├── io.cpp │ │ ├── math_functions.cpp │ │ ├── math_functions.cu │ │ ├── signal_handler.cpp │ │ └── upgrade_proto.cpp └── gtest │ ├── CMakeLists.txt │ ├── gtest-all.cpp │ ├── gtest.h │ └── gtest_main.cc ├── test.py └── tools ├── CMakeLists.txt ├── caffe.cpp ├── compute_image_mean.cpp ├── convert_imageset.cpp ├── device_query.cpp ├── extra ├── extract_seconds.py ├── launch_resize_and_crop_images.sh ├── parse_log.py ├── parse_log.sh ├── plot_log.gnuplot.example ├── plot_training_log.py.example └── resize_and_crop_images.py ├── extract_features.cpp ├── finetune_net.cpp ├── net_speed_benchmark.cpp ├── test_net.cpp ├── train_net.cpp ├── upgrade_net_proto_binary.cpp └── upgrade_net_proto_text.cpp /cmake/Modules/FindLMDB.cmake: -------------------------------------------------------------------------------- 1 | # Try to find the LMBD libraries and headers 2 | # LMDB_FOUND - system has LMDB lib 3 | # LMDB_INCLUDE_DIR - the LMDB include directory 4 | # LMDB_LIBRARIES - Libraries needed to use LMDB 5 | 6 | # FindCWD based on FindGMP by: 7 | # Copyright (c) 2006, Laurent Montel, 8 | # 9 | # Redistribution and use is allowed according to the terms of the BSD license. 10 | 11 | # Adapted from FindCWD by: 12 | # Copyright 2013 Conrad Steenberg 13 | # Aug 31, 2013 14 | 15 | find_path(LMDB_INCLUDE_DIR NAMES lmdb.h PATHS "$ENV{LMDB_DIR}/include") 16 | find_library(LMDB_LIBRARIES NAMES lmdb PATHS "$ENV{LMDB_DIR}/lib" ) 17 | 18 | include(FindPackageHandleStandardArgs) 19 | find_package_handle_standard_args(LMDB DEFAULT_MSG LMDB_INCLUDE_DIR LMDB_LIBRARIES) 20 | 21 | if(LMDB_FOUND) 22 | message(STATUS "Found lmdb (include: ${LMDB_INCLUDE_DIR}, library: ${LMDB_LIBRARIES})") 23 | mark_as_advanced(LMDB_INCLUDE_DIR LMDB_LIBRARIES) 24 | 25 | caffe_parse_header(${LMDB_INCLUDE_DIR}/lmdb.h 26 | LMDB_VERSION_LINES MDB_VERSION_MAJOR MDB_VERSION_MINOR MDB_VERSION_PATCH) 27 | set(LMDB_VERSION "${MDB_VERSION_MAJOR}.${MDB_VERSION_MINOR}.${MDB_VERSION_PATCH}") 28 | endif() 29 | -------------------------------------------------------------------------------- /cmake/Modules/FindSnappy.cmake: -------------------------------------------------------------------------------- 1 | # Find the Snappy libraries 2 | # 3 | # The following variables are optionally searched for defaults 4 | # Snappy_ROOT_DIR: Base directory where all Snappy components are found 5 | # 6 | # The following are set after configuration is done: 7 | # SNAPPY_FOUND 8 | # Snappy_INCLUDE_DIR 9 | # Snappy_LIBRARIES 10 | 11 | find_path(Snappy_INCLUDE_DIR NAMES snappy.h 12 | PATHS ${SNAPPY_ROOT_DIR} ${SNAPPY_ROOT_DIR}/include) 13 | 14 | find_library(Snappy_LIBRARIES NAMES snappy 15 | PATHS ${SNAPPY_ROOT_DIR} ${SNAPPY_ROOT_DIR}/lib) 16 | 17 | include(FindPackageHandleStandardArgs) 18 | find_package_handle_standard_args(Snappy DEFAULT_MSG Snappy_INCLUDE_DIR Snappy_LIBRARIES) 19 | 20 | if(SNAPPY_FOUND) 21 | message(STATUS "Found Snappy (include: ${Snappy_INCLUDE_DIR}, library: ${Snappy_LIBRARIES})") 22 | mark_as_advanced(Snappy_INCLUDE_DIR Snappy_LIBRARIES) 23 | 24 | caffe_parse_header(${Snappy_INCLUDE_DIR}/snappy-stubs-public.h 25 | SNAPPY_VERION_LINES SNAPPY_MAJOR SNAPPY_MINOR SNAPPY_PATCHLEVEL) 26 | set(Snappy_VERSION "${SNAPPY_MAJOR}.${SNAPPY_MINOR}.${SNAPPY_PATCHLEVEL}") 27 | endif() 28 | 29 | -------------------------------------------------------------------------------- /cmake/Templates/CaffeConfigVersion.cmake.in: -------------------------------------------------------------------------------- 1 | set(PACKAGE_VERSION "@Caffe_VERSION@") 2 | 3 | # Check whether the requested PACKAGE_FIND_VERSION is compatible 4 | if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") 5 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 6 | else() 7 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 8 | if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") 9 | set(PACKAGE_VERSION_EXACT TRUE) 10 | endif() 11 | endif() 12 | -------------------------------------------------------------------------------- /cmake/Templates/caffe_config.h.in: -------------------------------------------------------------------------------- 1 | /* Sources directory */ 2 | #define SOURCE_FOLDER "${PROJECT_SOURCE_DIR}" 3 | 4 | /* Binaries directory */ 5 | #define BINARY_FOLDER "${PROJECT_BINARY_DIR}" 6 | 7 | /* NVIDA Cuda */ 8 | #cmakedefine HAVE_CUDA 9 | 10 | /* NVIDA cuDNN */ 11 | #cmakedefine HAVE_CUDNN 12 | #cmakedefine USE_CUDNN 13 | 14 | /* NVIDA cuDNN */ 15 | #cmakedefine CPU_ONLY 16 | 17 | /* Test device */ 18 | #define CUDA_TEST_DEVICE ${CUDA_TEST_DEVICE} 19 | 20 | /* Temporary (TODO: remove) */ 21 | #if 1 22 | #define CMAKE_SOURCE_DIR SOURCE_FOLDER "/src/" 23 | #define EXAMPLES_SOURCE_DIR BINARY_FOLDER "/examples/" 24 | #define CMAKE_EXT ".gen.cmake" 25 | #else 26 | #define CMAKE_SOURCE_DIR "src/" 27 | #define EXAMPLES_SOURCE_DIR "examples/" 28 | #define CMAKE_EXT "" 29 | #endif 30 | 31 | /* Matlab */ 32 | #cmakedefine HAVE_MATLAB 33 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | caffe.berkeleyvision.org 2 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Caffe Documentation 2 | 3 | To generate the documentation, run `$CAFFE_ROOT/scripts/build_docs.sh`. 4 | 5 | To push your changes to the documentation to the gh-pages branch of your or the BVLC repo, run `$CAFFE_ROOT/scripts/deploy_docs.sh `. 6 | -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | defaults: 2 | - 3 | scope: 4 | path: "" # an empty string here means all files in the project 5 | values: 6 | layout: "default" 7 | 8 | -------------------------------------------------------------------------------- /docs/images/GitHub-Mark-64px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/docs/images/GitHub-Mark-64px.png -------------------------------------------------------------------------------- /docs/images/caffeine-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/docs/images/caffeine-icon.png -------------------------------------------------------------------------------- /docs/stylesheets/reset.css: -------------------------------------------------------------------------------- 1 | /* MeyerWeb Reset */ 2 | 3 | html, body, div, span, applet, object, iframe, 4 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 5 | a, abbr, acronym, address, big, cite, code, 6 | del, dfn, em, img, ins, kbd, q, s, samp, 7 | small, strike, strong, sub, sup, tt, var, 8 | b, u, i, center, 9 | dl, dt, dd, ol, ul, li, 10 | fieldset, form, label, legend, 11 | table, caption, tbody, tfoot, thead, tr, th, td, 12 | article, aside, canvas, details, embed, 13 | figure, figcaption, footer, header, hgroup, 14 | menu, nav, output, ruby, section, summary, 15 | time, mark, audio, video { 16 | margin: 0; 17 | padding: 0; 18 | border: 0; 19 | font: inherit; 20 | vertical-align: baseline; 21 | } 22 | -------------------------------------------------------------------------------- /docs/tutorial/convolution.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Convolution 3 | --- 4 | # Caffeinated Convolution 5 | 6 | The Caffe strategy for convolution is to reduce the problem to matrix-matrix multiplication. 7 | This linear algebra computation is highly-tuned in BLAS libraries and efficiently computed on GPU devices. 8 | 9 | For more details read Yangqing's [Convolution in Caffe: a memo](https://github.com/Yangqing/caffe/wiki/Convolution-in-Caffe:-a-memo). 10 | 11 | As it turns out, this same reduction was independently explored in the context of conv. nets by 12 | 13 | > K. Chellapilla, S. Puri, P. Simard, et al. High performance convolutional neural networks for document processing. In Tenth International Workshop on Frontiers in Handwriting Recognition, 2006. 14 | -------------------------------------------------------------------------------- /docs/tutorial/fig/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/docs/tutorial/fig/.gitignore -------------------------------------------------------------------------------- /docs/tutorial/fig/backward.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/docs/tutorial/fig/backward.jpg -------------------------------------------------------------------------------- /docs/tutorial/fig/forward.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/docs/tutorial/fig/forward.jpg -------------------------------------------------------------------------------- /docs/tutorial/fig/forward_backward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/docs/tutorial/fig/forward_backward.png -------------------------------------------------------------------------------- /docs/tutorial/fig/layer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/docs/tutorial/fig/layer.jpg -------------------------------------------------------------------------------- /docs/tutorial/fig/logreg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/docs/tutorial/fig/logreg.jpg -------------------------------------------------------------------------------- /eval_tool/crack_eval.m: -------------------------------------------------------------------------------- 1 | model='FPHB'; 2 | fprintf('%s\n',model); 3 | resDir='/data/crack/testresults/nms'; 4 | gtDir='/data/crack/testcrop'; 5 | edgesEvalDir_crack('resDir',resDir,'gtDir',gtDir, 'thin', 1, 'pDistr',{{'type','parfor'}},'maxDist',0.0075); 6 | figure; edgesEvalPlot(resDir,model); 7 | close all 8 | -------------------------------------------------------------------------------- /eval_tool/crack_nms.m: -------------------------------------------------------------------------------- 1 | clear; clc; 2 | path_to_input='/data/crack/testresults/hed_fuse_fpn_ada_python_v1_iter_12000'; 3 | path_to_output='/data/crack/testresults/nms'; 4 | mkdir(path_to_output); 5 | iids = dir(fullfile(path_to_input, '*.mat')); 6 | for i = 1:length(iids) 7 | %edge = imread(fullfile(path_to_input, iids(i).name));\ 8 | load(fullfile(path_to_input, iids(i).name)); 9 | predmap=predmap; 10 | [Ox, Oy] = gradient2(convTri(predmap, 4)); 11 | [Oxx, ~] = gradient2(Ox); 12 | [Oxy, Oyy] = gradient2(Oy); 13 | O = mod(atan(Oyy .* sign(-Oxy) ./ (Oxx + 1e-5)), pi); 14 | predmap = edgesNmsMex(predmap, O, 2, 5, 1.01, 8); 15 | imwrite(predmap, fullfile(path_to_output, [iids(i).name(1:end-4) '.png'])); 16 | save(fullfile(path_to_output, [iids(i).name(1:end-4) '.mat']),'predmap'); 17 | end 18 | -------------------------------------------------------------------------------- /eval_tool/edges/.gitignore: -------------------------------------------------------------------------------- 1 | /BSR/ 2 | /models/ 3 | /sweeps* 4 | /boxes/ 5 | -------------------------------------------------------------------------------- /eval_tool/edges/Contents.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/Contents.m -------------------------------------------------------------------------------- /eval_tool/edges/edgeBoxes.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/edgeBoxes.m -------------------------------------------------------------------------------- /eval_tool/edges/edgesDemo.m: -------------------------------------------------------------------------------- 1 | % Demo for Structured Edge Detector (please see readme.txt first). 2 | 3 | %% set opts for training (see edgesTrain.m) 4 | opts=edgesTrain(); % default options (good settings) 5 | opts.modelDir='models/'; % model will be in models/forest 6 | opts.modelFnm='modelBsds'; % model name 7 | opts.nPos=5e5; opts.nNeg=5e5; % decrease to speedup training 8 | opts.useParfor=0; % parallelize if sufficient memory 9 | 10 | %% train edge detector (~20m/8Gb per tree, proportional to nPos/nNeg) 11 | tic, model=edgesTrain(opts); toc; % will load model if already trained 12 | 13 | %% set detection parameters (can set after training) 14 | model.opts.multiscale=0; % for top accuracy set multiscale=1 15 | model.opts.sharpen=2; % for top speed set sharpen=0 16 | model.opts.nTreesEval=4; % for top speed set nTreesEval=1 17 | model.opts.nThreads=4; % max number threads for evaluation 18 | model.opts.nms=0; % set to true to enable nms 19 | 20 | %% evaluate edge detector on BSDS500 (see edgesEval.m) 21 | if(0), edgesEval( model, 'show',1, 'name','' ); end 22 | 23 | %% detect edge and visualize results 24 | I = imread('peppers.png'); 25 | tic, E=edgesDetect(I,model); toc 26 | figure(1); im(I); figure(2); im(1-E); 27 | -------------------------------------------------------------------------------- /eval_tool/edges/privated/correspondPixels.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/correspondPixels.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/correspondPixels.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/correspondPixels.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/correspondPixels.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/correspondPixels.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/edgeBoxesMex.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/edgeBoxesMex.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/edgeBoxesMex.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/edgeBoxesMex.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/edgeBoxesMex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/edgeBoxesMex.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/edgesDetectMex.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/edgesDetectMex.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/edgesDetectMex.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/edgesDetectMex.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/edgesDetectMex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/edgesDetectMex.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/edgesNmsMex.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/edgesNmsMex.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/edgesNmsMex.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/edgesNmsMex.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/edgesNmsMex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/edgesNmsMex.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/spDetectMex.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/spDetectMex.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/spDetectMex.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/spDetectMex.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/spDetectMex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/spDetectMex.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/ucm_mean_pb.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/ucm_mean_pb.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/ucm_mean_pb.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/ucm_mean_pb.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/privated/ucm_mean_pb.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/privated/ucm_mean_pb.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/.gitignore: -------------------------------------------------------------------------------- 1 | /videos/private/*png*.* 2 | /videos/private/*jpg8c.* 3 | /detector/models/*Dets.txt 4 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/README.md: -------------------------------------------------------------------------------- 1 | Documentation: https://pdollar.github.io/toolbox/ 2 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/Contents.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/Contents.m -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/chnsCompute.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/chnsCompute.m -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/chnsPyramid.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/chnsPyramid.m -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/chnsScaling.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/chnsScaling.m -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/gradient2.m: -------------------------------------------------------------------------------- 1 | function [Gx,Gy] = gradient2( I ) 2 | % Compute numerical gradients along x and y directions. 3 | % 4 | % For 2D arrays identical to Matlab's gradient() with a spacing value of 5 | % h=1 but ~10-20x faster (due to mexed implementation). Like gradient(), 6 | % computes centered derivatives in interior of image and uncentered 7 | % derivatives along boundaries. For 3D arrays computes x and y gradient 8 | % separately for each channel and concatenates the results. 9 | % 10 | % This code requires SSE2 to compile and run (most modern Intel and AMD 11 | % processors support SSE2). Please see: http://en.wikipedia.org/wiki/SSE2. 12 | % 13 | % USAGE 14 | % [Gx,Gy] = gradient2( I ) 15 | % 16 | % INPUTS 17 | % I - [hxwxk] input k channel single image 18 | % 19 | % OUTPUTS 20 | % Gx - [hxwxk] x-gradient (horizontal) 21 | % Gy - [hxwxk] y-gradient (vertical) 22 | % 23 | % EXAMPLE 24 | % I=single(imread('peppers.png'))/255; 25 | % tic, [Gx1,Gy1]=gradient(I,1); toc 26 | % tic, [Gx2,Gy2]=gradient2(I); toc 27 | % isequal(Gx1,Gx2), isequal(Gy1,Gy2) 28 | % 29 | % See also gradient, gradientMag 30 | % 31 | % Piotr's Computer Vision Matlab Toolbox Version 3.00 32 | % Copyright 2014 Piotr Dollar & Ron Appel. [pdollar-at-gmail.com] 33 | % Licensed under the Simplified BSD License [see external/bsd.txt] 34 | 35 | [Gx,Gy]=gradientMex('gradient2',I); 36 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/gradientHist.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/gradientHist.m -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/private/convConst.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/private/convConst.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/private/convConst.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/private/convConst.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/private/convConst.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/private/convConst.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/private/gradientMex.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/private/gradientMex.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/private/gradientMex.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/private/gradientMex.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/private/gradientMex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/private/gradientMex.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/private/gradientMexNew.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/private/gradientMexNew.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/private/imPadMex.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/private/imPadMex.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/private/imPadMex.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/private/imPadMex.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/private/imPadMex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/private/imPadMex.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/private/imResampleMex.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/private/imResampleMex.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/private/imResampleMex.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/private/imResampleMex.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/private/imResampleMex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/private/imResampleMex.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/private/rgbConvertMex.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/private/rgbConvertMex.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/private/rgbConvertMex.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/private/rgbConvertMex.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/channels/private/rgbConvertMex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/channels/private/rgbConvertMex.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/classify/adaBoostTrain.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/classify/adaBoostTrain.m -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/classify/binaryTreeApply.m: -------------------------------------------------------------------------------- 1 | function hs = binaryTreeApply( X, tree, maxDepth, minWeight, nThreads ) 2 | % Apply learned binary decision tree classifier. 3 | % 4 | % USAGE 5 | % hs = binaryTreeApply( X, tree, [maxDepth], [minWeight], [nThreads] ) 6 | % 7 | % INPUTS 8 | % X - [NxF] N length F feature vectors 9 | % tree - learned tree classification model 10 | % maxDepth - [] maximum depth of tree 11 | % minWeight - [] minimum sample weigth to allow split 12 | % nThreads - [16] max number of computational threads to use 13 | % 14 | % OUTPUTS 15 | % hs - [Nx1] predicted output log ratios 16 | % 17 | % EXAMPLE 18 | % 19 | % See also binaryTreeTrain 20 | % 21 | % Piotr's Computer Vision Matlab Toolbox Version 3.40 22 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 23 | % Licensed under the Simplified BSD License [see external/bsd.txt] 24 | 25 | if(nargin<3 || isempty(maxDepth)), maxDepth=0; end 26 | if(nargin<4 || isempty(minWeight)), minWeight=0; end 27 | if(nargin<5 || isempty(nThreads)), nThreads=16; end 28 | if(maxDepth>0), tree.child(tree.depth>=maxDepth) = 0; end 29 | if(minWeight>0), tree.child(tree.weights<=minWeight) = 0; end 30 | hs = tree.hs(forestInds(X,tree.thrs,tree.fids,tree.child,nThreads)); 31 | 32 | end 33 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/classify/binaryTreeTrain.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/classify/binaryTreeTrain.m -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/classify/fernsClfApply.m: -------------------------------------------------------------------------------- 1 | function [hs,probs] = fernsClfApply( data, ferns, inds ) 2 | % Apply learned fern classifier. 3 | % 4 | % USAGE 5 | % [hs,probs] = fernsClfApply( data, ferns, [inds] ) 6 | % 7 | % INPUTS 8 | % data - [NxF] N length F binary feature vectors 9 | % ferns - learned fern classification model 10 | % inds - [NxM] cached inds (from previous call to fernsInds) 11 | % 12 | % OUTPUTS 13 | % hs - [Nx1] predicted output labels 14 | % probs - [NxH] predicted output label probabilities 15 | % 16 | % EXAMPLE 17 | % 18 | % See also fernsClfTrain, fernsInds 19 | % 20 | % Piotr's Computer Vision Matlab Toolbox Version 2.50 21 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 22 | % Licensed under the Simplified BSD License [see external/bsd.txt] 23 | if( nargin<3 || isempty(inds) ) 24 | inds = fernsInds(data,ferns.fids,ferns.thrs); end 25 | [N,M]=size(inds); H=ferns.H; probs=zeros(N,H); 26 | for m=1:M, probs = probs + ferns.pFern(inds(:,m),:,m); end 27 | if(ferns.bayes==0), probs=probs/M; end; [~,hs]=max(probs,[],2); 28 | end 29 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/classify/fernsInds.m: -------------------------------------------------------------------------------- 1 | function inds = fernsInds( data, fids, thrs ) 2 | % Compute indices for each input by each fern. 3 | % 4 | % USAGE 5 | % inds = fernsInds( data, fids, thrs ) 6 | % 7 | % INPUTS 8 | % data - [NxF] N length F binary feature vectors 9 | % fids - [MxS] feature ids for each fern for each depth 10 | % thrs - [MxS] threshold corresponding to each fid 11 | % 12 | % OUTPUTS 13 | % inds - [NxM] computed indices for each input by each fern 14 | % 15 | % EXAMPLE 16 | % 17 | % See also fernsClfTrain, fernsClfApply 18 | % 19 | % Piotr's Computer Vision Matlab Toolbox Version 2.50 20 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 21 | % Licensed under the Simplified BSD License [see external/bsd.txt] 22 | 23 | inds = fernsInds1( data, fids, thrs ); 24 | 25 | %%% OLD MATLAB CODE -- NOW IN MEX 26 | % [M,S]=size(fids); N=size(data,1); 27 | % inds = zeros(N,M,'uint32'); 28 | % for n=1:N 29 | % for m=1:M 30 | % for s=1:S 31 | % inds(n,m)=inds(n,m)*2; 32 | % if( data(n,fids(m,s)) 3 | 4 | 5 | Piotr's Matlab Toolbox 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Sorry, your browser doesn't support frames. 20 | Go to menu.html for the documentation of all 21 | the Matlab functions. 22 | 23 | 24 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/doc/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/doc/left.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/doc/linux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/doc/linux.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/doc/m2html.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: white; 3 | color: black; 4 | font-family: arial,sans-serif; 5 | margin: 0; 6 | padding: 1ex; 7 | } 8 | 9 | div.fragment { 10 | width: 98%; 11 | border: 1px solid #CCCCCC; 12 | background-color: #f5f5f5; 13 | padding-left: 4px; 14 | margin: 4px; 15 | } 16 | 17 | div.box { 18 | width: 98%; 19 | background-color: #f5f5f5; 20 | border: 1px solid #CCCCCC; 21 | color: black; 22 | padding: 4px; 23 | } 24 | 25 | .comment { 26 | color: #228B22; 27 | } 28 | .string { 29 | color: #B20000; 30 | } 31 | .keyword { 32 | color: #0000FF; 33 | } 34 | 35 | .keywordtype { color: #604020; } 36 | .keywordflow { color: #e08000; } 37 | .preprocessor { color: #806020; } 38 | .stringliteral { color: #002080; } 39 | .charliteral { color: #008080; } 40 | 41 | a { 42 | text-decoration: none; 43 | } 44 | 45 | a:hover { 46 | background-color: #006699; 47 | color:#FFFFFF; 48 | } 49 | 50 | a.code { 51 | font-weight: normal; 52 | color: #A020F0; 53 | } 54 | 55 | a.code:hover { 56 | background-color: #FF0000; 57 | color: #FFFFFF; 58 | } 59 | 60 | h1 { 61 | background: transparent; 62 | color: #006699; 63 | font-size: x-large; 64 | text-align: center; 65 | } 66 | 67 | h2 { 68 | background: transparent; 69 | color: #006699; 70 | font-size: large; 71 | } 72 | 73 | address { 74 | font-size:small; 75 | } 76 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/doc/matlabicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/doc/matlabicon.gif -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/doc/mex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/doc/mex.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/doc/new.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/doc/new.gif -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/doc/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/doc/right.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/doc/sgi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/doc/sgi.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/doc/simulinkicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/doc/simulinkicon.gif -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/doc/solaris.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/doc/solaris.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/doc/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/doc/up.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/doc/videos/imagesAlignSeq.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/doc/videos/imagesAlignSeq.html -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/doc/windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/doc/windows.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/deprecated/clfData.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/deprecated/clfData.mat -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/deprecated/clfDecTree.m: -------------------------------------------------------------------------------- 1 | function clf = clfDecTree( p, varargin ) 2 | % Wrapper for treefit that makes decision trees compatible with nfoldxval. 3 | % 4 | % USAGE 5 | % clf = clfDecTree( p, varargin ) 6 | % 7 | % INPUTS 8 | % p - data dimension 9 | % varargin- params for treefit, ex: 'splitmin'',2,'priorprob',ones(1,n)/n 10 | % 11 | % OUTPUTS 12 | % clf - model ready to be trained 13 | % 14 | % EXAMPLE 15 | % 16 | % See also NFOLDXVAL, TREEFIT, CLFDECTREEFWD, CLFDECTREETRAIN 17 | % 18 | % Piotr's Image&Video Toolbox Version 2.0 19 | % Copyright 2008 Piotr Dollar. [pdollar-at-caltech.edu] 20 | % Please email me if you find bugs, or have suggestions or questions! 21 | % Licensed under the Lesser GPL [see external/lgpl.txt] 22 | 23 | clf.p = p; 24 | clf.type = 'dectree'; 25 | clf.params = varargin; 26 | 27 | clf.funTrain = @clfDecTreeTrain; 28 | clf.funFwd = @clfDecTreeFwd; 29 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/deprecated/clfDecTreeFwd.m: -------------------------------------------------------------------------------- 1 | function Y = clfDecTreeFwd( clf, X ) 2 | % Apply the decision tree to data X. 3 | % 4 | % USAGE 5 | % Y = clfDecTreeFwd( clf, X ) 6 | % 7 | % INPUTS 8 | % clf - trained model 9 | % X - nxp data array 10 | % 11 | % OUTPUTS 12 | % Y - nx1 vector of labels predicted according to the clf 13 | % 14 | % EXAMPLE 15 | % 16 | % See also CLFDECTREE 17 | % 18 | % Piotr's Image&Video Toolbox Version 2.0 19 | % Copyright 2008 Piotr Dollar. [pdollar-at-caltech.edu] 20 | % Please email me if you find bugs, or have suggestions or questions! 21 | % Licensed under the Lesser GPL [see external/lgpl.txt] 22 | 23 | if(~strcmp(clf.type,'dectree')); error( ['incor. type: ' clf.type] ); end; 24 | if( size(X,2)~= clf.p ); error( 'Incorrect data dimension' ); end; 25 | T = clf.T; 26 | 27 | [Y,d,cnames] = treeval( T, X ); 28 | Y = str2double( cnames ); % convert Y back to an int format 29 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/deprecated/clfDecTreeTrain.m: -------------------------------------------------------------------------------- 1 | function clf = clfDecTreeTrain( clf, X, Y ) 2 | % Train a decision tree classifier. 3 | % 4 | % USAGE 5 | % clf = clfDecTreeTrain( clf, X, Y ) 6 | % 7 | % INPUTS 8 | % clf - model to be trained 9 | % X - nxp data array 10 | % Y - nx1 array of labels 11 | % 12 | % OUTPUTS 13 | % clf - a trained binary decision tree clf 14 | % 15 | % EXAMPLE 16 | % 17 | % See also CLFDECTREE 18 | % 19 | % Piotr's Image&Video Toolbox Version 2.0 20 | % Copyright 2008 Piotr Dollar. [pdollar-at-caltech.edu] 21 | % Please email me if you find bugs, or have suggestions or questions! 22 | % Licensed under the Lesser GPL [see external/lgpl.txt] 23 | 24 | if(~strcmp(clf.type,'dectree')); error( ['incor. type: ' clf.type] ); end 25 | if( size(X,2)~= clf.p ); error( 'Incorrect data dimension' ); end 26 | 27 | % apply treefit 28 | Y = int2str2( Y ); % convert Y to string format for treefit. 29 | params = clf.params; 30 | T = treefit(X,Y,'method','classification',params{:}); 31 | 32 | % apply cross validation (on training data), and prune 33 | [c,s,n,best] = treetest(T,'cross',X,Y); 34 | T = treeprune(T,'level',best); 35 | 36 | clf.T = T; 37 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/deprecated/clfEcocCode.m: -------------------------------------------------------------------------------- 1 | function [C,nbits] = clfEcocCode( k ) 2 | % Generates optimal ECOC codes when 3<=nclasses<=7. 3 | % 4 | % USAGE 5 | % [C,nbits] = clfEcocCode( k ) 6 | % 7 | % INPUTS 8 | % k - number of classes 9 | % 10 | % OUTPUTS 11 | % C - code 12 | % nbits - number of bits 13 | % 14 | % EXAMPLE 15 | % 16 | % See also CLFECOC 17 | % 18 | % Piotr's Image&Video Toolbox Version 2.0 19 | % Copyright 2008 Piotr Dollar. [pdollar-at-caltech.edu] 20 | % Please email me if you find bugs, or have suggestions or questions! 21 | % Licensed under the Lesser GPL [see external/lgpl.txt] 22 | 23 | if( k<3 || k>7 ) 24 | error( 'method only works if k is small: 3<=k<=7'); end 25 | 26 | % create C 27 | C = ones(k,2^(k-1)); 28 | for i=2:k 29 | partw = 2^(k-i); nparts = 2^(i-2); 30 | row = [zeros(1,partw) ones(1,partw)]; 31 | row = repmat( row, 1, nparts ); 32 | C(i,:) = row; 33 | end 34 | C = C(:,1:end-1); 35 | nbits = size(C,2); 36 | 37 | % alter C to have entries [-1,1] 38 | C(C==0)=-1; 39 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/deprecated/clfKnn.m: -------------------------------------------------------------------------------- 1 | function clf = clfKnn( p, k, metric ) 2 | % Create a k nearest neighbor classifier. 3 | % 4 | % USAGE 5 | % clf = clfKnn( p, k, metric ) 6 | % 7 | % INPUTS 8 | % p - data dimension 9 | % k - number of nearest neighbors to look at 10 | % metric - [] distance function, squared euclidean by default 11 | % 12 | % OUTPUTS 13 | % clf - model ready to be trained 14 | % 15 | % EXAMPLE 16 | % 17 | % See also NFOLDXVAL, CLFKNNTRAIN, CLFKNNFWD, CLFKNNDIST 18 | % 19 | % Piotr's Image&Video Toolbox Version 2.0 20 | % Copyright 2008 Piotr Dollar. [pdollar-at-caltech.edu] 21 | % Please email me if you find bugs, or have suggestions or questions! 22 | % Licensed under the Lesser GPL [see external/lgpl.txt] 23 | 24 | if( nargin<3 ); metric = []; end 25 | 26 | clf.p = p; 27 | clf.type = 'knn'; 28 | clf.k = k; 29 | clf.metric = metric; 30 | clf.funTrain = @clfKnnTrain; 31 | clf.funFwd = @clfKnnFwd; 32 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/deprecated/clfKnnFwd.m: -------------------------------------------------------------------------------- 1 | function Y = clfKnnFwd( clf, X ) 2 | % Apply a k-nearest neighbor classifier to X. 3 | % 4 | % USAGE 5 | % Y = clfKnnFwd( clf, X ) 6 | % 7 | % INPUTS 8 | % clf - trained model 9 | % X - nxp data array 10 | % 11 | % OUTPUTS 12 | % Y - nx1 vector of labels predicted according to the clf 13 | % 14 | % EXAMPLE 15 | % 16 | % See also CLFKNN, CLFKNNTRAIN 17 | % 18 | % Piotr's Image&Video Toolbox Version 2.0 19 | % Copyright 2008 Piotr Dollar. [pdollar-at-caltech.edu] 20 | % Please email me if you find bugs, or have suggestions or questions! 21 | % Licensed under the Lesser GPL [see external/lgpl.txt] 22 | 23 | if( ~strcmp(clf.type,'knn')); error( ['incorrect type: ' clf.type] ); end 24 | if( size(X,2)~= clf.p ); error( 'Incorrect data dimension' ); end 25 | 26 | metric = clf.metric; 27 | Xtrain = clf.Xtrain; 28 | Ytrain = clf.Ytrain; 29 | k = clf.k; 30 | 31 | % get nearest neighbors for each X point 32 | D = pdist2( X, Xtrain, metric ); 33 | Y = clfKnnDist( D, Ytrain, k ); 34 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/deprecated/clfKnnTrain.m: -------------------------------------------------------------------------------- 1 | function clf = clfKnnTrain( clf, X, Y ) 2 | % Train a k nearest neighbor classifier (memorization). 3 | % 4 | % USAGE 5 | % clf = clfKnnTrain( clf, X, Y ) 6 | % 7 | % INPUTS 8 | % clf - model to be trained 9 | % X - nxp data array 10 | % Y - nx1 array of labels 11 | % 12 | % OUTPUTS 13 | % clf - a trained k-nearest neighbor classifier. 14 | % 15 | % EXAMPLE 16 | % 17 | % See also CLFKNN, CLFKNNFWD 18 | % 19 | % Piotr's Image&Video Toolbox Version 2.0 20 | % Copyright 2008 Piotr Dollar. [pdollar-at-caltech.edu] 21 | % Please email me if you find bugs, or have suggestions or questions! 22 | % Licensed under the Lesser GPL [see external/lgpl.txt] 23 | 24 | if( ~strcmp(clf.type,'knn')); error( ['incorrect type: ' clf.type] ); end; 25 | if( size(X,2)~= clf.p ); error( 'Incorrect data dimension' ); end; 26 | 27 | %%% error check 28 | n=size(X,1); Y=double(Y); 29 | [Y,er] = checkNumArgs( Y, [n 1], 0, 0 ); error(er); 30 | 31 | %%% training is memorization 32 | clf.Xtrain = X; 33 | clf.Ytrain = Y; 34 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/deprecated/clfSvm.m: -------------------------------------------------------------------------------- 1 | function net = clfSvm(varargin) 2 | % Wrapper for svm that makes svm compatible with nfoldxval. 3 | % 4 | % Requires the SVM toolbox by Anton Schwaighofer. 5 | % 6 | % USAGE 7 | % net = clfSvm(varargin) 8 | % 9 | % INPUTS 10 | % see svm in SVM toolbox by Anton Schwaighofer. 11 | % 12 | % OUTPUTS 13 | % see svm in SVM toolbox by Anton Schwaighofer. 14 | % 15 | % EXAMPLE 16 | % 17 | % See also SVM, NFOLDXVAL 18 | % 19 | % Piotr's Image&Video Toolbox Version 2.0 20 | % Copyright 2008 Piotr Dollar. [pdollar-at-caltech.edu] 21 | % Please email me if you find bugs, or have suggestions or questions! 22 | % Licensed under the Lesser GPL [see external/lgpl.txt] 23 | 24 | net = svm( varargin{:} ); 25 | net.funTrain = @svmtrain; 26 | net.funFwd = @svmfwd; 27 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/deprecated/filter_gauss_1D.m: -------------------------------------------------------------------------------- 1 | % 1D Gaussian filter. 2 | % 3 | % Equivalent to (but faster then): 4 | % f = fspecial('Gaussian',[2*r+1,1],sigma); 5 | % f = filter_gauss_nD( 2*r+1, r+1, sigma^2 ); 6 | % 7 | % USAGE 8 | % f = filter_gauss_1D( r, sigma, [show] ) 9 | % 10 | % INPUTS 11 | % r - filter size=2r+1, if r=[] -> r=ceil(2.25*sigma) 12 | % sigma - standard deviation of filter 13 | % show - [0] figure to use for optional display 14 | % 15 | % OUTPUTS 16 | % f - 1D Gaussian filter 17 | % 18 | % EXAMPLE 19 | % f1 = filter_gauss_1D( 10, 2, 1 ); 20 | % f2 = filter_gauss_nD( 21, [], 2^2, 2); 21 | % 22 | % See also FILTER_BINOMIAL_1D, FILTER_GAUSS_ND, FSPECIAL 23 | 24 | % Piotr's Image&Video Toolbox Version 1.5 25 | % Written and maintained by Piotr Dollar pdollar-at-cs.ucsd.edu 26 | % Please email me if you find bugs, or have suggestions or questions! 27 | 28 | function f = filter_gauss_1D( r, sigma, show ) 29 | 30 | if( nargin<3 || isempty(show) ); show=0; end 31 | if( isempty(r) ); r = ceil(sigma*2.25); end 32 | if( mod(r,1)~=0 ); error( 'r must be an integer'); end 33 | 34 | % compute filter 35 | x = -r:r; 36 | f = exp(-(x.*x)/(2*sigma*sigma))'; 37 | f(f 9 | % $Revision: 1.0 $Date: 2003/05/05 22:19:51 $ 10 | 11 | s = ['Template Object: root ''',... 12 | tpl.root,''', ',... 13 | num2str(length(tpl.file)), ' files, ',... 14 | num2str(length(tpl.varkeys)), ' keys, ',... 15 | tpl.unknowns, ' unknowns.']; 16 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/@template/display.m: -------------------------------------------------------------------------------- 1 | function display(tpl) 2 | %TEMPLATE Display a template object in Matlab window 3 | % DISPLAY(TPL) displays informations about the content of template 4 | % object TPL: 5 | % Template Object: root '.', 2 files, 9 keys, comment unknowns. 6 | % root element of template files, number of template files, number of 7 | % keywords defined and the way of handling unknowns tags. 8 | 9 | % Copyright (C) 2003 Guillaume Flandin 10 | % $Revision: 1.0 $Date: 2003/05/05 22:19:51 $ 11 | 12 | disp(' '); 13 | disp([inputname(1),' = ']); 14 | disp(' '); 15 | for i=1:prod(size(tpl)) 16 | disp([blanks(length(inputname(1))+3) char(tpl(i))]); 17 | end 18 | disp(' '); 19 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/@template/parse.m: -------------------------------------------------------------------------------- 1 | function [tpl, str] = parse(tpl,target,handle,append) 2 | %TEMPLATE/PARSE Fill in replacement fields with the class properties 3 | % [TPL, STR] = PARSE(TPL,TARGET,HANDLE) fills in the replacement field 4 | % HANDLE using previously defined variables of template TPL and store 5 | % it in field TARGET. HANDLE can also be a cell array of field names. 6 | % Output is also provided in output STR (content of TARGET). 7 | % [TPL, STR] = PARSE(TPL,TARGET,HANDLE,APPEND) allows to specify if 8 | % TARGET field is reseted before being filled or if new content is 9 | % appended to the previous one. 10 | 11 | % Copyright (C) 2003 Guillaume Flandin 12 | % $Revision: 1.0 $Date: 2003/05/05 22:19:51 $ 13 | 14 | narginchk(3,4); 15 | if nargin == 3 16 | append = 0; 17 | end 18 | 19 | if iscellstr(handle) 20 | for i=1:length(handle) 21 | [tpl, str] = subst(tpl,handle{i}); 22 | tpl = set(tpl,'var',target,str); 23 | end 24 | elseif ischar(handle) 25 | [tpl, str] = subst(tpl,handle); 26 | if append 27 | tpl = set(tpl,'var',target,[get(tpl,'var',target) str]); 28 | else 29 | tpl = set(tpl,'var',target,str); 30 | end 31 | else 32 | error('[Template] Badly formed handle.'); 33 | end 34 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/@template/private/finish.m: -------------------------------------------------------------------------------- 1 | function str = finish(str,unknowns) 2 | %TEMPLATE/FINISH Apply given strategy to unknown fields in a string 3 | % STR = FINISH(STR,UNKNOWNS) applies on string STR the strategy defined 4 | % in UNKNOWNS to unknowns fields '{UNKNOWNS_FIELDS}'. 5 | % UNKNOWNS may be: 6 | % * 'keep' to do nothing 7 | % * 'remove' to remove all undefined fields 8 | % * 'comment' to replace undefined fields by a warning HTML comment. 9 | % This function uses Matlab REGEXPREP function coming with R13. If you 10 | % hold an older version, please comment lines 38 and 42: then you can 11 | % only apply the 'keep' strategy. 12 | 13 | % Copyright (C) 2003 Guillaume Flandin 14 | % $Revision: 1.0 $Date: 2003/05/05 22:19:51 $ 15 | 16 | narginchk(2,2); 17 | 18 | switch lower(unknowns) 19 | case 'keep' 20 | %- do nothing 21 | case 'remove' 22 | %%%%%%%%%%%%%%%%%%%%%%%% WIH REGEXP ONLY %%%%%%%%%%%%%%%%%%%% 23 | % str = regexprep(str,'{[^ \t\r\n}]+}',''); 24 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 25 | case 'comment' 26 | %%%%%%%%%%%%%%%%%%%%%%%% WIH REGEXP ONLY %%%%%%%%%%%%%%%%%%%% 27 | % str = regexprep(str,'{[^ \t\r\n}]+}',''); 28 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 29 | otherwise 30 | error('[Template] Unknown action.'); 31 | end 32 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/@template/private/loadtpl.m: -------------------------------------------------------------------------------- 1 | function tpl = loadtpl(tpl,handle) 2 | %TEMPLATE/LOADTPL Read a template from file 3 | % TPL = LOADTPL(TPL,HANDLE) read the template file associated with the 4 | % handle HANDLE in the template TPL and store it in the variable HANDLE. 5 | 6 | % Copyright (C) 2003 Guillaume Flandin 7 | % $Revision: 1.0 $Date: 2003/05/05 22:19:51 $ 8 | 9 | if ~isempty(get(tpl,'var',handle)) 10 | return; 11 | else 12 | ind = find(ismember(tpl.handles,handle)); 13 | if isempty(ind) 14 | error('[Template] No such template handle.'); 15 | else 16 | filename = tpl.file{ind}; 17 | [fid, errmsg] = fopen(filename,'rt'); 18 | if ~isempty(errmsg) 19 | error(sprintf('Cannot open template file %s.',filename)); 20 | end 21 | tpl = set(tpl,'var',handle,fscanf(fid,'%c')); 22 | fclose(fid); 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/@template/private/subst.m: -------------------------------------------------------------------------------- 1 | function [tpl, str] = subst(tpl,handle) 2 | %TEMPLATE/SUBST Substitute a replacement field by its value 3 | % STR = SUBST(TPL,HANDLE) substitute all the known fields of variable HANDLE 4 | % in the template TPL. 5 | 6 | % Copyright (C) 2003 Guillaume Flandin 7 | % $Revision: 1.0 $Date: 2003/05/05 22:19:51 $ 8 | 9 | tpl = loadtpl(tpl,handle); 10 | 11 | str = get(tpl,'var',handle); 12 | for i=1:length(tpl.varkeys) 13 | str = strrep(str, strcat('{',tpl.varkeys{i},'}'), tpl.varvals{i}); 14 | end 15 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/Contents.m: -------------------------------------------------------------------------------- 1 | % M2HTML Toolbox - A Documentation Generator for Matlab in HTML 2 | % Version 1.4 16-Jun-2004 3 | % 4 | % M2HTML main functions. 5 | % m2html - Documentation System for Matlab M-files in HTML. 6 | % mdot - Wrapper to GraphViz's for dependency graphs. 7 | % mwizard - Graphical user interface for m2html. 8 | % private - Internal functions. 9 | % 10 | % Template toolbox. 11 | % @template - HTML template class 12 | % 13 | % Templates files. 14 | % templates/blue - Default HTML template. 15 | % templates/frame - Identical to but using frames. 16 | % 17 | % Others. 18 | % Changelog, GPL, INSTALL, LICENSE, README, TODO. 19 | 20 | % Copyright (C) 2003-2005 Guillaume Flandin 21 | % $Revision: 1.4 $Date: 2004/06/16 12:45:24 $ 22 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/INSTALL: -------------------------------------------------------------------------------- 1 | M2HTML - Documentation System for Matlab .m files in HTML 2 | ========================================================= 3 | 4 | 0/ Requirements: 5 | - Matlab 5.3 or above 6 | - Operating system: any. 7 | 8 | 1/ Download the latest m2html.zip on this website: 9 | 10 | 11 | 2/ Extract files in your Matlab Repository /home/foo/matlab/ : 12 | unzip m2html.zip 13 | 14 | 3/ Add the m2html directory in your Matlab path: 15 | addpath /home/foo/matlab/m2html/ 16 | 17 | 5/ Ready to use ! 18 | help m2html 19 | 20 | Please read the README file. 21 | A tutorial and a FAQ (Frequently Asked Questions) are available online at: 22 | 23 | 24 | 25 | If you want to generate dependency graphs, you need to install GraphViz (a 26 | graph visualization software), free and cross-platform, from: 27 | 28 | 29 | ------------------------------------------------------------------------------- 30 | Matlab is a Registered Trademark of The Mathworks, Inc. 31 | 32 | Copyright (C) 2003-2005 Guillaume Flandin 33 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/LICENSE: -------------------------------------------------------------------------------- 1 | M2HTML - Documentation System for Matlab .m files in HTML 2 | Copyright (C) 2003-2005 Guillaume Flandin 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation Inc, 59 Temple Pl. - Suite 330, Boston, MA 02111-1307, USA. 17 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/mwizard.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/mwizard.m -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/mwizard2.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/mwizard2.m -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/private/m2htmltoolbarimages.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/private/m2htmltoolbarimages.mat -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/private/mexexts.m: -------------------------------------------------------------------------------- 1 | function [ext, platform] = mexexts 2 | %MEXEXTS List of Mex files extensions 3 | % MEXEXTS returns a cell array containing the Mex files platform 4 | % dependent extensions and another cell array containing the full names 5 | % of the corresponding platforms. 6 | % 7 | % See also MEX, MEXEXT 8 | 9 | % Copyright (C) 2003 Guillaume Flandin 10 | % $Revision: 1.0 $Date: 2003/29/04 17:33:43 $ 11 | 12 | ext = {'.mexsol' '.mexhpux' '.mexhp7' '.mexrs6' '.mexsg' '.mexaxp' '.mexglx' ... 13 | '.mexlx' '.dll'}; 14 | 15 | platform = {'SunOS' 'HP' 'HP700' 'IBM' 'SGI' 'Alpha' 'Linux x86' 'Linux' 'Windows'}; 16 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/private/openfile.m: -------------------------------------------------------------------------------- 1 | function fid = openfile(filename,permission) 2 | %OPENFILE Open a file in read/write mode, catching errors 3 | % FID = OPENFILE(FILENAME,PERMISSION) opens file FILENAME 4 | % in PERMISSION mode ('r' or 'w') and return a file identifier FID. 5 | % File is opened in text mode: no effect on Unix but useful on Windows. 6 | 7 | % Copyright (C) 2004 Guillaume Flandin 8 | % $Revision: 1.1 $Date: 2004/05/05 17:14:09 $ 9 | 10 | [fid, errmsg] = fopen(filename,[permission 't']); 11 | if ~isempty(errmsg) 12 | switch permission 13 | case 'r' 14 | error(sprintf('Cannot open %s in read mode.',filename)); 15 | case 'w' 16 | error(sprintf('Cannot open %s in write mode.',filename)); 17 | otherwise 18 | error(errmsg); 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/Thumbs.db -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/alpha.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/c++.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/c++.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/c.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/demoicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/demoicon.gif -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/down.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/fortran.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/fortran.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/hp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/hp.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/left.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/linux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/linux.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/matlabicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/matlabicon.gif -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/mex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/mex.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/pcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/pcode.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/right.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/search.tpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Matlab Search Engine 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

Search Engine

16 | 17 | 21 | 22 | 26 | 27 |
Generated on {DATE} by m2html © 2005
28 | 29 | 30 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/sgi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/sgi.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/simulinkicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/simulinkicon.gif -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/solaris.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/solaris.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/up.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/blue/windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/blue/windows.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/alpha.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/brain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/brain.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/c++.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/c++.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/c.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/demoicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/demoicon.gif -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/down.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/fortran.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/fortran.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/graph.tpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Dependency Graph for {MDIR} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

Dependency Graph for {MDIR}

16 | 17 |
18 | Dependency Graph for {MDIR} 19 | 20 | {GRAPH_MAP} 21 | 22 |
23 | 24 |
Generated by m2html © 2005
25 | 26 | 27 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/hp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/hp.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Matlab Documentation by M2HTML 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | This is a Matlab Documentation by M2HTML.
19 | Go to menu.html for the documentation of all 20 | the Matlab functions. 21 |
22 | 23 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/left.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/linux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/linux.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/matlabicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/matlabicon.gif -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/mex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/mex.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/pcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/pcode.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/right.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/search.tpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Matlab Search Engine 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

Search Engine

16 | 17 | 21 | 22 | 26 | 27 |
Generated on {DATE} by m2html © 2005
28 | 29 | 30 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/sgi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/sgi.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/simulinkicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/simulinkicon.gif -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/solaris.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/solaris.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/todo.tpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | To Do List for {MDIR} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
^ Master index ^
16 |

TODO list for {MDIR}

17 | 18 |

{MFILE}:

19 | 24 | 25 |
Generated by m2html © 2005
26 | 27 | 28 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/up.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/brain/windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/brain/windows.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/alpha.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/c++.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/c++.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/c.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/demoicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/demoicon.gif -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/down.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/favicon.ico -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/fortran.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/fortran.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/graph.tpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Dependency Graph for {MDIR} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

Dependency Graph for {MDIR}

16 | 17 |
18 | Dependency Graph for {MDIR} 19 | 20 | {GRAPH_MAP} 21 | 22 |
23 | 24 |
Generated by m2html © 2003
25 | 26 | 27 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/hp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/hp.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Piotr's Matlab Toolbox 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Sorry, your browser doesn't support frames. 20 | Go to menu.html for the documentation of all 21 | the Matlab functions. 22 | 23 | 24 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/left.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/linux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/linux.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/m2html.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: white; 3 | color: black; 4 | font-family: arial,sans-serif; 5 | margin: 0; 6 | padding: 1ex; 7 | } 8 | 9 | div.fragment { 10 | width: 98%; 11 | border: 1px solid #CCCCCC; 12 | background-color: #f5f5f5; 13 | padding-left: 4px; 14 | margin: 4px; 15 | } 16 | 17 | div.box { 18 | width: 98%; 19 | background-color: #f5f5f5; 20 | border: 1px solid #CCCCCC; 21 | color: black; 22 | padding: 4px; 23 | } 24 | 25 | .comment { 26 | color: #228B22; 27 | } 28 | .string { 29 | color: #B20000; 30 | } 31 | .keyword { 32 | color: #0000FF; 33 | } 34 | 35 | .keywordtype { color: #604020; } 36 | .keywordflow { color: #e08000; } 37 | .preprocessor { color: #806020; } 38 | .stringliteral { color: #002080; } 39 | .charliteral { color: #008080; } 40 | 41 | a { 42 | text-decoration: none; 43 | } 44 | 45 | a:hover { 46 | background-color: #006699; 47 | color:#FFFFFF; 48 | } 49 | 50 | a.code { 51 | font-weight: normal; 52 | color: #A020F0; 53 | } 54 | 55 | a.code:hover { 56 | background-color: #FF0000; 57 | color: #FFFFFF; 58 | } 59 | 60 | h1 { 61 | background: transparent; 62 | color: #006699; 63 | font-size: x-large; 64 | text-align: center; 65 | } 66 | 67 | h2 { 68 | background: transparent; 69 | color: #006699; 70 | font-size: large; 71 | } 72 | 73 | address { 74 | font-size:small; 75 | } 76 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/matlabicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/matlabicon.gif -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/mex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/mex.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/new.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/new.gif -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/right.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/sgi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/sgi.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/simulinkicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/simulinkicon.gif -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/solaris.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/solaris.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/todo.tpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | To Do List for {MDIR} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
^ Master index ^
16 |

TODO list for {MDIR}

17 | 18 |

{MFILE}:

19 | 24 | 25 |
Generated by m2html © 2003
26 | 27 | 28 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/up.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame-piotr/windows.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/alpha.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/c++.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/c++.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/c.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/demoicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/demoicon.gif -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/down.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/fortran.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/fortran.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/graph.tpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Dependency Graph for {MDIR} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

Dependency Graph for {MDIR}

16 | 17 |
18 | Dependency Graph for {MDIR} 19 | 20 | {GRAPH_MAP} 21 | 22 |
23 | 24 |
Generated by m2html © 2005
25 | 26 | 27 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/hp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/hp.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Matlab Documentation by M2HTML 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | This is a Matlab Documentation by M2HTML.
19 | Go to menu.html for the documentation of all 20 | the Matlab functions. 21 |
22 | 23 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/left.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/linux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/linux.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/matlabicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/matlabicon.gif -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/mex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/mex.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/pcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/pcode.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/right.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/search.tpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Matlab Search Engine 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

Search Engine

16 | 17 | 21 | 22 | 26 | 27 |
Generated on {DATE} by m2html © 2005
28 | 29 | 30 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/sgi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/sgi.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/simulinkicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/simulinkicon.gif -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/solaris.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/solaris.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/todo.tpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | To Do List for {MDIR} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
^ Master index ^
16 |

TODO list for {MDIR}

17 | 18 |

{MFILE}:

19 | 24 | 25 |
Generated by m2html © 2005
26 | 27 | 28 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/up.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/m2html/templates/frame/windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/m2html/templates/frame/windows.png -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/external/other/multiprod.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/external/other/multiprod.m -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/filters/Contents.m: -------------------------------------------------------------------------------- 1 | % FILTERS 2 | % See also 3 | % 4 | % Filters: 5 | % filterBinomial1d - 1D binomial filter (approximation to Gaussian filter) 6 | % filterDog2d - Difference of Gaussian (Dog) Filter. 7 | % filterDoog - n-dim difference of offset Gaussian DooG filter (Gaussian derivative). 8 | % filterGabor1d - Creates an even/odd pair of 1D Gabor filters. 9 | % filterGabor2d - Creates an even/odd pair of 2D Gabor filters. 10 | % filterGauss - n-dimensional Gaussian filter. 11 | % filterSteerable - Steerable 2D Gaussian derivative filter (for visualization). 12 | % filterVisualize - Used to visualize a 1D/2D/3D filter. 13 | % 14 | % Operations involving a set of filters (a filter bank or FB): 15 | % FbApply2d - Applies each of the filters in the filterbank FB to the image I. 16 | % FbCrop - Crop a 2D filterbank (adjusting filter norms). 17 | % FbMake - Various 1D/2D/3D filterbanks (hardcoded). 18 | % FbReconstruct2d - Use to see how much image information is preserved in filter outputs. 19 | % FbVisualize - Used to visualize a series of 1D/2D/3D filters. 20 | % 21 | % Simple nonlinear filters: 22 | % medfilt1m - One-dimensional adaptive median filtering with missing values. 23 | % modefilt1 - One-dimensional mode filtering. 24 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/filters/FbCrop.m: -------------------------------------------------------------------------------- 1 | function FBC = FbCrop( FB, delta ) 2 | % Crop a 2D filterbank (adjusting filter norms). 3 | % 4 | % Takes a filter bank and crops it by cropping off delta pixels from each 5 | % side. Ensures that the mean response of each filter is 0 and that the L1 6 | % norm is 1, i.e. sum(sum(abs(F)))==1. 7 | % 8 | % USAGE 9 | % FBC = FbCrop( FB, delta ) 10 | % 11 | % INPUTS 12 | % FB - original filterbank 13 | % delta - amount to crop by 14 | % 15 | % OUTPUTS 16 | % FBC - cropped filterbank 17 | % 18 | % EXAMPLE 19 | % load FbDoG.mat; FBC=FbCrop(FB,4); 20 | % figure(1); montage2(FB,struct('extraInfo',1)); 21 | % figure(2); montage2(FBC,struct('extraInfo',1)); 22 | % 23 | % See also FBAPPLY2D 24 | % 25 | % Piotr's Computer Vision Matlab Toolbox Version 2.0 26 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 27 | % Licensed under the Simplified BSD License [see external/bsd.txt] 28 | 29 | nd = ndims(FB); 30 | if( nd~=2 && nd~=3 ); error('I must an MxNxK array'); end 31 | 32 | cropsiz = size(FB); 33 | cropsiz = [cropsiz(1:2)-2*delta, cropsiz(3)]; 34 | FBC = arrayToDims( FB, cropsiz ); 35 | 36 | for f=1:size(FB,3) 37 | FC = FBC(:,:,f); 38 | FC = FC - sum(sum(FC)) / numel(FC); % 0 mean 39 | FC = FC / sum(sum(abs(FC))); % L1 norm == 1 40 | FBC(:,:,f) = FC; 41 | end 42 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/filters/FbDoG.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/filters/FbDoG.mat -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/filters/FbGabor.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/filters/FbGabor.mat -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/filters/filterBinomial1d.m: -------------------------------------------------------------------------------- 1 | function f = filterBinomial1d( r, show ) 2 | % 1D binomial filter (approximation to Gaussian filter) 3 | % 4 | % Creates a binomial filter of size 2*r+1 x 1. This can be used to 5 | % approximate the Gaussian distribution with sigma=sqrt((2*r+1)/4). For 6 | % large r, should give same output as: 7 | % g = fspecial( 'Gaussian', [2*r+1,1],sqrt((2*r+1)/4) ); 8 | % Given sigma, use r ~= 2*sigma^2. 9 | % 10 | % Use F = f*f' to get the equivalent 2d filter. 11 | % 12 | % USAGE 13 | % f = filterBinomial1d( r, [show] ) 14 | % 15 | % INPUTS 16 | % r - mask will have length 2r+1 and var=(2*r+1)/4 17 | % show - [0] figure to use for optional display 18 | % 19 | % OUTPUTS 20 | % f - 1D binomial filter 21 | % 22 | % EXAMPLE 23 | % r = 10; 24 | % fbinom = filterBinomial1d( r, 1 ); 25 | % fgauss = filterGauss( 2*r+1, [], (2*r+1)/4, 2); 26 | % 27 | % See also FILTERGAUSS 28 | % 29 | % Piotr's Computer Vision Matlab Toolbox Version 2.0 30 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 31 | % Licensed under the Simplified BSD License [see external/bsd.txt] 32 | 33 | if( nargin<2 ); show=0; end; 34 | if( mod(r,1)~=0 ); error( 'r must be an integer'); end; 35 | 36 | f = diag(fliplr(pascal(2*r+1))) / 4^r; 37 | 38 | % display 39 | if(show); filterVisualize( f, show ); end; 40 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/filters/filterSteerable.m: -------------------------------------------------------------------------------- 1 | function filterSteerable( theta ) 2 | % Steerable 2D Gaussian derivative filter (for visualization). 3 | % 4 | % This function is a demonstration of steerable filters. The directional 5 | % derivative of G in an arbitrary direction theta can be found by taking a 6 | % linear combination of the directional derivatives dxG and dyG. 7 | % 8 | % USAGE 9 | % filterSteerable( theta ) 10 | % 11 | % INPUTS 12 | % theta - orientation in radians 13 | % 14 | % OUTPUTS 15 | % 16 | % EXAMPLE 17 | % filterSteerable( pi/4 ); 18 | % 19 | % See also filterGauss 20 | % 21 | % Piotr's Computer Vision Matlab Toolbox Version 2.0 22 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 23 | % Licensed under the Simplified BSD License [see external/bsd.txt] 24 | 25 | % Get G 26 | [x,y]=meshgrid(-1:.1:1, -1:.1:1 ); 27 | r = sqrt( x.^2 + y.^2 ); 28 | G = exp( -r .* r *2 ); 29 | 30 | % get first derivatives of G. note: d/dx(G)=-2x*G 31 | phi = atan2( y, x ); 32 | dxG = r .* cos(phi) .* G; 33 | dyG = r .* sin(phi) .* G; 34 | 35 | % get directional derivative by taking linear comb in theta 36 | Gtheta = cos(theta)*dxG + sin(theta)*dyG; 37 | 38 | % dislpay (scale for visualization purposes) 39 | GS = cat(3,G,dxG*2,dyG*2,Gtheta*2); 40 | figure(1); montage2( GS ); 41 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/images.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/images/images.mat -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/movieToImages.m: -------------------------------------------------------------------------------- 1 | function I = movieToImages( M ) 2 | % Creates a stack of images from a matlab movie M. 3 | % 4 | % Repeatedly calls frame2im. Useful for playback with playMovie. 5 | % 6 | % USAGE 7 | % I = movieToImages( M ) 8 | % 9 | % INPUTS 10 | % M - a matlab movie 11 | % 12 | % OUTPUTS 13 | % I - MxNxT array (of images) 14 | % 15 | % EXAMPLE 16 | % load( 'images.mat' ); [X,map]=gray2ind(video(:,:,1)); 17 | % M = fevalArrays( video, @(x) im2frame(gray2ind(x),map) ); 18 | % I = movieToImages(M); playMovie(I); 19 | % 20 | % See also PLAYMOVIE 21 | % 22 | % Piotr's Computer Vision Matlab Toolbox Version 2.0 23 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 24 | % Licensed under the Simplified BSD License [see external/bsd.txt] 25 | 26 | I = fevalArrays( M, @frame2Ii ); 27 | 28 | function I = frame2Ii( F ) 29 | 30 | [I,map] = frame2im( F ); 31 | if( isempty(map) ) 32 | if( size(I,3)==3 ) 33 | classname = class( I ); 34 | I = sum(I,3)/3; 35 | I = feval( classname, I ); 36 | end 37 | else 38 | I = ind2gray( I, map ); 39 | end 40 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/private/assignToBins1.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/images/private/assignToBins1.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/private/assignToBins1.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/images/private/assignToBins1.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/private/assignToBins1.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/images/private/assignToBins1.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/private/histc2c.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/images/private/histc2c.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/private/histc2c.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/images/private/histc2c.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/private/histc2c.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/images/private/histc2c.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/private/imtransform2_c.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/images/private/imtransform2_c.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/private/imtransform2_c.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/images/private/imtransform2_c.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/private/imtransform2_c.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/images/private/imtransform2_c.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/private/nlfiltersep_max.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/images/private/nlfiltersep_max.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/private/nlfiltersep_max.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/images/private/nlfiltersep_max.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/private/nlfiltersep_max.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/images/private/nlfiltersep_max.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/private/nlfiltersep_sum.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/images/private/nlfiltersep_sum.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/private/nlfiltersep_sum.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/images/private/nlfiltersep_sum.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/images/private/nlfiltersep_sum.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/images/private/nlfiltersep_sum.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/c.m: -------------------------------------------------------------------------------- 1 | % clc - clear command window. 2 | % 3 | % USAGE 4 | % c 5 | % 6 | % INPUTS 7 | % 8 | % OUTPUTS 9 | % 10 | % EXAMPLE 11 | % 12 | % See also CLC, CC, CCC 13 | % 14 | % Piotr's Computer Vision Matlab Toolbox Version 1.5 15 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 16 | % Licensed under the Simplified BSD License [see external/bsd.txt] 17 | 18 | clc 19 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/cc.m: -------------------------------------------------------------------------------- 1 | % close all, clc 2 | % 3 | % USAGE 4 | % cc 5 | % 6 | % INPUTS 7 | % 8 | % OUTPUTS 9 | % 10 | % EXAMPLE 11 | % 12 | % See also C, CCC 13 | % 14 | % Piotr's Computer Vision Matlab Toolbox Version 1.5 15 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 16 | % Licensed under the Simplified BSD License [see external/bsd.txt] 17 | 18 | close all; clc 19 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/ccc.m: -------------------------------------------------------------------------------- 1 | % clear, close all, clc, clear global 2 | % 3 | % USAGE 4 | % ccc 5 | % 6 | % INPUTS 7 | % 8 | % OUTPUTS 9 | % 10 | % EXAMPLE 11 | % 12 | % See also C, CC 13 | % 14 | % Piotr's Computer Vision Matlab Toolbox Version 1.5 15 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 16 | % Licensed under the Simplified BSD License [see external/bsd.txt] 17 | 18 | clear; close all; clc; clear all; 19 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/dijkstra.m: -------------------------------------------------------------------------------- 1 | function [D,P] = dijkstra( G, varargin ) 2 | % Runs Dijkstra's shortest path algorithm on a distance matrix. 3 | % 4 | % Runs Dijkstra's on the given SPARSE nxn distance matrix G, where missing 5 | % values mean no edge (infinite distance). Uses a Finonacci heap resulting 6 | % in fast computation. Finds the shortest path distance from every point 7 | % S(i) in the 1xp source vector S to every other point j, resulting in a 8 | % pxn distance matrix D. P(i,j) contains the second to last node on the 9 | % path from S(i) to j. If point j is not reachable from point S(i) then 10 | % D(i,j)=inf and P(i,j)=-1. 11 | % 12 | % USAGE 13 | % [D P] = dijkstra( G, [S] ) 14 | % 15 | % INPUT 16 | % G - sparse nxn distance matrix 17 | % S - 1xp array of source indices i 18 | % 19 | % OUPUT 20 | % D - pxn - shortest path lengths from S(i) to j 21 | % P - pxn - indicies of second to last node on path from S(i) to j 22 | % 23 | % EXAMPLE 24 | % n=11; G=sparse(n,n); for i=1:n-1, G(i,i+1)=1; end; G=G+G'; 25 | % [D,P] = dijkstra(G,5), % D=[4:-1:0 1:6]; P=[2:5 -1 5:10]; 26 | % 27 | % See also 28 | % 29 | % Piotr's Computer Vision Matlab Toolbox Version 3.20 30 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 31 | % Licensed under the Simplified BSD License [see external/bsd.txt] 32 | 33 | [D,P] = dijkstra1( G, varargin{:} ); 34 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/diskFill.m: -------------------------------------------------------------------------------- 1 | function diskFill( tDir, nGig ) 2 | % Fill a harddisk with garbage files (useful before discarding disk). 3 | % 4 | % USAGE 5 | % diskFill( tDir, nGig ) 6 | % 7 | % INPUTS 8 | % tDir - target directory to fill with garbage 9 | % nGig - maximum number of gigabytes to write to disk 10 | % 11 | % OUTPUTS 12 | % 13 | % EXAMPLE 14 | % diskFill( 'k:', 500 ) 15 | % 16 | % See also 17 | % 18 | % Piotr's Computer Vision Matlab Toolbox Version 2.61 19 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 20 | % Licensed under the Simplified BSD License [see external/bsd.txt] 21 | 22 | nm = sprintf('%s/garbage_%s_%05i_%%05i.mat',tDir,date,round(rand*10^5)); 23 | tid = ticStatus(); 24 | for i=1:nGig 25 | % write up to 1 GB of garbage bytes in chunks of 1 MB 26 | fid=fopen(sprintf(nm,i),'w'); mb=2^20; n=0; o=mb; 27 | while(n<2^30 && o==mb), o=fwrite(fid,rand(mb,1)); n=n+o; end 28 | try fclose(fid); catch, end; tocStatus( tid, i/nGig ); %#ok 29 | % if write failed (k<1), disk is presumably full 30 | if( o 22 | f=fopen([jobId '-done'],'w'); fclose(f); 23 | end 24 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/figureResized.m: -------------------------------------------------------------------------------- 1 | function varargout = figureResized( screenratio, varargin ) 2 | % Creates a figures that takes up certain area of screen. 3 | % 4 | % Almost same as figure, except get to specify what fraction of available 5 | % screen space figure should take up. Figure appears in center of screen. 6 | % 7 | % USAGE 8 | % varargout = figureResized( screenratio, varargin ) 9 | % 10 | % INPUTS 11 | % screenratio - controls fraction of screen image takes out (<=.8) 12 | % varargin - parameters to figure 13 | % 14 | % OUTPUTS 15 | % varargout - out from figure 16 | % 17 | % EXAMPLE 18 | % figureResized( .75 ) 19 | % 20 | % See also FIGURE 21 | % 22 | % Piotr's Computer Vision Matlab Toolbox Version 2.0 23 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 24 | % Licensed under the Simplified BSD License [see external/bsd.txt] 25 | 26 | if( nargin<1 ); screenratio=.3; end 27 | if( screenratio>1 ); error('screenratio must be <= 1'); end 28 | 29 | % call figure 30 | h = figure( varargin{:} ); 31 | if( nargout ); varargout = {h}; end; 32 | 33 | % get dimensions of screen and what want figure to be 34 | units = get(0,'Units'); 35 | ss = get(0,'ScreenSize'); 36 | st = (1 - screenratio)/2; 37 | pos = [st*ss(3), st*ss(4), screenratio*ss(3), screenratio*ss(4)]; 38 | 39 | % set dimensions of figure 40 | set( h, 'Units', units ); 41 | set( h, 'Position', pos ); 42 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/ind2sub2.m: -------------------------------------------------------------------------------- 1 | function sub = ind2sub2( siz, ind ) 2 | % Improved version of ind2sub. 3 | % 4 | % Almost the same as ind2sub, except always returns only a single output 5 | % that contains all the index locations. Also handles multiple linear 6 | % indicies at the same time. See help for ind2sub for more info. 7 | % 8 | % USAGE 9 | % sub = ind2sub2( siz, ind ) 10 | % 11 | % INPUTS 12 | % siz - size of array into which ind is an index 13 | % ind - linear index (or vector of indicies) into given array 14 | % 15 | % OUTPUTS 16 | % sub - sub(i,:) is the ith set of subscripts into the array. 17 | % 18 | % EXAMPLE 19 | % sub = ind2sub2( [10,10], 20 ) % 10 2 20 | % sub = ind2sub2( [10,10], [20 19] ) % 10 2; 9 2 21 | % 22 | % See also IND2SUB, SUB2IND2 23 | % 24 | % Piotr's Computer Vision Matlab Toolbox Version 2.0 25 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 26 | % Licensed under the Simplified BSD License [see external/bsd.txt] 27 | 28 | if( any(ind>prod(siz)) ); error('index out of range'); end 29 | 30 | % taken almost directly from ind2sub.m 31 | ind = ind(:); 32 | nd = length(siz); 33 | k = [1 cumprod(siz(1:end-1))]; 34 | ind = ind - 1; 35 | sub = zeros(length(ind),nd); 36 | for i = nd:-1:1 37 | sub(:,i) = floor(ind/k(i))+1; 38 | ind = rem(ind,k(i)); 39 | end 40 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/num2strs.m: -------------------------------------------------------------------------------- 1 | function Y = num2strs( X, varargin ) 2 | % Applies num2str to each element of an array X. 3 | % 4 | % USAGE 5 | % Y = num2strs( X, [varargin] ) 6 | % 7 | % INPUTS 8 | % X - array of number to convert to strings 9 | % varargin - [] additional input to num2str 10 | % 11 | % OUTPUTS 12 | % Y - cell array of strings 13 | % 14 | % EXAMPLE 15 | % Y = num2strs( [1.3 2.6; 3 11] ) 16 | % 17 | % See also NUM2STR 18 | % 19 | % Piotr's Computer Vision Matlab Toolbox Version 1.5 20 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 21 | % Licensed under the Simplified BSD License [see external/bsd.txt] 22 | 23 | Y = cell(size(X)); 24 | for i=1:numel(X) 25 | Y{i} = num2str( X(i), varargin{:} ); 26 | end 27 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/plotGaussEllipses.m: -------------------------------------------------------------------------------- 1 | function hs = plotGaussEllipses( mus, Cs, rad ) 2 | % Plots 2D ellipses derived from 2D Gaussians specified by mus & Cs. 3 | % 4 | % USAGE 5 | % hs = plotGaussEllipses( mus, Cs, [rad] ) 6 | % 7 | % INPUTS 8 | % mus - k x 2 matrix of means 9 | % Cs - 2 x 2 x k covariance matricies 10 | % rad - [2] Number of std to create the ellipse to 11 | % 12 | % OUTPUTS 13 | % hs - handles to ellipses 14 | % 15 | % EXAMPLE 16 | % plotGaussEllipses( [ 10 10; 10 10 ], cat(3,eye(2),eye(2)*2) ); 17 | % 18 | % See also PLOTELLIPSE, GAUSS2ELLIPSE 19 | % 20 | % Piotr's Computer Vision Matlab Toolbox Version 2.0 21 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 22 | % Licensed under the Simplified BSD License [see external/bsd.txt] 23 | 24 | if (nargin<3 || isempty(rad) ); rad=2; end 25 | colors = ['b', 'g', 'r', 'c', 'm', 'y', 'k']; nc = length(colors); 26 | 27 | washeld = ishold; if (~washeld); hold('on'); end 28 | hs = zeros( size(mus,1),1 ); 29 | for i=1:size( mus,1) 30 | [ cRow, ccol, ra, rb, phi ] = gauss2ellipse( mus(i,:), Cs(:,:,i), rad ); 31 | hs(i)=plotEllipse( cRow, ccol, ra, rb, phi, colors( mod(i-1,nc)+1) ); 32 | end 33 | if (~washeld); hold('off'); end 34 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/private/char2img_h015.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/matlab/private/char2img_h015.mat -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/private/char2img_h020.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/matlab/private/char2img_h020.mat -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/private/char2img_h025.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/matlab/private/char2img_h025.mat -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/private/char2img_h030.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/matlab/private/char2img_h030.mat -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/private/char2img_h035.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/matlab/private/char2img_h035.mat -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/private/char2img_h050.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/matlab/private/char2img_h050.mat -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/private/dijkstra1.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/matlab/private/dijkstra1.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/private/dijkstra1.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/matlab/private/dijkstra1.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/private/dijkstra1.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/matlab/private/dijkstra1.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/randSample.m: -------------------------------------------------------------------------------- 1 | function r = randSample( n, k, isArray ) 2 | % Generate values sampled uniformly without replacement from 1:n. 3 | % 4 | % If n is an integer, samples k values from 1:n without replacement. If n 5 | % is an array, samples k values without replacement from n. This function 6 | % implements much of the same functionality as randsample.m in the 7 | % Statistics Toolbox. 8 | % 9 | % USAGE 10 | % r = randSample( n, k, [isArray] ) 11 | % 12 | % INPUTS 13 | % n - specifies sampling source (if array) or range (if scalar) 14 | % k - the number of samples to draw 15 | % isArray - [0] if true treat n as an array (even if has single elt) 16 | % 17 | % OUTPUTS 18 | % r - k uniformly generated random samples 19 | % 20 | % EXAMPLE 21 | % r = randSample( 10, 5 ) 22 | % r = randSample( [ 5 6 8 9 32 45 ], 2 ) 23 | % 24 | % See also randperm 25 | % 26 | % Piotr's Computer Vision Matlab Toolbox Version 2.50 27 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 28 | % Licensed under the Simplified BSD License [see external/bsd.txt] 29 | 30 | if( nargin<3 ), isArray=0; end 31 | m=length(n); if(m>1), isArray=1; elseif(isArray==0), m=n; end 32 | if(k>m), error('Too many samples requested.'); end 33 | if(k==1), r=1+floor(m*rand); else r=randperm(m); r=r(1:k); end 34 | if(isArray), r=n(r); end 35 | 36 | end 37 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/randint2.m: -------------------------------------------------------------------------------- 1 | function R = randint2( m, n, range ) 2 | % Faster but restricted version of randint. 3 | % 4 | % Generate matrix of uniformly distributed random integers. 5 | % R=randint2(m,n,range) generates an m-by-n matrix of random integers 6 | % between [range(1), range(2)]. Note that randint is part of the 7 | % 'Communications Toolbox' and may not be available on all systems. 8 | % 9 | % To test speed: 10 | % tic, for i=1:1000; R = randint( 100, 10, [0 10] ); end; toc 11 | % tic, for i=1:1000; R = randint2( 100, 10, [0 10] ); end; toc 12 | % 13 | % USAGE 14 | % R = randint2( m, n, range ) 15 | % 16 | % INPUTS 17 | % m - m rows 18 | % n - n cols 19 | % range - range of ints 20 | % 21 | % OUTPUTS 22 | % R - mxn matrix of integers 23 | % 24 | % EXAMPLE 25 | % R = randint2( 2, 5, [0 1] ) 26 | % 27 | % See also RANDINT 28 | % 29 | % Piotr's Computer Vision Matlab Toolbox Version 2.12 30 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 31 | % Licensed under the Simplified BSD License [see external/bsd.txt] 32 | 33 | R = rand( m, n ); 34 | R = range(1) + floor( (range(2)-range(1)+1)*R ); 35 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/subsToArray.m: -------------------------------------------------------------------------------- 1 | function I = subsToArray( subs, vals, siz, fillVal ) 2 | % Converts subs/vals image representation to array representation. 3 | % 4 | % Constructs array from subs/vals representation. Similar to Matlab's 5 | % sparse command, except doesn't actually produce a sparse matrix. Uses 6 | % different conventions as well. 7 | % 8 | % USAGE 9 | % I = subsToArray( subs, vals, siz, [fillVal] ) 10 | % 11 | % INPUTS 12 | % subs - subscripts of point locations (n x d) 13 | % vals - values at point locations (n x 1) 14 | % siz - image size vector (1xd) - must fully contain subs 15 | % fillVal - [0] value to fill array with at nonspecified locs 16 | % 17 | % OUTPUTS 18 | % I - array of size siz 19 | % 20 | % EXAMPLE 21 | % 22 | % See also SUB2IND2, SPARSE 23 | % 24 | % Piotr's Computer Vision Matlab Toolbox Version 2.0 25 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 26 | % Licensed under the Simplified BSD License [see external/bsd.txt] 27 | 28 | if( nargin<4 || isempty(fillVal) ); fillVal=0; end 29 | 30 | inds = sub2ind2( siz, subs ); 31 | I = repmat( fillVal, siz ); 32 | I(inds) = vals; 33 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/matlab/tpsRandom.m: -------------------------------------------------------------------------------- 1 | function w = tpsRandom( LnInv, bendE ) 2 | % Obtain a random warp with the same bending energy as the original. 3 | % 4 | % USAGE 5 | % w = tpsRandom( LnInv, bendE ) 6 | % 7 | % INPUTS 8 | % LnInv - [see tpsGetWarp] bookstein warping parameters 9 | % bendE - amount of bening energy for random warp to have 10 | % 11 | % OUTPUTS 12 | % w - nonlinear component of warp for use in tpsInterpolate 13 | % 14 | % EXAMPLE 15 | % 16 | % See also TPSGETWARP 17 | % 18 | % Piotr's Computer Vision Matlab Toolbox Version 2.0 19 | % Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] 20 | % Licensed under the Simplified BSD License [see external/bsd.txt] 21 | 22 | n = size(LnInv,1); 23 | u = rand(n-3,1) - .5; 24 | u = u / norm(u); 25 | u = [u; 0; 0; 0]; 26 | 27 | % get U, sig, sigInv, requires some fanangling 28 | [U,sig] = eig(LnInv); 29 | U = real(U); sig=real(sig); 30 | sig( abs(sig)<.000001)=0; 31 | %sigInv = sig; 32 | %sigInv(abs(sig)>.000001) = 1./sigInv(abs(sig)>.000001); 33 | 34 | % get w (and v?) 35 | %v = sqrt(bendE)* U * sqrt(sigInv) * u; 36 | w = sqrt(bendE)* U * sqrt(sig) * u; 37 | 38 | % % should be eye(N) with 3 0's 39 | % sqrt(sigInv) * U' * LnInv * U * sqrt(sigInv) 40 | % % should be equal 41 | % v' * LnInv * v, bendE 42 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/videos/Contents.m: -------------------------------------------------------------------------------- 1 | % VIDEOS 2 | % See also 3 | % 4 | % Behavior annotation for seq files: 5 | % behaviorAnnotator - Caltech Behavior Annotator. 6 | % behaviorData - Retrieve and manipulate behavior annotation of a video. 7 | % 8 | % Seq files [custom codec free video format]: 9 | % seqIo - Utilities for reading and writing seq files. 10 | % seqReaderPlugin - Plugin for seqIo and videoIO to allow reading of seq files. 11 | % seqWriterPlugin - Plugin for seqIo and videoIO to allow writing of seq files. 12 | % seqPlayer - Simple GUI to play seq files. 13 | % 14 | % Image and sequence alignment: 15 | % imagesAlign - Fast and robust estimation of homography relating two images. 16 | % imagesAlignSeq - Stabilize image sequence using coarse optical flow estimation. 17 | % 18 | % Miscellaneous: 19 | % kernelTracker - Kernel Tracker from Comaniciu, Ramesh and Meer PAMI 2003. 20 | % opticalFlow - Coarse-to-fine optical flow using Lucas&Kanade or Horn&Schunck. 21 | -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/videos/imagesAlignSeq.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/videos/imagesAlignSeq.m -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/videos/opticalFlowTest.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/videos/opticalFlowTest.mat -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/videos/peds30-seek.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/videos/peds30-seek.mat -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/videos/peds30.seq: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/videos/peds30.seq -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/videos/private/ktComputeW_c.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/videos/private/ktComputeW_c.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/videos/private/ktComputeW_c.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/videos/private/ktComputeW_c.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/videos/private/ktComputeW_c.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/videos/private/ktComputeW_c.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/videos/private/ktHistcRgb_c.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/videos/private/ktHistcRgb_c.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/videos/private/ktHistcRgb_c.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/videos/private/ktHistcRgb_c.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/videos/private/ktHistcRgb_c.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/videos/private/ktHistcRgb_c.mexw64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/videos/private/opticalFlowHsMex.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/videos/private/opticalFlowHsMex.mexa64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/videos/private/opticalFlowHsMex.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/videos/private/opticalFlowHsMex.mexmaci64 -------------------------------------------------------------------------------- /eval_tool/edges/toolbox/videos/private/opticalFlowHsMex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/eval_tool/edges/toolbox/videos/private/opticalFlowHsMex.mexw64 -------------------------------------------------------------------------------- /examples/fphb/solver_fphb_crack.prototxt: -------------------------------------------------------------------------------- 1 | net: "train_fphb_crack.prototxt" 2 | #test_iter: 0 3 | #test_interval: 1000000 4 | # lr for fine-tuning should be lower than when starting from scratch 5 | #debug_info: true 6 | #base_lr: 0.000001 7 | base_lr: 0.00000001 8 | lr_policy: "step" 9 | gamma: 0.1 10 | iter_size: 10 11 | # stepsize should also be lower, as we're closer to being done 12 | stepsize: 10000 13 | display: 20 14 | max_iter: 100000 15 | momentum: 0.9 16 | weight_decay: 0.0002 17 | snapshot: 4000 18 | snapshot_prefix: "fphb" 19 | # uncomment the following to default to CPU mode solving 20 | # solver_mode: CPU 21 | -------------------------------------------------------------------------------- /examples/fphb/solver_fpn_crack.prototxt: -------------------------------------------------------------------------------- 1 | net: "train_fpn_crack.prototxt" 2 | #test_iter: 0 3 | #test_interval: 1000000 4 | # lr for fine-tuning should be lower than when starting from scratch 5 | #debug_info: true 6 | #base_lr: 0.000001 7 | base_lr: 0.00000001 8 | lr_policy: "step" 9 | gamma: 0.1 10 | iter_size: 10 11 | # stepsize should also be lower, as we're closer to being done 12 | stepsize: 10000 13 | display: 20 14 | max_iter: 100000 15 | momentum: 0.9 16 | weight_decay: 0.0002 17 | snapshot: 4000 18 | snapshot_prefix: "hed_fpn" 19 | # uncomment the following to default to CPU mode solving 20 | # solver_mode: CPU 21 | -------------------------------------------------------------------------------- /include/caffe/caffe.hpp: -------------------------------------------------------------------------------- 1 | // caffe.hpp is the header file that you need to include in your code. It wraps 2 | // all the internal caffe header files into one for simpler inclusion. 3 | 4 | #ifndef CAFFE_CAFFE_HPP_ 5 | #define CAFFE_CAFFE_HPP_ 6 | 7 | #include "caffe/blob.hpp" 8 | #include "caffe/common.hpp" 9 | #include "caffe/filler.hpp" 10 | #include "caffe/layer.hpp" 11 | #include "caffe/layer_factory.hpp" 12 | #include "caffe/net.hpp" 13 | #include "caffe/parallel.hpp" 14 | #include "caffe/proto/caffe.pb.h" 15 | #include "caffe/solver.hpp" 16 | #include "caffe/util/benchmark.hpp" 17 | #include "caffe/util/io.hpp" 18 | #include "caffe/vision_layers.hpp" 19 | 20 | #endif // CAFFE_CAFFE_HPP_ 21 | -------------------------------------------------------------------------------- /include/caffe/util/benchmark.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CAFFE_UTIL_BENCHMARK_H_ 2 | #define CAFFE_UTIL_BENCHMARK_H_ 3 | 4 | #include 5 | 6 | #include "caffe/util/device_alternate.hpp" 7 | 8 | namespace caffe { 9 | 10 | class Timer { 11 | public: 12 | Timer(); 13 | virtual ~Timer(); 14 | virtual void Start(); 15 | virtual void Stop(); 16 | virtual float MilliSeconds(); 17 | virtual float MicroSeconds(); 18 | virtual float Seconds(); 19 | 20 | inline bool initted() { return initted_; } 21 | inline bool running() { return running_; } 22 | inline bool has_run_at_least_once() { return has_run_at_least_once_; } 23 | 24 | protected: 25 | void Init(); 26 | 27 | bool initted_; 28 | bool running_; 29 | bool has_run_at_least_once_; 30 | #ifndef CPU_ONLY 31 | cudaEvent_t start_gpu_; 32 | cudaEvent_t stop_gpu_; 33 | #endif 34 | boost::posix_time::ptime start_cpu_; 35 | boost::posix_time::ptime stop_cpu_; 36 | float elapsed_milliseconds_; 37 | float elapsed_microseconds_; 38 | }; 39 | 40 | class CPUTimer : public Timer { 41 | public: 42 | explicit CPUTimer(); 43 | virtual ~CPUTimer() {} 44 | virtual void Start(); 45 | virtual void Stop(); 46 | virtual float MilliSeconds(); 47 | virtual float MicroSeconds(); 48 | }; 49 | 50 | } // namespace caffe 51 | 52 | #endif // CAFFE_UTIL_BENCHMARK_H_ 53 | -------------------------------------------------------------------------------- /include/caffe/util/blocking_queue.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CAFFE_UTIL_BLOCKING_QUEUE_HPP_ 2 | #define CAFFE_UTIL_BLOCKING_QUEUE_HPP_ 3 | 4 | #include 5 | #include 6 | 7 | #include "caffe/common.hpp" 8 | 9 | namespace caffe { 10 | 11 | template 12 | class BlockingQueue { 13 | public: 14 | explicit BlockingQueue(); 15 | 16 | void push(const T& t); 17 | 18 | bool try_pop(T* t); 19 | 20 | // This logs a message if the threads needs to be blocked 21 | // useful for detecting e.g. when data feeding is too slow 22 | T pop(const string& log_on_wait = ""); 23 | 24 | bool try_peek(T* t); 25 | 26 | // Return element without removing it 27 | T peek(); 28 | 29 | size_t size() const; 30 | 31 | protected: 32 | /** 33 | Move synchronization fields out instead of including boost/thread.hpp 34 | to avoid a boost/NVCC issues (#1009, #1010) on OSX. Also fails on 35 | Linux CUDA 7.0.18. 36 | */ 37 | class sync; 38 | 39 | std::queue queue_; 40 | shared_ptr sync_; 41 | 42 | DISABLE_COPY_AND_ASSIGN(BlockingQueue); 43 | }; 44 | 45 | } // namespace caffe 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /include/caffe/util/db.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CAFFE_UTIL_DB_HPP 2 | #define CAFFE_UTIL_DB_HPP 3 | 4 | #include 5 | 6 | #include "caffe/common.hpp" 7 | #include "caffe/proto/caffe.pb.h" 8 | 9 | namespace caffe { namespace db { 10 | 11 | enum Mode { READ, WRITE, NEW }; 12 | 13 | class Cursor { 14 | public: 15 | Cursor() { } 16 | virtual ~Cursor() { } 17 | virtual void SeekToFirst() = 0; 18 | virtual void Next() = 0; 19 | virtual string key() = 0; 20 | virtual string value() = 0; 21 | virtual bool valid() = 0; 22 | 23 | DISABLE_COPY_AND_ASSIGN(Cursor); 24 | }; 25 | 26 | class Transaction { 27 | public: 28 | Transaction() { } 29 | virtual ~Transaction() { } 30 | virtual void Put(const string& key, const string& value) = 0; 31 | virtual void Commit() = 0; 32 | 33 | DISABLE_COPY_AND_ASSIGN(Transaction); 34 | }; 35 | 36 | class DB { 37 | public: 38 | DB() { } 39 | virtual ~DB() { } 40 | virtual void Open(const string& source, Mode mode) = 0; 41 | virtual void Close() = 0; 42 | virtual Cursor* NewCursor() = 0; 43 | virtual Transaction* NewTransaction() = 0; 44 | 45 | DISABLE_COPY_AND_ASSIGN(DB); 46 | }; 47 | 48 | DB* GetDB(DataParameter::DB backend); 49 | DB* GetDB(const string& backend); 50 | 51 | } // namespace db 52 | } // namespace caffe 53 | 54 | #endif // CAFFE_UTIL_DB_HPP 55 | -------------------------------------------------------------------------------- /include/caffe/util/gpu_util.cuh: -------------------------------------------------------------------------------- 1 | #ifndef CAFFE_UTIL_GPU_UTIL_H_ 2 | #define CAFFE_UTIL_GPU_UTIL_H_ 3 | 4 | namespace caffe { 5 | 6 | template 7 | inline __device__ Dtype caffe_gpu_atomic_add(const Dtype val, Dtype* address); 8 | 9 | template <> 10 | inline __device__ 11 | float caffe_gpu_atomic_add(const float val, float* address) { 12 | return atomicAdd(address, val); 13 | } 14 | 15 | // double atomicAdd implementation taken from: 16 | // http://docs.nvidia.com/cuda/cuda-c-programming-guide/#axzz3PVCpVsEG 17 | template <> 18 | inline __device__ 19 | double caffe_gpu_atomic_add(const double val, double* address) { 20 | unsigned long long int* address_as_ull = // NOLINT(runtime/int) 21 | // NOLINT_NEXT_LINE(runtime/int) 22 | reinterpret_cast(address); 23 | unsigned long long int old = *address_as_ull; // NOLINT(runtime/int) 24 | unsigned long long int assumed; // NOLINT(runtime/int) 25 | do { 26 | assumed = old; 27 | old = atomicCAS(address_as_ull, assumed, 28 | __double_as_longlong(val + __longlong_as_double(assumed))); 29 | } while (assumed != old); 30 | return __longlong_as_double(old); 31 | } 32 | 33 | } // namespace caffe 34 | 35 | #endif // CAFFE_UTIL_GPU_UTIL_H_ 36 | -------------------------------------------------------------------------------- /include/caffe/util/hdf5.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CAFFE_UTIL_HDF5_H_ 2 | #define CAFFE_UTIL_HDF5_H_ 3 | 4 | #include 5 | 6 | #include "hdf5.h" 7 | #include "hdf5_hl.h" 8 | 9 | #include "caffe/blob.hpp" 10 | 11 | namespace caffe { 12 | 13 | template 14 | void hdf5_load_nd_dataset_helper( 15 | hid_t file_id, const char* dataset_name_, int min_dim, int max_dim, 16 | Blob* blob); 17 | 18 | template 19 | void hdf5_load_nd_dataset( 20 | hid_t file_id, const char* dataset_name_, int min_dim, int max_dim, 21 | Blob* blob); 22 | 23 | template 24 | void hdf5_save_nd_dataset( 25 | const hid_t file_id, const string& dataset_name, const Blob& blob, 26 | bool write_diff = false); 27 | 28 | int hdf5_load_int(hid_t loc_id, const string& dataset_name); 29 | void hdf5_save_int(hid_t loc_id, const string& dataset_name, int i); 30 | string hdf5_load_string(hid_t loc_id, const string& dataset_name); 31 | void hdf5_save_string(hid_t loc_id, const string& dataset_name, 32 | const string& s); 33 | 34 | int hdf5_get_num_links(hid_t loc_id); 35 | string hdf5_get_name_by_idx(hid_t loc_id, int idx); 36 | 37 | } // namespace caffe 38 | 39 | #endif // CAFFE_UTIL_HDF5_H_ 40 | -------------------------------------------------------------------------------- /include/caffe/util/im2col.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _CAFFE_UTIL_IM2COL_HPP_ 2 | #define _CAFFE_UTIL_IM2COL_HPP_ 3 | 4 | namespace caffe { 5 | 6 | template 7 | void im2col_cpu(const Dtype* data_im, const int channels, 8 | const int height, const int width, const int kernel_h, const int kernel_w, 9 | const int pad_h, const int pad_w, const int stride_h, 10 | const int stride_w, Dtype* data_col); 11 | 12 | template 13 | void col2im_cpu(const Dtype* data_col, const int channels, 14 | const int height, const int width, const int patch_h, const int patch_w, 15 | const int pad_h, const int pad_w, const int stride_h, 16 | const int stride_w, Dtype* data_im); 17 | 18 | template 19 | void im2col_gpu(const Dtype* data_im, const int channels, 20 | const int height, const int width, const int kernel_h, const int kernel_w, 21 | const int pad_h, const int pad_w, const int stride_h, 22 | const int stride_w, Dtype* data_col); 23 | 24 | template 25 | void col2im_gpu(const Dtype* data_col, const int channels, 26 | const int height, const int width, const int patch_h, const int patch_w, 27 | const int pad_h, const int pad_w, const int stride_h, 28 | const int stride_w, Dtype* data_im); 29 | 30 | } // namespace caffe 31 | 32 | #endif // CAFFE_UTIL_IM2COL_HPP_ 33 | -------------------------------------------------------------------------------- /include/caffe/util/insert_splits.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _CAFFE_UTIL_INSERT_SPLITS_HPP_ 2 | #define _CAFFE_UTIL_INSERT_SPLITS_HPP_ 3 | 4 | #include 5 | 6 | #include "caffe/proto/caffe.pb.h" 7 | 8 | namespace caffe { 9 | 10 | // Copy NetParameters with SplitLayers added to replace any shared bottom 11 | // blobs with unique bottom blobs provided by the SplitLayer. 12 | void InsertSplits(const NetParameter& param, NetParameter* param_split); 13 | 14 | void ConfigureSplitLayer(const string& layer_name, const string& blob_name, 15 | const int blob_idx, const int split_count, const float loss_weight, 16 | LayerParameter* split_layer_param); 17 | 18 | string SplitLayerName(const string& layer_name, const string& blob_name, 19 | const int blob_idx); 20 | 21 | string SplitBlobName(const string& layer_name, const string& blob_name, 22 | const int blob_idx, const int split_idx); 23 | 24 | } // namespace caffe 25 | 26 | #endif // CAFFE_UTIL_INSERT_SPLITS_HPP_ 27 | -------------------------------------------------------------------------------- /include/caffe/util/rng.hpp: -------------------------------------------------------------------------------- 1 | #ifndef CAFFE_RNG_CPP_HPP_ 2 | #define CAFFE_RNG_CPP_HPP_ 3 | 4 | #include 5 | #include 6 | 7 | #include "boost/random/mersenne_twister.hpp" 8 | #include "boost/random/uniform_int.hpp" 9 | 10 | #include "caffe/common.hpp" 11 | 12 | namespace caffe { 13 | 14 | typedef boost::mt19937 rng_t; 15 | 16 | inline rng_t* caffe_rng() { 17 | return static_cast(Caffe::rng_stream().generator()); 18 | } 19 | 20 | // Fisher–Yates algorithm 21 | template 22 | inline void shuffle(RandomAccessIterator begin, RandomAccessIterator end, 23 | RandomGenerator* gen) { 24 | typedef typename std::iterator_traits::difference_type 25 | difference_type; 26 | typedef typename boost::uniform_int dist_type; 27 | 28 | difference_type length = std::distance(begin, end); 29 | if (length <= 0) return; 30 | 31 | for (difference_type i = length - 1; i > 0; --i) { 32 | dist_type dist(0, i); 33 | std::iter_swap(begin + i, begin + dist(*gen)); 34 | } 35 | } 36 | 37 | template 38 | inline void shuffle(RandomAccessIterator begin, RandomAccessIterator end) { 39 | shuffle(begin, end, caffe_rng()); 40 | } 41 | } // namespace caffe 42 | 43 | #endif // CAFFE_RNG_HPP_ 44 | -------------------------------------------------------------------------------- /include/caffe/util/signal_handler.h: -------------------------------------------------------------------------------- 1 | #ifndef INCLUDE_CAFFE_UTIL_SIGNAL_HANDLER_H_ 2 | #define INCLUDE_CAFFE_UTIL_SIGNAL_HANDLER_H_ 3 | 4 | #include "caffe/proto/caffe.pb.h" 5 | #include "caffe/solver.hpp" 6 | 7 | namespace caffe { 8 | 9 | class SignalHandler { 10 | public: 11 | // Contructor. Specify what action to take when a signal is received. 12 | SignalHandler(SolverAction::Enum SIGINT_action, 13 | SolverAction::Enum SIGHUP_action); 14 | ~SignalHandler(); 15 | ActionCallback GetActionFunction(); 16 | private: 17 | SolverAction::Enum CheckForSignals() const; 18 | SolverAction::Enum SIGINT_action_; 19 | SolverAction::Enum SIGHUP_action_; 20 | }; 21 | 22 | } // namespace caffe 23 | 24 | #endif // INCLUDE_CAFFE_UTIL_SIGNAL_HANDLER_H_ 25 | -------------------------------------------------------------------------------- /matlab/+caffe/Layer.m: -------------------------------------------------------------------------------- 1 | classdef Layer < handle 2 | % Wrapper class of caffe::Layer in matlab 3 | 4 | properties (Access = private) 5 | hLayer_self 6 | attributes 7 | % attributes fields: 8 | % hBlob_blobs 9 | end 10 | properties (SetAccess = private) 11 | params 12 | end 13 | 14 | methods 15 | function self = Layer(hLayer_layer) 16 | CHECK(is_valid_handle(hLayer_layer), 'invalid Layer handle'); 17 | 18 | % setup self handle and attributes 19 | self.hLayer_self = hLayer_layer; 20 | self.attributes = caffe_('layer_get_attr', self.hLayer_self); 21 | 22 | % setup weights 23 | self.params = caffe.Blob.empty(); 24 | for n = 1:length(self.attributes.hBlob_blobs) 25 | self.params(n) = caffe.Blob(self.attributes.hBlob_blobs(n)); 26 | end 27 | end 28 | function layer_type = type(self) 29 | layer_type = caffe_('layer_get_type', self.hLayer_self); 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /matlab/+caffe/get_net.m: -------------------------------------------------------------------------------- 1 | function net = get_net(varargin) 2 | % net = get_net(model_file, phase_name) or 3 | % net = get_net(model_file, weights_file, phase_name) 4 | % Construct a net from model_file, and load weights from weights_file 5 | % phase_name can only be 'train' or 'test' 6 | 7 | CHECK(nargin == 2 || nargin == 3, ['usage: ' ... 8 | 'net = get_net(model_file, phase_name) or ' ... 9 | 'net = get_net(model_file, weights_file, phase_name)']); 10 | if nargin == 3 11 | model_file = varargin{1}; 12 | weights_file = varargin{2}; 13 | phase_name = varargin{3}; 14 | elseif nargin == 2 15 | model_file = varargin{1}; 16 | phase_name = varargin{2}; 17 | end 18 | 19 | CHECK(ischar(model_file), 'model_file must be a string'); 20 | CHECK(ischar(phase_name), 'phase_name must be a string'); 21 | CHECK_FILE_EXIST(model_file); 22 | CHECK(strcmp(phase_name, 'train') || strcmp(phase_name, 'test'), ... 23 | sprintf('phase_name can only be %strain%s or %stest%s', ... 24 | char(39), char(39), char(39), char(39))); 25 | 26 | % construct caffe net from model_file 27 | hNet = caffe_('get_net', model_file, phase_name); 28 | net = caffe.Net(hNet); 29 | 30 | % load weights from weights_file 31 | if nargin == 3 32 | CHECK(ischar(weights_file), 'weights_file must be a string'); 33 | CHECK_FILE_EXIST(weights_file); 34 | net.copy_from(weights_file); 35 | end 36 | 37 | end 38 | -------------------------------------------------------------------------------- /matlab/+caffe/get_solver.m: -------------------------------------------------------------------------------- 1 | function solver = get_solver(solver_file) 2 | % solver = get_solver(solver_file) 3 | % Construct a Solver object from solver_file 4 | 5 | CHECK(ischar(solver_file), 'solver_file must be a string'); 6 | CHECK_FILE_EXIST(solver_file); 7 | pSolver = caffe_('get_solver', solver_file); 8 | solver = caffe.Solver(pSolver); 9 | 10 | end 11 | -------------------------------------------------------------------------------- /matlab/+caffe/imagenet/ilsvrc_2012_mean.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/matlab/+caffe/imagenet/ilsvrc_2012_mean.mat -------------------------------------------------------------------------------- /matlab/+caffe/private/CHECK.m: -------------------------------------------------------------------------------- 1 | function CHECK(expr, error_msg) 2 | 3 | if ~expr 4 | error(error_msg); 5 | end 6 | 7 | end 8 | -------------------------------------------------------------------------------- /matlab/+caffe/private/CHECK_FILE_EXIST.m: -------------------------------------------------------------------------------- 1 | function CHECK_FILE_EXIST(filename) 2 | 3 | if exist(filename, 'file') == 0 4 | error('%s does not exist', filename); 5 | end 6 | 7 | end 8 | -------------------------------------------------------------------------------- /matlab/+caffe/private/is_valid_handle.m: -------------------------------------------------------------------------------- 1 | function valid = is_valid_handle(hObj) 2 | % valid = is_valid_handle(hObj) or is_valid_handle('get_new_init_key') 3 | % Check if a handle is valid (has the right data type and init_key matches) 4 | % Use is_valid_handle('get_new_init_key') to get new init_key from C++; 5 | 6 | % a handle is a struct array with the following fields 7 | % (uint64) ptr : the pointer to the C++ object 8 | % (double) init_key : caffe initialization key 9 | 10 | persistent init_key; 11 | if isempty(init_key) 12 | init_key = caffe_('get_init_key'); 13 | end 14 | 15 | % is_valid_handle('get_new_init_key') to get new init_key from C++; 16 | if ischar(hObj) && strcmp(hObj, 'get_new_init_key') 17 | init_key = caffe_('get_init_key'); 18 | return 19 | else 20 | % check whether data types are correct and init_key matches 21 | valid = isstruct(hObj) ... 22 | && isscalar(hObj.ptr) && isa(hObj.ptr, 'uint64') ... 23 | && isscalar(hObj.init_key) && isa(hObj.init_key, 'double') ... 24 | && hObj.init_key == init_key; 25 | end 26 | 27 | end 28 | -------------------------------------------------------------------------------- /matlab/+caffe/reset_all.m: -------------------------------------------------------------------------------- 1 | function reset_all() 2 | % reset_all() 3 | % clear all solvers and stand-alone nets and reset Caffe to initial status 4 | 5 | caffe_('reset'); 6 | is_valid_handle('get_new_init_key'); 7 | 8 | end 9 | -------------------------------------------------------------------------------- /matlab/+caffe/run_tests.m: -------------------------------------------------------------------------------- 1 | function results = run_tests() 2 | % results = run_tests() 3 | % run all tests in this caffe matlab wrapper package 4 | 5 | % use CPU for testing 6 | caffe.set_mode_cpu(); 7 | 8 | % reset caffe before testing 9 | caffe.reset_all(); 10 | 11 | % put all test cases here 12 | results = [... 13 | run(caffe.test.test_net) ... 14 | run(caffe.test.test_solver) ]; 15 | 16 | % reset caffe after testing 17 | caffe.reset_all(); 18 | 19 | end 20 | -------------------------------------------------------------------------------- /matlab/+caffe/set_device.m: -------------------------------------------------------------------------------- 1 | function set_device(device_id) 2 | % set_device(device_id) 3 | % set Caffe's GPU device ID 4 | 5 | CHECK(isscalar(device_id) && device_id >= 0, ... 6 | 'device_id must be non-negative integer'); 7 | device_id = double(device_id); 8 | 9 | caffe_('set_device', device_id); 10 | 11 | end 12 | -------------------------------------------------------------------------------- /matlab/+caffe/set_mode_cpu.m: -------------------------------------------------------------------------------- 1 | function set_mode_cpu() 2 | % set_mode_cpu() 3 | % set Caffe to CPU mode 4 | 5 | caffe_('set_mode_cpu'); 6 | 7 | end 8 | -------------------------------------------------------------------------------- /matlab/+caffe/set_mode_gpu.m: -------------------------------------------------------------------------------- 1 | function set_mode_gpu() 2 | % set_mode_gpu() 3 | % set Caffe to GPU mode 4 | 5 | caffe_('set_mode_gpu'); 6 | 7 | end 8 | -------------------------------------------------------------------------------- /matlab/hdf5creation/.gitignore: -------------------------------------------------------------------------------- 1 | *.h5 2 | list.txt 3 | -------------------------------------------------------------------------------- /python/caffe/__init__.py: -------------------------------------------------------------------------------- 1 | from .pycaffe import Net, SGDSolver 2 | from ._caffe import set_mode_cpu, set_mode_gpu, set_device, Layer, get_solver, layer_type_list 3 | from .proto.caffe_pb2 import TRAIN, TEST 4 | from .classifier import Classifier 5 | from .detector import Detector 6 | from . import io 7 | from .net_spec import layers, params, NetSpec, to_proto 8 | -------------------------------------------------------------------------------- /python/caffe/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/python/caffe/__init__.pyc -------------------------------------------------------------------------------- /python/caffe/_caffe.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/python/caffe/_caffe.so -------------------------------------------------------------------------------- /python/caffe/classifier.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/python/caffe/classifier.pyc -------------------------------------------------------------------------------- /python/caffe/detector.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/python/caffe/detector.pyc -------------------------------------------------------------------------------- /python/caffe/imagenet/ilsvrc_2012_mean.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/python/caffe/imagenet/ilsvrc_2012_mean.npy -------------------------------------------------------------------------------- /python/caffe/io.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/python/caffe/io.pyc -------------------------------------------------------------------------------- /python/caffe/net_spec.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/python/caffe/net_spec.pyc -------------------------------------------------------------------------------- /python/caffe/proto/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/python/caffe/proto/__init__.py -------------------------------------------------------------------------------- /python/caffe/proto/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/python/caffe/proto/__init__.pyc -------------------------------------------------------------------------------- /python/caffe/proto/caffe_pb2.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/python/caffe/proto/caffe_pb2.pyc -------------------------------------------------------------------------------- /python/caffe/pycaffe.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/python/caffe/pycaffe.pyc -------------------------------------------------------------------------------- /python/caffe/test/test_layer_type_list.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | import caffe 4 | 5 | class TestLayerTypeList(unittest.TestCase): 6 | 7 | def test_standard_types(self): 8 | for type_name in ['Data', 'Convolution', 'InnerProduct']: 9 | self.assertIn(type_name, caffe.layer_type_list(), 10 | '%s not in layer_type_list()' % type_name) 11 | -------------------------------------------------------------------------------- /python/requirements.txt: -------------------------------------------------------------------------------- 1 | Cython>=0.19.2 2 | numpy>=1.7.1 3 | scipy>=0.13.2 4 | scikit-image>=0.9.3 5 | matplotlib>=1.3.1 6 | ipython>=3.0.0 7 | h5py>=2.2.0 8 | leveldb>=0.191 9 | networkx>=1.8.1 10 | nose>=1.3.0 11 | pandas>=0.12.0 12 | python-dateutil>=1.4,<2 13 | protobuf>=2.5.0 14 | python-gflags>=2.0 15 | pyyaml>=3.10 16 | Pillow>=2.3.0 17 | six>=1.1.0 -------------------------------------------------------------------------------- /scripts/build_docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Build documentation for display in web browser. 3 | 4 | PORT=${1:-4000} 5 | 6 | echo "usage: build_docs.sh [port]" 7 | 8 | # Find the docs dir, no matter where the script is called 9 | ROOT_DIR="$( cd "$(dirname "$0")"/.. ; pwd -P )" 10 | cd $ROOT_DIR 11 | 12 | # Gather docs. 13 | scripts/gather_examples.sh 14 | 15 | # Generate developer docs. 16 | make docs 17 | 18 | # Display docs using web server. 19 | cd docs 20 | jekyll serve -w -s . -d _site --port=$PORT 21 | -------------------------------------------------------------------------------- /scripts/copy_notebook.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """ 3 | Takes as arguments: 4 | 1. the path to a JSON file (such as an IPython notebook). 5 | 2. the path to output file 6 | 7 | If 'metadata' dict in the JSON file contains 'include_in_docs': true, 8 | then copies the file to output file, appending the 'metadata' property 9 | as YAML front-matter, adding the field 'category' with value 'notebook'. 10 | """ 11 | import os 12 | import sys 13 | import json 14 | 15 | filename = sys.argv[1] 16 | output_filename = sys.argv[2] 17 | content = json.load(open(filename)) 18 | 19 | if 'include_in_docs' in content['metadata'] and content['metadata']['include_in_docs']: 20 | yaml_frontmatter = ['---'] 21 | for key, val in content['metadata'].iteritems(): 22 | if key == 'example_name': 23 | key = 'title' 24 | if val == '': 25 | val = os.path.basename(filename) 26 | yaml_frontmatter.append('{}: {}'.format(key, val)) 27 | yaml_frontmatter += ['category: notebook'] 28 | yaml_frontmatter += ['original_path: ' + filename] 29 | 30 | with open(output_filename, 'w') as fo: 31 | fo.write('\n'.join(yaml_frontmatter + ['---']) + '\n') 32 | fo.write(open(filename).read()) 33 | -------------------------------------------------------------------------------- /scripts/download_model_from_gist.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | GIST=$1 4 | DIRNAME=${2:-./models} 5 | 6 | if [ -z $GIST ]; then 7 | echo "usage: download_model_from_gist.sh " 8 | exit 9 | fi 10 | 11 | GIST_DIR=$(echo $GIST | tr '/' '-') 12 | MODEL_DIR="$DIRNAME/$GIST_DIR" 13 | 14 | if [ -d $MODEL_DIR ]; then 15 | echo "$MODEL_DIR already exists! Please make sure you're not overwriting anything important!" 16 | exit 17 | fi 18 | 19 | echo "Downloading Caffe model info to $MODEL_DIR ..." 20 | mkdir -p $MODEL_DIR 21 | wget https://gist.github.com/$GIST/download -O $MODEL_DIR/gist.zip 22 | unzip -j $MODEL_DIR/gist.zip -d $MODEL_DIR 23 | rm $MODEL_DIR/gist.zip 24 | echo "Done" 25 | -------------------------------------------------------------------------------- /scripts/gather_examples.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Assemble documentation for the project into one directory via symbolic links. 3 | 4 | # Find the docs dir, no matter where the script is called 5 | ROOT_DIR="$( cd "$(dirname "$0")"/.. ; pwd -P )" 6 | cd $ROOT_DIR 7 | 8 | # Gather docs from examples/**/readme.md 9 | GATHERED_DIR=docs/gathered 10 | rm -r $GATHERED_DIR 11 | mkdir $GATHERED_DIR 12 | for README_FILENAME in $(find examples -iname "readme.md"); do 13 | # Only use file if it is to be included in docs. 14 | if grep -Fxq "include_in_docs: true" $README_FILENAME; then 15 | # Make link to readme.md in docs/gathered/. 16 | # Since everything is called readme.md, rename it by its dirname. 17 | README_DIRNAME=`dirname $README_FILENAME` 18 | DOCS_FILENAME=$GATHERED_DIR/$README_DIRNAME.md 19 | mkdir -p `dirname $DOCS_FILENAME` 20 | ln -s $ROOT_DIR/$README_FILENAME $DOCS_FILENAME 21 | fi 22 | done 23 | 24 | # Gather docs from examples/*.ipynb and add YAML front-matter. 25 | for NOTEBOOK_FILENAME in $(find examples -depth -iname "*.ipynb"); do 26 | DOCS_FILENAME=$GATHERED_DIR/$NOTEBOOK_FILENAME 27 | mkdir -p `dirname $DOCS_FILENAME` 28 | python scripts/copy_notebook.py $NOTEBOOK_FILENAME $DOCS_FILENAME 29 | done 30 | -------------------------------------------------------------------------------- /scripts/travis/travis_build_and_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Script called by Travis to do a CPU-only build of and test Caffe. 3 | 4 | set -e 5 | MAKE="make --jobs=$NUM_THREADS --keep-going" 6 | 7 | if $WITH_CMAKE; then 8 | mkdir build 9 | cd build 10 | CPU_ONLY=" -DCPU_ONLY=ON" 11 | if ! $WITH_CUDA; then 12 | CPU_ONLY=" -DCPU_ONLY=OFF" 13 | fi 14 | PYTHON_ARGS="" 15 | if [ "$PYTHON_VERSION" = "3" ]; then 16 | PYTHON_ARGS="$PYTHON_ARGS -Dpython_version=3 -DBOOST_LIBRARYDIR=$CONDA_DIR/lib/" 17 | fi 18 | cmake -DBUILD_python=ON -DCMAKE_BUILD_TYPE=Release $CPU_ONLY $PYTHON_ARGS -DCMAKE_INCLUDE_PATH="$CONDA_DIR/include/" -DCMAKE_LIBRARY_PATH="$CONDA_DIR/lib/" .. 19 | $MAKE 20 | $MAKE pytest 21 | if ! $WITH_CUDA; then 22 | $MAKE runtest 23 | $MAKE lint 24 | fi 25 | $MAKE clean 26 | cd - 27 | else 28 | if ! $WITH_CUDA; then 29 | export CPU_ONLY=1 30 | fi 31 | $MAKE all test pycaffe warn lint || true 32 | if ! $WITH_CUDA; then 33 | $MAKE runtest 34 | fi 35 | $MAKE all 36 | $MAKE test 37 | $MAKE pycaffe 38 | $MAKE pytest 39 | $MAKE warn 40 | if ! $WITH_CUDA; then 41 | $MAKE lint 42 | fi 43 | fi 44 | -------------------------------------------------------------------------------- /scripts/travis/travis_setup_makefile_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | mv Makefile.config.example Makefile.config 6 | 7 | if $WITH_CUDA; then 8 | # Only generate compute_50. 9 | GENCODE="-gencode arch=compute_50,code=sm_50" 10 | GENCODE="$GENCODE -gencode arch=compute_50,code=compute_50" 11 | echo "CUDA_ARCH := $GENCODE" >> Makefile.config 12 | fi 13 | 14 | cat << 'EOF' >> Makefile.config 15 | # Travis' nvcc doesn't like newer boost versions 16 | NVCCFLAGS := -Xcudafe --diag_suppress=cc_clobber_ignored -Xcudafe --diag_suppress=useless_using_declaration -Xcudafe --diag_suppress=set_but_not_used 17 | ANACONDA_HOME := $(CONDA_DIR) 18 | PYTHON_INCLUDE := $(ANACONDA_HOME)/include \ 19 | $(ANACONDA_HOME)/include/python2.7 \ 20 | $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include 21 | PYTHON_LIB := $(ANACONDA_HOME)/lib 22 | INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include 23 | LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib 24 | WITH_PYTHON_LAYER := 1 25 | EOF 26 | -------------------------------------------------------------------------------- /scripts/upload_model_to_gist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check for valid directory 4 | DIRNAME=$1 5 | if [ ! -f $DIRNAME/readme.md ]; then 6 | echo "usage: upload_model_to_gist.sh " 7 | echo " /readme.md must exist" 8 | fi 9 | cd $DIRNAME 10 | FILES=`find . -maxdepth 1 -type f ! -name "*.caffemodel*" | xargs echo` 11 | 12 | # Check for gist tool. 13 | gist -v >/dev/null 2>&1 || { echo >&2 "I require 'gist' but it's not installed. Do 'gem install gist'."; exit 1; } 14 | 15 | NAME=`sed -n 's/^name:[[:space:]]*//p' readme.md` 16 | if [ -z "$NAME" ]; then 17 | echo " /readme.md must contain name field in the front-matter." 18 | fi 19 | 20 | GIST=`sed -n 's/^gist_id:[[:space:]]*//p' readme.md` 21 | if [ -z "$GIST" ]; then 22 | echo "Uploading new Gist" 23 | gist -p -d "$NAME" $FILES 24 | else 25 | echo "Updating existing Gist, id $GIST" 26 | gist -u $GIST -d "$NAME" $FILES 27 | fi 28 | 29 | RESULT=$? 30 | if [ $RESULT -eq 0 ]; then 31 | echo "You've uploaded your model!" 32 | echo "Don't forget to add the gist_id field to your /readme.md now!" 33 | echo "Run the command again after you do that, to make sure the Gist id propagates." 34 | echo "" 35 | echo "And do share your model over at https://github.com/BVLC/caffe/wiki/Model-Zoo" 36 | else 37 | echo "Something went wrong!" 38 | fi 39 | -------------------------------------------------------------------------------- /src/caffe/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # generate protobuf sources 2 | file(GLOB proto_files proto/*.proto) 3 | caffe_protobuf_generate_cpp_py(${proto_gen_folder} proto_srcs proto_hdrs proto_python ${proto_files}) 4 | 5 | # include python files either to force generation 6 | add_library(proto STATIC ${proto_hdrs} ${proto_srcs} ${proto_python}) 7 | set(Caffe_LINKER_LIBS proto ${Caffe_LINKER_LIBS}) # note, crucial to prepend! 8 | caffe_default_properties(proto) 9 | 10 | # --[ Caffe library 11 | 12 | # creates 'test_srcs', 'srcs', 'test_cuda', 'cuda' lists 13 | caffe_pickup_caffe_sources(${PROJECT_SOURCE_DIR}) 14 | 15 | if(HAVE_CUDA) 16 | caffe_cuda_compile(cuda_objs ${cuda}) 17 | list(APPEND srcs ${cuda_objs} ${cuda}) 18 | endif() 19 | 20 | add_library(caffe ${srcs}) 21 | target_link_libraries(caffe proto ${Caffe_LINKER_LIBS}) 22 | caffe_default_properties(caffe) 23 | 24 | # ---[ Tests 25 | add_subdirectory(test) 26 | 27 | # ---[ Install 28 | install(DIRECTORY ${Caffe_INCLUDE_DIR}/caffe DESTINATION include) 29 | install(FILES ${proto_hdrs} DESTINATION include/caffe/proto) 30 | install(TARGETS caffe proto EXPORT CaffeTargets DESTINATION lib) 31 | 32 | file(WRITE ${PROJECT_BINARY_DIR}/__init__.py) 33 | list(APPEND proto_python ${PROJECT_BINARY_DIR}/__init__.py) 34 | install(PROGRAMS ${proto_python} DESTINATION python/caffe/proto) 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/caffe/layer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "caffe/layer.hpp" 3 | 4 | namespace caffe { 5 | 6 | template 7 | void Layer::InitMutex() { 8 | forward_mutex_.reset(new boost::mutex()); 9 | } 10 | 11 | template 12 | void Layer::Lock() { 13 | if (IsShared()) { 14 | forward_mutex_->lock(); 15 | } 16 | } 17 | 18 | template 19 | void Layer::Unlock() { 20 | if (IsShared()) { 21 | forward_mutex_->unlock(); 22 | } 23 | } 24 | 25 | INSTANTIATE_CLASS(Layer); 26 | 27 | } // namespace caffe 28 | -------------------------------------------------------------------------------- /src/caffe/layers/absval_layer.cu: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "caffe/layer.hpp" 4 | #include "caffe/util/math_functions.hpp" 5 | #include "caffe/vision_layers.hpp" 6 | 7 | namespace caffe { 8 | 9 | template 10 | void AbsValLayer::Forward_gpu( 11 | const vector*>& bottom, const vector*>& top) { 12 | const int count = top[0]->count(); 13 | Dtype* top_data = top[0]->mutable_gpu_data(); 14 | caffe_gpu_abs(count, bottom[0]->gpu_data(), top_data); 15 | } 16 | 17 | template 18 | void AbsValLayer::Backward_gpu(const vector*>& top, 19 | const vector& propagate_down, const vector*>& bottom) { 20 | const int count = top[0]->count(); 21 | const Dtype* top_diff = top[0]->gpu_diff(); 22 | if (propagate_down[0]) { 23 | const Dtype* bottom_data = bottom[0]->gpu_data(); 24 | Dtype* bottom_diff = bottom[0]->mutable_gpu_diff(); 25 | caffe_gpu_sign(count, bottom_data, bottom_diff); 26 | caffe_gpu_mul(count, bottom_diff, top_diff, bottom_diff); 27 | } 28 | } 29 | 30 | INSTANTIATE_LAYER_GPU_FUNCS(AbsValLayer); 31 | 32 | 33 | } // namespace caffe 34 | -------------------------------------------------------------------------------- /src/caffe/layers/im2col_layer.cu: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "caffe/common.hpp" 4 | #include "caffe/layer.hpp" 5 | #include "caffe/util/im2col.hpp" 6 | #include "caffe/vision_layers.hpp" 7 | 8 | namespace caffe { 9 | 10 | template 11 | void Im2colLayer::Forward_gpu(const vector*>& bottom, 12 | const vector*>& top) { 13 | const Dtype* bottom_data = bottom[0]->gpu_data(); 14 | Dtype* top_data = top[0]->mutable_gpu_data(); 15 | for (int n = 0; n < bottom[0]->num(); ++n) { 16 | im2col_gpu(bottom_data + bottom[0]->offset(n), channels_, height_, 17 | width_, kernel_h_, kernel_w_, pad_h_, pad_w_, 18 | stride_h_, stride_w_, top_data + top[0]->offset(n)); 19 | } 20 | } 21 | 22 | template 23 | void Im2colLayer::Backward_gpu(const vector*>& top, 24 | const vector& propagate_down, const vector*>& bottom) { 25 | const Dtype* top_diff = top[0]->gpu_diff(); 26 | Dtype* bottom_diff = bottom[0]->mutable_gpu_diff(); 27 | for (int n = 0; n < top[0]->num(); ++n) { 28 | col2im_gpu(top_diff + top[0]->offset(n), channels_, height_, width_, 29 | kernel_h_, kernel_w_, pad_h_, pad_w_, 30 | stride_h_, stride_w_, bottom_diff + bottom[0]->offset(n)); 31 | } 32 | } 33 | 34 | 35 | INSTANTIATE_LAYER_GPU_FUNCS(Im2colLayer); 36 | 37 | } // namespace caffe 38 | -------------------------------------------------------------------------------- /src/caffe/layers/loss_layer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "caffe/layer.hpp" 7 | #include "caffe/util/io.hpp" 8 | #include "caffe/util/math_functions.hpp" 9 | #include "caffe/vision_layers.hpp" 10 | 11 | namespace caffe { 12 | 13 | template 14 | void LossLayer::LayerSetUp( 15 | const vector*>& bottom, const vector*>& top) { 16 | // LossLayers have a non-zero (1) loss by default. 17 | if (this->layer_param_.loss_weight_size() == 0) { 18 | this->layer_param_.add_loss_weight(Dtype(1)); 19 | } 20 | } 21 | 22 | template 23 | void LossLayer::Reshape( 24 | const vector*>& bottom, const vector*>& top) { 25 | CHECK_EQ(bottom[0]->num(), bottom[1]->num()) 26 | << "The data and label should have the same number."; 27 | vector loss_shape(0); // Loss layers output a scalar; 0 axes. 28 | top[0]->Reshape(loss_shape); 29 | } 30 | 31 | INSTANTIATE_CLASS(LossLayer); 32 | 33 | } // namespace caffe 34 | -------------------------------------------------------------------------------- /src/caffe/layers/neuron_layer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "caffe/layer.hpp" 4 | #include "caffe/vision_layers.hpp" 5 | 6 | namespace caffe { 7 | 8 | template 9 | void NeuronLayer::Reshape(const vector*>& bottom, 10 | const vector*>& top) { 11 | top[0]->ReshapeLike(*bottom[0]); 12 | } 13 | 14 | INSTANTIATE_CLASS(NeuronLayer); 15 | 16 | } // namespace caffe 17 | -------------------------------------------------------------------------------- /src/caffe/layers/silence_layer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "caffe/common_layers.hpp" 4 | #include "caffe/layer.hpp" 5 | #include "caffe/util/math_functions.hpp" 6 | 7 | namespace caffe { 8 | 9 | template 10 | void SilenceLayer::Backward_cpu(const vector*>& top, 11 | const vector& propagate_down, const vector*>& bottom) { 12 | for (int i = 0; i < bottom.size(); ++i) { 13 | if (propagate_down[i]) { 14 | caffe_set(bottom[i]->count(), Dtype(0), 15 | bottom[i]->mutable_cpu_data()); 16 | } 17 | } 18 | } 19 | 20 | #ifdef CPU_ONLY 21 | STUB_GPU(SilenceLayer); 22 | #endif 23 | 24 | INSTANTIATE_CLASS(SilenceLayer); 25 | REGISTER_LAYER_CLASS(Silence); 26 | 27 | } // namespace caffe 28 | -------------------------------------------------------------------------------- /src/caffe/layers/silence_layer.cu: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "caffe/common_layers.hpp" 4 | #include "caffe/layer.hpp" 5 | #include "caffe/util/math_functions.hpp" 6 | 7 | namespace caffe { 8 | 9 | template 10 | void SilenceLayer::Forward_gpu(const vector*>& bottom, 11 | const vector*>& top) { 12 | // Do nothing. 13 | } 14 | 15 | template 16 | void SilenceLayer::Backward_gpu(const vector*>& top, 17 | const vector& propagate_down, const vector*>& bottom) { 18 | for (int i = 0; i < bottom.size(); ++i) { 19 | if (propagate_down[i]) { 20 | caffe_gpu_set(bottom[i]->count(), Dtype(0), 21 | bottom[i]->mutable_gpu_data()); 22 | } 23 | } 24 | } 25 | 26 | INSTANTIATE_LAYER_GPU_FUNCS(SilenceLayer); 27 | 28 | } // namespace caffe 29 | -------------------------------------------------------------------------------- /src/caffe/layers/split_layer.cu: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "caffe/layer.hpp" 4 | #include "caffe/util/math_functions.hpp" 5 | #include "caffe/vision_layers.hpp" 6 | 7 | namespace caffe { 8 | 9 | template 10 | void SplitLayer::Forward_gpu(const vector*>& bottom, 11 | const vector*>& top) { 12 | for (int i = 0; i < top.size(); ++i) { 13 | top[i]->ShareData(*bottom[0]); 14 | } 15 | } 16 | 17 | template 18 | void SplitLayer::Backward_gpu(const vector*>& top, 19 | const vector& propagate_down, const vector*>& bottom) { 20 | if (!propagate_down[0]) { return; } 21 | if (top.size() == 1) { 22 | caffe_copy(count_, top[0]->gpu_diff(), bottom[0]->mutable_gpu_diff()); 23 | return; 24 | } 25 | caffe_gpu_add(count_, top[0]->gpu_diff(), top[1]->gpu_diff(), 26 | bottom[0]->mutable_gpu_diff()); 27 | // Add remaining top blob diffs. 28 | for (int i = 2; i < top.size(); ++i) { 29 | const Dtype* top_diff = top[i]->gpu_diff(); 30 | Dtype* bottom_diff = bottom[0]->mutable_gpu_diff(); 31 | caffe_gpu_axpy(count_, Dtype(1.), top_diff, bottom_diff); 32 | } 33 | } 34 | 35 | 36 | INSTANTIATE_LAYER_GPU_FUNCS(SplitLayer); 37 | 38 | } // namespace caffe 39 | -------------------------------------------------------------------------------- /src/caffe/layers/threshold_layer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "caffe/layer.hpp" 4 | #include "caffe/vision_layers.hpp" 5 | 6 | 7 | namespace caffe { 8 | 9 | template 10 | void ThresholdLayer::LayerSetUp(const vector*>& bottom, 11 | const vector*>& top) { 12 | NeuronLayer::LayerSetUp(bottom, top); 13 | threshold_ = this->layer_param_.threshold_param().threshold(); 14 | } 15 | 16 | template 17 | void ThresholdLayer::Forward_cpu(const vector*>& bottom, 18 | const vector*>& top) { 19 | const Dtype* bottom_data = bottom[0]->cpu_data(); 20 | Dtype* top_data = top[0]->mutable_cpu_data(); 21 | const int count = bottom[0]->count(); 22 | for (int i = 0; i < count; ++i) { 23 | top_data[i] = (bottom_data[i] > threshold_) ? Dtype(1) : Dtype(0); 24 | } 25 | } 26 | 27 | #ifdef CPU_ONLY 28 | STUB_GPU_FORWARD(ThresholdLayer, Forward); 29 | #endif 30 | 31 | INSTANTIATE_CLASS(ThresholdLayer); 32 | REGISTER_LAYER_CLASS(Threshold); 33 | 34 | } // namespace caffe 35 | -------------------------------------------------------------------------------- /src/caffe/layers/threshold_layer.cu: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "caffe/layer.hpp" 5 | #include "caffe/vision_layers.hpp" 6 | 7 | namespace caffe { 8 | 9 | template 10 | __global__ void ThresholdForward(const int n, const Dtype threshold, 11 | const Dtype* in, Dtype* out) { 12 | CUDA_KERNEL_LOOP(index, n) { 13 | out[index] = in[index] > threshold ? 1 : 0; 14 | } 15 | } 16 | 17 | template 18 | void ThresholdLayer::Forward_gpu(const vector*>& bottom, 19 | const vector*>& top) { 20 | const Dtype* bottom_data = bottom[0]->gpu_data(); 21 | Dtype* top_data = top[0]->mutable_gpu_data(); 22 | const int count = bottom[0]->count(); 23 | // NOLINT_NEXT_LINE(whitespace/operators) 24 | ThresholdForward<<>>( 25 | count, threshold_, bottom_data, top_data); 26 | CUDA_POST_KERNEL_CHECK; 27 | } 28 | 29 | 30 | INSTANTIATE_LAYER_GPU_FORWARD(ThresholdLayer); 31 | 32 | 33 | } // namespace caffe 34 | -------------------------------------------------------------------------------- /src/caffe/test/test_caffe_main.cpp: -------------------------------------------------------------------------------- 1 | // The main caffe test code. Your test cpp code should include this hpp 2 | // to allow a main function to be compiled into the binary. 3 | 4 | #include "caffe/caffe.hpp" 5 | #include "caffe/test/test_caffe_main.hpp" 6 | 7 | namespace caffe { 8 | #ifndef CPU_ONLY 9 | cudaDeviceProp CAFFE_TEST_CUDA_PROP; 10 | #endif 11 | } 12 | 13 | #ifndef CPU_ONLY 14 | using caffe::CAFFE_TEST_CUDA_PROP; 15 | #endif 16 | 17 | int main(int argc, char** argv) { 18 | ::testing::InitGoogleTest(&argc, argv); 19 | caffe::GlobalInit(&argc, &argv); 20 | #ifndef CPU_ONLY 21 | // Before starting testing, let's first print out a few cuda defice info. 22 | int device; 23 | cudaGetDeviceCount(&device); 24 | cout << "Cuda number of devices: " << device << endl; 25 | if (argc > 1) { 26 | // Use the given device 27 | device = atoi(argv[1]); 28 | cudaSetDevice(device); 29 | cout << "Setting to use device " << device << endl; 30 | } else if (CUDA_TEST_DEVICE >= 0) { 31 | // Use the device assigned in build configuration; but with a lower priority 32 | device = CUDA_TEST_DEVICE; 33 | } 34 | cudaGetDevice(&device); 35 | cout << "Current device id: " << device << endl; 36 | cudaGetDeviceProperties(&CAFFE_TEST_CUDA_PROP, device); 37 | #endif 38 | // invoke the test. 39 | return RUN_ALL_TESTS(); 40 | } 41 | -------------------------------------------------------------------------------- /src/caffe/test/test_data/sample_data.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/src/caffe/test/test_data/sample_data.h5 -------------------------------------------------------------------------------- /src/caffe/test/test_data/sample_data_2_gzip.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/src/caffe/test/test_data/sample_data_2_gzip.h5 -------------------------------------------------------------------------------- /src/caffe/test/test_data/sample_data_list.txt: -------------------------------------------------------------------------------- 1 | src/caffe/test/test_data/sample_data.h5 2 | src/caffe/test/test_data/sample_data_2_gzip.h5 3 | -------------------------------------------------------------------------------- /src/caffe/test/test_data/solver_data.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fyangneil/pavement-crack-detection/956083b0816493191d8d5a6739e24d47fe22deaa/src/caffe/test/test_data/solver_data.h5 -------------------------------------------------------------------------------- /src/caffe/test/test_data/solver_data_list.txt: -------------------------------------------------------------------------------- 1 | src/caffe/test/test_data/solver_data.h5 2 | -------------------------------------------------------------------------------- /src/caffe/test/test_protobuf.cpp: -------------------------------------------------------------------------------- 1 | // This is simply a script that tries serializing protocol buffer in text 2 | // format. Nothing special here and no actual code is being tested. 3 | #include 4 | 5 | #include "google/protobuf/text_format.h" 6 | #include "gtest/gtest.h" 7 | 8 | #include "caffe/proto/caffe.pb.h" 9 | 10 | #include "caffe/test/test_caffe_main.hpp" 11 | 12 | namespace caffe { 13 | 14 | class ProtoTest : public ::testing::Test {}; 15 | 16 | TEST_F(ProtoTest, TestSerialization) { 17 | LayerParameter param; 18 | param.set_name("test"); 19 | param.set_type("Test"); 20 | std::cout << "Printing in binary format." << std::endl; 21 | std::cout << param.SerializeAsString() << std::endl; 22 | std::cout << "Printing in text format." << std::endl; 23 | std::string str; 24 | google::protobuf::TextFormat::PrintToString(param, &str); 25 | std::cout << str << std::endl; 26 | EXPECT_TRUE(true); 27 | } 28 | 29 | } // namespace caffe 30 | -------------------------------------------------------------------------------- /src/caffe/util/cudnn.cpp: -------------------------------------------------------------------------------- 1 | #ifdef USE_CUDNN 2 | #include "caffe/util/cudnn.hpp" 3 | 4 | namespace caffe { 5 | namespace cudnn { 6 | 7 | float dataType::oneval = 1.0; 8 | float dataType::zeroval = 0.0; 9 | const void* dataType::one = 10 | static_cast(&dataType::oneval); 11 | const void* dataType::zero = 12 | static_cast(&dataType::zeroval); 13 | 14 | double dataType::oneval = 1.0; 15 | double dataType::zeroval = 0.0; 16 | const void* dataType::one = 17 | static_cast(&dataType::oneval); 18 | const void* dataType::zero = 19 | static_cast(&dataType::zeroval); 20 | 21 | } // namespace cudnn 22 | } // namespace caffe 23 | #endif 24 | -------------------------------------------------------------------------------- /src/caffe/util/db.cpp: -------------------------------------------------------------------------------- 1 | #include "caffe/util/db.hpp" 2 | #include "caffe/util/db_leveldb.hpp" 3 | #include "caffe/util/db_lmdb.hpp" 4 | 5 | #include 6 | 7 | namespace caffe { namespace db { 8 | 9 | DB* GetDB(DataParameter::DB backend) { 10 | switch (backend) { 11 | case DataParameter_DB_LEVELDB: 12 | return new LevelDB(); 13 | case DataParameter_DB_LMDB: 14 | return new LMDB(); 15 | default: 16 | LOG(FATAL) << "Unknown database backend"; 17 | } 18 | } 19 | 20 | DB* GetDB(const string& backend) { 21 | if (backend == "leveldb") { 22 | return new LevelDB(); 23 | } else if (backend == "lmdb") { 24 | return new LMDB(); 25 | } else { 26 | LOG(FATAL) << "Unknown database backend"; 27 | } 28 | } 29 | 30 | } // namespace db 31 | } // namespace caffe 32 | -------------------------------------------------------------------------------- /src/caffe/util/db_leveldb.cpp: -------------------------------------------------------------------------------- 1 | #include "caffe/util/db_leveldb.hpp" 2 | 3 | #include 4 | 5 | namespace caffe { namespace db { 6 | 7 | void LevelDB::Open(const string& source, Mode mode) { 8 | leveldb::Options options; 9 | options.block_size = 65536; 10 | options.write_buffer_size = 268435456; 11 | options.max_open_files = 100; 12 | options.error_if_exists = mode == NEW; 13 | options.create_if_missing = mode != READ; 14 | leveldb::Status status = leveldb::DB::Open(options, source, &db_); 15 | CHECK(status.ok()) << "Failed to open leveldb " << source 16 | << std::endl << status.ToString(); 17 | LOG(INFO) << "Opened leveldb " << source; 18 | } 19 | 20 | } // namespace db 21 | } // namespace caffe 22 | -------------------------------------------------------------------------------- /src/gtest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(gtest STATIC EXCLUDE_FROM_ALL gtest.h gtest-all.cpp) 2 | caffe_default_properties(gtest) 3 | 4 | #add_library(gtest_main gtest_main.cc) 5 | #target_link_libraries(gtest_main gtest) 6 | -------------------------------------------------------------------------------- /tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Collect source files 2 | file(GLOB_RECURSE srcs ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 3 | 4 | # Build each source file independently 5 | foreach(source ${srcs}) 6 | get_filename_component(name ${source} NAME_WE) 7 | 8 | # caffe target already exits 9 | if(name MATCHES "caffe") 10 | set(name ${name}.bin) 11 | endif() 12 | 13 | # target 14 | add_executable(${name} ${source}) 15 | target_link_libraries(${name} ${Caffe_LINK}) 16 | caffe_default_properties(${name}) 17 | 18 | # set back RUNTIME_OUTPUT_DIRECTORY 19 | caffe_set_runtime_directory(${name} "${PROJECT_BINARY_DIR}/tools") 20 | caffe_set_solution_folder(${name} tools) 21 | 22 | # restore output name without suffix 23 | if(name MATCHES "caffe.bin") 24 | set_target_properties(${name} PROPERTIES OUTPUT_NAME caffe) 25 | endif() 26 | 27 | # Install 28 | install(TARGETS ${name} DESTINATION bin) 29 | endforeach(source) 30 | -------------------------------------------------------------------------------- /tools/device_query.cpp: -------------------------------------------------------------------------------- 1 | #include "caffe/common.hpp" 2 | 3 | int main(int argc, char** argv) { 4 | LOG(FATAL) << "Deprecated. Use caffe device_query " 5 | "[--device_id=0] instead."; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /tools/finetune_net.cpp: -------------------------------------------------------------------------------- 1 | #include "caffe/caffe.hpp" 2 | 3 | int main(int argc, char** argv) { 4 | LOG(FATAL) << "Deprecated. Use caffe train --solver=... " 5 | "[--weights=...] instead."; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /tools/net_speed_benchmark.cpp: -------------------------------------------------------------------------------- 1 | #include "caffe/caffe.hpp" 2 | 3 | int main(int argc, char** argv) { 4 | LOG(FATAL) << "Deprecated. Use caffe time --model=... " 5 | "[--iterations=50] [--gpu] [--device_id=0]"; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /tools/test_net.cpp: -------------------------------------------------------------------------------- 1 | #include "caffe/caffe.hpp" 2 | 3 | int main(int argc, char** argv) { 4 | LOG(FATAL) << "Deprecated. Use caffe test --model=... " 5 | "--weights=... instead."; 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /tools/train_net.cpp: -------------------------------------------------------------------------------- 1 | #include "caffe/caffe.hpp" 2 | 3 | int main(int argc, char** argv) { 4 | LOG(FATAL) << "Deprecated. Use caffe train --solver=... " 5 | "[--snapshot=...] instead."; 6 | return 0; 7 | } 8 | --------------------------------------------------------------------------------