Giter VIP home page Giter VIP logo

lanenet-lane-detection's Introduction

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 software has only been tested on ubuntu 16.04(x64), python3.5, cuda-9.0, cudnn-7.0 with a GTX-1070 GPU. To install this software you need tensorflow 1.12.0 and other version of tensorflow has not been tested but I think it will be able to work properly in tensorflow above version 1.12. Other required package you may install them by

pip3 install -r requirements.txt

Test model

In this repo I uploaded a model trained on tusimple lane dataset Tusimple_Lane_Detection. The deep neural network inference part can achieve around a 50fps which is similar to the description in the paper. But the input pipeline I implemented now need to be improved to achieve a real time lane detection system.

The trained lanenet model weights files are stored in lanenet_pretrained_model. You can download the model and put them in folder weights/tusimple_lanenet/

You may also download the pretrained model via BaiduNetDisk here and extract code is 86sd.

You can test a single image on the trained model as follows

python tools/test_lanenet.py --weights_path /PATH/TO/YOUR/CKPT_FILE_PATH 
--image_path ./data/tusimple_test_image/0.jpg

The results are as follows:

Test Input Image

Test Input

Test Lane Mask Image

Test Lane_Mask

Test Lane Binary Segmentation Image

Test Lane_Binary_Seg

Test Lane Instance Segmentation Image

Test Lane_Instance_Seg

If you want to evaluate the model on the whole tusimple test dataset you may call

python tools/evaluate_lanenet_on_tusimple.py 
--image_dir ROOT_DIR/TUSIMPLE_DATASET/test_set/clips 
--weights_path /PATH/TO/YOUR/CKPT_FILE_PATH 
--save_dir ROOT_DIR/TUSIMPLE_DATASET/test_set/test_output

If you set the save_dir argument the result will be saved in that folder or the result will not be saved but be displayed during the inference process holding on 3 seconds per image. I test the model on the whole tusimple lane detection dataset and make it a video. You may catch a glimpse of it bellow.

Tusimple test dataset gif tusimple_batch_test_gif

Train your own model

Data Preparation

Firstly you need to organize your training data refer to the data/training_data_example folder structure. And you need to generate a train.txt and a val.txt to record the data used for training the model.

The training samples consist of three components, a binary segmentation label file, a instance segmentation label file and the original image. The binary segmentation uses 255 to represent the lane field and 0 for the rest. The instance use different pixel value to represent different lane field and 0 for the rest.

All your training image will be scaled into the same scale according to the config file.

Use the script here to generate the tensorflow records file

python tools/make_tusimple_tfrecords.py 

Train model

In my experiment the training epochs are 80010, batch size is 4, initialized learning rate is 0.001 and use polynomial decay with power 0.9. About training parameters you can check the global_configuration/config.py for details. You can switch --net argument to change the base encoder stage. If you choose --net vgg then the vgg16 will be used as the base encoder stage and a pretrained parameters will be loaded. And you can modified the training script to load your own pretrained parameters or you can implement your own base encoder stage. You may call the following script to train your own model

python tools/train_lanenet_tusimple.py 

You may monitor the training process using tensorboard tools

During my experiment the Total loss drops as follows:
Training loss

The Binary Segmentation loss drops as follows:
Training binary_seg_loss

The Instance Segmentation loss drops as follows:
Training instance_seg_loss

Experiment

The accuracy during training process rises as follows: Training accuracy

Please cite my repo lanenet-lane-detection if you use it.

Segment-Anything-U-Specify

You must be interested in recently released SAM model. Here's a repo using clip + sam to segment any instances you specify. segment-anything-u-specify.

segment-anything-u-specify

Serve Your Model

If you want to serve your model via a web server you may be interested in mortred_model_server which is a high performace web server for DNN vision models 🔥🔥🔥

mortred_model_server

Recently updates 2018.11.10

Adjust some basic cnn op according to the new tensorflow api. Use the traditional SGD optimizer to optimize the whole model instead of the origin Adam optimizer used in the origin paper. I have found that the SGD optimizer will lead to more stable training process and will not easily stuck into nan loss which may often happen when using the origin code.

Recently updates 2018.12.13

Since a lot of user want a automatic tools to generate the training samples from the Tusimple Dataset. I upload the tools I use to generate the training samples. You need to firstly download the Tusimple dataset and unzip the file to your local disk. Then run the following command to generate the training samples and the train.txt file.

python tools/generate_tusimple_dataset.py --src_dir path/to/your/unzipped/file

The script will make the train folder and the test folder. The training samples of origin rgb image, binary label image, instance label image will be automatically generated in the training/gt_image, training/gt_binary_image, training/gt_instance_image folder.You may check it yourself before start the training process.

