LaneNet implementation in PyTorch

klintan, updated 🕥 2022-11-29 01:04:59

LaneNet in PyTorch

Adapted from https://github.com/MaybeShewill-CV/lanenet-lane-detection and https://github.com/leonfrank/lanenet-danet-pytorch

Inspiration drawn from https://github.com/davidtvs/PyTorch-ENet https://github.com/sacmehta/ESPNet

Using ESPNet as Encoder-Decoder instead of ENet.

Installation

python setup.py install

Usage

Train

To train on the test data included in the repo,

python3 lanenet/train.py --dataset ./data/training_data_example

TUSimple dataset

Download TUsimple dataset from https://github.com/TuSimple/tusimple-benchmark/issues/3

When done run the script in the scripts-folder (From https://github.com/MaybeShewill-CV/lanenet-lane-detection) python tusimple_transform.py --src_dir <directory of downloaded tusimple>

After this run training as before: python3 lanenet/train.py --dataset <tusimple_transform script output folder>

Custom dataset

To train on a custom dataset, the easiest approach is to make sure it follows the format laid out in the data folder. Alternatively write a custom PyTorch dataset class (if you do, feel free to provide a PR)

Test

Resources

Papers

Towards End-to-End Lane Detection: an Instance Segmentation Approach

https://arxiv.org/pdf/1802.05591.pdf

ESPNet: Efficient Spatial Pyramid of Dilated Convolutions for Semantic Segmentation

https://arxiv.org/abs/1803.06815

ENet: A Deep Neural Network Architecture for Real-Time Semantic Segmentation

https://arxiv.org/abs/1606.02147

https://maybeshewill-cv.github.io/lanenet-lane-detection/

Issues

Bump pillow from 8.3.2 to 9.3.0

opened on 2022-11-22 08:52:56 by dependabot[bot]

Bumps pillow from 8.3.2 to 9.3.0.

Release notes

Sourced from pillow's releases.

9.3.0

https://pillow.readthedocs.io/en/stable/releasenotes/9.3.0.html

Changes

... (truncated)

Changelog

Sourced from pillow's changelog.

9.3.0 (2022-10-29)

  • Limit SAMPLESPERPIXEL to avoid runtime DOS #6700 [wiredfool]

  • Initialize libtiff buffer when saving #6699 [radarhere]

  • Inline fname2char to fix memory leak #6329 [nulano]

  • Fix memory leaks related to text features #6330 [nulano]

  • Use double quotes for version check on old CPython on Windows #6695 [hugovk]

  • Remove backup implementation of Round for Windows platforms #6693 [cgohlke]

  • Fixed set_variation_by_name offset #6445 [radarhere]

  • Fix malloc in _imagingft.c:font_setvaraxes #6690 [cgohlke]

  • Release Python GIL when converting images using matrix operations #6418 [hmaarrfk]

  • Added ExifTags enums #6630 [radarhere]

  • Do not modify previous frame when calculating delta in PNG #6683 [radarhere]

  • Added support for reading BMP images with RLE4 compression #6674 [npjg, radarhere]

  • Decode JPEG compressed BLP1 data in original mode #6678 [radarhere]

  • Added GPS TIFF tag info #6661 [radarhere]

  • Added conversion between RGB/RGBA/RGBX and LAB #6647 [radarhere]

  • Do not attempt normalization if mode is already normal #6644 [radarhere]

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/klintan/pytorch-lanenet/network/alerts).

Proof of Concept?

opened on 2022-09-01 15:02:52 by clkinder1

Has anybody been able to visualize the output of this model. I've trained up two of them (one that I rewrote, and the original one), and as where they seem to "train" properly, they definitely don't output what they should. I was looking to see if anybody has been able to prove this network.

Loss Calculation Problem

opened on 2022-08-30 01:54:02 by clkinder1

I'm having a problem with the trainer where:

Traceback (most recent call last): File "C:\Users\Carsten Kinderknecht\Documents\GitHub\pytorch-lanenet\lanenet\train.py", line 156, in <module> main() File "C:\Users\Carsten Kinderknecht\Documents\GitHub\pytorch-lanenet\lanenet\train.py", line 144, in main train_iou = train(train_loader, model, optimizer, epoch) File "C:\Users\Carsten Kinderknecht\Documents\GitHub\pytorch-lanenet\lanenet\train.py", line 68, in train total_loss, binary_loss, instance_loss, out, train_iou = compute_loss(net_output, binary_label, instance_label) File "C:\Users\Carsten Kinderknecht\AppData\Local\Programs\Python\Python310\lib\site-packages\lanenet-0.1.0-py3.10.egg\lanenet\model\model.py", line 75, in compute_loss File "C:\Users\Carsten Kinderknecht\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "C:\Users\Carsten Kinderknecht\AppData\Local\Programs\Python\Python310\lib\site-packages\lanenet-0.1.0-py3.10.egg\lanenet\model\loss.py", line 33, in forward File "C:\Users\Carsten Kinderknecht\AppData\Local\Programs\Python\Python310\lib\site-packages\lanenet-0.1.0-py3.10.egg\lanenet\model\loss.py", line 71, in _discriminative_loss File "C:\Users\Carsten Kinderknecht\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\functional.py", line 1472, in norm return _VF.frobenius_norm(input, _dim, keepdim=keepdim) IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)

Any help would be appreciated

how to test the model?

opened on 2022-08-10 09:54:14 by q36101 None

About pretrained model

opened on 2022-06-22 08:53:23 by Yx1322441675

Can you provide Pretrained model ?

[loss.py] there is a bug

opened on 2022-03-01 14:30:55 by qq852518421

https://github.com/klintan/pytorch-lanenet/blob/43f1bf3c8ef6163357993d2f8869cd2be74741a3/lanenet/model/loss.py#L61-L67

Andreas Klintberg

Prototyper and tinkerer. Loves robots, space and building things.

GitHub Repository