GithubHelp home page GithubHelp logo

sanwen211314 / cnn-for-crack-detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shengyuan-li/cnn-for-crack-detection

0.0 1.0 0.0 5.2 MB

An application of CNN for crack detection using Caffe

Batchfile 40.83% MATLAB 59.17%

cnn-for-crack-detection's Introduction

CNN-for-Crack-Detection

An application of CNN for crack detection using Caffe

Requirements

Caffe-GPU in Windows system (with compiled MATLAB interface)
MATLAB R2014a

Content

train/0/*: Folder for training images with cracks
train/1/*: Folder for training images without cracks
val/0/*: Folder for validation images with cracks
val/1/*: Folder for validation images without cracks
test/*: Folder for testing images and testing results
train_leveldb: Folder for converted training set
val_leveldb: Folder for converted validation set
train.txt: label file of training set
val.txt: label file of validation set
train_label.m: MATLAB code for generating train.txt
val_label.m: MATLAB code for generating val.txt
convert_train_leveldb.bat: Batch file for converting training set
convert_val_leveldb.bat: Batch file for converting validation set
train_mean.binaryproto: Mean file of training set
val_mean.binaryproto: Mean file of validation set
mean_train.bat: Batch file for computing mean of training set
mean_val.bat: Batch file for computing mean of validation set
train_val.prototxt: CNN architecture of training and validation processes
solver.prototxt: Solver file for setting training and validation parameters
train.bat: Batch file for training and validating the CNN
log.txt: Log file of training and validation processes
trained_models: Folder for saving trained CNN model
deploy.prototxt: Deploy file used in CNN testing process
demo/*.m: MATLAB codes for testing the trained model

Useage

Preraring datasets

1. Prepare your own data. Then put the data into train/ and val/ respectively
2. Generating label files train.txt and val.txt, run train_label.m and val_label.m
3. Converting training set and validation set to genarate train_leveldb and val_leveldb, run
   convert_train_leveldb.bat and convert_val_leveldb.bat
4. Computing means of training set and validation set to genarate train_mean.binaryproto and
   val_mean.binaryproto, run mean_train.bat and mean_val.bat


Training and validation

Run train.bat, then the log.txt will be created autometiclly and trained CNN models will be saved in the
trained_models folder


Testing

In the path of compiled MATLAB interface caffe/matlab/demo, run demo/AlexNet_test.m. Then testing results
will be saved in the test folder

Note

1. In all batch files (*.bat), the path of compiled caffe must be changed correctly 
2. The MATLAB files in demo folder must be run in the path of compiled MATLAB interface caffe/matlab/demo
3. In AlexNet_test.m, project_dir must be changed as the absolute path to the test folder

cnn-for-crack-detection's People

Contributors

shengyuan-li avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.