Giter VIP home page Giter VIP logo

lanenetros's Introduction

LaneNet Ros Node

This project is modified from the lanenet-lane-detection project(see: https://github.com/MaybeShewill-CV/lanenet-lane-detection)

Here I use lanenet-lane-detection project to implement a Ros node to do lane detection. Input and output parameters can be config at launch file.

Dependencies

Install the dependencies as lanenet-lane-detection metioned:

pip install -r requirements.txt

Then you need to install the ROS kinetic.

That's all.

launch the node

In you catkin workspace src dir, clone the project:

git clone https://github.com/AbangLZU/LaneNetRos.git

download the pretrained weight(trained by @MaybeShewill-CV) in: https://www.dropbox.com/sh/tnsf0lw6psszvy4/AAA81r53jpUI3wLsRW6TiPCya?dl=0

copy these checkpoints files to the foler:

cd model
mkdir tusimple_lanenet
cd tusimple_lanenet
cp -r YOU_DOWNLOAD_FILES .

build and source (in the workspace)

catkin_make
sorce devel/setup.bash

you may need to change the mode of the python script, as follow:

cd lane_detector/scripts/
sudo chmod +x lanenet_node.py

Then you can launch the lane detector node with:

roslaunch lane_detector lanenet.launch

play one of you rosbag which contains the images, I use the KITTI dataset, which can be download at: http://www.cvlibs.net/datasets/kitti/raw_data.php?type=road

Download any drive data as you want (the synced+rectified data amd calibration), use tomas789's project kitti2bag (see: https://github.com/tomas789/kitti2bag) to convert it to a rosbag.

Use the following command to play the bag:

rosbag play kitti_2011_??????????.bag

Open your RQT to visualize the output, assign the image topic as you set in the launch file, and you should get this:

See more in this video:

IMAGE ALT TEXT HERE

It's almost realtime in my GTX1070. If you think this work is useful to you, please both star this repository and the lanenet-lane-detection repository. THX!

Future works

  • Implement the Curve Fitting of the lane with a C++ node.
  • Retrain the LaneNet, improve its performance
  • TensorRT optimization

lanenetros's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lanenetros's Issues

coordinates

Hi, may i know how can i extract the lane coordinates data because i want to measure the radius of curve and monitors the offset from centre? What is the curve fitting file for? Thank you for your help.

detection speed

Hello, we have run through the code, but the detection speed cannot keep up, may I ask why this is

Can you give the new download weights link

Hello the weights file's link deleted and the original author of lanenet had changed to weights file. but the new files could not be used for your ros node so i need old weight files can you upload the files?

real-time

我复现了您的结果,但是运行效果实时性特别差,看了您在youtub的视频,效果看起来很好,我的处理器是2080ti,为什么呢?谢谢

权重

你好,我发现你给的官方的模型和你基于官方改编的ros代码,模型参数有所改变,请问是否可以将你用的模型分享,特别感谢

TensorFlow Checkpoint Error When using roslaunch

I have setup the project as suggested and made minimal alterations, however when I try to roslaunch the project using maybeshewill-CV's weights I get the following error:

`
2019-08-01 14:20:11.349834: W tensorflow/core/framework/op_kernel.cc:1275] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Not found: Key lanenet_model/vgg_frontend/vgg16_decode_module/binary_seg_decode/decode_stage_1_fuse/fuse_conv/W not found in checkpoint
Traceback (most recent call last):
File "/home/lonpc000698/catkin_ws/src/LaneNetRos/scripts/lanenet_node.py", line 138, in
lanenet_detector()
File "/home/lonpc000698/catkin_ws/src/LaneNetRos/scripts/lanenet_node.py", line 38, in init
self.init_lanenet()
File "/home/lonpc000698/catkin_ws/src/LaneNetRos/scripts/lanenet_node.py", line 76, in init_lanenet
saver.restore(sess=self.sess, save_path="/home/lonpc000698/catkin_ws/src/LaneNetRos/model/tusimple_lanenet_vgg.ckpt")
File "/home/lonpc000698/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1743, in restore
err, "a Variable name or other graph key that is missing")
tensorflow.python.framework.errors_impl.NotFoundError: Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Key lanenet_model/vgg_frontend/vgg16_decode_module/binary_seg_decode/decode_stage_1_fuse/fuse_conv/W not found in checkpoint
[[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]

Caused by op u'save/RestoreV2', defined at:
File "/home/lonpc000698/catkin_ws/src/LaneNetRos/scripts/lanenet_node.py", line 138, in
lanenet_detector()
File "/home/lonpc000698/catkin_ws/src/LaneNetRos/scripts/lanenet_node.py", line 38, in init
self.init_lanenet()
File "/home/lonpc000698/catkin_ws/src/LaneNetRos/scripts/lanenet_node.py", line 58, in init_lanenet
saver = tf.train.Saver()
File "/home/lonpc000698/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1281, in init
self.build()
File "/home/lonpc000698/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1293, in build
self._build(self._filename, build_save=True, build_restore=True)
File "/home/lonpc000698/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1330, in _build
build_save=build_save, build_restore=build_restore)
File "/home/lonpc000698/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 778, in _build_internal
restore_sequentially, reshape)
File "/home/lonpc000698/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 397, in _AddRestoreOps
restore_sequentially)
File "/home/lonpc000698/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 829, in bulk_restore
return io_ops.restore_v2(filename_tensor, names, slices, dtypes)
File "/home/lonpc000698/.local/lib/python2.7/site-packages/tensorflow/python/ops/gen_io_ops.py", line 1463, in restore_v2
shape_and_slices=shape_and_slices, dtypes=dtypes, name=name)
File "/home/lonpc000698/.local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/lonpc000698/.local/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 454, in new_func
return func(*args, **kwargs)
File "/home/lonpc000698/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3155, in create_op
op_def=op_def)
File "/home/lonpc000698/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1717, in init
self._traceback = tf_stack.extract_stack()

NotFoundError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Key lanenet_model/vgg_frontend/vgg16_decode_module/binary_seg_decode/decode_stage_1_fuse/fuse_conv/W not found in checkpoint
[[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]

`

Any ideas as to why this is happening ? Is it related to the python packages or something else ?

当我运行launch文件时,请问是什么问题,谢谢

NotFoundError (see above for traceback): Key lanenet_model/inference/decode/deconv_1/deconv_1/kernel not found in checkpoint
[[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor
_names, save/RestoreV2/shape_and_slices)]]

models

your code is of grate help to me,andI have the some question that the model parameters are different,i sincerely hope that you can release your model,thank you very much

Support for ros melodic ?

Hello,

Has anyone tried this package to run in ROS melodic?
Am trying to run, but there is an error in melodic.

Any suggestions, please !!

Regards,
Ajay

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.