This repository contains source files of Road Damage Detection and Classification (RDDC) based on Faster R-CNN, which achieved a Mean F1-Score of 0.6255 in the Road Damage Detection and Classification Challenge that held as one of the 2018 IEEE Big Data Cup and won the Silver Prize (Ranked 2nd).
It is developed based on the tf-faster-rcnn repository and created by Wenzhe Wang.
-
A GPU with sufficient memory.
-
A basic Tensorflow installation (I use 1.4.0).
-
Clone the tf-faster-rcnn-rddc repository into
$RDDC_ROOT
git clone https://github.com/zhezheey/tf-faster-rcnn-rddc.git
-
Install python packages you might not have in
requirements.txt
# Python 3.4.3+ is needed pip install -r requirements.txt
-
Update your -arch in setup script to match your GPU refer to tf-faster-rcnn
cd $RDDC_ROOT/lib # Change the GPU architecture (-arch) if necessary vim setup.py
-
Build the Cython modules
cd $RDDC_ROOT/lib make clean make
-
Install the Python COCO API
cd $RDDC_ROOT/data git clone https://github.com/pdollar/coco.git cd coco/PythonAPI make
-
Download the RDDC dataset and convert it into PASCAL VOC 2007's annotation format. For convenience, you can also download the converted dataset here.
-
Create symlinks for the converted PASCAL VOC dataset
cd $RDDC_ROOT/data ln -s $road_damage_dataset VOCdevkit2007
Follow the steps below to reproduce the experimental results of our submission.
-
Download our pre-trained model on RDDC and place them inside the
$RDDC_ROOT/output/res152/voc_2007_trainval/default
directory. -
Get the submission
cd $RDDC_ROOT/tools # Outputs are saved under $RDDC_ROOT python submmision.py
-
Download pre-trained models and weights. The current code supports VGG16 and Resnet V1 models. Pre-trained models are provided by slim, you can get the pre-trained models here and put them under the
$RDDC_ROOT/data/imagenet_weights
folder. For Resnet152, you can set up like:mkdir -p $RDDC_ROOT/data/imagenet_weights cd $RDDC_ROOT/data/imagenet_weights wget -v http://download.tensorflow.org/models/resnet_v1_152_2016_08_28.tar.gz tar -xzvf resnet_v1_152_2016_08_28.tar.gz mv resnet_v1_152.ckpt res152.ckpt
-
Augment the training data refer to
$RDDC_ROOT/analysis/data_augmentation_balance.ipynb
. -
Train
cd $RDDC_ROOT ./experiments/scripts/train_faster_rcnn.sh [GPU_ID] pascal_voc res152
Note: Please check that you have deleted the pre-trained models before training.
-
Visualization with Tensorboard
cd $RDDC_ROOT tensorboard --logdir=tensorboard/res152/voc_2007_trainval/ --port=[PORT] &
-
By default, trained networks are saved under:
$RDDC_ROOT/output/res152/voc_2007_trainval/default/
Tensorboard information is saved under:
$RDDC_ROOT/tensorboard/res152/voc_2007_trainval/default/ $RDDC_ROOT/tensorboard/res152/voc_2007_trainval/default_val/
Some analyses during the competititon are under $RDDC_ROOT/analysis
.
Please consider citing the related papers and linking this project.