Lane detection model for mobile device via MNN project. Thanks for the great efforts of li-qing etc.
Use tensorflow to implement a Deep Neural Network for real time lane detection mainly based on the IEEE IV conference paper "Towards End-to-End Lane Detection: an Instance Segmentation Approach".You can refer to their paper for details https://arxiv.org/abs/1802.05591. This model consists of a encoder-decoder stage, binary semantic segmentation stage and instance semantic segmentation using discriminative loss function for real time lane detection task.
The main network architecture is as follows:
Network Architecture
This project has been built and tested on Ubuntu16.04. Tests on other platform will be done recently.
OS: Ubuntu 16.04 LTS
Tensorflow: tensorflow 1.12.0
MNN: mnn 0.2.1.0
1.cd ROOT_DIR && git clone https://github.com/MaybeShewill-CV/MNN-LaneNet.git
2.Download the ckpt file path here https://www.dropbox.com/sh/yndoipxt6nbhg5g/AAAPxZDDO2N0HP0YonetamJoa?dl=0
and place the ckpt file into folder ./checkpoint
First you need to compile your own MNNConverter tools in your local environment. Then you're supposed to modify the script for conversion in folder ./checkpoint convert_ckpt_into_mnn_model.sh. Run the following commands
cd ROOT_DIR
bash checkpoint/convert_ckpt_into_mnn_model.sh MNNConverter_TOOL_PATH
You may get some useful information via following command
cd ROOT_DIR
bash checkpoint/convert_ckpt_into_mnn_model.sh -h
You will get the mnn model named lanenet_model.mnn in folder ./checkpoint if everything works correctly
1.cd ROOT_DIR/build
2.cmake .. && make -j4
You will get the built executable binary file named lane_detector.out in folder ./build if everything works correctly
Run the following command
cd ROOT_DIR/build
./lanenet_detector.out ./config.ini ../data/tusimple_test_image/lanenet_test.jpg
The results are as follows:
Test Input Image
Test Lane Binary Segmentation Image
Test Lane Instance Segmentation Image
The origin lanenet repo can be found here. Feel free to raise issues to help the repo become better.
The lanenet project refers to the following projects: