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.
python setup.py install
To train on the test data included in the repo,
python3 lanenet/train.py --dataset ./data/training_data_example
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>
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)
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/
Bumps pillow from 8.3.2 to 9.3.0.
Sourced from pillow's releases.
9.3.0
https://pillow.readthedocs.io/en/stable/releasenotes/9.3.0.html
Changes
- Initialize libtiff buffer when saving #6699 [
@radarhere
]- Limit SAMPLESPERPIXEL to avoid runtime DOS #6700 [
@wiredfool
]- 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
]- GHA: replace deprecated set-output command with GITHUB_OUTPUT file #6697 [
@nulano
]- Remove backup implementation of Round for Windows platforms #6693 [
@cgohlke
]- Upload fribidi.dll to GitHub Actions #6532 [
@nulano
]- Fixed set_variation_by_name offset #6445 [
@radarhere
]- Windows build improvements #6562 [
@nulano
]- Fix malloc in _imagingft.c:font_setvaraxes #6690 [
@cgohlke
]- Only use ASCII characters in C source file #6691 [
@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
]- Decode JPEG compressed BLP1 data in original mode #6678 [
@radarhere
]- pylint warnings #6659 [
@marksmayo
]- 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
]- Fixed seeking to an L frame in a GIF #6576 [
@radarhere
]- Consider all frames when selecting mode for PNG save_all #6610 [
@radarhere
]- Don't reassign crc on ChunkStream close #6627 [
@radarhere
]- Raise a warning if NumPy failed to raise an error during conversion #6594 [
@radarhere
]- Only read a maximum of 100 bytes at a time in IMT header #6623 [
@radarhere
]- Show all frames in ImageShow #6611 [
@radarhere
]- Allow FLI palette chunk to not be first #6626 [
@radarhere
]- If first GIF frame has transparency for RGB_ALWAYS loading strategy, use RGBA mode #6592 [
@radarhere
]- Round box position to integer when pasting embedded color #6517 [
@radarhere
]- Removed EXIF prefix when saving WebP #6582 [
@radarhere
]- Pad IM palette to 768 bytes when saving #6579 [
@radarhere
]- Added DDS BC6H reading #6449 [
@ShadelessFox
]- Added support for opening WhiteIsZero 16-bit integer TIFF images #6642 [
@JayWiz
]- Raise an error when allocating translucent color to RGB palette #6654 [
@jsbueno
]- Moved mode check outside of loops #6650 [
@radarhere
]- Added reading of TIFF child images #6569 [
@radarhere
]- Improved ImageOps palette handling #6596 [
@PososikTeam
]- Defer parsing of palette into colors #6567 [
@radarhere
]- Apply transparency to P images in ImageTk.PhotoImage #6559 [
@radarhere
]- Use rounding in ImageOps contain() and pad() #6522 [
@bibinhashley
]- Fixed GIF remapping to palette with duplicate entries #6548 [
@radarhere
]- Allow remap_palette() to return an image with less than 256 palette entries #6543 [
@radarhere
]- Corrected BMP and TGA palette size when saving #6500 [
@radarhere
]
... (truncated)
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)
d594f4c
Update CHANGES.rst [ci skip]909dc64
9.3.0 version bump1a51ce7
Merge pull request #6699 from hugovk/security-libtiff_buffer2444cdd
Merge pull request #6700 from hugovk/security-samples_per_pixel-sec744f455
Added release notes0846bfa
Add to release notes799a6a0
Fix linting00b25fd
Hide UserWarning in logs05b175e
Tighter test case13f2c5a
Prevent DOS with large SAMPLESPERPIXEL in Tiff IFDDependabot 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
.
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.
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
Can you provide Pretrained model ?
https://github.com/klintan/pytorch-lanenet/blob/43f1bf3c8ef6163357993d2f8869cd2be74741a3/lanenet/model/loss.py#L61-L67
Prototyper and tinkerer. Loves robots, space and building things.
GitHub Repository