feat: initial HSAP platform
Huaxu Sentinel Active Safety Platform with embedded algorithm code, Docker Compose setup, and vendored dataset scaffolds for clone-and-run. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
8
algorithms/lane_ufld/code/pytorch-auto-drive-master/.gitignore
vendored
Normal file
8
algorithms/lane_ufld/code/pytorch-auto-drive-master/.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# standard
|
||||
__pycache__/
|
||||
.idea
|
||||
.vscode
|
||||
|
||||
# custom
|
||||
output
|
||||
checkpoints
|
||||
29
algorithms/lane_ufld/code/pytorch-auto-drive-master/LICENSE
Normal file
29
algorithms/lane_ufld/code/pytorch-auto-drive-master/LICENSE
Normal file
@@ -0,0 +1,29 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2021, Maintainers
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
108
algorithms/lane_ufld/code/pytorch-auto-drive-master/README.md
Normal file
108
algorithms/lane_ufld/code/pytorch-auto-drive-master/README.md
Normal file
@@ -0,0 +1,108 @@
|
||||
# PytorchAutoDrive: Framework for self-driving perception
|
||||
|
||||
|
||||
*PytorchAutoDrive* is a **pure Python** framework includes semantic segmentation models, lane detection models based on **PyTorch**. Here we provide full stack supports from research (model training, testing, fair benchmarking by simply writing configs) to application (visualization, model deployment).
|
||||
|
||||
**Paper:** [Rethinking Efficient Lane Detection via Curve Modeling](https://arxiv.org/abs/2203.02431) (CVPR 2022)
|
||||
|
||||
**Poster:** [PytorchAutoDrive: Toolkit & Fair Benchmark for Autonomous Driving Research](https://drive.google.com/file/d/14EgcwPnKvAZJ1aWqBv6W9Msm666Wqi5a/view?usp=sharing) (PyTorch Developer Day 2021)
|
||||
|
||||
*This repository is under active development, results with models uploaded are stable. For legacy code users, please check [deprecations](https://github.com/voldemortX/pytorch-auto-drive/issues/14) for changes.*
|
||||
|
||||
**A demo video from ERFNet:**
|
||||
|
||||
https://user-images.githubusercontent.com/32259501/148680744-a18793cd-f437-461f-8c3a-b909c9931709.mp4
|
||||
|
||||
## Highlights
|
||||
|
||||
Various methods on a wide range of backbones, **config** based implementations, **modulated** and **easily understood** codes, image/keypoint loading, transformations and **visualizations**, **mixed precision training**, tensorboard logging and **deployment support** with ONNX and TensorRT.
|
||||
|
||||
Models from this repo are faster to train (**single card trainable**) and often have better performance than other implementations, see [wiki](https://github.com/voldemortX/pytorch-auto-drive/wiki/Notes) for reasons and technical specification of models.
|
||||
|
||||
## Supported datasets:
|
||||
|
||||
| Task | Dataset |
|
||||
| :---: | :---: |
|
||||
| semantic segmentation | PASCAL VOC 2012 |
|
||||
| semantic segmentation | Cityscapes |
|
||||
| semantic segmentation | GTAV* |
|
||||
| semantic segmentation | SYNTHIA* |
|
||||
| lane detection | CULane |
|
||||
| lane detection | TuSimple |
|
||||
| lane detection | LLAMAS |
|
||||
| lane detection | BDD100K (*In progress*) |
|
||||
|
||||
\* The UDA baseline setup, with Cityscapes *val* set as validation.
|
||||
|
||||
## Supported models:
|
||||
|
||||
| Task | Backbone | Model/Method |
|
||||
| :---: | :---: | :---: |
|
||||
| semantic segmentation | ResNet-101 | [FCN](/configs/semantic_segmentation/fcn) |
|
||||
| semantic segmentation | ResNet-101 | [DeeplabV2](https://arxiv.org/abs/1606.00915) |
|
||||
| semantic segmentation | ResNet-101 | [DeeplabV3](https://arxiv.org/abs/1706.05587) |
|
||||
| semantic segmentation | - | [ENet](https://arxiv.org/abs/1606.02147) |
|
||||
| semantic segmentation | - | [ERFNet](/configs/semantic_segmentation/erfnet) |
|
||||
| lane detection | ENet, ERFNet, VGG16, ResNets (18, 34, 50, 101), MobileNets (V2, V3-Large), RepVGGs (A0, A1, B0, B1g2, B2), Swin (Tiny) | [Baseline](/configs/lane_detection/baseline) |
|
||||
| lane detection | ERFNet, VGG16, ResNets (18, 34, 50, 101), RepVGGs (A1) | [SCNN](https://arxiv.org/abs/1712.06080) |
|
||||
| lane detection | ResNets (18, 34, 50, 101), MobileNets (V2, V3-Large), ERFNet | [RESA](https://arxiv.org/abs/2008.13719) |
|
||||
| lane detection | ERFNet, ENet | [SAD](https://arxiv.org/abs/1908.00821) ([*Postponed*](https://github.com/voldemortX/pytorch-auto-drive/wiki/Notes)) |
|
||||
| lane detection | ERFNet | [PRNet](http://www.ecva.net/papers/eccv_2020/papers_ECCV/papers/123630698.pdf) (*In progress*) |
|
||||
| lane detection | ResNets (18, 34, 50, 101), ResNet18-reduced | [LSTR](https://arxiv.org/abs/2011.04233) |
|
||||
| lane detection | ResNets (18, 34) | [LaneATT](https://arxiv.org/abs/2010.12035) |
|
||||
| lane detection | ResNets (18, 34) | [BézierLaneNet](/configs/lane_detection/bezierlanenet) |
|
||||
|
||||
## Model Zoo
|
||||
|
||||
We provide solid results (average/best/detailed), training time, shell scripts and trained models available for download in [MODEL_ZOO.md](docs/MODEL_ZOO_J.md).
|
||||
|
||||
## Installation
|
||||
|
||||
Please prepare the environment and code with [INSTALL.md](docs/INSTALL.md). Then follow the instructions in [DATASET.md](docs/DATASET.md) to set up datasets.
|
||||
|
||||
## Getting Started
|
||||
|
||||
Get started with [LANEDETECTION.md](docs/LANEDETECTION.md) for lane detection.
|
||||
|
||||
Get started with [SEGMENTATION.md](docs/SEGMENTATION.md) for semantic segmentation.
|
||||
|
||||
## Visualization Tools
|
||||
|
||||
Refer to [VISUALIZATION.md](docs/VISUALIZATION.md) for a visualization & inference tutorial, for image and video inputs.
|
||||
|
||||
## Benchmark Tools
|
||||
|
||||
Refer to [BENCHMARK.md](docs/BENCHMARK.md) for a benchmarking tutorial, including FPS test, FLOPs & memory count for each supported model.
|
||||
|
||||
## Deployment
|
||||
|
||||
Refer to [DEPLOY.md](docs/DEPLOY.md) for ONNX and TensorRT deployment supports.
|
||||
|
||||
## Advanced Tutorial
|
||||
|
||||
Checkout [ADVANCED_TUTORIAL.md](docs/ADVANCED_TUTORIAL.md) for advanced use cases and how to code in PytorchAutoDrive.
|
||||
|
||||
## Contributing
|
||||
|
||||
Refer to [CONTRIBUTING.md](/docs/CONTRIBUTING.md) for contribution guides.
|
||||
|
||||
## Citation
|
||||
|
||||
If you feel this framework substantially helped your research or you want a reference when using our results, please cite the following paper that made the official release of PytorchAutoDrive:
|
||||
|
||||
```
|
||||
@inproceedings{feng2022rethinking,
|
||||
title={Rethinking efficient lane detection via curve modeling},
|
||||
author={Feng, Zhengyang and Guo, Shaohua and Tan, Xin and Xu, Ke and Wang, Min and Ma, Lizhuang},
|
||||
booktitle={Computer Vision and Pattern Recognition},
|
||||
year={2022}
|
||||
}
|
||||
```
|
||||
|
||||
## Credits:
|
||||
|
||||
PytorchAutoDrive is maintained by Zhengyang Feng ([voldemortX](https://github.com/voldemortX)) and Shaohua Guo ([cedricgsh](https://github.com/cedricgsh)).
|
||||
|
||||
Contributors (GitHub ID): [kalkun](https://github.com/kalkun), [LittleJohnKhan](https://github.com/LittleJohnKhan), [francis0407](https://github.com/francis0407), [PannenetsF](https://github.com/PannenetsF), [bjzhb666](https://github.com/bjzhb666)
|
||||
|
||||
People who sponsored us (e.g., with hardware): [Lizhuang Ma](https://dmcv.sjtu.edu.cn/people/), [Xin Tan](https://tanxincs.github.io/TAN-Xin.github.io/), Junshu Tang ([junshutang](https://github.com/junshutang)), Fengqi Liu ([FengqiLiu1221](https://github.com/FengqiLiu1221))
|
||||
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
backend="cpp" # or python
|
||||
echo experiment name: $1
|
||||
echo status: $2
|
||||
echo save dir: $3
|
||||
|
||||
if [ "${backend}" = "cpp" ]; then
|
||||
cd tools/culane_evaluation
|
||||
else
|
||||
echo Although python version works, we still suggest using the official Cpp version when possible!
|
||||
echo At least try them when you are writing a paper.
|
||||
echo Cpp and Python backends yield slightly different results.
|
||||
cd tools/culane_evaluation_py
|
||||
fi
|
||||
|
||||
if [ "$2" = "test" ]; then
|
||||
# Perform test with official scripts
|
||||
./eval.sh $1 $3
|
||||
# Calculate overall F1 score
|
||||
python cal_total.py --exp-name=$1 --save-dir=$3
|
||||
else
|
||||
# Perform validation with official scripts
|
||||
./eval_validation.sh $1 $3
|
||||
fi
|
||||
cd ../../
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
echo experiment name: $1
|
||||
echo status: $2
|
||||
echo save dir: $3
|
||||
data_dir=../../../../dataset/llamas/labels/valid
|
||||
cd tools/llamas_evaluation/
|
||||
|
||||
if [ "$2" = "val" ]; then
|
||||
# we can provide the valid set to evaluate models
|
||||
python evaluate.py --pred_dir=../../output/valid --anno_dir=${data_dir} --exp_name=$1 --save-dir=$3
|
||||
else
|
||||
echo "The test set of llamas is not public available."
|
||||
fi
|
||||
cd ../../
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
data_dir=../../../../dataset/tusimple/
|
||||
echo experiment name: $1
|
||||
echo status: $2
|
||||
echo save dir: $3
|
||||
|
||||
# Perform test/validation with official scripts
|
||||
cd tools/tusimple_evaluation
|
||||
if [ "$2" = "test" ]; then
|
||||
python lane.py ../../output/${1}.json ${data_dir}test_label.json $1 $3
|
||||
else
|
||||
python lane.py ../../output/${1}.json ${data_dir}label_data_0531.json $1 $3
|
||||
fi
|
||||
cd ../../
|
||||
@@ -0,0 +1,43 @@
|
||||
## Configs
|
||||
|
||||
Config files in *PytorchAutoDrive* (`./configs/`) are used to define models,
|
||||
how they are trained, tested, visualized, *etc*.
|
||||
|
||||
### Registry Mechanism
|
||||
|
||||
Different to existing class-based registers, we can also register functions.
|
||||
For functions, you only write static args in your config,
|
||||
while passing the dynamic ones on-the-fly by:
|
||||
|
||||
```
|
||||
REGISTRY.from_dict(
|
||||
<config dict for a function/class>,
|
||||
kwarg1=1, kwarg2=2, ...
|
||||
)
|
||||
```
|
||||
|
||||
Note that each argument must be keyword (k=v), and some kwargs can overwrite dict configs.
|
||||
|
||||
### Use An Existing Config
|
||||
|
||||
Modify customized options like the root of your datasets (in `configs/*/common/_*.py`).
|
||||
|
||||
### Write A New Config
|
||||
|
||||
Copy the config file most similar to your use case and modify it.
|
||||
Note that you can simply import config parts from `common` or other config files, it is like writing Python.
|
||||
|
||||
### Register A New Class/Func
|
||||
|
||||
Choose the appropriate registry and register your Class/Func by:
|
||||
|
||||
```
|
||||
@REGISTRY.register()
|
||||
```
|
||||
|
||||
Remember you still need to import this Class/Func for the registering to take effects.
|
||||
|
||||
### How To Read The Code
|
||||
|
||||
Since you can't just click 'go to definition' in your IDE,
|
||||
it is suggested to search the directory for each Class/Function by `name` in configs.
|
||||
@@ -0,0 +1,116 @@
|
||||
# Baseline
|
||||
|
||||
> Not exactly proposed by any paper.
|
||||
|
||||
## Method Overview
|
||||
|
||||
The segmentation baseline takes semantic segmentation networks and appends a lane existence head. It takes the most classic multi-class segmentation approach, its design originates from the SCNN paper (ResNets and VGG based Deeplab), while the SAD paper explores the use of ENet and ERFNet, later the RESA paper reduced the network width for efficient ResNet baselines, finally the BézierLaneNet paper (this framework) improved these baselines with modern training techniques and fair evaluations, further extended them to modern architectures such as Swin Transformer, RepVGG and MobileNets. Among them, the ERFNet baseline even achieves comparable performance against SOTA methods. However, they are very sensitive to hyper-parameters, see [Wiki](https://github.com/voldemortX/pytorch-auto-drive/wiki/Notes) and the BézierLaneNet Appendix.B for more info. Specifically, the VGG16 backbone corresponds to DeepLab-LargeFOV in SCNN, the ResNet & other backbones correspond to DeepLabV2 (w.o. ASPP) with output channels reduced to 128 as in RESA. We sometimes call them by backbone names for consistency with common practices.
|
||||
|
||||
## Results
|
||||
|
||||
*Training time estimated with single 2080 Ti.*
|
||||
|
||||
*ImageNet pre-training, 3-times average/best.*
|
||||
|
||||
*<sup>+</sup> Measured on a single GTX 1080Ti.*
|
||||
|
||||
*<sup>#</sup> No pre-training.*
|
||||
|
||||
*\* Trained on a 1080 Ti cluster, with CUDA 9.0 PyTorch 1.3, training time is estimated as: single 2080 Ti, mixed precision.*
|
||||
|
||||
*\*\* Trained on two 2080ti.*
|
||||
|
||||
### TuSimple (test)
|
||||
|
||||
| backbone | aug | resolution | training time | precision | accuracy (avg) | accuracy | FP | FN | |
|
||||
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
||||
| VGG16 | level 0 | 360 x 640 | 1.5h | mix | 93.79% | 93.94% | 0.0998 | 0.1021 | [model](https://drive.google.com/file/d/1ChK0hApqLU0xUiEm4Wul-gNYQDQka151/view?usp=sharing) \| [shell](/tools/shells/vgg16_baseline_tusimple.sh) |
|
||||
| ResNet18 | level 0 | 360 x 640 | 0.7h | mix | 94.18% | 94.25% | 0.0881 | 0.0894 | [model](https://drive.google.com/file/d/17VKnwsN4WMbpnD4DgaaerppjXybqn-LG/view?usp=sharing) \| [shell](/tools/shells/resnet18_baseline_tusimple.sh) |
|
||||
| ResNet34 | level 0 | 360 x 640 | 1.1h | mix | 95.23% | 95.31% | 0.0640 | 0.0622 | [model](https://drive.google.com/file/d/1NAck0aQZK_wAHer4xB8xzegxDWk9EFtG/view?usp=sharing) \| [shell](/tools/shells/resnet34_baseline_tusimple.sh) |
|
||||
| ResNet34 | level 1a | 360 x 640 | 1.2h* | full | 92.14% | 92.68% | 0.1073 | 0.1221 | [model](https://drive.google.com/file/d/1OhN2tWIep9ncKFf-_2RqUEaSJvPK60cn/view?usp=sharing) \| [shell](/tools/shells/resnet34_baseline-aug_tusimple.sh) |
|
||||
| ResNet50 | level 0 | 360 x 640 | 1.5h | mix | 95.07% | 95.12% | 0.0649 | 0.0653 | [model](https://drive.google.com/file/d/10KBMVGc63kPvqL_2deaLfTfC3fSAtnju/view?usp=sharing) \| [shell](/tools/shells/resnet50_baseline_tusimple.sh) |
|
||||
| ResNet101 | level 0 | 360 x 640 | 2.6h | mix | 95.15% | 95.19% | 0.0619 | 0.0620 | [model](https://drive.google.com/file/d/1mELtKB3e8ntOmPovhnMphXWKf_bv83ef/view?usp=sharing) \| [shell](/tools/shells/resnet101_baseline_tusimple.sh) |
|
||||
| ERFNet | level 0 | 360 x 640 | 0.8h | mix | 96.02% | 96.04% | 0.0591 | 0.0365 | [model](https://drive.google.com/file/d/1rLWDP_dkIQ7sBsCEzJi8T7ET1EPghhJJ/view?usp=sharing) \| [shell](/tools/shells/erfnet_baseline_tusimple.sh) |
|
||||
| ERFNet | level 1a | 360 x 640 | 0.9h* | full | 94.21% | 94.37% | 0.0846 | 0.0770 | [model](https://drive.google.com/file/d/1LPmxT8rnyZL2M08lSLrlvrM0H_hMrFvq/view?usp=sharing) \| [shell](/tools/shells/erfnet_baseline-aug_tusimple.sh) |
|
||||
| ENet<sup>#</sup> | level 0 | 360 x 640 | 1h<sup>+</sup> | mix | 95.55% | 95.61% | 0.0655 | 0.0503 | [model](https://drive.google.com/file/d/1CNSox62ghs0ArDVJb9mTZ1NVvqSkUNYC/view?usp=sharing) \| [shell](/tools/shells/enet_baseline_tusimple.sh) |
|
||||
| MobileNetV2 | level 0 | 360 x 640 | 0.5h | mix | 93.98% | 94.07% | 0.0792 | 0.0866 | [model](https://drive.google.com/file/d/1SUqt3BDXSMhAv68F9VIKncY0lDUg9My8/view?usp=sharing) \| [shell](/tools/shells/mobilenetv2_baseline_tusimple.sh) |
|
||||
| MobileNetV3-Large | level 0 | 360 x 640 | 0.5h | mix | 92.09% | 92.18% | 0.1149 | 0.1322 | [model](https://drive.google.com/file/d/1I5SPlkmC8TnNeANoQGxzP3P1_iVxms3u/view?usp=sharing) \| [shell](/tools/shells/mobilenetv3-large_baseline_tusimple.sh) |
|
||||
|
||||
### CULane (test)
|
||||
|
||||
| backbone | aug | resolution | training time | precision | F1 (avg) | F1 | normal | crowded | night | no line | shadow | arrow | dazzle<br>light | curve | crossroad | |
|
||||
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
||||
| VGG16 | level 0 | 288 x 800 | 9.3h | mix | 65.93 | 66.09 | 85.51 | 64.05 | 61.14 | 35.96 | 59.76 | 78.43 | 53.25 | 62.16 | 2224 | [model](https://drive.google.com/file/d/1wVz1a7S1e5Dgy7ERk7E8dqQ8gyK-dWLG/view?usp=sharing) \| [shell](/tools/shells/vgg16_baseline_culane.sh) |
|
||||
| ResNet18 | level 0 | 288 x 800 | 5.3h | mix | 65.19 | 65.30 | 85.45 | 62.63 | 61.04 | 33.88 | 51.72 | 78.15 | 53.05 | 59.70 | 1915 | [model](https://drive.google.com/file/d/1wkaTp8v1ceXrd6AjRccqpNxxxkd_qg1U/view?usp=sharing) \| [shell](/tools/shells/resnet18_baseline_culane.sh) |
|
||||
| ResNet34 | level 0 | 288 x 800 | 7.3h | mix | 69.82 | 69.92 | 89.46 | 66.66 | 65.38 | 40.43 | 62.17 | 83.18 | 58.51 | 63.00 | 1713 | [model](https://drive.google.com/file/d/16VIJcd3wDOjFjg3UCVekUPcAb_F1K604/view?usp=sharing) \| [shell](/tools/shells/resnet34_baseline_culane.sh) |
|
||||
| ResNet50 | level 0 | 288 x 800 | 12.4h | mix | 68.31 | 68.48 | 88.15 | 65.73 | 63.74 | 37.96 | 62.59 | 81.68 | 59.47 | 64.01 | 2046 | [model](https://drive.google.com/file/d/1DYVeH9kdSPhEMA4fsJFdEiw8qOwvQBl8/view?usp=sharing) \| [shell](/tools/shells/resnet50_baseline_culane.sh) |
|
||||
| ResNet101 | level 0 | 288 x 800 | 20.0h | mix | 71.29 | 71.37 | 90.11 | 67.89 | 67.01 | 43.10 | 70.56 | 85.09 | 61.77 | 65.47 | 1883 | [model](https://drive.google.com/file/d/1iubFjWetsKE2VI4BEIWLDd80gB7IQUaP/view?usp=sharing) \| [shell](/tools/shells/resnet101_baseline_culane.sh) |
|
||||
| ERFNet | level 0 | 288 x 800 | 6h | mix | 73.40 | 73.49 | 91.48 | 71.27 | 68.09 | 46.76 | 74.47 | 86.09 | 64.18 | 66.89 | 2102 | [model](https://drive.google.com/file/d/16-Q_jZYc9IIKUEHhClSTwZI4ClMeVvQS/view?usp=sharing) \| [shell](/tools/shells/erfnet_baseline_culane.sh) |
|
||||
| ENet<sup>#</sup> | level 0 | 288 x 800 | 6.4h<sup>+</sup> | mix | 69.39 | 69.90 | 89.26 | 68.15 | 62.99 | 42.43 | 68.59 | 83.10 | 58.49 | 63.23 | 2464 | [model](https://drive.google.com/file/d/1DNgOpAVq87GIPUeAdMP6fnS4LhUmqyRB/view?usp=sharing) \| [shell](/tools/shells/enet_baseline_culane.sh) |
|
||||
| MobileNetV2 | level 0 | 288 x 800 | 3.0h | mix | 67.34 | 67.41 | 87.82 | 65.09 | 61.46 | 38.15 | 57.34 | 79.29 | 55.89 | 60.29 | 2114 | [model](https://drive.google.com/file/d/1xTW24b0bW_tzeXQc0znHrMrkBK4BL7_t/view?usp=sharing) \| [shell](/tools/shells/mobilenetv2_baseline_culane.sh) |
|
||||
| MobileNetV3-Large | level 0 | 288 x 800 | 3.0h | mix | 68.27 | 68.42 | 88.20 | 66.33 | 63.08 | 40.41 | 56.15 | 79.81 | 59.15 | 61.96 | 2304 | [model](https://drive.google.com/file/d/1JJ6gGcH6fAwR3UcGAnmdels5Vm8Bz48Q/view?usp=sharing) \| [shell](/tools/shells/mobilenetv3-large_baseline_culane.sh) |
|
||||
| RepVGG-A0 | level 0 | 288 x 800 | 3.3h** | mix | 70.22 | 70.56 | 89.74 | 67.68 | 65.21 | 42.51 | 67.85 | 83.13 | 60.86 | 63.63 | 2011 | [model](https://drive.google.com/file/d/1IJtM5LT0GTsHHlO0USLpuZLA_KyuLRd_/view?usp=sharing) \| [shell](/tools/shells/repvgg-a0_baseline_culane.sh) |
|
||||
| RepVGG-A1 | level 0 | 288 x 800 | 4.1h** | mix | 70.73 | 70.85 | 89.92 | 68.60 | 65.43 | 41.99 | 66.64 | 84.78 | 61.38 | 64.85 | 2127 | [model](https://drive.google.com/file/d/1cQMaXCww-a3mPssQK9iFzHJh6SinxcOo/view?usp=sharing) \| [shell](/tools/shells/repvgg-a1_baseline_culane.sh) |
|
||||
| RepVGG-B0 | level 0 | 288 x 800 | 6.2h** | mix | 71.77 | 71.81 | 90.86 | 69.32 | 66.68 | 43.53 | 67.83 | 85.43 | 59.80 | 66.47 | 2189 | [model](https://drive.google.com/file/d/1NR4n7N7mK3yKvRAWZUbtRYQ0xHM2vL60/view?usp=sharing) \| [shell](/tools/shells/repvgg-b0_baseline_culane.sh) |
|
||||
| RepVGG-B1g2 | level 0 | 288 x 800 | 10.0h** | mix | 72.08 | 72.20 | 90.85 | 69.31 | 67.94 | 43.81 | 68.45 | 85.85 | 60.64 | 67.69 | 2092 | [model](https://drive.google.com/file/d/1tKo69RroMYMn_v_C51BuHJQDSN0I7R-m/view?usp=sharing) \| [shell](/tools/shells/repvgg-b1g2_baseline_culane.sh) |
|
||||
| RepVGG-B2 | level 0 | 288 x 800 | 13.2h** | mix | 72.24 | 72.33 | 90.82 | 69.84 | 67.65 | 43.02 | 72.08 | 85.76 | 61.75 | 67.67 | 2000 | [model](https://drive.google.com/file/d/1_3sS5U20lTDIsq5jS4cev0kZaUER9NPH/view?usp=sharing) \| [shell](/tools/shells/repvgg-b2_baseline_culane.sh) |
|
||||
| Swin-Tiny | level 0 | 288 x 800 | 12.1h** | mix | 69.75 | 69.90 | 89.55 | 68.36 | 63.56 | 42.53 | 61.96 | 82.64 | 60.81 | 65.21 | 2813 | [model](https://drive.google.com/file/d/1YI_pHGVuuWYyTLeUgdZVDS14WoQjPon4/view?usp=sharing) \| [shell](/tools/shells/swin-tiny_baseline_culane.sh) |
|
||||
|
||||
### LLAMAS (val)
|
||||
|
||||
| backbone | aug | resolution | training time | precision | F1 (avg) | F1 | TP | FP | FN | Precision | Recall | |
|
||||
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
||||
| VGG16 | level 0 | 360 x 640 | 9.3h | mix | 95.05 | 95.11 | 70263 | 3460 | 3772 | 95.31 | 94.91 | [model](https://drive.google.com/file/d/1k2b7iRw3_YMJDMUsKVjtdOXRdZsXNXnO/view?usp=sharing) \| [shell](/tools/shells/vgg16_baseline_llamas.sh) |
|
||||
| ResNet34 | level 0 | 360 x 640 | 7.0h | mix | 95.90 | 95.91 | 70841 | 2847 | 3194 | 96.14 | 95.69 | [model](https://drive.google.com/file/d/1YXNgwhQqwxoMkHDbRqAdnuAXIe1IdLSm/view?usp=sharing) \| [shell](/tools/shells/resnet34_baseline_llamas.sh) |
|
||||
| ERFNet | level 0 | 360 x 640 | 10.9h<sup>+</sup> | mix | 95.94 | 96.13 | 71136 | 2830 | 2899 | 96.17 | 96.08 | [model](https://drive.google.com/file/d/15oNU4iffIPYTuKSCH2j0boRkYmm3-uSh/view?usp=sharing) \| [shell](/tools/shells/erfnet_baseline_llamas.sh) |
|
||||
|
||||
Their test performance can be found at the [LLAMAS leaderboard](https://unsupervised-llamas.com/llamas/benchmark_splines).
|
||||
|
||||
## Profiling
|
||||
|
||||
*FPS is best trial-avg among 3 trials on a 2080 Ti. Post-processing is ignored.*
|
||||
|
||||
| backbone | resolution | FPS | FLOPS(G) | Params(M) |
|
||||
| :---: | :---: | :---: | :---: | :---: |
|
||||
| VGG16 | 360 x 640 | 56.36 | 214.50 | 20.37 |
|
||||
| ResNet18 | 360 x 640 | 148.59 | 85.24 | 12.04 |
|
||||
| ResNet34 | 360 x 640 | 79.97 | 159.60 | 22.15 |
|
||||
| ResNet50 | 360 x 640 | 50.58 | 177.62 | 24.57 |
|
||||
| ResNet101 | 360 x 640 | 27.41 | 314.36 | 43.56 |
|
||||
| ERFNet | 360 x 640 | 85.87 | 26.32 | 2.67 |
|
||||
| ENet | 360 x 640 | 56.63 | 4.26 | 0.95 |
|
||||
| MobileNetV2 | 360 x 640 | 126.54 | 4.49 | 2.06 |
|
||||
| MobileNetV3-Large | 360 x 640 | 104.34 | 3.63 | 3.30 |
|
||||
| VGG16 | 288 x 800 | 55.31 | 214.50 | 20.15 |
|
||||
| ResNet18 | 288 x 800 | 136.28 | 85.22 | 11.82 |
|
||||
| ResNet34 | 288 x 800 | 72.42 | 159.60 | 21.93 |
|
||||
| ResNet50 | 288 x 800 | 49.41 | 177.60 | 24.35 |
|
||||
| ResNet101 | 288 x 800 | 27.19 | 314.34 | 43.34 |
|
||||
| ERFNet | 288 x 800 | 88.76 | 26.26 | 2.68 |
|
||||
| ENet | 288 x 800 | 57.99 | 4.12 | 0.96 |
|
||||
| MobileNetV2 | 288 x 800 | 129.24 | 4.41 | 2.00 |
|
||||
| MobileNetV3-Large | 288 x 800 | 107.83 | 3.56 | 3.25 |
|
||||
| RepVGG-A0 | 288 x 800 | 162.61 | 207.81 | 9.06 |
|
||||
| RepVGG-A1 | 288 x 800 | 117.30 | 339.83 | 13.54 |
|
||||
| RepVGG-B0 | 288 x 800 | 103.68 | 390.83 | 15.09 |
|
||||
| RepVGG-B1g2 | 288 x 800 | 36.91 | 1166.76 | 42.20 |
|
||||
| RepVGG-B2 | 288 x 800 | 18.98 | 2310.13 | 81.23 |
|
||||
| Swin-Tiny | 288 x 800 | 51.90 | 44.24 | 27.72 |
|
||||
|
||||
## Citation (if you have to)
|
||||
|
||||
```
|
||||
@inproceedings{pan2018spatial,
|
||||
title={Spatial as deep: Spatial cnn for traffic scene understanding},
|
||||
author={Pan, Xingang and Shi, Jianping and Luo, Ping and Wang, Xiaogang and Tang, Xiaoou},
|
||||
booktitle={AAAI},
|
||||
year={2018}
|
||||
}
|
||||
|
||||
@inproceedings{feng2022rethinking,
|
||||
title={Rethinking efficient lane detection via curve modeling},
|
||||
author={Feng, Zhengyang and Guo, Shaohua and Tan, Xin and Xu, Ke and Wang, Min and Ma, Lizhuang},
|
||||
booktitle={Computer Vision and Pattern Recognition},
|
||||
year={2022}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,72 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd05 import optimizer
|
||||
from configs.lane_detection.common.optims.ep12_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='enet_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=5,
|
||||
num_epochs=12,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True, # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='enet_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/enet_baseline_culane/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='ENet',
|
||||
num_classes=5,
|
||||
encoder_relu=False,
|
||||
decoder_relu=True,
|
||||
dropout_1=0.01,
|
||||
dropout_2=0.1,
|
||||
encoder_only=False,
|
||||
pretrained_weights=None,
|
||||
lane_classifier_cfg=dict(
|
||||
name='EDLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=4500,
|
||||
dropout=0.1,
|
||||
pool='avg'
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,72 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.tusimple_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_7class import loss
|
||||
from configs.lane_detection.common.optims.sgd04 import optimizer
|
||||
from configs.lane_detection.common.optims.ep50_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='enet_baseline_tusimple',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
num_classes=7,
|
||||
num_epochs=50,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='enet_baseline_tusimple',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/enet_baseline_tusimple/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=10,
|
||||
ppl=56,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
max_lane=5,
|
||||
dataset_name='tusimple'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='ENet',
|
||||
num_classes=7,
|
||||
encoder_relu=False,
|
||||
decoder_relu=True,
|
||||
dropout_1=0.01,
|
||||
dropout_2=0.1,
|
||||
encoder_only=False,
|
||||
pretrained_weights=None,
|
||||
lane_classifier_cfg=dict(
|
||||
name='EDLaneExist',
|
||||
num_output=7 - 1,
|
||||
flattened_size=4400,
|
||||
dropout=0.1,
|
||||
pool='avg'
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,69 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd02 import optimizer
|
||||
from configs.lane_detection.common.optims.ep12_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='erfnet_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=5,
|
||||
num_epochs=12,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True, # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='erfnet_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/erfnet_baseline_culane/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='ERFNet',
|
||||
num_classes=5,
|
||||
dropout_1=0.1,
|
||||
dropout_2=0.1,
|
||||
pretrained_weights='erfnet_encoder_pretrained.pth.tar',
|
||||
lane_classifier_cfg=dict(
|
||||
name='EDLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=4500,
|
||||
dropout=0.1,
|
||||
pool='max'
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,69 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.llamas_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd05 import optimizer
|
||||
from configs.lane_detection.common.optims.ep10_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='erfnet_baseline_llamas',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(360, 640),
|
||||
original_size=(717, 1276),
|
||||
num_classes=5,
|
||||
num_epochs=10,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='erfnet_baseline_llamas',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/erfnet_baseline_llamas/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=1,
|
||||
ppl=417,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(360, 640),
|
||||
original_size=(717, 1276),
|
||||
max_lane=4,
|
||||
dataset_name='llamas'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='ERFNet',
|
||||
num_classes=5,
|
||||
dropout_1=0.3,
|
||||
dropout_2=0.3,
|
||||
pretrained_weights='erfnet_encoder_pretrained.pth.tar',
|
||||
lane_classifier_cfg=dict(
|
||||
name='EDLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=4400,
|
||||
dropout=0.3,
|
||||
pool='max'
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,69 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.tusimple_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_7class import loss
|
||||
from configs.lane_detection.common.optims.sgd02 import optimizer
|
||||
from configs.lane_detection.common.optims.ep50_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='erfnet_baseline_tusimple',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
num_classes=7,
|
||||
num_epochs=50,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='erfnet_baseline_tusimple',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/erfnet_baseline_tusimple/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=10,
|
||||
ppl=56,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
max_lane=5,
|
||||
dataset_name='tusimple'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='ERFNet',
|
||||
num_classes=7,
|
||||
dropout_1=0.3,
|
||||
dropout_2=0.3,
|
||||
pretrained_weights='erfnet_encoder_pretrained.pth.tar',
|
||||
lane_classifier_cfg=dict(
|
||||
name='EDLaneExist',
|
||||
num_output=7 - 1,
|
||||
flattened_size=4400,
|
||||
dropout=0.3,
|
||||
pool='max'
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,69 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.tusimple_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level1a_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_7class import loss
|
||||
from configs.lane_detection.common.optims.sgd02 import optimizer
|
||||
from configs.lane_detection.common.optims.ep50_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='erfnet_baseline_tusimple-aug',
|
||||
workers=5,
|
||||
batch_size=10,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=2,
|
||||
dist_url='tcp://localhost:12345',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
num_classes=7,
|
||||
num_epochs=50,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='erfnet_baseline_tusimple-aug',
|
||||
workers=10,
|
||||
batch_size=40,
|
||||
checkpoint='./checkpoints/erfnet_baseline_tusimple-aug/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=10,
|
||||
ppl=56,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
max_lane=5,
|
||||
dataset_name='tusimple'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='ERFNet',
|
||||
num_classes=7,
|
||||
dropout_1=0.3,
|
||||
dropout_2=0.3,
|
||||
pretrained_weights='erfnet_encoder_pretrained.pth.tar',
|
||||
lane_classifier_cfg=dict(
|
||||
name='EDLaneExist',
|
||||
num_output=7 - 1,
|
||||
flattened_size=4400,
|
||||
dropout=0.3,
|
||||
pool='max'
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,84 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd009 import optimizer
|
||||
from configs.lane_detection.common.optims.ep12_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='mobilenetv2_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=5,
|
||||
num_epochs=12,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='mobilenetv2_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/mobilenetv2_baseline_culane/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='DeepLabV1Lane',
|
||||
backbone_cfg=dict(
|
||||
name='MobileNetV2Encoder',
|
||||
pretrained='https://download.pytorch.org/models/mobilenet_v2-b0353104.pth',
|
||||
widen_factor=1,
|
||||
|
||||
# OS-16 (DeepLab style)
|
||||
strides=(1, 2, 2, 2, 1, 1, 1),
|
||||
dilations=(1, 1, 1, 1, 1, 2, 2),
|
||||
out_indices=(6, )
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=320,
|
||||
reduce=128
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=5,
|
||||
dilation=1
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=1125,
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,84 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.tusimple_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_7class import loss
|
||||
from configs.lane_detection.common.optims.sgd009 import optimizer
|
||||
from configs.lane_detection.common.optims.ep50_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='mobilenetv2_baseline_tusimple',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
num_classes=7,
|
||||
num_epochs=50,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='mobilenetv2_baseline_tusimple',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/mobilenetv2_baseline_tusimple/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=10,
|
||||
ppl=56,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
max_lane=5,
|
||||
dataset_name='tusimple'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='DeepLabV1Lane',
|
||||
backbone_cfg=dict(
|
||||
name='MobileNetV2Encoder',
|
||||
pretrained='https://download.pytorch.org/models/mobilenet_v2-b0353104.pth',
|
||||
widen_factor=1,
|
||||
|
||||
# OS-16 (DeepLab style)
|
||||
strides=(1, 2, 2, 2, 1, 1, 1),
|
||||
dilations=(1, 1, 1, 1, 1, 2, 2),
|
||||
out_indices=(6, )
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=320,
|
||||
reduce=128
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=7,
|
||||
dilation=1
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=7 - 1,
|
||||
flattened_size=1540,
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,88 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd009 import optimizer
|
||||
from configs.lane_detection.common.optims.ep12_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='mobilenetv3-large_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=5,
|
||||
num_epochs=12,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='mobilenetv3-large_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/mobilenetv3-large_baseline_culane/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='DeepLabV1Lane',
|
||||
backbone_cfg=dict(
|
||||
# MobileNetV3-Large 1.0
|
||||
# Manually download https://download.pytorch.org/models/mobilenet_v3_large-8738ca79.pth,
|
||||
# bug in torch 1.6
|
||||
name='MobileNetV3Encoder',
|
||||
pretrained='mobilenet_v3_large-8738ca79.pth',
|
||||
arch='large',
|
||||
reduction_factor=1,
|
||||
|
||||
# OS-16 (DeepLab style)
|
||||
strides=(1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||
dilations=(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2),
|
||||
out_indices=(16, )
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=5,
|
||||
dilation=1
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=960,
|
||||
reduce=128
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=1125,
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,88 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.tusimple_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_7class import loss
|
||||
from configs.lane_detection.common.optims.sgd009 import optimizer
|
||||
from configs.lane_detection.common.optims.ep50_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='mobilenetv3-large_baseline_tusimple',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
num_classes=7,
|
||||
num_epochs=50,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='mobilenetv3-large_baseline_tusimple',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/mobilenetv3-large_baseline_tusimple/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=10,
|
||||
ppl=56,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
max_lane=5,
|
||||
dataset_name='tusimple'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='DeepLabV1Lane',
|
||||
backbone_cfg=dict(
|
||||
# MobileNetV3-Large 1.0
|
||||
# Manually download https://download.pytorch.org/models/mobilenet_v3_large-8738ca79.pth,
|
||||
# bug in torch 1.6
|
||||
name='MobileNetV3Encoder',
|
||||
pretrained='mobilenet_v3_large-8738ca79.pth',
|
||||
arch='large',
|
||||
reduction_factor=1,
|
||||
|
||||
# OS-16 (DeepLab style)
|
||||
strides=(1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||
dilations=(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2),
|
||||
out_indices=(16, )
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=7,
|
||||
dilation=1
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=960,
|
||||
reduce=128
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=7 - 1,
|
||||
flattened_size=1540,
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,80 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd02 import optimizer
|
||||
from configs.lane_detection.common.optims.ep12_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='repvgg-a0_baseline_culane',
|
||||
workers=5,
|
||||
batch_size=10,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=2,
|
||||
dist_url='tcp://localhost:12345',
|
||||
device='cuda',
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=5,
|
||||
num_epochs=12,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='repvgg-a0_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/repvgg-a0_baseline_culane/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='SegRepVGG',
|
||||
# num_classes=5,
|
||||
# dropout_1=0.1,
|
||||
backbone_cfg=dict(
|
||||
name='RepVggEncoder',
|
||||
backbone_name='RepVGG-A0',
|
||||
pretrained=True,
|
||||
deploy=False
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=1280,
|
||||
reduce=128
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=4500,
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=5,
|
||||
dilation=1
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,80 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd02 import optimizer
|
||||
from configs.lane_detection.common.optims.ep12_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='repvgg-a1_baseline_culane',
|
||||
workers=5,
|
||||
batch_size=10,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=2,
|
||||
dist_url='tcp://localhost:12345',
|
||||
device='cuda',
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=5,
|
||||
num_epochs=12,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='repvgg-a1_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/repvgg-a1_baseline_culane/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='SegRepVGG',
|
||||
# num_classes=5,
|
||||
# dropout_1=0.1,
|
||||
backbone_cfg=dict(
|
||||
name='RepVggEncoder',
|
||||
backbone_name='RepVGG-A1',
|
||||
pretrained=True,
|
||||
deploy=False
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=1280,
|
||||
reduce=128
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=4500,
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=5,
|
||||
dilation=1
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,80 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd02 import optimizer
|
||||
from configs.lane_detection.common.optims.ep12_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='repvgg-b0_baseline_culane',
|
||||
workers=5,
|
||||
batch_size=10,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=2,
|
||||
dist_url='tcp://localhost:12345',
|
||||
device='cuda',
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=5,
|
||||
num_epochs=12,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='repvgg-b0_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/repvgg-b0_baseline_culane/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='SegRepVGG',
|
||||
# num_classes=5,
|
||||
# dropout_1=0.1,
|
||||
backbone_cfg=dict(
|
||||
name='RepVggEncoder',
|
||||
backbone_name='RepVGG-B0',
|
||||
pretrained=True,
|
||||
deploy=False
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=1280,
|
||||
reduce=128
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=4500,
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=5,
|
||||
dilation=1
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,80 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd02 import optimizer
|
||||
from configs.lane_detection.common.optims.ep12_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='repvgg-b1g2_baseline_culane',
|
||||
workers=5,
|
||||
batch_size=10,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=2,
|
||||
dist_url='tcp://localhost:12345',
|
||||
device='cuda',
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=5,
|
||||
num_epochs=12,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='repvgg-b1g2_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/repvgg-b1g2_baseline_culane/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='SegRepVGG',
|
||||
# num_classes=5,
|
||||
# dropout_1=0.1,
|
||||
backbone_cfg=dict(
|
||||
name='RepVggEncoder',
|
||||
backbone_name='RepVGG-B1g2',
|
||||
pretrained=True,
|
||||
deploy=False
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=2048,
|
||||
reduce=128
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=4500,
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=5,
|
||||
dilation=1
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,80 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd02 import optimizer
|
||||
from configs.lane_detection.common.optims.ep12_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='repvgg-b2_baseline_culane',
|
||||
workers=5,
|
||||
batch_size=10,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=2,
|
||||
dist_url='tcp://localhost:12345',
|
||||
device='cuda',
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=5,
|
||||
num_epochs=12,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='repvgg-b2_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/repvgg-b2_baseline_culane/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='SegRepVGG',
|
||||
# num_classes=5,
|
||||
# dropout_1=0.1,
|
||||
backbone_cfg=dict(
|
||||
name='RepVggEncoder',
|
||||
backbone_name='RepVGG-B2',
|
||||
pretrained=True,
|
||||
deploy=False
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=2560,
|
||||
reduce=128
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=4500,
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=5,
|
||||
dilation=1
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,82 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd008 import optimizer
|
||||
from configs.lane_detection.common.optims.ep12_poly_warmup500 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='resnet101_baseline_culane',
|
||||
workers=4,
|
||||
batch_size=8,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=5,
|
||||
num_epochs=12,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True, # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='resnet101_baseline_culane',
|
||||
workers=4,
|
||||
batch_size=32,
|
||||
checkpoint='./checkpoints/resnet101_baseline_culane/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
# Essentially DeepLabV1 without dilation like in SCNN paper
|
||||
model = dict(
|
||||
name='standard_segmentation_model',
|
||||
backbone_cfg=dict(
|
||||
name='predefined_resnet_backbone',
|
||||
backbone_name='resnet101',
|
||||
return_layer='layer4',
|
||||
pretrained=True,
|
||||
replace_stride_with_dilation=[False, True, True]
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=2048,
|
||||
reduce=128
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=5,
|
||||
dilation=1
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=4500
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,82 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.tusimple_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_7class import loss
|
||||
from configs.lane_detection.common.optims.sgd013 import optimizer
|
||||
from configs.lane_detection.common.optims.ep50_poly_warmup500 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='resnet101_baseline_tusimple',
|
||||
workers=4,
|
||||
batch_size=8,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
num_classes=7,
|
||||
num_epochs=50,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='resnet101_baseline_tusimple',
|
||||
workers=4,
|
||||
batch_size=32,
|
||||
checkpoint='./checkpoints/resnet101_baseline_tusimple/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=10,
|
||||
ppl=56,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
max_lane=5,
|
||||
dataset_name='tusimple'
|
||||
)
|
||||
|
||||
# Essentially DeepLabV1 without dilation like in SCNN paper
|
||||
model = dict(
|
||||
name='standard_segmentation_model',
|
||||
backbone_cfg=dict(
|
||||
name='predefined_resnet_backbone',
|
||||
backbone_name='resnet101',
|
||||
return_layer='layer4',
|
||||
pretrained=True,
|
||||
replace_stride_with_dilation=[False, True, True]
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=2048,
|
||||
reduce=128
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=7,
|
||||
dilation=1
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=7 - 1,
|
||||
flattened_size=6160
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,82 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd02 import optimizer
|
||||
from configs.lane_detection.common.optims.ep12_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='resnet18_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=5,
|
||||
num_epochs=12,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True, # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='resnet18_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/resnet18_baseline_culane/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
# Essentially DeepLabV1 without dilation like in SCNN paper
|
||||
model = dict(
|
||||
name='standard_segmentation_model',
|
||||
backbone_cfg=dict(
|
||||
name='predefined_resnet_backbone',
|
||||
backbone_name='resnet18',
|
||||
return_layer='layer4',
|
||||
pretrained=True,
|
||||
replace_stride_with_dilation=[False, True, True]
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=512,
|
||||
reduce=128
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=5,
|
||||
dilation=1
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=4500
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,82 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.tusimple_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_7class import loss
|
||||
from configs.lane_detection.common.optims.sgd02 import optimizer
|
||||
from configs.lane_detection.common.optims.ep50_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='resnet18_baseline_tusimple',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
num_classes=7,
|
||||
num_epochs=50,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='resnet18_baseline_tusimple',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/resnet18_baseline_tusimple/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=10,
|
||||
ppl=56,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
max_lane=5,
|
||||
dataset_name='tusimple'
|
||||
)
|
||||
|
||||
# Essentially DeepLabV1 without dilation like in SCNN paper
|
||||
model = dict(
|
||||
name='standard_segmentation_model',
|
||||
backbone_cfg=dict(
|
||||
name='predefined_resnet_backbone',
|
||||
backbone_name='resnet18',
|
||||
return_layer='layer4',
|
||||
pretrained=True,
|
||||
replace_stride_with_dilation=[False, True, True]
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=512,
|
||||
reduce=128
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=7,
|
||||
dilation=1
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=7 - 1,
|
||||
flattened_size=6160
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,82 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd02 import optimizer
|
||||
from configs.lane_detection.common.optims.ep12_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='resnet34_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=5,
|
||||
num_epochs=12,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True, # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='resnet34_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/resnet34_baseline_culane/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
# Essentially DeepLabV1 without dilation like in SCNN paper
|
||||
model = dict(
|
||||
name='standard_segmentation_model',
|
||||
backbone_cfg=dict(
|
||||
name='predefined_resnet_backbone',
|
||||
backbone_name='resnet34',
|
||||
return_layer='layer4',
|
||||
pretrained=True,
|
||||
replace_stride_with_dilation=[False, True, True]
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=512,
|
||||
reduce=128
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=5,
|
||||
dilation=1
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=4500
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,82 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.llamas_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd05 import optimizer
|
||||
from configs.lane_detection.common.optims.ep18_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='resnet34_baseline_llamas',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(360, 640),
|
||||
original_size=(717, 1276),
|
||||
num_classes=5,
|
||||
num_epochs=18,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='resnet34_baseline_llamas',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/resnet34_baseline_llamas/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=1,
|
||||
ppl=417,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(360, 640),
|
||||
original_size=(717, 1276),
|
||||
max_lane=4,
|
||||
dataset_name='llamas'
|
||||
)
|
||||
|
||||
# Essentially DeepLabV1 without dilation like in SCNN paper
|
||||
model = dict(
|
||||
name='standard_segmentation_model',
|
||||
backbone_cfg=dict(
|
||||
name='predefined_resnet_backbone',
|
||||
backbone_name='resnet34',
|
||||
return_layer='layer4',
|
||||
pretrained=True,
|
||||
replace_stride_with_dilation=[False, True, True]
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=512,
|
||||
reduce=128
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=5,
|
||||
dilation=1
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=4400
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,82 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.tusimple_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_7class import loss
|
||||
from configs.lane_detection.common.optims.sgd02 import optimizer
|
||||
from configs.lane_detection.common.optims.ep50_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='resnet34_baseline_tusimple',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
num_classes=7,
|
||||
num_epochs=50,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='resnet34_baseline_tusimple',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/resnet34_baseline_tusimple/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=10,
|
||||
ppl=56,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
max_lane=5,
|
||||
dataset_name='tusimple'
|
||||
)
|
||||
|
||||
# Essentially DeepLabV1 without dilation like in SCNN paper
|
||||
model = dict(
|
||||
name='standard_segmentation_model',
|
||||
backbone_cfg=dict(
|
||||
name='predefined_resnet_backbone',
|
||||
backbone_name='resnet34',
|
||||
return_layer='layer4',
|
||||
pretrained=True,
|
||||
replace_stride_with_dilation=[False, True, True]
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=512,
|
||||
reduce=128
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=7,
|
||||
dilation=1
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=7 - 1,
|
||||
flattened_size=6160
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,82 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.tusimple_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level1a_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_7class import loss
|
||||
from configs.lane_detection.common.optims.sgd02 import optimizer
|
||||
from configs.lane_detection.common.optims.ep50_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='resnet34_baseline_tusimple-aug',
|
||||
workers=8,
|
||||
batch_size=10,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=2,
|
||||
dist_url='tcp://localhost:12345',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
num_classes=7,
|
||||
num_epochs=50,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='resnet34_baseline_tusimple-aug',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/resnet34_baseline_tusimple-aug/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=10,
|
||||
ppl=56,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
max_lane=5,
|
||||
dataset_name='tusimple'
|
||||
)
|
||||
|
||||
# Essentially DeepLabV1 without dilation like in SCNN paper
|
||||
model = dict(
|
||||
name='standard_segmentation_model',
|
||||
backbone_cfg=dict(
|
||||
name='predefined_resnet_backbone',
|
||||
backbone_name='resnet34',
|
||||
return_layer='layer4',
|
||||
pretrained=True,
|
||||
replace_stride_with_dilation=[False, True, True]
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=512,
|
||||
reduce=128
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=7,
|
||||
dilation=1
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=7 - 1,
|
||||
flattened_size=6160
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,82 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd008 import optimizer
|
||||
from configs.lane_detection.common.optims.ep12_poly_warmup500 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='resnet50_baseline_culane',
|
||||
workers=4,
|
||||
batch_size=8,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=5,
|
||||
num_epochs=12,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True, # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='resnet50_baseline_culane',
|
||||
workers=4,
|
||||
batch_size=32,
|
||||
checkpoint='./checkpoints/resnet50_baseline_culane/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
# Essentially DeepLabV1 without dilation like in SCNN paper
|
||||
model = dict(
|
||||
name='standard_segmentation_model',
|
||||
backbone_cfg=dict(
|
||||
name='predefined_resnet_backbone',
|
||||
backbone_name='resnet50',
|
||||
return_layer='layer4',
|
||||
pretrained=True,
|
||||
replace_stride_with_dilation=[False, True, True]
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=2048,
|
||||
reduce=128
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=5,
|
||||
dilation=1
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=4500
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,82 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.tusimple_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_7class import loss
|
||||
from configs.lane_detection.common.optims.sgd013 import optimizer
|
||||
from configs.lane_detection.common.optims.ep50_poly_warmup500 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='resnet50_baseline_tusimple',
|
||||
workers=4,
|
||||
batch_size=8,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
num_classes=7,
|
||||
num_epochs=50,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='resnet50_baseline_tusimple',
|
||||
workers=4,
|
||||
batch_size=32,
|
||||
checkpoint='./checkpoints/resnet50_baseline_tusimple/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=10,
|
||||
ppl=56,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
max_lane=5,
|
||||
dataset_name='tusimple'
|
||||
)
|
||||
|
||||
# Essentially DeepLabV1 without dilation like in SCNN paper
|
||||
model = dict(
|
||||
name='standard_segmentation_model',
|
||||
backbone_cfg=dict(
|
||||
name='predefined_resnet_backbone',
|
||||
backbone_name='resnet50',
|
||||
return_layer='layer4',
|
||||
pretrained=True,
|
||||
replace_stride_with_dilation=[False, True, True]
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=2048,
|
||||
reduce=128
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=7,
|
||||
dilation=1
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=7 - 1,
|
||||
flattened_size=6160
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,115 @@
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.adamw00006_swin import optimizer
|
||||
# from configs.lane_detection.common.optims.ep12_poly_warmup200 import lr_scheduler
|
||||
|
||||
lr_scheduler = dict(
|
||||
name='poly_scheduler_with_warmup',
|
||||
epochs=36,
|
||||
power=1, # ? Kept for consistency with official repo
|
||||
warmup_steps=1500,
|
||||
start_lr_ratio=1e-6,
|
||||
)
|
||||
|
||||
# Default args that can be overridden in commandline
|
||||
train_args_default = dict(
|
||||
exp_name='swin-tiny_baseline_culane',
|
||||
workers=4,
|
||||
batch_size=8,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=2,
|
||||
dist_url='tcp://localhost:12345',
|
||||
device='cuda',
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints'
|
||||
)
|
||||
test_args_default = dict(
|
||||
exp_name='swin-tiny_baseline_culane',
|
||||
workers=4,
|
||||
batch_size=32,
|
||||
checkpoint='./checkpoints/swin-tiny_baseline_culane/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
save_dir='./checkpoints'
|
||||
)
|
||||
|
||||
# Configs
|
||||
train = dict(
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=5,
|
||||
num_epochs=36,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
train.update(train_args_default)
|
||||
|
||||
test = dict(
|
||||
seg=True,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
test.update(test_args_default)
|
||||
|
||||
model = dict(
|
||||
name='DeepLabV1Lane',
|
||||
backbone_cfg=dict(
|
||||
name='SwinTransformer',
|
||||
pretrain_img_size=(288, 800),
|
||||
patch_size=4,
|
||||
in_chans=3,
|
||||
embed_dim=96,
|
||||
depths=[2, 2, 6, 2],
|
||||
num_heads=[3, 6, 12, 24],
|
||||
window_size=7,
|
||||
mlp_ratio=4.,
|
||||
qkv_bias=True,
|
||||
qk_scale=None,
|
||||
drop_rate=0.,
|
||||
attn_drop_rate=0.,
|
||||
drop_path_rate=0.3,
|
||||
# norm_layer=nn.LayerNorm,
|
||||
ape=False,
|
||||
patch_norm=True,
|
||||
out_indices=(0, 1, 2, 3),
|
||||
frozen_stages=-1,
|
||||
use_checkpoint=False,
|
||||
pretrained='swin_tiny_patch4_window7_224.pth',
|
||||
chosen_stages=-1,
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=512,
|
||||
reduce=128
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=5,
|
||||
dilation=1
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=18000,
|
||||
),
|
||||
uper_cfg=dict(
|
||||
name='UperHead',
|
||||
in_channels=[96, 192, 384, 768],
|
||||
channels=512,
|
||||
align_corners=False,
|
||||
pool_scales=(1, 2, 3, 6)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,102 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.adamw0001_swin import optimizer
|
||||
|
||||
lr_scheduler = dict(
|
||||
name='poly_scheduler_with_warmup',
|
||||
epochs=12,
|
||||
power=1, # ? Kept for consistency with official repo
|
||||
warmup_steps=1500,
|
||||
start_lr_ratio=1e-6,
|
||||
)
|
||||
|
||||
train = dict(
|
||||
exp_name='swin-tiny_baseline_culane',
|
||||
workers=5,
|
||||
batch_size=10,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=2,
|
||||
dist_url='tcp://localhost:12345',
|
||||
device='cuda',
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=5,
|
||||
num_epochs=12,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='swin-tiny_baseline_culane',
|
||||
workers=4,
|
||||
batch_size=32,
|
||||
checkpoint='./checkpoints/swin-tiny_baseline_culane/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='DeepLabV1Lane',
|
||||
backbone_cfg=dict(
|
||||
name='SwinTransformer',
|
||||
pretrain_img_size=(288, 800),
|
||||
patch_size=4,
|
||||
in_chans=3,
|
||||
embed_dim=96,
|
||||
depths=[2, 2, 6, 2],
|
||||
num_heads=[3, 6, 12, 24],
|
||||
window_size=7,
|
||||
mlp_ratio=4.,
|
||||
qkv_bias=True,
|
||||
qk_scale=None,
|
||||
drop_rate=0.,
|
||||
attn_drop_rate=0.,
|
||||
drop_path_rate=0.3,
|
||||
# norm_layer=nn.LayerNorm,
|
||||
ape=False,
|
||||
patch_norm=True,
|
||||
out_indices=(0, 1, 2, 3),
|
||||
frozen_stages=-1,
|
||||
use_checkpoint=False,
|
||||
pretrained='swin_tiny_patch4_window7_224.pth',
|
||||
chosen_stages=2,
|
||||
),
|
||||
reducer_cfg=dict(
|
||||
name='RESAReducer',
|
||||
in_channels=384,
|
||||
reduce=128
|
||||
),
|
||||
classifier_cfg=dict(
|
||||
name='DeepLabV1Head',
|
||||
in_channels=128,
|
||||
num_classes=5,
|
||||
dilation=1
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=1125,
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,67 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd02 import optimizer
|
||||
from configs.lane_detection.common.optims.ep12_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='vgg16_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=5,
|
||||
num_epochs=12,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='vgg16_baseline_culane',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/vgg16_baseline_culane/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='DeepLabV1',
|
||||
num_classes=5,
|
||||
dropout_1=0.1,
|
||||
backbone_cfg=dict(
|
||||
name='VGG16',
|
||||
pretrained=True
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=4500,
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,68 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.llamas_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_5class import loss
|
||||
from configs.lane_detection.common.optims.sgd03 import optimizer
|
||||
from configs.lane_detection.common.optims.ep18_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='vgg16_baseline_llamas',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(360, 640),
|
||||
original_size=(717, 1276),
|
||||
num_classes=5,
|
||||
num_epochs=18,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='vgg16_baseline_llamas',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/vgg16_baseline_llamas/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=1,
|
||||
ppl=417,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(360, 640),
|
||||
original_size=(717, 1276),
|
||||
max_lane=4,
|
||||
dataset_name='llamas'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='DeepLabV1',
|
||||
num_classes=5,
|
||||
dropout_1=0.1,
|
||||
backbone_cfg=dict(
|
||||
name='VGG16',
|
||||
pretrained=True
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=5 - 1,
|
||||
flattened_size=4400,
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,68 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.tusimple_seg import dataset
|
||||
from configs.lane_detection.common.datasets.train_level0_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.segloss_7class import loss
|
||||
from configs.lane_detection.common.optims.sgd025 import optimizer
|
||||
from configs.lane_detection.common.optims.ep50_poly_warmup200 import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='vgg16_baseline_tusimple',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
num_classes=7,
|
||||
num_epochs=50,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
seg=True # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='vgg16_baseline_tusimple',
|
||||
workers=10,
|
||||
batch_size=80,
|
||||
checkpoint='./checkpoints/vgg16_baseline_tusimple/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=True,
|
||||
gap=10,
|
||||
ppl=56,
|
||||
thresh=0.3,
|
||||
collate_fn=None, # 'dict_collate_fn' for LSTR
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
max_lane=5,
|
||||
dataset_name='tusimple'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='DeepLabV1',
|
||||
num_classes=7,
|
||||
dropout_1=0.1,
|
||||
backbone_cfg=dict(
|
||||
name='VGG16',
|
||||
pretrained=True
|
||||
),
|
||||
lane_classifier_cfg=dict(
|
||||
name='SimpleLaneExist',
|
||||
num_output=7 - 1,
|
||||
flattened_size=6160,
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,66 @@
|
||||
# BézierLaneNet
|
||||
|
||||
> [Rethinking Efficient Lane Detection via Curve Modeling](https://arxiv.org/abs/2203.02431) **CVPR 2022**
|
||||
|
||||
> [Chinese Video (中文解读)](https://www.bilibili.com/video/BV1Pr4y147bZ?spm_id_from=333.999.0.0)
|
||||
|
||||
## Method Overview
|
||||
|
||||
State-of-the-art lane detectors are typically based on semantic segmentation (SCNN, RESA) or point detection (LaneATT). However, semantic segmentation requires customized post-processing & cannot deal with a variable number of lanes. Point detection methods are currently anchor-based, with NMS as post-processing. The more natural way would be getting a curve representation directly. Methods like LSTR made the first steps in this direction, but didn't really achieved comparable performance against SOTA methods. BézierLaneNet use a fully convolutional network to predict cubic Bézier curves, the ease of optimization of Bézier control points made it possible for direct curve methods to compete with SOTAs. A fusion of flipped feature maps is also employed to exploit symmetry in the car's front-view. BézierLaneNet (ResNet-34) achieves 75.6 F-1 on CULane, and attained the 1st place (of all published methods) in the LLAMAS leaderboard at its time, while running at 150 FPS in our benchmark.
|
||||
|
||||
<div align=center>
|
||||
<img src="https://user-images.githubusercontent.com/32259501/157155447-81f28ec6-3ebe-42e0-8864-c739d8c44155.png"/>
|
||||
</div>
|
||||
|
||||
For another earlier attempt on learning Bézier curves for lane detection with (almost) the same name BezierLaneNet, please refer to [wiki](https://github.com/voldemortX/pytorch-auto-drive/wiki/Notes) **9. BézierLaneNet disclaimer** and [this repo](https://github.com/mo-vic/BezierLaneNet).
|
||||
|
||||
## Results
|
||||
|
||||
*Training time estimated with single 2080 Ti.*
|
||||
|
||||
*ImageNet pre-training, 3-times average/best.*
|
||||
|
||||
### TuSimple (test)
|
||||
|
||||
| backbone | aug | resolution | training time | precision | accuracy (avg) | accuracy | FP | FN | |
|
||||
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
||||
| ResNet18 | level 1b | 360 x 640 | 5.5h | full | 95.01% | 95.41% | 0.0531 | 0.0458 | [model](https://drive.google.com/file/d/10qMdvPBnZP4P88EQXYZxsXZgj7sz6LvS/view?usp=sharing) \| [shell](/tools/shells/resnet18_bezierlanenet_tusimple-aug1b.sh) |
|
||||
| ResNet34 | level 1b | 360 x 640 | 6.5h | full | 95.17% | 95.65% | 0.0513 | 0.0386 | [model](https://drive.google.com/file/d/1FFn8j2BoUsyj8UbBcfeGWKvCQj9Qg-44/view?usp=sharing) \| [shell](/tools/shells/resnet34_bezierlanenet_tusimple-aug1b.sh) |
|
||||
|
||||
### CULane (test)
|
||||
|
||||
| backbone | aug | resolution | training time | precision | F1 (avg) | F1 | normal | crowded | night | no line | shadow | arrow | dazzle<br>light | curve | crossroad | |
|
||||
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
||||
| ResNet18 | level 1b | 288 x 800 | 9.9h | mix | 73.36 | 73.67 | 90.22 | 71.55 | 68.70 | 45.30 | 70.91 | 84.09 | 62.49 | 58.98 | 996 | [model](https://drive.google.com/file/d/1IpfusHvFeMEGe8wv0fer6KF3pH4X2Tj3/view?usp=sharing) \| [shell](/tools/shells/resnet18_bezierlanenet_culane-aug1b.sh) |
|
||||
| ResNet34 | level 1b | 288 x 800 | 11.0h | mix | 75.30 | 75.57 | 91.59 | 73.20 | 69.90 | 48.05 | 76.74 | 87.16 | 69.20 | 62.45 | 888 | [model](https://drive.google.com/file/d/1342FQeDQKRHMo283jW2T1WDgfgsYbR5q/view?usp=sharing) \| [shell](/tools/shells/resnet34_bezierlanenet_culane-aug1b.sh) |
|
||||
|
||||
### LLAMAS (val)
|
||||
|
||||
| backbone | aug | resolution | training time | precision | F1 (avg) | F1 | TP | FP | FN | Precision | Recall | |
|
||||
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
||||
| ResNet18 | level 1b | 360 x 640 | 5.5h | mix | 95.42 | 95.52 | 70515 | 3102 | 3520 | 95.79 | 95.25 | [model](https://drive.google.com/file/d/1fTQEZnr2wVQ20P3B2AyM3c_dFp5BHKwQ/view?usp=sharing) \| [shell](/tools/shells/resnet18_bezierlanenet_llamas-aug1b.sh) |
|
||||
| ResNet34 | level 1b | 360 x 640 | 6.1h | mix | 96.04 | 96.11 | 70959 | 2667 | 3076 | 96.38 | 95.85 | [model](https://drive.google.com/file/d/1RhYTJB_VlHL9hFYuwAX_T4Nev9ZIlmHt/view?usp=sharing) \| [shell](/tools/shells/resnet34_bezierlanenet_llamas-aug1b.sh) |
|
||||
|
||||
Their test performance can be found at the [LLAMAS leaderboard](https://unsupervised-llamas.com/llamas/benchmark_splines).
|
||||
|
||||
## Profiling
|
||||
|
||||
*FPS is best trial-avg among 3 trials on a 2080 Ti.*
|
||||
|
||||
| backbone | resolution | FPS | FLOPS(G) | Params(M) |
|
||||
| :---: | :---: | :---: | :---: | :---: |
|
||||
| ResNet18 | 360 x 640 | 212.83 | 14.77 | 4.10 |
|
||||
| ResNet34 | 360 x 640 | 149.52 | 29.85 | 9.49 |
|
||||
| ResNet18 | 288 x 800 | 210.79 | 14.66 | 4.10 |
|
||||
| ResNet34 | 288 x 800 | 144.65 | 29.54 | 9.49 |
|
||||
|
||||
## Citation
|
||||
|
||||
```
|
||||
@inproceedings{feng2022rethinking,
|
||||
title={Rethinking efficient lane detection via curve modeling},
|
||||
author={Feng, Zhengyang and Guo, Shaohua and Tan, Xin and Xu, Ke and Wang, Min and Ma, Lizhuang},
|
||||
booktitle={Computer Vision and Pattern Recognition},
|
||||
year={2022}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,101 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_bezier import dataset
|
||||
from configs.lane_detection.common.datasets.train_level1b_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.matchingloss_bezier import loss
|
||||
from configs.lane_detection.common.optims.adam00006_dcn import optimizer
|
||||
from configs.lane_detection.common.optims.ep36_cosine import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='resnet18_bezierlanenet_culane-aug2',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=None,
|
||||
num_epochs=36,
|
||||
collate_fn='dict_collate_fn', # 'dict_collate_fn' for LSTR
|
||||
seg=False, # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='resnet18_bezierlanenet_culane-aug2',
|
||||
workers=0,
|
||||
batch_size=1,
|
||||
checkpoint='./checkpoints/resnet18_bezierlanenet_culane-aug2/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=False,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=None,
|
||||
collate_fn='dict_collate_fn', # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='BezierLaneNet',
|
||||
image_height=288,
|
||||
num_regression_parameters=8, # 3 x 2 + 2 = 8 (Cubic Bezier Curve)
|
||||
|
||||
# Inference parameters
|
||||
thresh=0.95,
|
||||
local_maximum_window_size=9,
|
||||
|
||||
# Backbone (3-stage resnet (no dilation) + 2 extra dilated blocks)
|
||||
backbone_cfg=dict(
|
||||
name='predefined_resnet_backbone',
|
||||
backbone_name='resnet18',
|
||||
return_layer='layer3',
|
||||
pretrained=True,
|
||||
replace_stride_with_dilation=[False, False, False]
|
||||
),
|
||||
reducer_cfg=None, # No need here
|
||||
dilated_blocks_cfg=dict(
|
||||
name='predefined_dilated_blocks',
|
||||
in_channels=256,
|
||||
mid_channels=64,
|
||||
dilations=[4, 8]
|
||||
),
|
||||
|
||||
# Head, Fusion module
|
||||
feature_fusion_cfg=dict(
|
||||
name='FeatureFlipFusion',
|
||||
channels=256
|
||||
),
|
||||
head_cfg=dict(
|
||||
name='ConvProjection_1D',
|
||||
num_layers=2,
|
||||
in_channels=256,
|
||||
bias=True,
|
||||
k=3
|
||||
), # Just some transforms of feature, similar to FCOS heads, but shared between cls & reg branches
|
||||
|
||||
# Auxiliary binary segmentation head (automatically discarded in eval() mode)
|
||||
aux_seg_head_cfg=dict(
|
||||
name='SimpleSegHead',
|
||||
in_channels=256,
|
||||
mid_channels=64,
|
||||
num_classes=1
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,101 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.llamas_bezier import dataset
|
||||
from configs.lane_detection.common.datasets.train_level1b_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.matchingloss_bezier import loss
|
||||
from configs.lane_detection.common.optims.adam00006_dcn import optimizer
|
||||
from configs.lane_detection.common.optims.ep20_cosine import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='resnet18_bezierlanenet-aug2_llamas',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(360, 640),
|
||||
original_size=(717, 1276),
|
||||
num_classes=None,
|
||||
num_epochs=20,
|
||||
collate_fn='dict_collate_fn', # 'dict_collate_fn' for LSTR
|
||||
seg=False, # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='resnet18_bezierlanenet-aug2_llamas',
|
||||
workers=0,
|
||||
batch_size=1,
|
||||
checkpoint='./checkpoints/resnet18_bezierlanenet-aug2_llamas/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=False,
|
||||
gap=1,
|
||||
ppl=417,
|
||||
thresh=0.3,
|
||||
collate_fn='dict_collate_fn', # 'dict_collate_fn' for LSTR
|
||||
input_size=(360, 640),
|
||||
original_size=(717, 1276),
|
||||
max_lane=4,
|
||||
dataset_name='llamas'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='BezierLaneNet',
|
||||
image_height=360,
|
||||
num_regression_parameters=8, # 3 x 2 + 2 = 8 (Cubic Bezier Curve)
|
||||
|
||||
# Inference parameters
|
||||
thresh=0.95,
|
||||
local_maximum_window_size=9,
|
||||
|
||||
# Backbone (3-stage resnet (no dilation) + 2 extra dilated blocks)
|
||||
backbone_cfg=dict(
|
||||
name='predefined_resnet_backbone',
|
||||
backbone_name='resnet18',
|
||||
return_layer='layer3',
|
||||
pretrained=True,
|
||||
replace_stride_with_dilation=[False, False, False]
|
||||
),
|
||||
reducer_cfg=None, # No need here
|
||||
dilated_blocks_cfg=dict(
|
||||
name='predefined_dilated_blocks',
|
||||
in_channels=256,
|
||||
mid_channels=64,
|
||||
dilations=[4, 8]
|
||||
),
|
||||
|
||||
# Head, Fusion module
|
||||
feature_fusion_cfg=dict(
|
||||
name='FeatureFlipFusion',
|
||||
channels=256
|
||||
),
|
||||
head_cfg=dict(
|
||||
name='ConvProjection_1D',
|
||||
num_layers=2,
|
||||
in_channels=256,
|
||||
bias=True,
|
||||
k=3
|
||||
), # Just some transforms of feature, similar to FCOS heads, but shared between cls & reg branches
|
||||
|
||||
# Auxiliary binary segmentation head (automatically discarded in eval() mode)
|
||||
aux_seg_head_cfg=dict(
|
||||
name='SimpleSegHead',
|
||||
in_channels=256,
|
||||
mid_channels=64,
|
||||
num_classes=1
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,101 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.tusimple_bezier import dataset
|
||||
from configs.lane_detection.common.datasets.train_level1b_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.matchingloss_bezier import loss
|
||||
from configs.lane_detection.common.optims.adam00006_dcn import optimizer
|
||||
from configs.lane_detection.common.optims.ep400_cosine import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='resnet18_bezierlanenet_tusimple-aug2',
|
||||
workers=8,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # >0 not supported
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=False, # Seg-based method or not
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
num_classes=None,
|
||||
num_epochs=400,
|
||||
collate_fn='dict_collate_fn'
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='resnet18_bezierlanenet_tusimple-aug2',
|
||||
workers=0,
|
||||
batch_size=1,
|
||||
checkpoint='./checkpoints/resnet18_bezierlanenet_tusimple-aug2/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=False,
|
||||
gap=10,
|
||||
ppl=56,
|
||||
thresh=None,
|
||||
collate_fn='dict_collate_fn',
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
max_lane=5,
|
||||
dataset_name='tusimple'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='BezierLaneNet',
|
||||
image_height=360,
|
||||
num_regression_parameters=8, # 3 x 2 + 2 = 8 (Cubic Bezier Curve)
|
||||
|
||||
# Inference parameters
|
||||
thresh=0.5,
|
||||
local_maximum_window_size=9,
|
||||
|
||||
# Backbone (3-stage resnet (no dilation) + 2 extra dilated blocks)
|
||||
backbone_cfg=dict(
|
||||
name='predefined_resnet_backbone',
|
||||
backbone_name='resnet18',
|
||||
return_layer='layer3',
|
||||
pretrained=True,
|
||||
replace_stride_with_dilation=[False, False, False]
|
||||
),
|
||||
reducer_cfg=None, # No need here
|
||||
dilated_blocks_cfg=dict(
|
||||
name='predefined_dilated_blocks',
|
||||
in_channels=256,
|
||||
mid_channels=64,
|
||||
dilations=[4, 8]
|
||||
),
|
||||
|
||||
# Head, Fusion module
|
||||
feature_fusion_cfg=dict(
|
||||
name='FeatureFlipFusion',
|
||||
channels=256
|
||||
),
|
||||
head_cfg=dict(
|
||||
name='ConvProjection_1D',
|
||||
num_layers=2,
|
||||
in_channels=256,
|
||||
bias=True,
|
||||
k=3
|
||||
), # Just some transforms of feature, similar to FCOS heads, but shared between cls & reg branches
|
||||
|
||||
# Auxiliary binary segmentation head (automatically discarded in eval() mode)
|
||||
aux_seg_head_cfg=dict(
|
||||
name='SimpleSegHead',
|
||||
in_channels=256,
|
||||
mid_channels=64,
|
||||
num_classes=1
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,101 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.culane_bezier import dataset
|
||||
from configs.lane_detection.common.datasets.train_level1b_288 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_288 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.matchingloss_bezier import loss
|
||||
from configs.lane_detection.common.optims.adam00006_dcn import optimizer
|
||||
from configs.lane_detection.common.optims.ep36_cosine import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='resnet34_bezierlanenet_culane-aug2',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
num_classes=None,
|
||||
num_epochs=36,
|
||||
collate_fn='dict_collate_fn', # 'dict_collate_fn' for LSTR
|
||||
seg=False, # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='resnet34_bezierlanenet_culane-aug2',
|
||||
workers=0,
|
||||
batch_size=1,
|
||||
checkpoint='./checkpoints/resnet34_bezierlanenet_culane-aug2/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=False,
|
||||
gap=20,
|
||||
ppl=18,
|
||||
thresh=None,
|
||||
collate_fn='dict_collate_fn', # 'dict_collate_fn' for LSTR
|
||||
input_size=(288, 800),
|
||||
original_size=(590, 1640),
|
||||
max_lane=4,
|
||||
dataset_name='culane'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='BezierLaneNet',
|
||||
image_height=288,
|
||||
num_regression_parameters=8, # 3 x 2 + 2 = 8 (Cubic Bezier Curve)
|
||||
|
||||
# Inference parameters
|
||||
thresh=0.95,
|
||||
local_maximum_window_size=9,
|
||||
|
||||
# Backbone (3-stage resnet (no dilation) + 2 extra dilated blocks)
|
||||
backbone_cfg=dict(
|
||||
name='predefined_resnet_backbone',
|
||||
backbone_name='resnet34',
|
||||
return_layer='layer3',
|
||||
pretrained=True,
|
||||
replace_stride_with_dilation=[False, False, False]
|
||||
),
|
||||
reducer_cfg=None, # No need here
|
||||
dilated_blocks_cfg=dict(
|
||||
name='predefined_dilated_blocks',
|
||||
in_channels=256,
|
||||
mid_channels=64,
|
||||
dilations=[4, 8]
|
||||
),
|
||||
|
||||
# Head, Fusion module
|
||||
feature_fusion_cfg=dict(
|
||||
name='FeatureFlipFusion',
|
||||
channels=256
|
||||
),
|
||||
head_cfg=dict(
|
||||
name='ConvProjection_1D',
|
||||
num_layers=2,
|
||||
in_channels=256,
|
||||
bias=True,
|
||||
k=3
|
||||
), # Just some transforms of feature, similar to FCOS heads, but shared between cls & reg branches
|
||||
|
||||
# Auxiliary binary segmentation head (automatically discarded in eval() mode)
|
||||
aux_seg_head_cfg=dict(
|
||||
name='SimpleSegHead',
|
||||
in_channels=256,
|
||||
mid_channels=64,
|
||||
num_classes=1
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,101 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.llamas_bezier import dataset
|
||||
from configs.lane_detection.common.datasets.train_level1b_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.matchingloss_bezier import loss
|
||||
from configs.lane_detection.common.optims.adam00006_dcn import optimizer
|
||||
from configs.lane_detection.common.optims.ep20_cosine import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='resnet34_bezierlanenet-aug2_llamas',
|
||||
workers=10,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # Seg IoU validation (mostly useless)
|
||||
save_dir='./checkpoints',
|
||||
|
||||
input_size=(360, 640),
|
||||
original_size=(717, 1276),
|
||||
num_classes=None,
|
||||
num_epochs=20,
|
||||
collate_fn='dict_collate_fn', # 'dict_collate_fn' for LSTR
|
||||
seg=False, # Seg-based method or not
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='resnet34_bezierlanenet-aug2_llamas',
|
||||
workers=0,
|
||||
batch_size=1,
|
||||
checkpoint='./checkpoints/resnet34_bezierlanenet-aug2_llamas/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=False,
|
||||
gap=1,
|
||||
ppl=417,
|
||||
thresh=0.3,
|
||||
collate_fn='dict_collate_fn', # 'dict_collate_fn' for LSTR
|
||||
input_size=(360, 640),
|
||||
original_size=(717, 1276),
|
||||
max_lane=4,
|
||||
dataset_name='llamas'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='BezierLaneNet',
|
||||
image_height=360,
|
||||
num_regression_parameters=8, # 3 x 2 + 2 = 8 (Cubic Bezier Curve)
|
||||
|
||||
# Inference parameters
|
||||
thresh=0.95,
|
||||
local_maximum_window_size=9,
|
||||
|
||||
# Backbone (3-stage resnet (no dilation) + 2 extra dilated blocks)
|
||||
backbone_cfg=dict(
|
||||
name='predefined_resnet_backbone',
|
||||
backbone_name='resnet34',
|
||||
return_layer='layer3',
|
||||
pretrained=True,
|
||||
replace_stride_with_dilation=[False, False, False]
|
||||
),
|
||||
reducer_cfg=None, # No need here
|
||||
dilated_blocks_cfg=dict(
|
||||
name='predefined_dilated_blocks',
|
||||
in_channels=256,
|
||||
mid_channels=64,
|
||||
dilations=[4, 8]
|
||||
),
|
||||
|
||||
# Head, Fusion module
|
||||
feature_fusion_cfg=dict(
|
||||
name='FeatureFlipFusion',
|
||||
channels=256
|
||||
),
|
||||
head_cfg=dict(
|
||||
name='ConvProjection_1D',
|
||||
num_layers=2,
|
||||
in_channels=256,
|
||||
bias=True,
|
||||
k=3
|
||||
), # Just some transforms of feature, similar to FCOS heads, but shared between cls & reg branches
|
||||
|
||||
# Auxiliary binary segmentation head (automatically discarded in eval() mode)
|
||||
aux_seg_head_cfg=dict(
|
||||
name='SimpleSegHead',
|
||||
in_channels=256,
|
||||
mid_channels=64,
|
||||
num_classes=1
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,101 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# Data pipeline
|
||||
from configs.lane_detection.common.datasets.tusimple_bezier import dataset
|
||||
from configs.lane_detection.common.datasets.train_level1b_360 import train_augmentation
|
||||
from configs.lane_detection.common.datasets.test_360 import test_augmentation
|
||||
|
||||
# Optimization pipeline
|
||||
from configs.lane_detection.common.optims.matchingloss_bezier import loss
|
||||
from configs.lane_detection.common.optims.adam00006_dcn import optimizer
|
||||
from configs.lane_detection.common.optims.ep400_cosine import lr_scheduler
|
||||
|
||||
|
||||
train = dict(
|
||||
exp_name='resnet34_bezierlanenet_tusimple-aug1b',
|
||||
workers=8,
|
||||
batch_size=20,
|
||||
checkpoint=None,
|
||||
# Device args
|
||||
world_size=0,
|
||||
dist_url='env://',
|
||||
device='cuda',
|
||||
|
||||
val_num_steps=0, # >0 not supported
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=False, # Seg-based method or not
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
num_classes=None,
|
||||
num_epochs=400,
|
||||
collate_fn='dict_collate_fn'
|
||||
)
|
||||
|
||||
test = dict(
|
||||
exp_name='resnet34_bezierlanenet_tusimple-aug1b',
|
||||
workers=0,
|
||||
batch_size=1,
|
||||
checkpoint='./checkpoints/resnet34_bezierlanenet_tusimple-aug1b/model.pt',
|
||||
# Device args
|
||||
device='cuda',
|
||||
|
||||
save_dir='./checkpoints',
|
||||
|
||||
seg=False,
|
||||
gap=10,
|
||||
ppl=56,
|
||||
thresh=None,
|
||||
collate_fn='dict_collate_fn',
|
||||
input_size=(360, 640),
|
||||
original_size=(720, 1280),
|
||||
max_lane=5,
|
||||
dataset_name='tusimple'
|
||||
)
|
||||
|
||||
model = dict(
|
||||
name='BezierLaneNet',
|
||||
image_height=360,
|
||||
num_regression_parameters=8, # 3 x 2 + 2 = 8 (Cubic Bezier Curve)
|
||||
|
||||
# Inference parameters
|
||||
thresh=0.5,
|
||||
local_maximum_window_size=9,
|
||||
|
||||
# Backbone (3-stage resnet (no dilation) + 2 extra dilated blocks)
|
||||
backbone_cfg=dict(
|
||||
name='predefined_resnet_backbone',
|
||||
backbone_name='resnet34',
|
||||
return_layer='layer3',
|
||||
pretrained=True,
|
||||
replace_stride_with_dilation=[False, False, False]
|
||||
),
|
||||
reducer_cfg=None, # No need here
|
||||
dilated_blocks_cfg=dict(
|
||||
name='predefined_dilated_blocks',
|
||||
in_channels=256,
|
||||
mid_channels=64,
|
||||
dilations=[4, 8]
|
||||
),
|
||||
|
||||
# Head, Fusion module
|
||||
feature_fusion_cfg=dict(
|
||||
name='FeatureFlipFusion',
|
||||
channels=256
|
||||
),
|
||||
head_cfg=dict(
|
||||
name='ConvProjection_1D',
|
||||
num_layers=2,
|
||||
in_channels=256,
|
||||
bias=True,
|
||||
k=3
|
||||
), # Just some transforms of feature, similar to FCOS heads, but shared between cls & reg branches
|
||||
|
||||
# Auxiliary binary segmentation head (automatically discarded in eval() mode)
|
||||
aux_seg_head_cfg=dict(
|
||||
name='SimpleSegHead',
|
||||
in_channels=256,
|
||||
mid_channels=64,
|
||||
num_classes=1
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,19 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# 1. Import from the corresponding config
|
||||
# Or you can just copy-paste (if your config filename includes - or something)
|
||||
from configs.lane_detection.bezierlanenet.resnet34_culane_aug1b import *
|
||||
|
||||
# 2. Define vis_dataset
|
||||
from configs.lane_detection.common.datasets._utils import CULANE_ROOT
|
||||
|
||||
vis_dataset = dict(
|
||||
name='CULaneVis',
|
||||
root_dataset=CULANE_ROOT,
|
||||
root_output='./test_culane_vis',
|
||||
root_keypoint=None,
|
||||
image_set='val'
|
||||
)
|
||||
|
||||
# 3. You can optionally overwrite things, like
|
||||
# test['checkpoint'] = './resnet34_bezierlanenet_culane_aug2_20211109.pt'
|
||||
@@ -0,0 +1,16 @@
|
||||
from importmagician import import_from
|
||||
with import_from('./'):
|
||||
# 1. Import from the corresponding config
|
||||
# Or you can just copy-paste (if your config filename includes - or something)
|
||||
from configs.lane_detection.bezierlanenet.resnet34_tusimple_aug1b import *
|
||||
|
||||
# 2. Define vis_dataset
|
||||
from configs.lane_detection.common.datasets._utils import TUSIMPLE_ROOT
|
||||
|
||||
vis_dataset = dict(
|
||||
name='TuSimpleVis',
|
||||
root_dataset=TUSIMPLE_ROOT,
|
||||
root_output='./test_tusimple_vis',
|
||||
keypoint_json="./tusimple_pred.json",
|
||||
image_set='test'
|
||||
)
|
||||
@@ -0,0 +1,3 @@
|
||||
CULANE_ROOT = '../../dataset/culane'
|
||||
TUSIMPLE_ROOT = '../../dataset/tusimple'
|
||||
LLAMAS_ROOT = '../../dataset/llamas'
|
||||
@@ -0,0 +1,8 @@
|
||||
from ._utils import CULANE_ROOT
|
||||
|
||||
dataset = dict(
|
||||
name='CULane',
|
||||
image_set='train', # Only set for training. Testing will override this value by --state.
|
||||
root=CULANE_ROOT,
|
||||
padding_mask=False
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
from ._utils import CULANE_ROOT
|
||||
|
||||
dataset = dict(
|
||||
name='CULaneAsBezier',
|
||||
image_set='train', # Only set for training. Testing will override this value by --state.
|
||||
root=CULANE_ROOT,
|
||||
order=3,
|
||||
aux_segmentation=True
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
from ._utils import CULANE_ROOT
|
||||
|
||||
dataset = dict(
|
||||
name='CULaneAsSegmentation',
|
||||
image_set='train', # Only set for training. Testing will override this value by --state.
|
||||
root=CULANE_ROOT
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
from ._utils import LLAMAS_ROOT
|
||||
|
||||
dataset = dict(
|
||||
name='LLAMAS',
|
||||
image_set='train', # Only set for training. Testing will override this value by --state.
|
||||
root=LLAMAS_ROOT,
|
||||
padding_mask=False
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
from ._utils import LLAMAS_ROOT
|
||||
|
||||
dataset = dict(
|
||||
name='LLAMAS_AsBezier',
|
||||
image_set='train', # Only set for training. Testing will override this value by --state.
|
||||
root=LLAMAS_ROOT,
|
||||
order=3,
|
||||
aux_segmentation=True
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
from ._utils import LLAMAS_ROOT
|
||||
|
||||
dataset = dict(
|
||||
name='LLAMAS_AsSegmentation',
|
||||
image_set='train', # Only set for training. Testing will override this value by --state.
|
||||
root=LLAMAS_ROOT
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
test_augmentation = dict(
|
||||
name='Compose',
|
||||
transforms=[
|
||||
dict(
|
||||
name='Resize',
|
||||
size_image=(288, 800),
|
||||
size_label=(288, 800)
|
||||
),
|
||||
dict(
|
||||
name='ToTensor'
|
||||
),
|
||||
dict(
|
||||
name='Normalize',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
test_augmentation = dict(
|
||||
name='Compose',
|
||||
transforms=[
|
||||
dict(
|
||||
name='Resize',
|
||||
size_image=(360, 640),
|
||||
size_label=(360, 640)
|
||||
),
|
||||
dict(
|
||||
name='ToTensor'
|
||||
),
|
||||
dict(
|
||||
name='Normalize',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,24 @@
|
||||
# Aug level: simple
|
||||
train_augmentation = dict(
|
||||
name='Compose',
|
||||
transforms=[
|
||||
dict(
|
||||
name='Resize',
|
||||
size_image=(288, 800),
|
||||
size_label=(288, 800)
|
||||
),
|
||||
dict(
|
||||
name='RandomRotation',
|
||||
degrees=3
|
||||
),
|
||||
dict(
|
||||
name='ToTensor'
|
||||
),
|
||||
dict(
|
||||
name='Normalize',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225],
|
||||
normalize_target=True
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,24 @@
|
||||
# Aug level: simple
|
||||
train_augmentation = dict(
|
||||
name='Compose',
|
||||
transforms=[
|
||||
dict(
|
||||
name='Resize',
|
||||
size_image=(360, 640),
|
||||
size_label=(360, 640)
|
||||
),
|
||||
dict(
|
||||
name='RandomRotation',
|
||||
degrees=3
|
||||
),
|
||||
dict(
|
||||
name='ToTensor'
|
||||
),
|
||||
dict(
|
||||
name='Normalize',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225],
|
||||
normalize_target=True
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,56 @@
|
||||
# Aug level: strong
|
||||
train_augmentation = dict(
|
||||
name='Compose',
|
||||
transforms=[
|
||||
dict(
|
||||
name='RandomApply',
|
||||
apply_prob=10/11,
|
||||
transforms=[
|
||||
dict(
|
||||
name='RandomRotation',
|
||||
degrees=10
|
||||
),
|
||||
dict(
|
||||
name='RandomHorizontalFlip',
|
||||
flip_prob=0.5
|
||||
),
|
||||
dict(
|
||||
name='RandomCrop',
|
||||
size=(int(590 * 0.9), int(1640 * 0.9))
|
||||
)
|
||||
]
|
||||
),
|
||||
dict(
|
||||
name='Resize',
|
||||
size_image=(288, 800),
|
||||
size_label=(288, 800)
|
||||
),
|
||||
dict(
|
||||
name='ColorJitter',
|
||||
brightness=0.4,
|
||||
contrast=0.4,
|
||||
saturation=0.4,
|
||||
hue=0.2
|
||||
),
|
||||
dict(
|
||||
name='ToTensor'
|
||||
),
|
||||
dict(
|
||||
name='RandomLighting',
|
||||
mean=0.0,
|
||||
std=0.1,
|
||||
eigen_value=[0.00341571, 0.01817699, 0.2141788],
|
||||
eigen_vector=[
|
||||
[0.41340352, -0.69563484, -0.58752847],
|
||||
[-0.81221408, 0.00994535, -0.5832747],
|
||||
[0.41158938, 0.71832671, -0.56089297]
|
||||
]
|
||||
),
|
||||
dict(
|
||||
name='Normalize',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225],
|
||||
normalize_target=True
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,56 @@
|
||||
# Aug level: strong
|
||||
train_augmentation = dict(
|
||||
name='Compose',
|
||||
transforms=[
|
||||
dict(
|
||||
name='RandomApply',
|
||||
apply_prob=10/11,
|
||||
transforms=[
|
||||
dict(
|
||||
name='RandomRotation',
|
||||
degrees=10
|
||||
),
|
||||
dict(
|
||||
name='RandomHorizontalFlip',
|
||||
flip_prob=0.5
|
||||
),
|
||||
dict(
|
||||
name='RandomCrop',
|
||||
size=(int(720 * 0.9), int(1280 * 0.9))
|
||||
)
|
||||
]
|
||||
),
|
||||
dict(
|
||||
name='Resize',
|
||||
size_image=(360, 640),
|
||||
size_label=(360, 640)
|
||||
),
|
||||
dict(
|
||||
name='ColorJitter',
|
||||
brightness=0.4,
|
||||
contrast=0.4,
|
||||
saturation=0.4,
|
||||
hue=0.2
|
||||
),
|
||||
dict(
|
||||
name='ToTensor'
|
||||
),
|
||||
dict(
|
||||
name='RandomLighting',
|
||||
mean=0.0,
|
||||
std=0.1,
|
||||
eigen_value=[0.00341571, 0.01817699, 0.2141788],
|
||||
eigen_vector=[
|
||||
[0.41340352, -0.69563484, -0.58752847],
|
||||
[-0.81221408, 0.00994535, -0.5832747],
|
||||
[0.41158938, 0.71832671, -0.56089297]
|
||||
]
|
||||
),
|
||||
dict(
|
||||
name='Normalize',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225],
|
||||
normalize_target=True
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,56 @@
|
||||
# Aug level: strong
|
||||
train_augmentation = dict(
|
||||
name='Compose',
|
||||
transforms=[
|
||||
dict(
|
||||
name='RandomApply',
|
||||
apply_prob=10/11,
|
||||
transforms=[
|
||||
dict(
|
||||
name='RandomRotation',
|
||||
degrees=10
|
||||
),
|
||||
dict(
|
||||
name='RandomHorizontalFlip',
|
||||
flip_prob=0.5
|
||||
),
|
||||
dict(
|
||||
name='RandomCrop',
|
||||
size=(int(717 * 0.9), int(1276 * 0.9)) # LLAMAS size
|
||||
)
|
||||
]
|
||||
),
|
||||
dict(
|
||||
name='Resize',
|
||||
size_image=(360, 640),
|
||||
size_label=(360, 640)
|
||||
),
|
||||
dict(
|
||||
name='ColorJitter',
|
||||
brightness=0.4,
|
||||
contrast=0.4,
|
||||
saturation=0.4,
|
||||
hue=0.2
|
||||
),
|
||||
dict(
|
||||
name='ToTensor'
|
||||
),
|
||||
dict(
|
||||
name='RandomLighting',
|
||||
mean=0.0,
|
||||
std=0.1,
|
||||
eigen_value=[0.00341571, 0.01817699, 0.2141788],
|
||||
eigen_vector=[
|
||||
[0.41340352, -0.69563484, -0.58752847],
|
||||
[-0.81221408, 0.00994535, -0.5832747],
|
||||
[0.41158938, 0.71832671, -0.56089297]
|
||||
]
|
||||
),
|
||||
dict(
|
||||
name='Normalize',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225],
|
||||
normalize_target=True
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,41 @@
|
||||
# Aug level: strong-B (w.o. random lighting, more random affine like LaneATT)
|
||||
train_augmentation = dict(
|
||||
name='Compose',
|
||||
transforms=[
|
||||
dict(
|
||||
name='RandomAffine',
|
||||
degrees=(-10, 10),
|
||||
scale=(0.8, 1.2),
|
||||
translate=(50, 20),
|
||||
ignore_x=None
|
||||
),
|
||||
dict(
|
||||
name='RandomHorizontalFlip',
|
||||
flip_prob=0.5,
|
||||
ignore_x=None
|
||||
),
|
||||
dict(
|
||||
name='Resize',
|
||||
size_image=(288, 800),
|
||||
size_label=(288, 800),
|
||||
ignore_x=None
|
||||
),
|
||||
dict(
|
||||
name='ColorJitter',
|
||||
brightness=0.3,
|
||||
contrast=0.3,
|
||||
saturation=0.3,
|
||||
hue=0.15
|
||||
),
|
||||
dict(
|
||||
name='ToTensor'
|
||||
),
|
||||
dict(
|
||||
name='Normalize',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225],
|
||||
normalize_target=True,
|
||||
ignore_x=None
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,41 @@
|
||||
# Aug level: strong-B (w.o. random lighting, more random affine like LaneATT)
|
||||
train_augmentation = dict(
|
||||
name='Compose',
|
||||
transforms=[
|
||||
dict(
|
||||
name='RandomAffine',
|
||||
degrees=(-10, 10),
|
||||
scale=(0.8, 1.2),
|
||||
translate=(50, 20),
|
||||
ignore_x=None
|
||||
),
|
||||
dict(
|
||||
name='RandomHorizontalFlip',
|
||||
flip_prob=0.5,
|
||||
ignore_x=None
|
||||
),
|
||||
dict(
|
||||
name='Resize',
|
||||
size_image=(360, 640),
|
||||
size_label=(360, 640),
|
||||
ignore_x=None
|
||||
),
|
||||
dict(
|
||||
name='ColorJitter',
|
||||
brightness=0.3,
|
||||
contrast=0.3,
|
||||
saturation=0.3,
|
||||
hue=0.15
|
||||
),
|
||||
dict(
|
||||
name='ToTensor'
|
||||
),
|
||||
dict(
|
||||
name='Normalize',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225],
|
||||
normalize_target=True,
|
||||
ignore_x=None
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
from ._utils import TUSIMPLE_ROOT
|
||||
|
||||
dataset = dict(
|
||||
name='TuSimple',
|
||||
image_set='train', # Only set for training. Testing will override this value by --state.
|
||||
root=TUSIMPLE_ROOT,
|
||||
padding_mask=False
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
from ._utils import TUSIMPLE_ROOT
|
||||
|
||||
dataset = dict(
|
||||
name='TuSimpleAsBezier',
|
||||
image_set='train', # Only set for training. Testing will override this value by --state.
|
||||
root=TUSIMPLE_ROOT,
|
||||
order=3,
|
||||
aux_segmentation=True
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
from ._utils import TUSIMPLE_ROOT
|
||||
|
||||
dataset = dict(
|
||||
name='TuSimpleAsSegmentation',
|
||||
image_set='train', # Only set for training. Testing will override this value by --state.
|
||||
root=TUSIMPLE_ROOT
|
||||
)
|
||||
@@ -0,0 +1,5 @@
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='Adam',
|
||||
lr=0.00025
|
||||
)
|
||||
@@ -0,0 +1,15 @@
|
||||
lr = 0.0006
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='Adam',
|
||||
lr=lr,
|
||||
parameters=[
|
||||
dict(
|
||||
params='conv_offset',
|
||||
lr=lr * 0.1 # 1/10 lr for DCNv2 offsets
|
||||
),
|
||||
dict(
|
||||
params='__others__'
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,24 @@
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='AdamW',
|
||||
lr=0.00006,
|
||||
betas=(0.9, 0.999),
|
||||
weight_decay=0.01,
|
||||
parameters=[
|
||||
dict(
|
||||
params='absolute_pos_embed',
|
||||
weight_decay=0
|
||||
),
|
||||
dict(
|
||||
params='relative_position_bias_table',
|
||||
weight_decay=0
|
||||
),
|
||||
dict(
|
||||
params='norm',
|
||||
weight_decay=0
|
||||
),
|
||||
dict(
|
||||
params='__others__'
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,24 @@
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='AdamW',
|
||||
lr=0.0001,
|
||||
betas=(0.9, 0.999),
|
||||
weight_decay=0.01,
|
||||
parameters=[
|
||||
dict(
|
||||
params='absolute_pos_embed',
|
||||
weight_decay=0
|
||||
),
|
||||
dict(
|
||||
params='relative_position_bias_table',
|
||||
weight_decay=0
|
||||
),
|
||||
dict(
|
||||
params='norm',
|
||||
weight_decay=0
|
||||
),
|
||||
dict(
|
||||
params='__others__'
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
lr_scheduler = dict(
|
||||
name='poly_scheduler_with_warmup',
|
||||
epochs=10,
|
||||
power=0.9,
|
||||
warmup_steps=200
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
lr_scheduler = dict(
|
||||
name='poly_scheduler_with_warmup',
|
||||
epochs=12,
|
||||
power=0.9,
|
||||
warmup_steps=200
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
lr_scheduler = dict(
|
||||
name='poly_scheduler_with_warmup',
|
||||
epochs=12,
|
||||
power=0.9,
|
||||
warmup_steps=500
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
lr_scheduler = dict(
|
||||
name='poly_scheduler_with_warmup',
|
||||
epochs=12,
|
||||
power=0.9,
|
||||
warmup_steps=600
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
lr_scheduler = dict(
|
||||
name='step_scheduler',
|
||||
epochs=150,
|
||||
step_ratio=0.9,
|
||||
gamma=0.1
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
lr_scheduler = dict(
|
||||
name='poly_scheduler_with_warmup',
|
||||
epochs=18,
|
||||
power=0.9,
|
||||
warmup_steps=200
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
lr_scheduler = dict(
|
||||
name='step_scheduler',
|
||||
epochs=2000,
|
||||
step_ratio=0.9,
|
||||
gamma=0.1
|
||||
)
|
||||
@@ -0,0 +1,4 @@
|
||||
lr_scheduler = dict(
|
||||
name='CosineAnnealingLRWrapper',
|
||||
epochs=20
|
||||
)
|
||||
@@ -0,0 +1,4 @@
|
||||
lr_scheduler = dict(
|
||||
name='CosineAnnealingLRWrapper',
|
||||
epochs=36
|
||||
)
|
||||
@@ -0,0 +1,4 @@
|
||||
lr_scheduler = dict(
|
||||
name='CosineAnnealingLRWrapper',
|
||||
epochs=400
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
lr_scheduler = dict(
|
||||
name='poly_scheduler_with_warmup',
|
||||
epochs=50,
|
||||
power=0.9,
|
||||
warmup_steps=200
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
lr_scheduler = dict(
|
||||
name='poly_scheduler_with_warmup',
|
||||
epochs=50,
|
||||
power=0.9,
|
||||
warmup_steps=250
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
lr_scheduler = dict(
|
||||
name='poly_scheduler_with_warmup',
|
||||
epochs=50,
|
||||
power=0.9,
|
||||
warmup_steps=500
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
loss = dict(
|
||||
name='HungarianBezierLoss',
|
||||
weight=[0.4, 1],
|
||||
weight_seg=[0.4, 1],
|
||||
curve_weight=1,
|
||||
label_weight=0.1,
|
||||
seg_weight=0.75,
|
||||
alpha=0.8,
|
||||
num_sample_points=100,
|
||||
bezier_order=3,
|
||||
k=9, # for the local maximum prior
|
||||
reduction='mean',
|
||||
ignore_index=255
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
loss = dict(
|
||||
name='HungarianLoss',
|
||||
upper_weight=2,
|
||||
lower_weight=2,
|
||||
curve_weight=5,
|
||||
label_weight=3
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
loss = dict(
|
||||
name='LaneLoss',
|
||||
existence_weight=0.1,
|
||||
ignore_index=255,
|
||||
weight=[0.4, 1, 1, 1, 1]
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
loss = dict(
|
||||
name='LaneLoss',
|
||||
existence_weight=0.1,
|
||||
ignore_index=255,
|
||||
weight=[0.4, 1, 1, 1, 1, 1, 1]
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='SGD',
|
||||
lr=0.048,
|
||||
momentum=0.9,
|
||||
weight_decay=1e-4
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='SGD',
|
||||
lr=0.06,
|
||||
momentum=0.9,
|
||||
weight_decay=1e-4
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='SGD',
|
||||
lr=0.08,
|
||||
momentum=0.9,
|
||||
weight_decay=1e-4
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='SGD',
|
||||
lr=0.09,
|
||||
momentum=0.9,
|
||||
weight_decay=1e-4
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='SGD',
|
||||
lr=0.1,
|
||||
momentum=0.9,
|
||||
weight_decay=1e-4
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='SGD',
|
||||
lr=0.13,
|
||||
momentum=0.9,
|
||||
weight_decay=1e-4
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='SGD',
|
||||
lr=0.2,
|
||||
momentum=0.9,
|
||||
weight_decay=1e-4
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='SGD',
|
||||
lr=0.25,
|
||||
momentum=0.9,
|
||||
weight_decay=1e-4
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='SGD',
|
||||
lr=0.3,
|
||||
momentum=0.9,
|
||||
weight_decay=1e-4
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='SGD',
|
||||
lr=0.35,
|
||||
momentum=0.9,
|
||||
weight_decay=1e-4
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='SGD',
|
||||
lr=0.4,
|
||||
momentum=0.9,
|
||||
weight_decay=1e-4
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='SGD',
|
||||
lr=0.5,
|
||||
momentum=0.9,
|
||||
weight_decay=1e-4
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
optimizer = dict(
|
||||
name='torch_optimizer',
|
||||
torch_optim_class='SGD',
|
||||
lr=0.6,
|
||||
momentum=0.9,
|
||||
weight_decay=1e-4
|
||||
)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user