Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
MaybeShewill-CV committed May 16, 2019
1 parent 41c405d commit a4de03d
Show file tree
Hide file tree
Showing 20 changed files with 215,065 additions and 678 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and instance semantic segmentation using discriminative loss function for real t
The main network architecture is as follows:

`Network Architecture`
![NetWork_Architecture](/data/source_image/network_architecture.png)
![NetWork_Architecture](./data/source_image/network_architecture.png)

## 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.
Expand Down Expand Up @@ -38,23 +38,23 @@ The results are as follows:

`Test Input Image`

![Test Input](/data/tusimple_test_image/0.jpg)
![Test Input](./data/tusimple_test_image/0.jpg)

`Test Lane Mask Image`

![Test Lane_Mask](/data/source_image/lanenet_mask_result.png)
![Test Lane_Mask](./data/source_image/lanenet_mask_result.png)

`Test Lane Binary Segmentation Image`

![Test Lane_Binary_Seg](/data/source_image/lanenet_binary_seg.png)
![Test Lane_Binary_Seg](./data/source_image/lanenet_binary_seg.png)

`Test Lane Instance Segmentation Image`

![Test Lane_Instance_Seg](/data/source_image/lanenet_instance_seg.png)
![Test Lane_Instance_Seg](./data/source_image/lanenet_instance_seg.png)

`Test Lane Instance Embedding Image`

![Test Lane_Embedding](/data/source_image/lanenet_embedding.png)
![Test Lane_Embedding](./data/source_image/lanenet_embedding.png)

If you want to test the model on a whole dataset you may call
```
Expand All @@ -66,7 +66,7 @@ If you set the save_dir argument the result will be saved in that folder or the
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](/data/source_image/lanenet_batch_test.gif)
![tusimple_batch_test_gif](./data/source_image/lanenet_batch_test.gif)

## Train your own model
#### Data Preparation
Expand Down Expand Up @@ -99,17 +99,17 @@ python tools/train_lanenet.py --net vgg --dataset_dir data/training_data_example
You may monitor the training process using tensorboard tools

During my experiment the `Total loss` drops as follows:
![Training loss](/data/source_image/total_loss.png)
![Training loss](./data/source_image/total_loss.png)

The `Binary Segmentation loss` drops as follows:
![Training binary_seg_loss](/data/source_image/binary_seg_loss.png)
![Training binary_seg_loss](./data/source_image/binary_seg_loss.png)

The `Instance Segmentation loss` drops as follows:
![Training instance_seg_loss](/data/source_image/instance_seg_loss.png)
![Training instance_seg_loss](./data/source_image/instance_seg_loss.png)

## Experiment
The accuracy during training process rises as follows:
![Training accuracy](/data/source_image/accuracy.png)
![Training accuracy](./data/source_image/accuracy.png)

Please cite my repo [lanenet-lane-detection](https://github.com/MaybeShewill-CV/lanenet-lane-detection) if you use it.

Expand Down
41 changes: 30 additions & 11 deletions config/global_config.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 18-1-31 上午11:21
# @Author : Luo Yao
# @Author : MaybeShewill-CV
# @Site : https://github.com/MaybeShewill-CV/lanenet-lane-detection
# @File : global_config.py
# @IDE: PyCharm Community Edition
"""
设置全局变量
Set global configuration
"""
from easydict import EasyDict as edict

Expand All @@ -19,26 +19,25 @@
__C.TRAIN = edict()

# Set the shadownet training epochs
__C.TRAIN.EPOCHS = 200010
__C.TRAIN.EPOCHS = 80010
# Set the display step
__C.TRAIN.DISPLAY_STEP = 1
# Set the test display step during training process
__C.TRAIN.TEST_DISPLAY_STEP = 1000
__C.TRAIN.VAL_DISPLAY_STEP = 1000
# Set the momentum parameter of the optimizer
__C.TRAIN.MOMENTUM = 0.9
# Set the initial learning rate
__C.TRAIN.LEARNING_RATE = 0.0005
__C.TRAIN.LEARNING_RATE = 0.001
# Set the GPU resource used during training process
__C.TRAIN.GPU_MEMORY_FRACTION = 0.85
__C.TRAIN.GPU_MEMORY_FRACTION = 0.95
# Set the GPU allow growth parameter during tensorflow training process
__C.TRAIN.TF_ALLOW_GROWTH = True
# Set the shadownet training batch size
__C.TRAIN.BATCH_SIZE = 8

__C.TRAIN.BATCH_SIZE = 4
# Set the shadownet validation batch size
__C.TRAIN.VAL_BATCH_SIZE = 8
__C.TRAIN.VAL_BATCH_SIZE = 4
# Set the learning rate decay steps
__C.TRAIN.LR_DECAY_STEPS = 410000
__C.TRAIN.LR_DECAY_STEPS = 210000
# Set the learning rate decay rate
__C.TRAIN.LR_DECAY_RATE = 0.1
# Set the class numbers
Expand All @@ -47,6 +46,16 @@
__C.TRAIN.IMG_HEIGHT = 256
# Set the image width
__C.TRAIN.IMG_WIDTH = 512
# Set the embedding features dims
__C.TRAIN.EMBEDDING_FEATS_DIMS = 4
# Set the random crop pad size
__C.TRAIN.CROP_PAD_SIZE = 32
# Set cpu multi process thread nums
__C.TRAIN.CPU_MULTI_PROCESS_NUMS = 6
# Set the train moving average decay
__C.TRAIN.MOVING_AVERAGE_DECAY = 0.9999
# Set the GPU nums
__C.TRAIN.GPU_NUM = 2

# Test options
__C.TEST = edict()
Expand All @@ -56,4 +65,14 @@
# Set the GPU allow growth parameter during tensorflow testing process
__C.TEST.TF_ALLOW_GROWTH = True
# Set the test batch size
__C.TEST.BATCH_SIZE = 8
__C.TEST.BATCH_SIZE = 2

# Test options
__C.POSTPROCESS = edict()

# Set the post process connect components analysis min area threshold
__C.POSTPROCESS.MIN_AREA_THRESHOLD = 100
# Set the post process dbscan search radius threshold
__C.POSTPROCESS.DBSCAN_EPS = 0.35
# Set the post process dbscan min samples threshold
__C.POSTPROCESS.DBSCAN_MIN_SAMPLES = 800
Loading

0 comments on commit a4de03d

Please sign in to comment.