Codes-for-Lane-Detection

我要开发同款
匿名用户2021年11月17日
72阅读
开发技术Python
所属分类人工智能、机器学习/深度学习
授权协议MIT License

作品详情

Codesfor"LearningLightweightLaneDetectionCNNsbySelfAttentionDistillation"

ThisrepoalsocontainsTensorflowimplementationof"SpatialAsDeep:SpatialCNNforTrafficSceneUnderstanding".(SCNN-Tensorflow)

News

ERFNet-CULane-PyTorchhasbeenreleased.(Itcanachieve73.1F1-measureinCULanetestingset)

ENet-Label-Torch,ENet-TuSimple-TorchandENet-BDD100K-Torchhavebeenreleased.

Keyfeatures:

(1)ENet-labelisalight-weightlanedetectionmodelbasedonENetandadoptsselfattentiondistillation(moredetailscanbefoundinourpaper).

(2)Ithas20×fewerparametersandruns10×fastercomparedtothestate-of-the-artSCNN,andachieves72.0(F1-measure)onCULanetestingset(betterthanSCNNwhichachieves71.6).Italsoachieves96.64%accuracyinTuSimpletestingset(betterthanSCNNwhichachieves96.53%)and36.56%accuracyinBDD100Ktestingset(betterthanSCNNwhichachieves35.79%).

(3)ApplyingENet-SADtoLLAMASdatasetyields0.635mAPinthemulti-classlanemarkersegmentationtask,whichismuchbetterthanthebaselinealgorithmwhichachieves0.500mAP.Detailscanbefoundinthisrepo.

(Donothesitatetotryourmodel!!!)

Multi-GPUtraininghasbeensupported.JustchangeBATCH_SIZEandGPU_NUMinglobal_config.py,andthenuseCUDA_VISIBLE_DEVICES="0,1,2,3"pythonfile_name.py.Thanks@yujincheng08.ContentInstallationDatasetsTuSimpleCULaneBDD100KSCNN-TensorflowTestTrainPerformanceOthersCitationAcknowledgementContactInstallationInstallnecessarypackages:condacreate-ntensorflow_gpupippython=3.5sourceactivatetensorflow_gpupipinstall--upgradetensorflow-gpu==1.3.0pip3install-rSCNN-Tensorflow/lane-detection-model/requirements.txtDownloadVGG-16:

Downloadthevgg.npyhereandputitinSCNN-Tensorflow/lane-detection-model/data.

Pre-trainedmodelfortesting:

Downloadthepre-trainedmodelhere.

DatasetsTuSimple

Theground-truthlabelsofTuSimpletestingsetisnowavailableatTuSimple.Theannotatedtraining(#frame=3268)andvalidationlabels(#frame=358)canbefoundhere,pleaseusethem(list-name.txt)toreplacethetrain_gt.txtandval_gt.txtintrain_lanenet.py.Moreover,youneedtoresizetheimageto256x512insteadof288x800inTuSimple.Remembertochangethemaximumindexofrowsandcolumns,anddetailedexplanationscanbeseenhere.Pleaseevaluateyourpred.jsonusingthelabelsandthisscript.Besides,togeneratepred.json,youcanrefertothisissue.

CULane

ThewholedatasetisavailableatCULane.

BDD100K

ThewholedatasetisavailableatBDD100K.

SCNN-TensorflowTestcdSCNN-Tensorflow/lane-detection-modelCUDA_VISIBLE_DEVICES="0"pythontools/test_lanenet.py--weights_pathpath/to/model_weights_file--image_pathpath/to/image_name_list--save_dirto_be_saved_dir

Notethatpath/to/image_name_listshouldbeliketest_img.txt.Now,yougettheprobabilitymapsfromourmodel.Togetthefinalperformance,youneedtofollowSCNNtogetcurvelinesfromprobabilitymapsaswellascalculateprecision,recallandF1-measure.

Reminder:youshouldchecklanenet_data_processor.pyandlanenet_data_processor_test.pytoensurethattheprocessingofimagepathisright.Youarerecommendedtousetheabsolutepathinyourimagepathlist.Besides,thiscodeneedsbatchsizeusedintrainingandtestingtobeconsistent.Toenablearbitrarybatchsizeinthetestingphase,pleaserefertothisissue.

TrainCUDA_VISIBLE_DEVICES="0"pythontools/train_lanenet.py--netvgg--dataset_dirpath/to/CULane-dataset/

Notethatpath/to/CULane-dataset/shouldcontainfilesliketrain_gt.txtandval_gt.txt.

PerformanceTuSimpletestingset:ModelAccuracyFPFNSCNN-Torch96.53%0.06170.0180SCNN-Tensorflow------ENet-Label-Torch96.64%0.06020.0205

Thepre-trainedmodelfortestingishere.(comingsoon!)NotethatinTuSimple,SCNN-TorchisbasedonResNet-101whileSCNN-TensorflowisbasedonVGG-16.InCULaneandBDD100K,bothSCNN-TorchandSCNN-TensorflowarebasedonVGG-16.

CULanetestingset(F1-measure):CategorySCNN-TorchSCNN-TensorflowENet-Label-TorchERFNet-CULane-PyTorchNormal90.690.290.791.5Crowded69.771.970.871.6Night66.164.665.967.1Noline43.445.844.745.1Shadow66.973.870.671.3Arrow84.183.885.887.2Dazzlelight58.559.564.466.0Curve64.463.465.466.3Crossroad1990413727292199Total71.671.372.073.1Runtime(ms)133.5--13.410.2Parameter(M)20.72--0.982.49

Thepre-trainedmodelfortestingishere.NotethatyouneedtoexchangetheorderofVGG-MEANintest_lanenet.pyandchangetheorderofinputimagesfromRGBtoBGRsincethepre-trainedmodelusesopencvtoreadimages.Youcanfurtherboosttheperformancebyreferringtothisissue.

BDD100Ktestingset:ModelAccuracyIoUSCNN-Torch35.79%15.84SCNN-Tensorflow----ENet-Label-Torch36.56%16.02

TheaccuracyandIoUoflanepixelsarecomputed.Thepre-trainedmodelfortestingishere.(comingsoon!)

OthersCitation

Ifyouusethecodes,pleasecitethefollowingpublications:

@article{hou2019learning,title={LearningLightweightLaneDetectionCNNsbySelfAttentionDistillation},author={Hou,YuenanandMa,ZhengandLiu,ChunxiaoandLoy,ChenChange},journal={arXivpreprintarXiv:1908.00821},year={2019}}@inproceedings{pan2018SCNN,author={XingangPan,JianpingShi,PingLuo,XiaogangWang,andXiaoouTang},title={SpatialAsDeep:SpatialCNNforTrafficSceneUnderstanding},booktitle={AAAIConferenceonArtificialIntelligence(AAAI)},month={February},year={2018}}@misc{hou2019agnostic,title={AgnosticLaneDetection},author={YuenanHou},year={2019},eprint={1905.03704},archivePrefix={arXiv},primaryClass={cs.CV}}Acknowledgement

ThisrepoisbuiltuponSCNNandLaneNet.

Contact

Ifyouhaveanyproblemsinreproducingtheresults,justraiseanissueinthisrepo.

To-DoListTestSCNN-TensorflowinTuSimpleandBDD100KProvidedetailedinstructionstorunSCNN-TensorflowinTuSimpleandBDD100KUploadourlight-weightmodel(ENet-SAD)anditstraining&testingscripts
声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论