Pay attention that the script only process the training samples and you need to select several lines from the train.txt to generate your own val.txt file. In order to obtain the test images you can modify the script on your own.

Recently updates 2020.06.12

Add real-time segmentation model BiseNetV2 as lanenet backbone. You may modify the config/tusimple_lanenet.yaml config file to choose the front-end of lanenet model.

New lanenet model trainned based on BiseNetV2 can be found here

BaiduNetDisk is available too. You can download here https://pan.baidu.com/s/1sLLSE1CWksKNxmRIGaQn_A and extract code is 86sd

The new model can reach 78 fps in single image inference process.

Recently updates 2022.05.28

Since lots of user have encountered with a empty mask image problem when they do model inference using their own custom data. For example the user issue have encountered such a problem. I have openend a discussion here to give some advice to solve those problem.

That problem mainly caused by the dbscan cluster's params was not properly adjusted for custom data. For example if I use the default dbscan param settled here

POSTPROCESS:
    MIN_AREA_THRESHOLD: 100
    DBSCAN_EPS: 0.35
    DBSCAN_MIN_SAMPLES: 1000

The inference result was black_mask

When I enlarge the dbscan DBSCAN_EPS param from 0.35 to 0.5 and reduce DBSCAN_MIN_SAMPLES from 1000 to 250. The infer ence result was black_mask_after_adjust

Some more detailed discussion you may find in discussion module

The lane fit process in postprocess module was designed for tusimple dataset which means it can not work well on your custorm data. So I add an option in testing scripts to disable this feature when processing custom data. It will plot mask image directly upon source image

python tools/test_lanenet.py --weights_path /PATH/TO/YOUR/CKPT_FILE_PATH 
--image_path ./data/custom_test_image/test.png --with_lane_fit 0

Before you test the example custom data remember to adjust dbscan cluster params following instruction above and the test result should be like black_mask_after_adjust

To get better lane detection result on your own data you'd better train a new model on custom dataset rather than using the pretrained model directly.

Hope it helps:)

MNN Project

Add tools to convert lanenet tensorflow ckpt model into mnn model and deploy the model on mobile device

Freeze your tensorflow ckpt model weights file

cd LANENET_PROJECT_ROOT_DIR
python mnn_project/freeze_lanenet_model.py -w lanenet.ckpt -s lanenet.pb

Convert pb model into mnn model

cd MNN_PROJECT_ROOT_DIR/tools/converter/build
./MNNConver -f TF --modelFile lanenet.pb --MNNModel lanenet.mnn --bizCode MNN

Add lanenet source code into MNN project

Add lanenet source code into MNN project and modified CMakeList.txt to compile the executable binary file.

Status

Repobeats analytics image

Star History

Star History Chart

TODO

  • Add a embedding visualization tools to visualize the embedding feature map
  • Add detailed explanation of training the components of lanenet separately.
  • Training the model on different dataset
  • [ ] Adjust the lanenet hnet model and merge the hnet model to the main lanenet model
  • [ ] Change the normalization function from BN to GN

Acknowledgement

The lanenet project refers to the following projects:

Visitor Count

Visitor Count

Contact

Scan the following QR to disscuss :) qr

lanenet-lane-detection's People

Contributors

dependabot[bot] avatar inons avatar kunalgoyal9 avatar maybeshewill-cv avatar pauperonway avatar

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  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

lanenet-lane-detection's Issues

channel qusetion?

请问:为什么训练您的数据集时,在图片预处理
label_img = cv2.imread(gt_label_path, cv2.IMREAD_UNCHANGED)时,可以将
(720, 1280, 3)变为(720, 1280)
我用自己的训练集,处理之后
(720, 1280, 3)还是(720, 1280,3)
这是什么原因呢?

Detect lane type

Hi @TJCVRS,

I am wondering to detect the type of line, like double yellow line or white, dot line.
Is it possible ?

数据集制作

请问 训练数据集 二值图和实例图 是如何制作的呢?都是手工标注吗?

No semantic_segmentation in the encoder_decoder_model

你好,在train_encoder_decoder.py 前面有 from encoder_decoder_model import semantic_segmentation
但是在encoder_decoder_model里面没有找到semantic_segmentation啊。pycharm里面也有报错。
先谢谢你啦><

output nodes

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?

dense net training from scratch accuracy keeps dropping

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?

flow to train own dataset

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?

reuse variable error

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
w = tf.get_variable('W', filter_shape, initializer=w_init)
File "
/lanenet-lane-detection/encoder_decoder_model/vgg_encoder.py", line 55, in _conv_stage
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')

