• Stars
    star
    256
  • Rank 159,219 (Top 4 %)
  • Language
    Python
  • License
    Other
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Pytorch implementation of DeepCrack and RoadNet projects.

Python 3.5 Packagist Last Commit Maintenance Contributing Open In Colab

DeepSegmentor

A Pytorch implementation of DeepCrack and RoadNet projects.

1.Datasets

Please download the corresponding dataset and prepare it by following the guidance.

2.Installation

We provide an user-friendly configuring method via Conda system, and you can create a new Conda environment using the command:

conda env create -f environment.yml

3.Balancing Weights

We follow the Median Frequency Balancing method, using the command:

python3 ./tools/calculate_weights.py --data_path <path_to_segmentation>

4.Training

Before the training, please download the dataset and copy it into the folder datasets.

  • Crack Detection
sh ./scripts/train_deepcrack.sh <gpu_id>
  • Road Detection
sh ./scripts/train_roadnet.sh <gpu_id>

We provide our pretrained models here:

Model Google Drive Baidu Yun Others
DeepCrack πŸ‘Œ[link] πŸ‘Œ[link](psw: 3fai) Fine-tuned
RoadNet πŸ‘Œ[link] πŸ‘Œ[link](psw: c2gi) Roughly trained
RoadNet++ [link] [link] -

5.Testing

  • Crack Detection
sh ./scripts/test_deepcrack.sh <gpu_id>
Image Ground Truth GF fused side1 side2 side3 side4 side5

[See more examples >>>]

  • Road Detection
sh ./scripts/test_roadnet.sh <gpu_id>
Image Ground Truth Prediction

[See more examples >>>]

6.Evaluation

  • Metrics (appeared in our papers):
Metric Description Usage
P Precision, TP/(TP+FP) segmentation
R Recall, TP/(TP+FN) segmentation
F F-score, 2PR/(P+R) segmentation
TPR True Positive Rate, TP/(TP+FN) segmentation
FPR False Positive Rate, FP/(FP+TN) segmentation
AUC The Area Under the ROC Curve segmentation
G Global accuracy, measures the percentage of the pixels correctly predicted segmentation
C Class average accuracy, means the predictive accuracy over all classes segmentation
I/U Mean intersection over union segmentation
ODS the best F-measure on the dataset for a fixed scale edge,centerline
OIS the aggregate F-measure on the dataset for the best scale in each image edge,centerline
AP the average precision on the full recall range edge,centerline

Note: If you want to apply the standard non-maximum suppression (NMS) for edge/centerline thinning. Please see more details in Piotr's Structured Forest matlab toolbox or some helper functions provided in the hed/eval.

[See more details (Evaluation + Guided Filter + CRF) >>>]

Usage:

cd eval
python eval.py --metric_mode prf --model_name deepcrack --output deepcrack.prf

[Display the accuracy curves >>>]

Acknowledgment

References

If you take use of our datasets or code, please cite our papers:

@article{liu2019deepcrack,
  title={DeepCrack: A Deep Hierarchical Feature Learning Architecture for Crack Segmentation},
  author={Liu, Yahui and Yao, Jian and Lu, Xiaohu and Xie, Renping and Li, Li},
  journal={Neurocomputing},
  volume={338},
  pages={139--153},
  year={2019},
  doi={10.1016/j.neucom.2019.01.036}
}

@article{liu2019roadnet,
  title={RoadNet: Learning to Comprehensively Analyze Road Networks in Complex Urban Scenes from High-Resolution Remotely Sensed Images},
  author={Liu, Yahui and Yao, Jian and Lu, Xiaohu and Xia, Menghan and Wang, Xingbo and Liu, Yuan},
  journal={IEEE Transactions on Geoscience and Remote Sensing},
  volume={57},
  number={4},
  pages={2043--2056},
  year={2019},
  doi={10.1109/TGRS.2018.2870871}
}

If you have any questions, please contact me without hesitation (yahui.cvrs AT gmail.com).

More Repositories

1

DeepCrack

DeepCrack: A Deep Hierarchical Feature Learning Architecture for Crack Segmentation, Neurocomputing.
211
star
2

VTs-Drloc

NeurIPS 2021, Official codes for "Efficient Training of Visual Transformers with Small Datasets".
Python
138
star
3

tensorflow.cifar10

The examples of image recognition with the dataset CIFAR10 via tensorflow.
Python
132
star
4

mnist

Some samples of the MNIST classifier.
Python
118
star
5

RoadNet

RoadNet: A Multi-task Benchmark Dataset for Road Detection, TGRS.
97
star
6

cifar10Dataset

Create your own dataset with the similar format with CIFAR10 in python version.
Python
87
star
7

GAN-Metrics

A collection of metrics for evaluating GAN models.
Python
55
star
8

imageBinaryDataset

C++
50
star
9

SmoothingLatentSpace

CVPR 2021, Smoothing the Disentangled Latent Style Space for Unsupervised I2I Translation
Python
41
star
10

MJP

An official Pytorch implementation of "Masked Jigsaw Puzzle: A Versatile Position Embedding for Vision Transformers", CVPR 2023.
Python
39
star
11

DWC-GAN

DWC-GAN, ACM MM 2020.
Python
32
star
12

uaggan

A Pytorch implementation of "Unsupervised Attention-Guided Image-to-Image Translation"
Python
29
star
13

TriangleGAN

TriangleGAN, ACM MM 2019.
Python
29
star
14

Domain-Translation-Papers

Collecting papers about domain translations.
21
star
15

frechet-bert-distance

Findings of ACL 2021
Python
21
star
16

stylegan-mmuit

ISF-GAN, TMM 2022.
Python
17
star
17

SuperpixelRegionFill

Superpixels-based region filling
C++
17
star
18

RG-UNIT

RG-UNIT, ACM MM 2020.
Python
11
star
19

ImageDataAugmentation

Image data augmentation via flipping and rotation.
C++
11
star
20

FindFilesWithinFolder

Find and generate a file list of the folder.
C++
7
star
21

Activations

A list of current activation functions in deep learning.
MATLAB
7
star
22

Reweighting

Reweighting Responses, EMNLP 2018 (short, oral)
Python
4
star
23

ImageFormatConversion

A Demo of converting the single channel 16-bit images to 8-bit images.
C
2
star
24

image2binarytest

C++
2
star
25

Create-Subfolder

Create a subfolder included in the input file path.
C++
1
star
26

QImage2Mat

The conversion between Qt QImage and OpenCV Mat.
C++
1
star