Giter Club home page Giter Club logo

concrete-crack-detection's Introduction

Concrete-Crack-Detection

This repository contains the code for crack detection in concrete surfaces. It is a TensorFlow implementation of the paper by by Young-Jin Cha and Wooram Choi - "Deep Learning-Based Crack Damage Detection Using Convolutional Neural Networks".

CNN_Archi

The model acheived 85% accuracy on the validation set. A few results are shown below - results

MATLAB was used to prepare the data. Regions of Interest were sliced into smaller 128 x 128 pixel images and used for training -

roi

Dependencies required-

  • TensorFlow
  • OpenCV

The dataset.py file creates the training dataset class to be fed into the Convolutional Neural Network. This class automatically determines the number of classes by the number of folders in 'in_dir' (number of folders=number of classes)

NOTE: This script utilizes an already saved cache file. The cache file contains the filenames of the data. If the cache file doesn't exist, a new one created. If the data has been altered with, please delete the old cache file and run the script again. This applies for both Running.py and Train_CD.py. This was my first ever Deep Learning project hence, the naive approach. I'll streamline this once I get some time, or gladly accept a pull request!

The directory structure is assumed to be the following- (For example considering 3 classes)

  • in_dir/class1/ - Contains all the training images for class 1
    • test/ - Contains all the validation images for class 1
  • in_dir/class2/ - Contains all the training images for class 2
    • test/ - Contains all the validation images for class 2
  • in_dir/class3/ - Contains all the training images for class 3
    • test/ - Contains all the validation images for class 3

To train the network run the command with the following arguments:
python Train_CD.py

Argument Details Default
--in_dir path to in_dir folder cracky
--iter number of iterations to run the model for 1500
--save_folder Directory to save checkpoint CURRENT_DIR

After model has been trained, meta_files are saved into 'save_folder'. To test the model, run the command with the following arguments: python Running.py

Argument Details Default
--in_dir directory containing unlabeled test data cracky_test
--meta_file MetaFile path None (Will throw error if not given)
--CP_dir dir contatining checkpoint None (Will throw error if not given)
--save_dir dir to save output images CURRENT_DIR

TODO:

  • Streamline data loading; remove cache file system
  • Combine training and testing scripts into one

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.