使用深度学习进行自动车牌检测和识别

# First download Darknet project$ git clone https://github.com/pjreddie/darknet.git# in "darknet/Makefile" put affect 1 to OpenCV, CUDNN and GPU if you # want to train with you GPU then time thos two commands$ cd darknet$ make# Load convert.py to change labels (xml files) into the appropriate # format that darknet understand and past it under darknet/https://github.com/GuiltyNeuron/ANPR# Unzip the dataset$ unzip dataset.zip# Create two folders, one for the images and the other for labels$ mkdir darknet/images$ mkdir darknet/labels# Convert labels format and create files with location of images# for the test and the training$ python convert.py# Create a folder under darknet/ that will contain your data$ mkdir darknet/custom# Move files train.txt and test.txt that contains data path to# custom folder$ mv train.txt custom/$ mv test.txt custom/# Create file to put licence plate class name "LP"$ touch darknet/custom/classes.names$ echo LP > classes.names# Create Backup folder to save weights$ mkdir custom/weights# Create a file contains information about data and cfg# files locations$ touch darknet/custom/darknet.data# in darknet/custom/darknet.data file paste those informationsclasses = 1train = custom/train.txtvalid = custom/test.txtnames = custom/classes.namesbackup = custom/weights/# Copy and paste yolo config file in "darknet/custom"$ cp darknet/cfg/yolov3.cfg darknet/custom# Open yolov3.cfg and change :# " filters=(classes + 5)*3" just the ones before "Yolo"# in our case classes=1, so filters=18# change classes=... to classes=1# Download pretrained model$ wget https://pjreddie.com/media/files/darknet53.conv.74 -O ~/darknet/darknet53.conv.74# Let's train our model !!!!!!!!!!!!!!!!!!!!!$ ./darknet detector train custom/darknet.data custom/yolov3.cfg darknet53.conv.74
python object-detection_yolo.py --image= image.jpg







分享

点收藏

点点赞

点在看
关注公众号:拾黑(shiheibook)了解更多
[广告]赞助链接:
四季很好,只要有你,文娱排行榜:https://www.yaopaiming.com/
让资讯触达的更精准有趣:https://www.0xu.cn/
关注网络尖刀微信公众号随时掌握互联网精彩
赞助链接
排名
热点
搜索指数
- 1 习近平将发表二〇二六年新年贺词 7904141
- 2 2026年国补政策来了 7808738
- 3 东部战区:开火!开火!全部命中! 7712893
- 4 2026年这些民生政策将惠及百姓 7616985
- 5 小学食堂米线过期2.5小时被罚5万 7519709
- 6 解放军喊话驱离台军 原声曝光 7428214
- 7 为博流量直播踩烈士陵墓?绝不姑息 7327605
- 8 每月最高800元!多地发放养老消费券 7238391
- 9 数字人民币升级 1月1日起将计付利息 7141831
- 10 2026年1月1日起 一批新规将施行 7040675








AI100
