This repository provides instructions on how to create a lane detection dataset in tusimple format.
To create a dataset in tusimple format, we will use VIA annotation tool. Download the zip file from that link and open it via.html
using a browser.
- Use
Add files
option to select images from your local directory. - Select
polyline
option fromRegion Shape
section. - Start drawing line/points from bottom to top on top of lanes. At least keep 6-7 points per lane to ensure a good result from Spline model. Also, make sure x-coordinates of a lane are in order, for example, [239, 250, 270, 320, 380, ... 570] or [ 710, 650, 623, 589, .... 345, 310]. It should not be like [239, 250, 245, 270, 320, 380, ... 570].
- Save the project for later use.
- Export the annotations in
json
format.
After annotating all the images and exporting the annotation file, run each cell of tusimple_annotation.ipynb
to get the dataset in tusimple format. Make sure to edit the file location in line 1 and raw_images location in dictionary[raw_file]
object.
If you want to annotate lane classes like solid, dash, etc, then create a .txt file of the same name as the json file. Like if your json file name is LVLane_train_sunny.json
and then create a file named by LVLane_train_sunny_classes.txt
. For each image, we will have one line in that txt file. If one image contains 5 lanes, we will have 5 class labels separated by space in that line. Use this to get class names. Run this code to get lane visualization. You have to modify the location and json names in lines
Line 112 in d149a89
Line 80 in d149a89
2 4 5
2 1 4 6
3 5 5 2
.
.
.
4 5 7 3
We could use directly via tool too to annotate the classes but it may take a longer period of time. I found this way faster.
If you use our tool, please cite the following the paper as well as VIA annotation tool
@article{rahman2023lvlane,
title={LVLane: Deep Learning for Lane Detection and Classification in Challenging Conditions},
author={Rahman, Zillur and Morris, Brendan Tran},
journal={2023 IEEE International Conference on Intelligent Trabsportation Systems (ITSC)},
year={2023}
}