CN109344850A - A kind of water meter automatic testing method based on YOLO - Google Patents

A kind of water meter automatic testing method based on YOLO Download PDF

Info

Publication number
CN109344850A
CN109344850A CN201810845742.2A CN201810845742A CN109344850A CN 109344850 A CN109344850 A CN 109344850A CN 201810845742 A CN201810845742 A CN 201810845742A CN 109344850 A CN109344850 A CN 109344850A
Authority
CN
China
Prior art keywords
yolo
water meter
network
training
frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810845742.2A
Other languages
Chinese (zh)
Inventor
金连文
谢乐乐
刘禹良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN201810845742.2A priority Critical patent/CN109344850A/en
Publication of CN109344850A publication Critical patent/CN109344850A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

The present invention provides a kind of water meter automatic testing method based on YOLO frame, specifically comprise the following steps: (1) data acquisition: shooting meter reading photos more as far as possible with mobile phone, cover a variety of water meters (2) data processing: photo is cut, size is 480*200(3 after processing) label production: because detecting water meter using there is the method for supervision, so by manually demarcating meter reading frame (4) training network manually with software: ready training data and label are input in YOLO network training (5) test network: input test data are to having trained in network, finally obtain water meter testing result and probability.The present invention realizes the automatic detection of water meter using YOLO, can rapidly go out meter reading region detection, and detection time is 0.08 second, and Detection accuracy has high practicability and application value up to 99.5%.

Description

