A public available dataset for road boundary detection in aerial images

Overview

Topo-boundary

This is the official github repo of paper Topo-boundary: A Benchmark Dataset on Topological Road-boundary Detection Using Aerial Images for Autonomous Driving.

Project page.

Topo-boundary is a publicly available benchmark dataset for topological road-boundary detection in aerial images. With an aerial image as the input, the evaluated method should predict the topological structure of road boundaries in the form of a graph.

This dataset is based on NYC Planimetric Database. Topo-boundary consists of 25,297 4-channel aerial images, and each aerial image has eight labels for different deep-learning tasks. More details about the dataset structure can be found in our paper. Follow the steps in the ./dataset to prepare the dataset.

We also provide the implementation code (including training and inference) based on PyTorch of 9 methods. Go to the Implementation section for details.

Update

  • May/22/2021 Topo_boundary is released. More time is needed to prepare ConvBoundary, DAGMapper and Enhanced-iCurb, thus currently these models are not open-sourced.

Platform information

Hardware info

GPU: one RTX3090 and one GTX1080Ti
CPU: i7-8700K
RAM: 32G
SSD: 256G + 1T

Software info

Ubuntu 18.04
CUDA 11.2
Docker 20.10.1

Make sure you have Docker installed.

File structure

Topo-Boundary
|
├── dataset
|   ├── data_split.json
|   ├── config_dir.yml
|   ├── get_data.bash
|   ├── get_checkpoints.bash
│   ├── cropped_tiff
│   ├── labels
|   ├── pretrain_checkpoints
│   └── scripts
|   
├── docker 
|
├── graph_based_baselines
|   ├── ConvBoundary
|   ├── DAGMApper
|   ├── Enhanced-iCurb
|   ├── iCurb
|   ├── RoadTracer
|   └── VecRoad 
|
├── segmentation_based_baselines
|   ├── DeepRoadMapper
|   ├── OrientationRefine
|   └── naive_baseline
|

Environment and Docker

Docker is used to set up the environment. If you are not familiar with Docker, refer to install Docker and Docker beginner tutorial for more information.

To build the docker image, run:

# go to the directory
cd ./docker
# optional
chmod +x ./build_image.sh
# build the docker image
./build_image.sh

Data and pretrain checkpoints preparation

Follow the steps in ./dataset to prepare the dataset and checkpoints trained by us.

Implementations

We provide the implementation code of 9 methods, including 3 segmentation-based baseline models, 5 graph-based baseline models, and an improved method based on our previous work iCurb. All methods are implemented with PyTorch by ourselves.

Note that the evaluation results of baselines may change after some modifications being made.

Evaluation metrics

We evaluate our implementations by 3 relaxed-pixel-level metrics, the self-defined Entropy Connectivity Metric (ECM), naive connectivity metric (proposed in ConvBoundary) and Average Path Length Similarity (APLS). For more details, refer to the supplementary document.

Related topics

Other research topics about line-shaped object detection could be inspiring to our task. Line-shaped object indicts target objects that have long but thin shapes, and the topology correctness of them also matters a lot. They usually have an irregular shape. E.g., road-network detection, road-lane detection, road-curb detection, line-segment detection, etc. The method to detect one line-shaped object could be adapted to another category without much modification.

To do

  • Acceleration
  • Fix bugs

Contact

For any questions, please send email to zxubg at connect dot ust dot hk.

Citation

@article{xu2021topo,
  title={Topo-boundary: A Benchmark Dataset on Topological Road-boundary Detection Using Aerial Images for Autonomous Driving},
  author={Xu, Zhenhua and Sun, Yuxiang and Liu, Ming},
  journal={arXiv preprint arXiv:2103.17119},
  year={2021}
}

