<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>
"); //-->

博客專(zhuān)欄

EEPW首頁(yè) > 博客 > 使用深度學(xué)習進(jìn)行自動(dòng)車(chē)牌檢測和識別

使用深度學(xué)習進(jìn)行自動(dòng)車(chē)牌檢測和識別

發(fā)布人:AI科技大本營(yíng) 時(shí)間:2021-10-18 來(lái)源:工程師 發(fā)布文章

以下文章來(lái)源于小白學(xué)視覺(jué) ,作者小白

介紹

在現代世界的不同方面,信息技術(shù)的大規模集成導致了將車(chē)輛視為信息系統中的概念資源。由于沒(méi)有任何數據,自主信息系統就沒(méi)有任何意義,因此需要在現實(shí)和信息系統之間改革車(chē)輛信息。這可以通過(guò)人工代理或特殊智能設備實(shí)現,這些設備將允許在真實(shí)環(huán)境中通過(guò)車(chē)輛牌照識別車(chē)輛。在智能設備中,,提到了車(chē)輛牌照檢測和識別系統。車(chē)輛牌照檢測和識別系統用于檢測車(chē)牌,然后識別車(chē)牌,即從圖像中提取文本,所有這一切都歸功于使用定位算法的計算模塊,車(chē)牌分割和字符識別。車(chē)牌檢測和讀取是一種智能系統,由于其在以下幾個(gè)領(lǐng)域的潛在應用,因此具有相當大的潛力:

1.指揮部隊:該系統用于檢測被盜和搜查的車(chē)輛,將檢測到的車(chē)牌與報告車(chē)輛的車(chē)牌進(jìn)行比較。

2.道路安全:該系統用于檢測超過(guò)一定速度的車(chē)牌,將車(chē)牌讀取系統與道路雷達耦合。

3.停車(chē)管理:車(chē)輛進(jìn)出口的管理。

step1:車(chē)牌檢測

為了檢測許可證,我們將使用基于卷積神經(jīng)網(wǎng)絡(luò )的Yolo(You Only Look One)深度學(xué)習對象檢測體系結構。該體系結構是由Joseph Redmon、Ali Farhadi、Ross Girshick和Santosh Divvala于2015年推出的第一個(gè)版本,以及更高版本2和3。

論文鏈接:

Yolo v1:https://arxiv.org/pdf/1506.02640.pdf

Yolo v2:https://arxiv.org/pdf/1612.08242.pdf

Yolo v3:https://arxiv.org/pdf/1804.02767.pdf

Yolo是一個(gè)經(jīng)過(guò)端到端訓練的單一網(wǎng)絡(luò ),用于執行預測對象邊界框和對象類(lèi)的回歸任務(wù)。這個(gè)網(wǎng)絡(luò )速度非???,它以每秒45幀的速度實(shí)時(shí)處理圖像。一個(gè)較小的網(wǎng)絡(luò )版本Fast YOLO每秒處理155幀,速度驚人。

實(shí)現YOLO V3:

首先,我們準備了一個(gè)由700張包含突尼斯車(chē)牌的汽車(chē)圖像組成的數據集,對于每張圖像,我們使用一個(gè)名為L(cháng)abelImg的桌面應用程序創(chuàng )建一個(gè)xml文件(之后更改為文本文件,其中包含與Darknet配置文件輸入兼容的坐標。Darknet:project用于重新培訓YOLO預訓練模型)。

# 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

完成訓練后,要從圖像中檢測發(fā)光板,請從darknet/custom/weights中選擇最新的模型,并將其路徑或名稱(chēng)放入object_detection_yolo.py文件中,我們還將使用yolov3.cfg文件,僅在該文件中,在訓練前放入,以便我們可以先刪除訓練,然后運行:

python object-detection_yolo.py --image= image.jpg

運行結果:

1.jpg

Step2:車(chē)牌檢測

現在我們必須分段我們的車(chē)牌號,輸入是板的圖像,我們必須能夠提取單字符圖像。這一步驟的結果作為識別階段的輸入非常重要。在自動(dòng)讀取車(chē)牌的系統中。分割是車(chē)牌自動(dòng)識別最重要的過(guò)程之一,因為任何其他步驟都是基于分割的。如果分割失敗,識別階段將不正確。為確保正確分割,必須執行初步處理。

2.png

像素投影直方圖包括查找每個(gè)字符的上下限、左下限和右上限,我們操作水平投影以查找字符的頂部和底部位置,一組直方圖的值是沿水平方向上特定線(xiàn)的白色像素的總和。當所有的值沿水平方向的所有直線(xiàn)進(jìn)行計算,得到水平投影直方圖。然后將直方圖的平均值用作閾值,以確定上限和下限。直方圖分段大于閾值的中心區域記錄為由上限和下限分隔的區域。然后,我們以同樣的方式計算垂直投影直方圖,但通過(guò)按圖像的列更改行,使每個(gè)字符具有兩個(gè)限制(左和右)。

3.png

從車(chē)牌中提取數字的另一種方法是使用開(kāi)/關(guān)形態(tài)學(xué)來(lái)制作某種連接區域,然后使用連接組件算法來(lái)提取連接區域。

Step3:車(chē)牌識別

識別階段是自動(dòng)車(chē)牌閱讀器系統開(kāi)發(fā)的最后一步。因此,它關(guān)閉圖像采集過(guò)程中經(jīng)過(guò)的所有過(guò)程,然后是板的位置,直到分割。識別必須從分割階段結束時(shí)獲得的圖像中提取字符。用于此識別的學(xué)習模型必須能夠讀取圖像并渲染相應的字符。

為了最大限度地利用可用于學(xué)習的數據,我們在應用車(chē)牌分割之前使用的相同圖像處理步驟后,通過(guò)在正方形中調整每個(gè)字符的大小來(lái)單獨切割每個(gè)字符。結果,我們獲得了一組由11個(gè)類(lèi)組成的數據,對于每個(gè)類(lèi),我們有30-40張28X28像素尺寸的PNG格式的圖像;從0到9的數字和阿拉伯語(yǔ)單詞(突尼斯)。

然后,我們在科學(xué)論文的基礎上對多層感知器(MLP)和分類(lèi)器K近鄰(KNN)進(jìn)行了比較研究。結果我們發(fā)現:如果使用MLP分類(lèi)器時(shí)隱層神經(jīng)元的數量也增加,并且如果使用KNN時(shí)最近鄰數也增加,則性能會(huì )提高。在這里,調整k-NN分類(lèi)器性能的能力非常有限。但是,可調整的隱藏層數量和可調整的MLP連接權重為細化決策區域提供了更大的機會(huì )。因此,我們將在此階段選擇多層感知器。

4.png

本文代碼Github鏈接:

https://github.com/GuiltyNeuron/ANPR

*博客內容為網(wǎng)友個(gè)人發(fā)布,僅代表博主個(gè)人觀(guān)點(diǎn),如有侵權請聯(lián)系工作人員刪除。

稱(chēng)重傳感器相關(guān)文章:稱(chēng)重傳感器原理


關(guān)鍵詞: 深度學(xué)習

相關(guān)推薦

技術(shù)專(zhuān)區

關(guān)閉
国产精品自在自线亚洲|国产精品无圣光一区二区|国产日产欧洲无码视频|久久久一本精品99久久K精品66|欧美人与动牲交片免费播放
<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>