Codesfor"LearigLightweightLaeDetectioCNNsbySelfAttetioDistillatio"
ThisrepoalsocotaisTesorflowimplemetatioof"SpatialAsDeep:SpatialCNNforTrafficSceeUderstadig".(SCNN-Tesorflow)
NewsERFNet-CULae-PyTorchhasbeereleased.(Itcaachieve73.1F1-measureiCULaetestigset)
ENet-Label-Torch,ENet-TuSimple-TorchadENet-BDD100K-Torchhavebeereleased.
Keyfeatures:
(1)ENet-labelisalight-weightlaedetectiomodelbasedoENetadadoptsselfattetiodistillatio(moredetailscabefoudiourpaper).
(2)Ithas20×fewerparametersadrus10×fastercomparedtothestate-of-the-artSCNN,adachieves72.0(F1-measure)oCULaetestigset(betterthaSCNNwhichachieves71.6).Italsoachieves96.64%accuracyiTuSimpletestigset(betterthaSCNNwhichachieves96.53%)ad36.56%accuracyiBDD100Ktestigset(betterthaSCNNwhichachieves35.79%).
(3)ApplyigENet-SADtoLLAMASdatasetyields0.635mAPithemulti-classlaemarkersegmetatiotask,whichismuchbetterthathebaseliealgorithmwhichachieves0.500mAP.Detailscabefoudithisrepo.
(Doothesitatetotryourmodel!!!)
Multi-GPUtraiighasbeesupported.JustchageBATCH_SIZEadGPU_NUMiglobal_cofig.py,adtheuseCUDA_VISIBLE_DEVICES="0,1,2,3"pythofile_ame.py.Thaks@yujicheg08.CotetIstallatioDatasetsTuSimpleCULaeBDD100KSCNN-TesorflowTestTraiPerformaceOthersCitatioAckowledgemetCotactIstallatioIstallecessarypackages:codacreate-tesorflow_gpupippytho=3.5sourceactivatetesorflow_gpupipistall--upgradetesorflow-gpu==1.3.0pip3istall-rSCNN-Tesorflow/lae-detectio-model/requiremets.txtDowloadVGG-16:Dowloadthevgg.pyhereadputitiSCNN-Tesorflow/lae-detectio-model/data.
Pre-traiedmodelfortestig:Dowloadthepre-traiedmodelhere.
DatasetsTuSimpleThegroud-truthlabelsofTuSimpletestigsetisowavailableatTuSimple.Theaotatedtraiig(#frame=3268)advalidatiolabels(#frame=358)cabefoudhere,pleaseusethem(list-ame.txt)toreplacethetrai_gt.txtadval_gt.txtitrai_laeet.py.Moreover,youeedtoresizetheimageto256x512isteadof288x800iTuSimple.Remembertochagethemaximumidexofrowsadcolums,addetailedexplaatioscabeseehere.Pleaseevaluateyourpred.jsousigthelabelsadthisscript.Besides,togeeratepred.jso,youcarefertothisissue.
CULaeThewholedatasetisavailableatCULae.
BDD100KThewholedatasetisavailableatBDD100K.
SCNN-TesorflowTestcdSCNN-Tesorflow/lae-detectio-modelCUDA_VISIBLE_DEVICES="0"pythotools/test_laeet.py--weights_pathpath/to/model_weights_file--image_pathpath/to/image_ame_list--save_dirto_be_saved_dirNotethatpath/to/image_ame_listshouldbeliketest_img.txt.Now,yougettheprobabilitymapsfromourmodel.Togetthefialperformace,youeedtofollowSCNNtogetcurveliesfromprobabilitymapsaswellascalculateprecisio,recalladF1-measure.
Remider:youshouldchecklaeet_data_processor.pyadlaeet_data_processor_test.pytoesurethattheprocessigofimagepathisright.Youarerecommededtousetheabsolutepathiyourimagepathlist.Besides,thiscodeeedsbatchsizeuseditraiigadtestigtobecosistet.Toeablearbitrarybatchsizeithetestigphase,pleaserefertothisissue.
TraiCUDA_VISIBLE_DEVICES="0"pythotools/trai_laeet.py--etvgg--dataset_dirpath/to/CULae-dataset/Notethatpath/to/CULae-dataset/shouldcotaifilesliketrai_gt.txtadval_gt.txt.
PerformaceTuSimpletestigset:ModelAccuracyFPFNSCNN-Torch96.53%0.06170.0180SCNN-Tesorflow------ENet-Label-Torch96.64%0.06020.0205Thepre-traiedmodelfortestigishere.(comigsoo!)NotethatiTuSimple,SCNN-TorchisbasedoResNet-101whileSCNN-TesorflowisbasedoVGG-16.ICULaeadBDD100K,bothSCNN-TorchadSCNN-TesorflowarebasedoVGG-16.
CULaetestigset(F1-measure):CategorySCNN-TorchSCNN-TesorflowENet-Label-TorchERFNet-CULae-PyTorchNormal90.690.290.791.5Crowded69.771.970.871.6Night66.164.665.967.1Nolie43.445.844.745.1Shadow66.973.870.671.3Arrow84.183.885.887.2Dazzlelight58.559.564.466.0Curve64.463.465.466.3Crossroad1990413727292199Total71.671.372.073.1Rutime(ms)133.5--13.410.2Parameter(M)20.72--0.982.49Thepre-traiedmodelfortestigishere.NotethatyoueedtoexchagetheorderofVGG-MEANitest_laeet.pyadchagetheorderofiputimagesfromRGBtoBGRsicethepre-traiedmodelusesopecvtoreadimages.Youcafurtherboosttheperformacebyreferrigtothisissue.
BDD100Ktestigset:ModelAccuracyIoUSCNN-Torch35.79%15.84SCNN-Tesorflow----ENet-Label-Torch36.56%16.02TheaccuracyadIoUoflaepixelsarecomputed.Thepre-traiedmodelfortestigishere.(comigsoo!)
OthersCitatioIfyouusethecodes,pleasecitethefollowigpublicatios:
@article{hou2019learig,title={LearigLightweightLaeDetectioCNNsbySelfAttetioDistillatio},author={Hou,YueaadMa,ZhegadLiu,ChuxiaoadLoy,CheChage},joural={arXivprepritarXiv:1908.00821},year={2019}}@iproceedigs{pa2018SCNN,author={XigagPa,JiapigShi,PigLuo,XiaogagWag,adXiaoouTag},title={SpatialAsDeep:SpatialCNNforTrafficSceeUderstadig},booktitle={AAAICofereceoArtificialItelligece(AAAI)},moth={February},year={2018}}@misc{hou2019agostic,title={AgosticLaeDetectio},author={YueaHou},year={2019},eprit={1905.03704},archivePrefix={arXiv},primaryClass={cs.CV}}AckowledgemetThisrepoisbuiltupoSCNNadLaeNet.
CotactIfyouhaveayproblemsireproducigtheresults,justraiseaissueithisrepo.
To-DoListTestSCNN-TesorflowiTuSimpleadBDD100KProvidedetailedistructiostoruSCNN-TesorflowiTuSimpleadBDD100KUploadourlight-weightmodel(ENet-SAD)aditstraiig&testigscripts






评论