@article{xu2021icurb,
  title={iCurb: Imitation Learning-Based Detection of Road Curbs Using Aerial Images for Autonomous Driving},
  author={Xu, Zhenhua and Sun, Yuxiang and Liu, Ming},
  journal={IEEE Robotics and Automation Letters},
  volume={6},
  number={2},
  pages={1097--1104},
  year={2021},
  publisher={IEEE}
}
Comments
  • RuntimeError: cuda runtime error (710) : device-side assert triggered when training the OrientationRefine segmentation network

    RuntimeError: cuda runtime error (710) : device-side assert triggered when training the OrientationRefine segmentation network

    Hi,

    Under /Topo-boundary/segmentation_based_baselines/OrientationRefine and built docker image, I run ./run_train_seg.bash and errors are following.

    =======================
    Start segmentation of OrientationRefine...
    Device:  cuda:0
    Batch size:  1
    Mode:  train
    =======================
    Finish loading the training data set lists 10000!
    Finish loading the valid data set lists 1770!
    /opt/conda/lib/python3.8/site-packages/torch/nn/_reduction.py:44: UserWarning: size_average and reduce args will be deprecated, please use reduction='mean' instead.
      warnings.warn(warning.format(ret))
    Epoch 1/10:   0%|                                                               | 0/10000 [00:00<?, ?img/s]/opt/conda/conda-bld/pytorch_1603729009598/work/aten/src/THCUNN/SpatialClassNLLCriterion.cu:106: cunn_SpatialClassNLLCriterion_updateOutput_kernel: block: [1,0,0], thread: [198,0,0] Assertion `t >= 0 && t < n_classes` failed.
    /opt/conda/conda-bld/pytorch_1603729009598/work/aten/src/THCUNN/SpatialClassNLLCriterion.cu:106: cunn_SpatialClassNLLCriterion_updateOutput_kernel: block: [0,0,0], thread: [222,0,0] Assertion `t >= 0 && t < n_classes` failed.
    THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1603729009598/work/aten/src/THCUNN/generic/SpatialClassNLLCriterion.cu line=134 error=710 : device-side assert triggered
    Epoch 1/10:   0%|                                                               | 0/10000 [00:00<?, ?img/s]
    Traceback (most recent call last):
      File "train_seg.py", line 214, in <module>
        train(args,i,net,train_dataloader,train_len,optimizor,criterion,writer,valid_dataloader,valid_len)
      File "train_seg.py", line 93, in train
        loss_ori += criterion['orien_loss'](F.interpolate(pre_oris[0], scale_factor=(4,4), mode='bilinear', align_corners=True),ori_mask)
      File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
        result = self.forward(*input, **kwargs)
      File "/home/huijie/projects/Topo-boundary/segmentation_based_baselines/OrientationRefine/utils/loss.py", line 16, in forward
        loss = self.nll_loss(log_p, targets)
      File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
        result = self.forward(*input, **kwargs)
      File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/loss.py", line 213, in forward
        return F.nll_loss(input, target, weight=self.weight, ignore_index=self.ignore_index, reduction=self.reduction)
      File "/opt/conda/lib/python3.8/site-packages/torch/nn/functional.py", line 2266, in nll_loss
        ret = torch._C._nn.nll_loss2d(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
    RuntimeError: cuda runtime error (710) : device-side assert triggered at /opt/conda/conda-bld/pytorch_1603729009598/work/aten/src/THCUNN/generic/SpatialClassNLLCriterion.cu:134```
    
    There are 65 classes including background, but the default number of classes is 64. The error happened when the class is 64. Do you have any suggestions about this problem.
    
    Thank you! 
    opened by Huijie2020 7
  • Retraining Enhanced-iCurb is slow

    Retraining Enhanced-iCurb is slow

    Dear Xu,

    I apologize for bugging you again here but would be greatly appreciated to hear your thoughts. I tried to retrain the Enhanced-iCurb model with 3-channel (RGB only) images and wanted to see the effect of removing the NIR channel.

    I learned that the retraining process was very slow mainly because of the validation for 150 images after training each image. It only trained about 500 images for 72 hours (on a gtx1080ti). The validation was very slow. The following are my two questions: (1) You might have tried your model with 3-channel images. Was it as good as the 4-channel one if you have done that? Never mind if you have not. I am happy to let you know the result if I have any. (2) Is there a faster way to retrain the model? For example, are validating the 150 images necessary after training one image?

    Thank you so much in advance.

    opened by Weixing-Zhang 6
  • Inferencing new images

    Inferencing new images

    Hi Zhenhua and other authors,

    I was trying to run inferencing with completely new 1000 by 1000 aerial images using "iCurb". It turned out that the model required label information from the "./dataset/labels/dense_seq/xxx.json." However, most label data are provided with a Google Download link.

    I wonder if there is a way to calculate all the required label information for inferencing new images. Any help would be much appreciated.

    opened by Weixing-Zhang 5
  • When load './checkpoints/seg_8.pth', i got this error

    When load './checkpoints/seg_8.pth', i got this error

    Start segmentation of OrientationRefine... Device: cuda:0 Batch size: 2 Mode: infer_train Checkpoint ./checkpoints/seg_8.pth

    Finish loading the training data set lists 10000! Finish loading the test data set lists 10236! Traceback (most recent call last): File "train_seg.py", line 199, in net.load_state_dict(torch.load(args.load_checkpoint, map_location='cpu')) File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for StackHourglassNetMTL: size mismatch for conv1.weight: copying a param with shape torch.Size([64, 4, 7, 7]) from checkpoint, the shape in current model is torch.Size([64, 5, 7, 7]). size mismatch for score_2.0.weight: copying a param with shape torch.Size([64, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([65, 128, 1, 1]). size mismatch for score_2.0.bias: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([65]). size mismatch for score_2.1.weight: copying a param with shape torch.Size([64, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([65, 128, 1, 1]). size mismatch for score_2.1.bias: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([65]). size mismatch for _score_2.0.weight: copying a param with shape torch.Size([128, 64, 1, 1]) from checkpoint, the shape in current model is torch.Size([128, 65, 1, 1]). size mismatch for angle_decoder1_score.weight: copying a param with shape torch.Size([64, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([65, 128, 1, 1]). size mismatch for angle_decoder1_score.bias: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([65]). size mismatch for angle_finalconv3.weight: copying a param with shape torch.Size([64, 32, 2, 2]) from checkpoint, the shape in current model is torch.Size([65, 32, 2, 2]). size mismatch for angle_finalconv3.bias: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([65]).

    Maybe the parameter of 'task2_classes' should be 64 on line 159 of 'topoBoundary/segmentation_based_baselines/OrientationRefine/model/stack_module.py'

    opened by cl886699 5
  • Can not download the dataset

    Can not download the dataset

    When I downloaded "cropped_tiff.zip", Google always display :

    Sorry, you can't view or download this file at this time. Too many users have viewed or downloaded this file recently. Please try accessing the file again later...

    could you please give me a private share so that I can download this data

    opened by xmqv0913 5
  • FileNotFoundError: [Errno 2] No such file or directory: './checkpoints/convBoundary_seg_pretrain.pth'

    FileNotFoundError: [Errno 2] No such file or directory: './checkpoints/convBoundary_seg_pretrain.pth'

    It seems the pretrain model for convBoundary is not available.

    I see only the following models in the directory. ConvBoundary_agent_best.pth ConvBoundary_seg_best.pth

    opened by arasharchor 4
  • About the initial Vertex Q in ICurb

    About the initial Vertex Q in ICurb

    hello, as your mentioned in ICurb paper: During training, the initial vertex candidates Q are obtained by adding Gaussian noises to the ground-truth initial vertices, while during testing, Q is generated from the segmentation results S and H by the proposed algorithm. but in your code, Whether it’s training or testing, the way to obtain the initial Vertex Q seems to be done directly from the data load, and it has nothing to do with the S and H branch. Did I understand it wrong? Below is the relevant code. iCurb/main_val.py

        # =================working on an image=====================
        for i, data in enumerate(network.dataloader_valid):
            _, _, tiff, mask, name, init_points, end_points = data
            name = name[0][-14:-5]
            tiff = tiff.to(args.device)
            mask, init_points, end_points = mask[0], init_points[0], end_points[0]
    

    Looking forward to your reply, thanks a lot.

    enhancement 
    opened by wulongjian 4
  • Can't find cuda in docker

    Can't find cuda in docker

    Hi, Per our previous conversation over email, there should be CUDA 11.0 installed in the docker image but I can't find (other packages like Torch 1.7.0 are fine).

    Here are my steps:

    1. I followed the directions to install docker and ran build_image.sh to build the docker.
    2. start the docker by sudo docker run -it zhxu_topoboundary.
    3. type nvidia-smi but command not found.

    Is there any extra steps missing from my installation?

    Thanks!

    opened by Huijie2020 4
  • ./get_label.bash cannot find the label data on Google Drive

    ./get_label.bash cannot find the label data on Google Drive

    Hi Author,

    I tried to run the ./get_label.bash and could not download the label data on Google Drive. It turns out that the file is not on the Google Drive server anymore. Any help is much appreciated.

    opened by Weixing-Zhang 3
  • Question about Enhance-iCurb loss

    Question about Enhance-iCurb loss

    Hi,

    I am training Enhance-iCurb baseline. After decreasing batch size and learning rate, the model doesn't converge.

    In the first model, I changed batch_size: 64 and lr_rate: 0.00005(Default setting : batch_size: 128 and lr_rate: 0.0001. Both coor_loss and stop_loss don't converge.

    In the 2nd model, I changed batch_size: 64 and lr_rate: 0.00001(Default setting : batch_size: 128 and lr_rate: 0.0001. Stop_loss doesn't converge, but the lr is very small.

    image

    Should I continue to decrease the learning rate to 0.000001?

    Thank you!

    opened by Huijie2020 3
  • NIR imagery

    NIR imagery

    Hi, Thanks so much for this awesome work. I was impressed by easy-to-use structures and performance.

    I am just trying to use my own dataset to predict the curb based on Enhanced-iCurb, but seems like NIR image channel is quite important to predict initial vertices and the curbs. I tried with and without NIR channel using the data the team provided and confirmed there is a quite difference in the performance.

    I am trying the same thing for the different city satellite imagery but I couldn't find the good source for the NIR imagery. Can I know how or where you obtained the NIR imagery?

    Thank you so much,

    opened by changkk 2
  • Dataset, Training questions

    Dataset, Training questions

    Hi, Zhenhua. Thanks for your great works. iCurb is so interesting. I'm trying to train Enhanced iCurb on a new dataset. and have some problems with training iCurb, and also have some questions.

    1. In your supplementary document you explained all types of labels needed for training iCurb, but when I read the codes, I found out that network uses only some of the generated labels, to be more precise; it actually needs Image, Binary_map, orientation_map and initial_vertices in order to train iCurb, and to test iCurb one additional data (sampled_seq) is need to be loaded. but in the paper you had mentioned 9 type of labels as training data. what is wrong here and how do the other labels(e.g. direction_map, annotation_seq, inverse_distance, ...), will help training process?

      ./utils/dataset: in function __getitem__():
               return seq, seq_lens, tiff, mask, ori, image_name, init_points, end_points
      ./utils/eval_metric: in function APLS(name_in):
               with open(os.path.join(args.sampled_seq_dir,image_name),'rb') as jf:
    

    2. In NYC dataset, annotation_seq data has dense points on road intersections and low density points on straight lines, is this a necessary feature for generating vertices in annotation_seq? How these vertices are generated?

    Screenshot (872)

    3. How many image is needed for training Enhanced iCurb?

    4. In our dataset we don't have direction of each line of a road, so we assign a direction to each line based on their vertex sequence. in fact, two line on each side of a road may have same direction or may not. in this manner there is a slight change in dataset configuration. How much direction map and orientation map is importance to iCurb?

    谢谢

    opened by FarshadGolparvar 3
Owner
Zhenhua Xu
HKUST Ph.D. Candidate
Zhenhua Xu
Learning Calibrated-Guidance for Object Detection in Aerial Images

Learning Calibrated-Guidance for Object Detection in Aerial Images arxiv We propose a simple yet effective Calibrated-Guidance (CG) scheme to enhance

null 51 Sep 22, 2022
Tiny Object Detection in Aerial Images.

AI-TOD AI-TOD is a dataset for tiny object detection in aerial images. [Paper] [Dataset] Description AI-TOD comes with 700,621 object instances for ei

jwwangchn 116 Dec 30, 2022
YOLTv5 rapidly detects objects in arbitrarily large aerial or satellite images that far exceed the ~600×600 pixel size typically ingested by deep learning object detection frameworks

YOLTv5 rapidly detects objects in arbitrarily large aerial or satellite images that far exceed the ~600×600 pixel size typically ingested by deep learning object detection frameworks.

Adam Van Etten 145 Jan 1, 2023
An image base contains 490 images for learning (400 cars and 90 boats), and another 21 images for testingAn image base contains 490 images for learning (400 cars and 90 boats), and another 21 images for testing

SVM Données Une base d’images contient 490 images pour l’apprentissage (400 voitures et 90 bateaux), et encore 21 images pour fait des tests. Prétrait

Achraf Rahouti 3 Nov 30, 2021
Road Crack Detection Using Deep Learning Methods

Road-Crack-Detection-Using-Deep-Learning-Methods This is my Diploma Thesis ¨Road Crack Detection Using Deep Learning Methods¨ under the supervision of

Aggelos Katsaliros 3 May 3, 2022
Python scripts for performing road segemtnation and car detection using the HybridNets multitask model in ONNX.

ONNX-HybridNets-Multitask-Road-Detection Python scripts for performing road segemtnation and car detection using the HybridNets multitask model in ONN

Ibai Gorordo 45 Jan 1, 2023
Official code of the paper "ReDet: A Rotation-equivariant Detector for Aerial Object Detection" (CVPR 2021)

ReDet: A Rotation-equivariant Detector for Aerial Object Detection ReDet: A Rotation-equivariant Detector for Aerial Object Detection (CVPR2021), Jiam

csuhan 334 Dec 23, 2022
TransNet V2: Shot Boundary Detection Neural Network

TransNet V2: Shot Boundary Detection Neural Network This repository contains code for TransNet V2: An effective deep network architecture for fast sho

Tomáš Souček 212 Dec 27, 2022
Generic Event Boundary Detection: A Benchmark for Event Segmentation

Generic Event Boundary Detection: A Benchmark for Event Segmentation We release our data annotation & baseline codes for detecting generic event bound

null 47 Nov 22, 2022
BADet: Boundary-Aware 3D Object Detection from Point Clouds (Pattern Recognition 2022)

BADet: Boundary-Aware 3D Object Detection from Point Clouds (Pattern Recognition

Rui Qian 17 Dec 12, 2022
A large dataset of 100k Google Satellite and matching Map images, resembling pix2pix's Google Maps dataset.

Larger Google Sat2Map dataset This dataset extends the aerial ⟷ Maps dataset used in pix2pix (Isola et al., CVPR17). The provide script download_sat2m

null 34 Dec 28, 2022
[CVPR'21] Projecting Your View Attentively: Monocular Road Scene Layout Estimation via Cross-view Transformation

Projecting Your View Attentively: Monocular Road Scene Layout Estimation via Cross-view Transformation Weixiang Yang, Qi Li, Wenxi Liu, Yuanlong Yu, Y

null 118 Dec 26, 2022
Trajectory Extraction of road users via Traffic Camera

Traffic Monitoring Citation The associated paper for this project will be published here as soon as possible. When using this software, please cite th

Julian Strosahl 14 Dec 17, 2022
Code repository for Semantic Terrain Classification for Off-Road Autonomous Driving

BEVNet Datasets Datasets should be put inside data/. For example, data/semantic_kitti_4class_100x100. Training BEVNet-S Example: cd experiments bash t

(Brian) JoonHo Lee 24 Dec 12, 2022
PyTorch implementation of Memory-based semantic segmentation for off-road unstructured natural environments.

MemSeg: Memory-based semantic segmentation for off-road unstructured natural environments Introduction This repository is a PyTorch implementation of

null 11 Nov 28, 2022
Find-Lane-Line - Use openCV library and Python to detect the road-lane-line

Find-Lane-Line This project is to use openCV library and Python to detect the road-lane-line. Data Pipeline Step one : Color Selection Step two : Cann

Kenny Cheng 3 Aug 17, 2022
[CVPR2021] UAV-Human: A Large Benchmark for Human Behavior Understanding with Unmanned Aerial Vehicles

UAV-Human Official repository for CVPR2021: UAV-Human: A Large Benchmark for Human Behavior Understanding with Unmanned Aerial Vehicle Paper arXiv Res

null 129 Jan 4, 2023
A 3D Dense mapping backend library of SLAM based on taichi-Lang designed for the aerial swarm.

TaichiSLAM This project is a 3D Dense mapping backend library of SLAM based Taichi-Lang, designed for the aerial swarm. Intro Taichi is an efficient d

XuHao 230 Dec 19, 2022