how to solve the import error?

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!

About restore weights.

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?

organize training data encounter problems

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

Vgg16.npy missing

I got a problem to train the dataset, could you please tell me where i can download vgg16.npy file?

how to evaluate?

在评估训练的模型时,需要将测试的图片转换成test_label.json文件的格式,请问具体怎样做了?

How to deal with tf.gather bug?

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. ''

how to generate the binary segmentation label file ?

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!

About test

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

A question about the test result

@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.
result_2

bounded inverse class weighting

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?

miss 'semantic_segmentation' in folder 'encoder_decoder_model' ?

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?

speed

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

A question about the train.

您好,请问在训练时我要分别训练三部分的网吗?我看您的代码是三个文件train_lanenet.py,train_encoder_decoder.py和train_lanenet_instance_segmentation.py,没有将三部分联合起来一起训练。

inference time

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

vgg16.npy missing

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!

problem about train own model

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.

Dimensions must be equal, but are 44 and 45 for 'lanenet_loss/inference/decode/fuse_1' (op: Add)

Thank you for sharing your code! I've formatted the BDD dataset to train your model on, but I keep running into this error:
image

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?

problem about Hnet test?

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.

Some problem about train

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?

some questions about the training dataset

你好,我现在想用自己的数据集训练。看到代码里给的训练集样本图片,里面的二值图像和实例分割图像都是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).

About VGG_MEAN

作者您好,我想了解下您在代码中的VGG_MEAN是什么作用,麻烦您解答一下,非常感谢。

How to train with more than 2 classes?

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.

Train on CULane

@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?

sth. about embedding branch

作者您好,非常感谢您的工作。我有个问题想请教您:
1)对于embedding分支我们是否真的需要?这样的分支加聚类无疑也是一笔开销,那么能否直接e2e的方式输出每条车道线。若是不可以,麻烦指教下原因?
2)延申:关于车道线我们无非关注是当前车道和非当前车辆行驶车道,这种情况是否可以e2e?

loss = nan problem

您好,请问我在使用自己制作的数据集进行训练的时候,出现了loss=nan的问题,请问为什么会出现这样的情况呢,一般会是哪里出错呀?
出错信息如下:
2018-07-25 11-13-06

merge the hnet model

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?

关于实例分割的问题

@MaybeShewill-CV 这个二值分割图中像素为1的像素 是编码和解码器预测的结果 这个预测的结果 我个人认为就是实例分割图中两个实例分界线那个地方 我认为的对嘛?谢谢!

转化为Instance label时遇到的问题

你好,首先谢谢您分享代码,我在把图森数据转化为Instance label时遇到这样的问题,我看您给出的训练样例中是左=20,自车左=70,自车右=120,右=170,第五条=220,但是图森数据保存的lanes的顺序有的不是按照自车左,自车右,左,右,这样的顺序,因此会导致如下的情况
2929
这是原图下面是instance图,因为原始label是按照从左至右的顺序,因此处理后就出现了自车左=20的情况
2929
请问您是如何处理这种情况的?还有一个问题想请教您就是图森的数据每个clip都有20张图,只有最后一张有label,那其他的图的作用是?小白一枚,百忙之后希望收到您的答疑十分感谢。

consistency with the original paper

我想问下,你的实现是不是和原文有区别的,比如网络结构,后处理的方法等等。如果是,能不能说下具体改了哪些。我完全按照原文实现了一遍,但效果不够好。

Data Preparation

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?

ERROR - cost is :nan

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 .
image

Thank you.
Best regards
Wzx

ImportError: No module named lanenet_model

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

Missing semantic_segmentation.py file

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?

ValueError: Cannot feed value of shape

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:

  • draw different color on black background for instance segmentation(three channel),for example(10,10,10),(20,20,20),(30,30,30)...
  • draw white line on lane otherwise black(0,0,0),(255,255,255),(I try to use json file to draw line and then use cv2.imwrite to save,when i read the image,inspecte it's shape,it's channel is 3 even if the black backgroud is zeros(720,1280),3 channel image data is ok?).
  • generator data list for example:/xxx/image /xxx/gt_gray/gt_instance in train.txt and val.txt
    when i try to train from scrach,the code raise the error,if you can you tell me which step is error,i will appreciate for you help,thanks for your share too.
    @MaybeShewill-CV

A question about the train.

您好,请问在训练时我要分别训练三部分的网吗?我看您的代码是三个文件train_lanenet.py,train_encoder_decoder.py和train_lanenet_instance_segmentation.py,没有将三部分联合起来一起训练。

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.