A kind of water meter automatic testing method based on YOLO
Technical field
The invention belongs to pattern-recognitions and field of artificial intelligence, in particular to a kind of relevant to deep neural network Automatic testing method.
Background technique
With the rapid development of computer technology, artificial intelligence technology is gradually changing our life, makes ours Life becomes more convenient and efficient.And the fast development of the hardware technologies such as GPU in the recent period, also answer the reality of deep neural network With being possibly realized.
In real life, we be unable to do without tap water, and either in rural area or city, tap water is all significantly general And.And tap water is in settlement process, require every month special personnel go to each household other, copy water intaking meter reading, this is One time-consuming and laborious work.Resident house is large number of, wide coverage or even remote, and artificial water-meter reading reading holds Error-prone, a variety of factors, which read water meter manually, becomes incomparable cumbersome, seeks and takes a kind of automatic and efficient water meter read method It is imperative.
The progress of deep neural network is exactly that we provide tools, and recently, researcher proposes a variety of utilizations The method that deep neural network is detected automatically, wherein YOLO (You Only Look Once) is one and is based on The object detection depth network of GoogleNet, is just being employed in many real-time detecting systems with its high frame rate and readjustment rate, We realize the automatic detection of meter reading also based on YOLO, lay the foundation to simplify tap water settlement process later.
Summary of the invention
The present invention provides a kind of water meter automatic testing method based on YOLO to realize the automatic detection of meter reading, The program has strong real-time, and the high feature of accuracy rate has very high use value.
The purpose of the present invention, which one of adopts the following technical scheme that, to be realized.
A kind of water meter automatic testing method based on YOLO comprising following steps:
(1) data acquisition: appropriate multiple water meters reading photo is shot, given water meter not of the same race is covered;
(2) data processing: cutting photo, is processed into and is sized;
(3) label makes: due to detecting water meter using there is the method for supervision, so by manually being marked manually with software Determine meter reading frame;
(4) ready training data and label training network: are input to training in YOLO network;
(5) test network: data to be tested are inputted to having trained in network, finally obtain water meter testing result and probability.
Preferably, the step (2) cuts picture, and making picture size is finally 480*200.Guaranteeing water meter reading Under the premise of number frame completely retains, the region of picture can be cut randomly.
Preferably, the step (3) the following steps are included:
(3-1) uses marking software, artificial to demarcate meter reading frame.
The coordinate of frame and wide height are stored in txt file by (3-2), while the reading of water meter is also recorded in file In.
Photo random division is training set (about 45000) and test set (about 5000) by (3-3).
Preferably, the frame coordinate is four apex coordinates of rectangle frame, by left upper apex coordinate record in first position Set, secondly according to clockwise by remaining coordinate record in the text, finally record meter reading, each coordinate value and reading value it Between separated with comma.
The setting of (4-2) training parameter: the number of iterations iters=80000, learning rate more new strategy: step updates step-length: 200,400,600,20000,30000, initial learning rate: 0.001, scales:2.5,2,2,0.1,0.1, batch=64, decay:0.0005;
(4-3) is divided equally into side in YOLO, by original image2A i.e. 7*7 rectangle, generates num in each rectangle A frame, for returning.Each rectangle generates 2 probability, the probability of corresponding text class and background class, each frame pair 4 coordinates and objective degrees of confidence should be exported, so final detection layers of output tensor size is size*size* (num* 5+2)。
(4-4) uses leaky activation functions;
(4-5) weight initialization: the weight of shared convolutional layer is carried out initial using Imagenet classification task training pattern Change, remaining new layer is initialized using zero-mean gaussian distribution.
(4-6) parameterizes the coordinate of frame.
(4-7) training convolutional neural networks: when training, setting frame loss is greater than the loss of confidence level.Utilize volume Product neural network extracts feature, and feature is inputted after full articulamentum and predicts to export.Each rectangle prediction in YOLO, in 7*7 Num output, finally we retain one according to maximum confidence level, then return to him.
Preferably, the step (5) comprises the steps of:
(5-1) in test set picture and label be input in trained network, detected.
After the completion of (5-2) detection, program calculates mean accuracy, readjustment rate.
(5-3) random display 20 opens the detection effect of photo, and the meter reading of every photo is outlined automatically,
And it has and judges probability.
Compared with traditional artificial read method, the present invention is had the following advantages and beneficial effects:
(1) due to the automatic study detection algorithm using depth network structure, so can be good at learning from data To effectively expressing, the accuracy rate of detection is improved.
(2) present invention using designing end to end, and compared with traditional artificial read, reading speed is fast, and accuracy rate is higher, together When intentional interference or deliberately error when avoiding manually reading.
(3) classification method Detection accuracy height of the present invention, strong robustness, high-efficient, speed is fast.
Detailed description of the invention
Fig. 1 is the flow chart of classification method of the present invention;
Fig. 2 is data acquisition and processing (DAP) flow chart of the invention;
Fig. 3 is depth convolutional neural networks structure chart of the invention;
Fig. 4 is water meter overhaul flow chart of the invention;
Fig. 5 is testing result example of the present invention.
Specific embodiment
Below with reference to embodiment and attached drawing, the present invention is described further, but embodiments of the present invention and protection are not It is limited to this, if it is noted that the following process or symbol for having not special detailed description, is that those skilled in the art can pass through The prior art understand or realize, especially with regard to some parameters and symbol in YOLO, details are not described herein.
The automatic detection scheme of water meter of this example based on YOLO, flow diagram are as shown in Fig. 1, including the following steps:
(1) data acquisition: 50000 multiple water meters reading photo is shot with mobile phone, covers a variety of water meters.
(2) data processing: cutting picture, and making picture size is finally 480*200.Guaranteeing that meter reading frame is complete Under the premise of whole reservation, the region of picture can be cut randomly.As shown in Figure 5.
(3) Label makes, including following three step:
(3-1) uses marking software, artificial to demarcate meter reading frame.
The coordinate of frame and wide height are stored in txt file by (3-2), while the reading of water meter is also recorded in file In.
Photo random division is training set (about 45000) and test set (about 5000) by (3-3).
The frame coordinate is four apex coordinates of rectangle frame, by left upper apex coordinate record in first position, secondly According to clockwise by remaining coordinate record in the text, meter reading is finally recorded, with funny between each coordinate value and reading value It number separates.
(4) training network comprising the steps of:
(4-1) constructs convolutional neural networks (wherein each layer of title is not listed one by one, can refer to the prior art):
Input (480x200) -> crop (200*200) -> conv1 (3*3, pad=1) -> activation (leaky) -> Pool1 (2*2, s=2)-> conv2 (3*3, pad=1) -> activation (leaky) -> pool2 (2*2, s=2) -> Conv3 (3*3, pad=1) -> activation (leaky) -> pool3 (2*2, s=2) -> conv4 (3*3, pad=1) -> Activation (leaky) -> pool4 (2*2, s=2) -> conv5 (3*3, pad=1) -> activation (leaky) -> Pool5 (2*2, s=2) -> conv6 (3*3, pad=1) -> activation (leaky) -> conv7 (3*3, pad=1) -> activation(leaky)->full_connect(128)->activation(linear)->full_connect(512)-> activation(le aky)->dropout(0.5)->full_connect(784)->activation(linear)-> Detection (cls=1, coords=4, rescore=1, side=7, num=2, softmax=0)
Network structure is as shown in figure 3, omit the network layers such as pooling.
The setting of (4-2) training parameter: the number of iterations iters=80000, learning rate more new strategy: step updates step-length: 200,400,600,20000,30000, initial learning rate: 0.001, scales:2.5,2,2,0.1,0.1, batch=64, decay:0.0005
The loss function that YOLO is used is (parameter definition can refer to existing definition):
(4-3) is divided equally into side in YOLO, by original image2A i.e. 7*7 rectangle, generates num in each rectangle A frame, for returning.Each rectangle generates 2 probability, the probability of corresponding text class and background class, each frame pair 4 coordinates and objective degrees of confidence should be exported, so final detection layers of output tensor size is size*size* (num* 5+2)。
(4-4) uses leaky activation functions:
(4-5) weight initialization: the weight of shared convolutional layer is carried out initial using Imagenet classification task training pattern Change, remaining new layer is initialized using zero-mean gaussian distribution.
(4-6) parameterizes the coordinate of frame:
tx=(x-xa)/wa ty=(y-ya)/ha
tw=log (w/wa) th=log (h/ha)
tx *=(x*-xa)/wa ty *=(y*-ya)/ha
tw *=log (w*/wa) th *=log (h*/ha)
Wherein, x, y, w, h represent the centre coordinate and width height of frame.x,xa, x* from prediction block, anchor frame and Ground truth frame, y, ya,y*、h,ha, h* is identical with this.
(4-7) training convolutional neural networks: when training, setting frame loss is greater than the loss, i.e. λ of confidence levelcoord =5, λnoobj=0.5.Feature is extracted using convolutional neural networks, feature is inputted after full articulamentum and predicts to export.In YOLO, Each rectangle in 7*7 predicts num output, finally retains one according to maximum confidence level, then returns to him.
(5) test network comprising the steps of:
(5-1) in test set picture and label be input in trained network, detected.
After the completion of (5-2) detection, program calculates mean accuracy, readjustment rate.
(5-3) random display 20 opens the detection effect of photo, and the meter reading of every photo is outlined automatically,
And it has and judges probability.
In example shown in Fig. 5, it is shown that will after the water meter picture detection of 480*200 as a result, in figure incited somebody to action Reading outlines automatically, while the upper left corner has decision probability 0.999.
Embodiment of the present invention are not limited by the above embodiments, other are any without departing from Spirit Essence of the invention With changes, modifications, substitutions, combinations, simplifications made under principle, equivalent substitute mode should be, be included in of the invention Within protection scope.

