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

# 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 informations
classes = 1
train = custom/train.txt
valid = custom/test.txt
names = custom/classes.names
backup = 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 铁肩担道义 历史鉴未来 7904574
- 2 中方对会谈结果满意吗?外交部回应 7809586
- 3 40℃高温要来了 7714267
- 4 中国经济必将破浪前行 7617906
- 5 中美双方降低超100%关税 7520639
- 6 英国首相斯塔默住所起火 7427652
- 7 李嘉诚卖港口 长和发布声明回应 7329419
- 8 雪碧悄悄换了配方?售后人员回应 7233595
- 9 黄晓明金世佳进博士复试 7143582
- 10 中美各取消91%关税 暂停24%关税 7042196