- For Pytorch version of IOPLIN, see this.
- For more details of this task, see Pavement Distress Classification.
This repo is the official implementation of "Iteratively Optimized Patch Label Inference Network for Automatic Pavement Disease Detection" based on Keras and TensorFlow 1, and IOPLIN has published in: IEEE Transactions on Intelligent Transportation Systems. The source code is placed at /ioplin, the script is placed at /script, and the required mini dataset should place at /miniset.
For more details of the pavement dataset CQU-BPDD used in paper, please refer to CQU-BPDD. (Note: CQU-BPDD can be only used in the uncommercial case and is licensed under CC BY-NC-SA 4.0.)
python <= 3.7.9
Keras == 2.2.4
/TensorFlow <= 1.15.0
keras_applications >= 1.0.7
scikit-image
opencv-python
efficientnet <= 0.0.3
$ python setup.py install
- Initializing the model:
# models can be build with Keras
import ioplin
model = ioplin.init_model()
- Loading the pre-trained weights:
import ioplin
model = ioplin.load_model('path/to/model.h5')
- Predicting:
import ioplin
pre = ioplin.predict(model,data)
- Pretrain and train:
import ioplin
model = ioplin.pretrain(model,data_x,data_y)
model = ioplin.train(model,data_x,data_y)
Simple application script of IOPLIN, and the required dataset and default model of IOPLIN can be downloaded from Google Drive
$ python pretrain.py --batch_size=32 --epoch=10
$ python train.py --batch_size=32 --epoch=10 --path_pretrain_model=path/pretrain_model.h5
If you want to use the trained IOPLIN model to predict data, you should download the model file and enter:
$ python predict.py --path_model=path/trained_model.h5 --positive_index=0
$ python predict.py --path_model=path/your_model.h5