Coder Social home page Coder Social logo

mnn-lanenet's Introduction

MNN-LaneNet

Lane detection model for mobile device via MNN project. Thanks for the great efforts of li-qing etc.

LaneNet-Lane-Detection

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 NetWork_Architecture

Installation

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

Common Preparation

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

Convert Model File

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

Build Binary file

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

Test model

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 Input

Test Lane Binary Segmentation Image

Test Lane_Binary_Seg

Test Lane Instance Segmentation Image

Test Lane_Instance_Seg

Reference

The origin lanenet repo can be found here. Feel free to raise issues to help the repo become better.

TODO

  • Test the model on TX2 platform
  • Add time cost profile tools to evaluate the speed on different platform

Acknowledgement

The lanenet project refers to the following projects:

mnn-lanenet's People

Contributors

maybeshewill-cv avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.