Concrete: Surface Crack Detection

1 minute read

Crack Detection

Background

Concrete surface cracks are major defect in civil structures. Crack detection plays a major role in building inspection, finding cracks and determining building health.

Developing a system to automatically classify instances would be beneficial especially when size of the dataset starts getting larger.

Data Description

The data to be analyzed includes

  • 20000 images with cracks;
  • 20000 images without cracks.

The dataset used for the project is available on Kaggle and can be accessed using this link.

Methodology

Image paths were scored into separate dataframes for training, validation and testing to make them easier to preprocess and evaluate.

The model used was defined by importing the network (with pre-trained weights) developed by the Visual Geometry Group at Oxford which won the ImageNet Large Scale Visual Recognition Challenge in 2014, chopping off the top layer and freezing other leayers before finally being connected to a global averaging layer followed by two dense layers that were finally fed into a sigmoid activation for classification.

Training, validation and testing steps were defined as the result of the division between the number of samples in each set and the corresponding batch sizes. Augmentation was applied to the training set to prevent overfitting and the images were resized appropriately.

Working with a large number of samples simultaneously and performing numeric computations on them will overstrain the Random Access Memory and can result in the kernel crashing which will also be prevented by working with data in smaller batches.

Results

The neural network model was trained and validated on the data for a single epoch which was expedited using the Graphics Processing Unit on Kaggle to produce the results shown below.

A copy of the working notebook is available here; the setup can also run directly on Kaggle after being forked from this link.

Conclusion

The accuracy on the test set was over 99.50 % without any fine tuning which is excellent.