Claims (8)

1. a kind of water meter automatic testing method based on YOLO, which comprises the following steps:
(1) data acquisition: appropriate multiple water meters reading photo is shot, given water meter not of the same race is covered;
(2) data processing: cutting photo, is processed into and is sized;
(3) label makes: by manually demarcating meter reading frame manually with software;
(4) ready training data and label training network: are input to training in YOLO network;
(5) test network: data to be tested are inputted to having trained in network, finally obtain water meter testing result and probability.
2. the water meter automatic testing method according to claim 1 based on YOLO, which is characterized in that the step (1) makes Water meter disk is shot with mobile phone, keeps the holding as far as possible of meter reading frame horizontal;Captured water meter should cover a variety of known water meters.
3. the water meter automatic testing method according to claim 1 based on YOLO, which is characterized in that the step (1) is clapped The number for taking the photograph water meter reading photo is 50000.
4. the water meter automatic testing method according to claim 1 based on YOLO, which is characterized in that the step (2) is right The photo taken is cut, and the picture size after cutting is 480*200, and meter reading is completely retained.
5. the water meter automatic testing method according to claim 1 based on YOLO, which is characterized in that step (3) packet Include following steps:
(3-1) uses marking software, artificial to demarcate meter reading frame;
The coordinate of frame and wide height are stored in txt file by (3-2), while the reading of water meter also being recorded
In file;
Photo random division is training set (about 45000) and test set (about 5000) by (3-3).
6. the automatic detection scheme of the water meter according to claim 1 based on YOLO, which is characterized in that step (4) packet Include following steps:
(4-1) constructs YOLO convolutional neural networks;
(4-2) YOLO network training parameter setting;
(4-3) is divided equally into side in YOLO network, by original image2A i.e. 7*7 rectangle, generates num in each rectangle Frame, for returning;Each rectangle generates 2 probability, the probability of corresponding text class and background class, and each frame corresponds to 4 coordinates and objective degrees of confidence are exported, so final detection layers of output tensor size is size*size* (num*5+ 2);
The leaky activation functions that (4-4) YOLO is used;
(4-5) weight initialization: the weight of shared convolutional layer is initialized using Imagenet classification task training pattern, The layer of Yu Xin is initialized using zero-mean gaussian distribution;
(4-6) parameterizes the coordinate of frame;
(4-7) training convolutional neural networks: when training, setting frame loss is greater than the loss of confidence level;Utilize convolution mind Feature is extracted through network, feature is inputted after full articulamentum and predicts to export;Each rectangle prediction num in YOLO, in 7*7 Output finally retains one according to maximum confidence level, then returns to him.
7. the water meter automatic testing method according to claim 6 based on YOLO, which is characterized in that the step (4-2) The number of iterations iters=80000 is set, learning rate more new strategy: step, update step-length: 200,400,600,20000, 30000, initial learning rate: 0.001, scales:2.5,2,2,0.1,0.1, batch=64, decay:0.0005.
8. the water meter automatic testing method according to claim 1 based on YOLO, which is characterized in that step (5) packet Include following steps:
(5-1) in test set picture and label be input in trained network, detected;
After the completion of (5-2) detection, program calculates mean accuracy, readjustment rate;
(5-3) random display 20 opens the detection effect of photo, and the meter reading of every photo is outlined automatically, and general with judgement Rate.
CN201810845742.2A 2018-07-27 2018-07-27 A kind of water meter automatic testing method based on YOLO Pending CN109344850A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810845742.2A CN109344850A (en) 2018-07-27 2018-07-27 A kind of water meter automatic testing method based on YOLO

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810845742.2A CN109344850A (en) 2018-07-27 2018-07-27 A kind of water meter automatic testing method based on YOLO

