maybeshewill-cv / lanenet-lane-detection Goto Github PK
View Code? Open in Web Editor NEWUnofficial implemention of lanenet model for real time lane detection
License: Apache License 2.0
Unofficial implemention of lanenet model for real time lane detection
License: Apache License 2.0
Thanks a lot for sharing your code. I am confused that both the lanenet and h-net have the same groundtruth from the paper,but the readme file on github said that I need to organize my training data refer to the data/training_data_example folder structure.I want to know when I train my own modle on tusimple dataset which has json file as label data, if i need to prepare binary segmentation and instance segmentation images as groundtruth for training, and how to deal the images to obtain instance label?
您好,请问在训练时我要分别训练三部分的网吗?我看您的代码是三个文件train_lanenet.py,train_encoder_decoder.py和train_lanenet_instance_segmentation.py,没有将三部分联合起来一起训练。
我想问下,你的实现是不是和原文有区别的,比如网络结构,后处理的方法等等。如果是,能不能说下具体改了哪些。我完全按照原文实现了一遍,但效果不够好。
@MaybeShewill-CV 这个二值分割图中像素为1的像素 是编码和解码器预测的结果 这个预测的结果 我个人认为就是实例分割图中两个实例分界线那个地方 我认为的对嘛?谢谢!
在评估训练的模型时,需要将测试的图片转换成test_label.json文件的格式,请问具体怎样做了?
I can't train lanenet with batch =3 , 1080 ti, because of this function.
''UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. ''
What's the different color of instance segmentation?
hello,I want to make the same dataset like you in lane dataset. but there is a question about me is how to convert my lane line json label file into the binary segmentation label file and the instance label file from original image. can you tell me how to operate it?
Thx!
Hi, I am trying the convert the model into frozen graph. But i could not found the output node names on the internet or the paper. Can you help me to find it?
thanks for your great work, but I wonder why I trained model using tusimple traindata (the number is 3626)
following the readme in this project, cannot achieve looks well result. The train loss looks well , but the trained model cannot achieve a effective result.
请问 训练数据集 二值图和实例图 是如何制作的呢?都是手工标注吗?
你好,在train_encoder_decoder.py 前面有 from encoder_decoder_model import semantic_segmentation
但是在encoder_decoder_model里面没有找到semantic_segmentation啊。pycharm里面也有报错。
先谢谢你啦><
Tried to train using your pre-trained vgg model, the error message indicates that vgg16.npy is not found. Can you provide that as well? Thanks!
Hello, I noticed that in your config file, you specify the number of classes to be 2, but I do not see where you call this parameter in any of your scripts. Say I have multiple classes: dashed white lines, solid white lines, solid yellow lines, etc, and I would like to train LaneNet to find all the instances of these classes, how would I do this?
I assume just changing the number of classes is not enough because in the binary segmented image, it could no longer be a binary segmented image. But then you would also have to change the instance segmentation label image. Simply giving each pixel an instance id is not good enough anymore because now you need to know which class that instance corresponds to?
I am not familiar with instance segmentation, so I am not even sure if this is possible.
Thank you.
Hi, thanks for your great work. I want to implement h-net function. I found lots of code in lanenet_hnet_loss.py and lanenet_hnet_model.py.
I am curious that since related codes were finished , why was hNET not implemented? Are there any unsolved problems? If I want to realize this function, what should I do?
你好,我现在想用自己的数据集训练。看到代码里给的训练集样本图片,里面的二值图像和实例分割图像都是3通道的,但是我按照3通道产生的数据集,报错维度应该为1通道。报错如下所示,谢谢
ValueError: Cannot feed value of shape (4, 512, 1024, 3) for Tensor 'instance_input_label:0', which has shape '(4, 512, 1024).
Traceback (most recent call last):
File "tools/test_lanenet.py", line 28, in
from lanenet_model import lanenet_merge_model
ImportError: No module named lanenet_model
Hi, thank you for your code!!
btw, I am curious about how you tested your model.
I am in the process of getting TPR and FPR.
I figured that you did not implement predicted label in your code.
If you have done getting accuracy before, can you let me know
how you did it?
Thanks
@MaybeShewill-CV Hi, I have trained on CULane dataset, and this is a strange test result, have you ever met this?
And when two lanes are close, they are easy to become wider and be connected together, you can see it in the middle of the image.
Hi @TJCVRS ,
I use tf 1.8. got the followoing error:
ValueError: Variable lanenet_loss/inference/encode/conv1_1/conv/W already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:
File "/lanenet-lane-detection/encoder_decoder_model/cnn_basenet.py", line 71, in conv2d/lanenet-lane-detection/encoder_decoder_model/vgg_encoder.py", line 55, in _conv_stage
w = tf.get_variable('W', filter_shape, initializer=w_init)
File "
use_bias=False, padding=pad, name='conv')
File "~/lanenet-lane-detection/encoder_decoder_model/vgg_encoder.py", line 95, in encode
out_dims=64, name='conv1_1')
Hi, I'm training myself's model by using my own dataset.
About restore weights from prior training, in file 'train_lanenet.py' line 171.
the vgg pretrained_weights reloading condition is just 'if net_flag == 'vgg''.
however, my own pretrained weights was saved as an .ckpt file which should contain my own vgg pretrained weights based on 'vgg16.npy'. So, this reloading condition may lead to an recover of my own vgg pretrained weights by 'vgg16.npy'.
Shouldn't it be 'if (net_flag == 'vgg') and (weights_path is None):' in line 171?
Hello,
How can the "binary segmentation label file" and "instance segmentation label file" be obtained from the original image file and the label json file? Is there a tool to convert it? Thank you :)
您好,请问在训练时我要分别训练三部分的网吗?我看您的代码是三个文件train_lanenet.py,train_encoder_decoder.py和train_lanenet_instance_segmentation.py,没有将三部分联合起来一起训练。
请问,测试的二值图像的大小和测试的标签图像大小不一致,在进行模型评估的时候,将二值图像的大小要resize到测试图像的大小,这样还有影响吗?
I download a vgg16.npy from network.When i train the model ,i get the error .
totalMemory: 10.91GiB freeMemory: 10.75GiB
2018-07-18 16:59:10.664853: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0, 1, 2, 3
2018-07-18 16:59:11.781350: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-07-18 16:59:11.781395: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929] 0 1 2 3
2018-07-18 16:59:11.781403: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0: N Y N N
2018-07-18 16:59:11.781408: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1: Y N N N
2018-07-18 16:59:11.781413: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 2: N N N Y
2018-07-18 16:59:11.781417: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 3: N N Y N
2018-07-18 16:59:11.781740: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 9496 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:02:00.0, compute capability: 6.1)
I0718 16:59:12.083954 20078 train_lanenet.py:153] Global configuration is as follows:
I0718 16:59:12.087059 20078 train_lanenet.py:154] {'TEST': {'TF_ALLOW_GROWTH': True, 'BATCH_SIZE': 32, 'GPU_MEMORY_FRACTION': 0.8}, 'TRAIN': {'LEARNING_RATE': 0.0005, 'IMG_WIDTH': 512, 'BATCH_SIZE': 4, 'EPOCHS': 200010, 'TEST_DISPLAY_STEP': 1000, 'IMG_HEIGHT': 256, 'MOMENTUM': 0.9, 'DISPLAY_STEP': 1, 'CLASSES_NUMS': 2, 'TF_ALLOW_GROWTH': True, 'VAL_BATCH_SIZE': 4, 'LR_DECAY_RATE': 0.1, 'GPU_MEMORY_FRACTION': 0.85, 'LR_DECAY_STEPS': 210000}}
I0718 16:59:12.806772 20078 train_lanenet.py:162] Training from scratch
Traceback (most recent call last):
File "/Disk/pch/lanenet-lane-detection-master/tools/train_lanenet.py", line 307, in
train_net(args.dataset_dir, args.weights_path, net_flag=args.net)
File "/Disk/pch/lanenet-lane-detection-master/tools/train_lanenet.py", line 245, in train_net
= val_dataset.next_batch(CFG.TRAIN.VAL_BATCH_SIZE)
File "/Disk/pch/lanenet-lane-detection-master/data_provider/lanenet_data_processor.py", line 95, in next_batch
return self.next_batch(batch_size)
File "/Disk/pch/lanenet-lane-detection-master/data_provider/lanenet_data_processor.py", line 95, in next_batch
File "/Disk/pch/lanenet-lane-detection-master/data_provider/lanenet_data_processor.py", line 95, in next_batch
return self.next_batch(batch_size)
File "/Disk/pch/lanenet-lane-detection-master/data_provider/lanenet_data_processor.py", line 93, in next_batch
self._random_dataset()
File "/Disk/pch/lanenet-lane-detection-master/data_provider/lanenet_data_processor.py", line 66, in _random_dataset
random_idx = np.random.permutation(len(self._gt_img_list))
File "mtrand.pyx", line 4907, in mtrand.RandomState.permutation
File "mtrand.pyx", line 4824, in mtrand.RandomState.shuffle
RuntimeError: maximum recursion depth exceeded
how can i solve it?Do you meet the same problem?
Error in running test_encoder_decoder.py:
File "tools/test_encoder_decoder.py", line 24, in
from encoder_decoder_model import semantic_segmentation
ImportError: cannot import name 'semantic_segmentation'
There is really no such file in encoder_decoder_modle.
Please upload this file as soon as possible, thank you!
Simultaneously,I still have a few questions I would like to ask you.
1,I want to train my own model, how is the train.txt and val.txt files generated?
2,Which of the three test files in the tools are the ones that you uploaded at the beginning?
In the Towards End-to-End Lane Detection: an Instance Segmentation Approach paper there is mentioned, that to balance the binary training a bounded inverse class weighting is used.
Did you also used that technique?
请问模型训练好之后,如何用test数据集验证我的模型了?
@MaybeShewill-CV Hello, I want to train your model on CULane dataset, which has 88880 for training set, 9675 for vali-dation set, and 34680 for test set, and some images without lines. Could you give some advice on training parameters?
hi,
Thanks for sharing your codes. I have encountered a mistake as follows when I was training the net using CULane dataset based on your pre-trained models. Would you please tell me the possible mistakes I took?Thanks, and this is my command to start training:
python tools/train_lanenet.py --net vgg --dataset_dir data/training_data/ --weights_path model/tusimple_lanenet/tusimple_lanenet_vgg_2018-05-21-11-11-03.ckpt-94000
And I am using miniconda and the env is python 3.6.2 .
Thank you.
Best regards
Wzx
hello, I am learning your work, the organization data set has a problem, I don't understand, your traning_data_example file structure, I want to know, how the images in pictures and gt_image_instance gt_image_binary file is generated
请问:为什么训练您的数据集时,在图片预处理
label_img = cv2.imread(gt_label_path, cv2.IMREAD_UNCHANGED)时,可以将
(720, 1280, 3)变为(720, 1280)
我用自己的训练集,处理之后
(720, 1280, 3)还是(720, 1280,3)
这是什么原因呢?
hi,i tested the model on GTX-1080 , but i found it's too slow approaching 1 fps.
"The deep neural network inference part can achieve around a 50fps"--can u tell me the reason?
thank you,@MaybeShewill-CV
Hi
I'd like to train lanenet mode on my own dataset, but found something seems wrong in 'train_encoder_deconder.py'
In line 28: 'from encoder_decoder_model import semantic_segmentation'
but no such file in folder 'encoder_decoder_model'
Do you miss something like this?
Hello,
Can you please tell the steps to train our own dataset in details. AS we need binary segmentation label file and instance segmentation label file with original image. How to create them?
What is the output of trained dataset?
Hi,
This is great, thanks for sharing the code!
I was using your code with processed TuSimple data trying to train dense net model from scratch according to your training procedure and config. While the training loss keeps decreasing, the accuracy also keeps decreasing (from around 0.5 at the beginning down to now close to 0.03 at the 500th epoch). I am using the same learning rate setup as your suggested setup. Any thoughts on why this is happening?
Thank you for sharing your code! I've formatted the BDD dataset to train your model on, but I keep running into this error:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/common_shapes.py", line 654, in _call_cpp_shape_fn_impl
input_tensors_as_shapes, status)
File "/usr/lib/python3.5/contextlib.py", line 66, in exit
next(self.gen)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Dimensions must be equal, but are 44 and 45 for 'lanenet_loss/inference/decode/fuse_1' (op: 'Add') with input shapes: [4,44,80,64], [4,45,80,64].
My command is: python3 tools/train_lanenet.py --net vgg --dataset_dir ~/data/bdd100k/ --weights_path model/tusimple_lanenet/tusimple_lanenet_vgg_2018-05-21-11-11-03.ckpt-94000, and ~/data/bdd100k/ has the three image directories along with train.txt and val.txt as specified in the example. The only configuration I've changed is image height and width to 720 x 1280. Do you have any ideas on what may be the problem here?
可能是我实现有些问题,不知作者啥时候实现这个多batchsize的训练,还有就是我又回顾了一边作者的论文,觉得关于训练拟合矩阵的**理解起来有些问题,比如作者算loss的方法,期待作者对hnet这一步的分析
when I run the command python tools/train_lanenet.py, the error as follows: from config import global_config ImportError:no moudle named 'config'
can you tell me how to solve the import error? thx!
请问您数据处理成二进制图和实例图是如何完成的啊,
Hi. I am using the pretrained model on jetson tx2 and the speed is too slow. It took 3.5 second to process only one image. Do you know what causing is this problem or is this normal speed time? Thank you
thanks for your kind, I did not find the use of hnet in line fit in test_lanenet.py? how to use this wonderful idea for ployline fitting as your paper said, thanks.
作者您好,非常感谢您的工作。我有个问题想请教您:
1)对于embedding分支我们是否真的需要?这样的分支加聚类无疑也是一笔开销,那么能否直接e2e的方式输出每条车道线。若是不可以,麻烦指教下原因?
2)延申:关于车道线我们无非关注是当前车道和非当前车辆行驶车道,这种情况是否可以e2e?
Thanks for your share,I want to use your model to train my data,but raise some error:
ValueError: Cannot feed value of shape (1, 256, 512, 3) for Tensor 'instance_input_label:0', which has shape '(?, 256, 512)'
,my works include:
/xxx/image /xxx/gt_gray/gt_instance
in train.txt and val.txtHi @TJCVRS,
I am wondering to detect the type of line, like double yellow line or white, dot line.
Is it possible ?
Hello, can I replace the VGGNet with SqueezeNet or some other model?
I need a model with fewer parameters for lane detection. Do you have any good suggestions? Thanks.
I got a problem to train the dataset, could you please tell me where i can download vgg16.npy file?
作者您好,我想了解下您在代码中的VGG_MEAN是什么作用,麻烦您解答一下,非常感谢。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.