Awesome Open Source
Awesome Open Source



  • Python 3.x
  • Tensorflow >= 1.21 or Tensorflow-gpu
  • Numpy
  • Scipy, Scikit-image
  • Matplotlib


  • Classes for training dataset and test image reading
  • Functions of layers
  • Model of FCN
  • Main training and test of FCN
  • data/train/*: Folder for training dataset, contains subfolder 'image', 'annotation' and 'index.txt'
  • data/valid/*: Folder for validing dataset, contains subfolder 'image', 'annotation' and 'index.txt'
  • logs: Folder for training logs
  • checkpoints: Folder for model parameters
  • test: Folder for test images



  1. Download pretrained model ( and put into folder checkpoints
  2. Put test images into folder test
  3. Run python --mode=predict --test_dir=test

Train and finetune

  1. Download vgg19 pretrained parameters into the root folder (
  2. Prepare your own data or download crack dataset from ( If you need to change the training samples or validating sample, you can modify the index.txt file directly. Then put the data into data/train/ and data/valid/ respectively.
  3. Run python --mode=finetune --learning_rate=1e-4 --num_of_epoch=20 --batch_size=2
  4. If you would like to check the training process, run tensorboard --logdir=logs, then open http://localhost:6006/ using any web explorer.

Please put 'index.txt' into train or valid folder as follows (The feeding process will follow this order):


Skeleton of cracks

Once you have got the predictions of cracks, go to python environment

from FCN_CrackAnalysis import CrackAnalyse

analyser = CrackAnalyse('test/001.png')
crack_skeleton = analyser.get_skeleton()
crack_lenth = analyser.get_crack_length()
crack_max_width = analyser.get_crack_max_width()
crack_mean_width = analyser.get_crack_mean_width()

Then you can using matplotlib to show the skeleton and print the crack morphological features.


  • training loss loss.jpg

  • training accuracy acc.jpg

  • normal cracks crack_cp_0742.png

  • thin cracks crack_cp_0063.png

  • intersected cracks crack_cp_0070.png

  • historical(wide) cracks crack_cp_0228.png

  • mixed cracks crack_cp_0286.png

  • complex cracks crack_cp_0619.png

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Python (861,969
Dataset (33,173
Tensorflow (22,760
Crack (1,116
Fcn (661
Image Annotation (166