Publications (1)

Publication Number Publication Date
CN109344850A true CN109344850A (en) 2019-02-15

Family

ID=65291240

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810845742.2A Pending CN109344850A (en) 2018-07-27 2018-07-27 A kind of water meter automatic testing method based on YOLO

Country Status (1)

Country Link
CN (1) CN109344850A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109977874A (en) * 2019-03-28 2019-07-05 北京易达图灵科技有限公司 A kind of meter register method and device
CN110188662A (en) * 2019-05-28 2019-08-30 唐山海森电子股份有限公司 A kind of AI intelligent identification Method of water meter number
CN111738229A (en) * 2020-08-05 2020-10-02 江西小马机器人有限公司 Automatic reading method for scale of pointer dial
CN112308054A (en) * 2020-12-29 2021-02-02 广东科凯达智能机器人有限公司 Automatic reading method of multifunctional digital meter based on target detection algorithm

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107392158A (en) * 2017-07-27 2017-11-24 济南浪潮高新科技投资发展有限公司 A kind of method and device of image recognition
CN107742093A (en) * 2017-09-01 2018-02-27 国网山东省电力公司电力科学研究院 A kind of infrared image power equipment component real-time detection method, server and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107392158A (en) * 2017-07-27 2017-11-24 济南浪潮高新科技投资发展有限公司 A kind of method and device of image recognition
CN107742093A (en) * 2017-09-01 2018-02-27 国网山东省电力公司电力科学研究院 A kind of infrared image power equipment component real-time detection method, server and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JOSEPH REDMON等: "You Only Look Once :Unified, Real-Time Object Detection", 《2016 IEEE CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION》 *
莫宇琨等: "深度卷积神经网络在水表字符图像识别上的应用", 《供水技术》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109977874A (en) * 2019-03-28 2019-07-05 北京易达图灵科技有限公司 A kind of meter register method and device
CN110188662A (en) * 2019-05-28 2019-08-30 唐山海森电子股份有限公司 A kind of AI intelligent identification Method of water meter number
CN111738229A (en) * 2020-08-05 2020-10-02 江西小马机器人有限公司 Automatic reading method for scale of pointer dial
CN111738229B (en) * 2020-08-05 2020-11-24 江西小马机器人有限公司 Automatic reading method for scale of pointer dial
CN112308054A (en) * 2020-12-29 2021-02-02 广东科凯达智能机器人有限公司 Automatic reading method of multifunctional digital meter based on target detection algorithm

Similar Documents

Publication Publication Date Title
CN109344850A (en) A kind of water meter automatic testing method based on YOLO
CN109029641A (en) A kind of water meter automatic testing method based on Faster-rcnn
CN106778502B (en) Crowd counting method based on deep residual error network
CN103268358B (en) Multi-source control point image database builds and update method
CN110991435A (en) Express waybill key information positioning method and device based on deep learning
CN109743683A (en) A method of mobile phone user position is determined using deep learning converged network model
CN104850836A (en) Automatic insect image identification method based on depth convolutional neural network
CN110264484A (en) A kind of improvement island water front segmenting system and dividing method towards remotely-sensed data
CN109242862A (en) A kind of real-time digital surface model generation method
CN110956412B (en) Flood dynamic assessment method, device, medium and equipment based on real-scene model
CN108921203A (en) A kind of detection and recognition methods of pointer-type water meter
CN108282743A (en) Indoor orientation method, apparatus and system
CN104050709B (en) A kind of three dimensional image processing method and electronic equipment
CN110276264A (en) A kind of crowd density estimation method based on foreground segmentation figure
CN109086649A (en) Satellite remote sensing images identifying water boy method
CN111784840B (en) LOD (line-of-sight) level three-dimensional data singulation method and system based on vector data automatic segmentation
CN108399430B (en) A kind of SAR image Ship Target Detection method based on super-pixel and random forest
Steinfeld et al. Semi‐automated GIS techniques for detecting floodplain earthworks
CN111079773A (en) Gravel parameter acquisition method, device, equipment and storage medium based on Mask R-CNN network
CN112949624A (en) Water level detection method and device based on water gauge, electronic equipment and storage medium
CN108520277A (en) Reinforced concrete structure seismic Damage automatic identification based on computer vision and intelligent locating method
CN110517575A (en) A kind of surface water body drafting method and device
CN109188410A (en) A kind of range calibration method, device and equipment under non line of sight scene
CN106845343A (en) A kind of remote sensing image offshore platform automatic testing method
CN116244805A (en) Automatic generation system and generation method for residential building planning design scheme

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190215