CN109614967B - License plate detection method based on negative sample data value resampling - Google Patents

License plate detection method based on negative sample data value resampling Download PDF

Info

Publication number
CN109614967B
CN109614967B CN201811176334.9A CN201811176334A CN109614967B CN 109614967 B CN109614967 B CN 109614967B CN 201811176334 A CN201811176334 A CN 201811176334A CN 109614967 B CN109614967 B CN 109614967B
Authority
CN
China
Prior art keywords
negative
samples
license plate
positive
classifier
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.)
Active
Application number
CN201811176334.9A
Other languages
Chinese (zh)
Other versions
CN109614967A (en
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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN201811176334.9A priority Critical patent/CN109614967B/en
Publication of CN109614967A publication Critical patent/CN109614967A/en
Application granted granted Critical
Publication of CN109614967B publication Critical patent/CN109614967B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/63Scene text, e.g. street names
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • G06V20/625License plates

Abstract

A license plate detection method based on negative sample data value resampling comprises the following steps: 1) collecting a license plate image, cutting out a license plate area as a positive sample, cutting out an image block at random in a non-license plate area as a negative sample, and dividing a training set, a verification set and a test set; 2) randomly selecting samples with the same number as that of the positive samples from the negative samples of the training set to train an initial classifier, predicting all the negative samples in the training set, grouping according to the probability value predicted as the negative samples, and ensuring that the sample amount of each group except the last group is the same as that of the positive samples; 3) retraining the classifier for each group of negative sample data and positive sample data, and calculating information gain on the verification set to measure the data value of each group of negative samples; 4) and calculating the weight according to the data value of each group of negative samples, re-randomly sampling from each group to form a new negative sample training set, training the final classifier together with the positive samples, and evaluating the effect of the classifier by using the test set.

Description

License plate detection method based on negative sample data value resampling
Technical Field
The invention belongs to the field of computer vision, and provides a license plate detection method based on negative sample data value resampling aiming at the problem of unbalance of positive and negative samples in a license plate detection scene.
Background
In a license plate detection scene, only 1-2 license plates usually appear in a picture containing the license plates, and only a small number of image blocks containing a license plate area can be cut out to serve as positive samples. Compared with the positive samples, the negative samples are easier to collect, and a large number of negative samples can be generated only by randomly cutting the image blocks in the residual area except the license plate. Therefore, when training classifiers for license plates and non-license plates, there is a severe imbalance of positive and negative samples, which makes the trained classifier preferable for predicting as a negative sample.
The existing methods for solving the imbalance between the positive sample and the negative sample are mainly three types: (1) data resampling; (2) learning with sensitive cost; (3) and (3) fusing the two modes. Data resampling mainly comprises oversampling and downsampling: over-sampling randomly selects a part of samples with small data quantity to be expanded in a copying mode; and the down-sampling randomly selects a part of subsets from samples with large data quantity for training. Both of these ways are from the data distribution point of view, so that the trained classifier has no obvious preference for the class with large sample size and the class with small sample size. The cost sensitive learning does not process the data distribution, but directly increases the punishment when the classifier predicts the error of the category with small sample size, thereby lightening the preference of the classifier.
Disclosure of Invention
Aiming at the current situation that positive and negative samples are not distributed uniformly in a license plate detection algorithm, the invention provides a license plate detection method based on negative sample data value resampling, and samples with optimal value for training a classifier are sampled from negative samples.
In order to achieve the purpose, the license plate detection method based on negative sample data value resampling comprises the following steps:
1) collecting positive and negative samples required by license plate detection, cutting out a license plate region in a picture containing a license plate as a positive sample, randomly cutting out a non-license plate region to obtain a negative sample, and further dividing data into a training set, a verification set and a test set;
2) and randomly selecting samples with the same quantity as the positive samples from the negative samples of the training set, and training the initial classifier by using the selected negative samples and the selected positive samples. Inputting the negative samples in the whole training set into an initial classifier, and grouping according to the probability of predicting the negative samples, wherein the quantity of the negative samples in the rest groups except the last group is consistent with that of the positive samples;
3) for each group of negative samples, training classifiers with the positive samples respectively, and measuring the data value of the group of negative samples by using the information gain of each classifier on a verification set;
4) and calculating the weight according to the data value of each group, resampling the negative samples in the whole training set according to the weight, training a final classifier by using the resampled negative samples and the resampled positive samples, and evaluating by using the test set.
Further, the positive samples in the step 1) refer to image blocks in the license plate area in the original image, and the negative samples only contain the image blocks cut out from other areas without the license plate. The amount of data for negative samples is typically multiple of that for positive samples, since negative samples are more readily available.
Further, the classifier in step 2) aims to classify the positive and negative samples, that is, to predict whether a license plate exists in an image block.
Further, the classifier in the step 2) uses an AlexNet network structure with an Re L U activation function.
Further, the value of the negative sample data in the step 3) refers to the beneficial degree of the training of the classifier by using the negative sample to participate in the classification performance.
Further, the probability of predicting as a negative sample in step 2) is only the value belonging to the negative sample in the two last-output probabilities of the classifier, and is between 0 and 1.
Further, the information gain of the single classifier in step 3) on the verification set is calculated by the following formula:
Figure GDA0002496445010000021
wherein I represents the ith group of negative samples, IgRepresenting the information gain, DvRepresenting a validation set, PvAnd NvRespectively representing positive and negative sample sets in the validation set, fiRepresenting the classifier trained with the set of negative examples, ∈ is a relaxation variable.
Data value of the ith group of negative examples
Figure GDA0002496445010000022
Further, the weight of the weight sampling of each group in the step 4) is
Figure GDA0002496445010000023
Where T is a resampling hyperparameter, the larger the value of which tends to select the more different negative examples.
The invention has the following beneficial effects:
the invention relates to a license plate detection method based on negative sample data value resampling. From the perspective of the training value of the samples, the method obtains a sample set beneficial to training from the group resampling in the negative samples with larger quantity.
Compared with the traditional method, the method can relieve the phenomenon of unbalance of the positive and negative samples in the training process of the license plate detection algorithm, and further improve the robustness of the algorithm.
Drawings
FIG. 1 is a schematic flow diagram of resampling based on negative sample data value for the method of the present invention.
Detailed Description
The technical solution of the present invention is clearly and completely explained and described below.
The invention provides a license plate detection method based on negative sample data value resampling, which can obtain a sample set beneficial to training by group resampling from a large number of negative samples. The method comprises the following steps:
step 1, collecting positive and negative samples required by license plate detection, wherein the number of the positive samples on a training set, a verification set and a test set is 3000, 1000 and 1000 respectively, the number of the negative samples is 30000, 1000 and 1000 correspondingly, and all sample image blocks are scaled to 224 × 224.
And 2, training an initial classifier. And randomly selecting 1000 negative samples, training the AlexNet structure classifier together with the positive samples, outputting a Softmax unit using 2 nodes, setting the model learning rate to be 0.001, carrying out batch processing to be 64, and terminating the training process after 10 iterations.
And 3, grouping the negative samples and evaluating the value, inputting all 30000 negative samples into an initial classifier, dividing the probability range predicted as the negative samples into 10 groups according to the model, wherein each group comprises 1000 negative samples, training the classifier in the positive sample combination respectively, calculating the resampling weight of each group, wherein ∈ is 0.001, T is 1, and all parameters of the classifier are the same as those in the step 2.
And 4, training a final classifier. From each group of negative samples, a new set of negative samples with a number of 1000 was resampled by weight and the final classifier was trained with the positive samples. The training process is terminated after 100 iterations, and the remaining parameters are the same as in step 2.
The embodiments described in this specification are merely illustrative of implementations of the inventive concept and the scope of the present invention should not be considered limited to the specific forms set forth in the embodiments but rather by the equivalents thereof as may occur to those skilled in the art upon consideration of the present inventive concept.

Claims (8)

1. A license plate detection method based on negative sample data value resampling comprises the following steps:
1) collecting positive and negative samples required by license plate detection, cutting out a license plate region in a picture containing a license plate as a positive sample, randomly cutting out a non-license plate region to obtain a negative sample, and further dividing data into a training set, a verification set and a test set;
2) randomly selecting samples with the same number as the positive samples from the negative samples of the training set, training an initial classifier by using the selected negative samples and the positive samples, inputting the negative samples in the whole training set into the initial classifier, and grouping according to the probability of predicting the negative samples, wherein the number of the negative samples in the other groups is the same as that of the positive samples except the last group;
3) for each group of negative samples, training classifiers with the positive samples respectively, and measuring the data value of the group of negative samples by using the information gain of each classifier on a verification set;
4) and calculating the weight according to the data value of each group, resampling the negative samples in the whole training set according to the weight, training a final classifier by using the resampled negative samples and the resampled positive samples, and evaluating by using the test set.
2. The vehicle license plate detection method based on negative sample data value resampling of claim 1, characterized in that: the positive sample in the step 1) refers to an image block of a license plate area in an original image, and the negative sample only does not contain the image block cut out from other areas of the license plate; the amount of data for negative samples is typically multiple of that for positive samples, since negative samples are more readily available.
3. The vehicle license plate detection method based on negative sample data value resampling of claim 1, characterized in that: the classifier in the step 2) aims at classifying the positive and negative samples, namely predicting whether a license plate exists in an image block.
4. The method for detecting the license plate based on the resampling of the negative sample data value as claimed in claim 1, wherein the classifier in the step 2) uses an AlexNet network structure with an Re L U activation function.
5. The vehicle license plate detection method based on negative sample data value resampling of claim 1, characterized in that: the value of the negative sample data in the step 3) refers to the beneficial degree of the training of the classifier by using the negative sample to participate in the classification performance.
6. The vehicle license plate detection method based on negative sample data value resampling of claim 1, characterized in that: the probability of predicting as a negative sample in the step 2) is only the value belonging to the negative sample in the two last output probabilities of the classifier, and the value is between 0 and 1.
7. The vehicle license plate detection method based on negative sample data value resampling of claim 1, characterized in that: the information gain of each classifier on the verification set in the step 3) is calculated by the following formula:
Figure FDA0002496443000000021
wherein I represents the ith group of negative samples, IgRepresenting the information gain, DvRepresenting a validation set, PvAnd NvRespectively representing positive and negative in the verification setSet of samples, fiRepresenting the classifier trained using the set of negative examples, ∈ is the relaxation variable, the data value of the ith set of negative examples
Figure FDA0002496443000000022
8. The vehicle license plate detection method based on negative sample data value resampling of claim 1, characterized in that: the weight of the resampling of each group in the step 4) is
Figure FDA0002496443000000023
Where T is a resampling hyperparameter, the larger the value of which tends to select the more different negative examples.
CN201811176334.9A 2018-10-10 2018-10-10 License plate detection method based on negative sample data value resampling Active CN109614967B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811176334.9A CN109614967B (en) 2018-10-10 2018-10-10 License plate detection method based on negative sample data value resampling

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811176334.9A CN109614967B (en) 2018-10-10 2018-10-10 License plate detection method based on negative sample data value resampling

Publications (2)

Publication Number Publication Date
CN109614967A CN109614967A (en) 2019-04-12
CN109614967B true CN109614967B (en) 2020-07-17

Family

ID=66002279

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811176334.9A Active CN109614967B (en) 2018-10-10 2018-10-10 License plate detection method based on negative sample data value resampling

Country Status (1)

Country Link
CN (1) CN109614967B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111310660A (en) * 2020-02-14 2020-06-19 开易(北京)科技有限公司 Target detection false alarm suppression method and device for ADAS scene
CN113780485B (en) * 2021-11-12 2022-03-25 浙江大华技术股份有限公司 Image acquisition, target recognition and model training method and equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102136075A (en) * 2011-03-04 2011-07-27 杭州海康威视软件有限公司 Multiple-viewing-angle human face detecting method and device thereof under complex scene
CN104573708A (en) * 2014-12-19 2015-04-29 天津大学 Ensemble-of-under-sampled extreme learning machine
CN105975992A (en) * 2016-05-18 2016-09-28 天津大学 Unbalanced data classification method based on adaptive upsampling
CN105975611A (en) * 2016-05-18 2016-09-28 天津大学 Self-adaptive combined downsampling reinforcing learning machine
CN107545275A (en) * 2017-07-27 2018-01-05 华南理工大学 The unbalanced data Ensemble classifier method that resampling is merged with cost sensitive learning
CN108091397A (en) * 2018-01-24 2018-05-29 浙江大学 A kind of bleeding episode Forecasting Methodology for the Ischemic Heart Disease analyzed based on promotion-resampling and feature association

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8447100B2 (en) * 2007-10-10 2013-05-21 Samsung Electronics Co., Ltd. Detecting apparatus of human component and method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102136075A (en) * 2011-03-04 2011-07-27 杭州海康威视软件有限公司 Multiple-viewing-angle human face detecting method and device thereof under complex scene
CN104573708A (en) * 2014-12-19 2015-04-29 天津大学 Ensemble-of-under-sampled extreme learning machine
CN105975992A (en) * 2016-05-18 2016-09-28 天津大学 Unbalanced data classification method based on adaptive upsampling
CN105975611A (en) * 2016-05-18 2016-09-28 天津大学 Self-adaptive combined downsampling reinforcing learning machine
CN107545275A (en) * 2017-07-27 2018-01-05 华南理工大学 The unbalanced data Ensemble classifier method that resampling is merged with cost sensitive learning
CN108091397A (en) * 2018-01-24 2018-05-29 浙江大学 A kind of bleeding episode Forecasting Methodology for the Ischemic Heart Disease analyzed based on promotion-resampling and feature association

Also Published As

Publication number Publication date
CN109614967A (en) 2019-04-12

Similar Documents

Publication Publication Date Title
CN108986869B (en) Disk fault detection method using multi-model prediction
CN111181939B (en) Network intrusion detection method and device based on ensemble learning
WO2021232229A1 (en) Virtual scene generation method and apparatus, computer device and storage medium
CN109067773B (en) Vehicle-mounted CAN network intrusion detection method and system based on neural network
CN106991047B (en) Method and system for predicting object-oriented software defects
CN111314331A (en) Unknown network attack detection method based on conditional variation self-encoder
CN110111113B (en) Abnormal transaction node detection method and device
CN111476435B (en) Charging pile load prediction method based on density peak value
KR20180055192A (en) Method and apparatus for estimating state of battery
CN109614967B (en) License plate detection method based on negative sample data value resampling
WO2023024851A1 (en) Battery equalization method and system
EP1958034B1 (en) Use of sequential clustering for instance selection in machine condition monitoring
CN109714311B (en) Abnormal behavior detection method based on clustering algorithm
CN102136087B (en) Multi-neural network-based traffic matrix estimation method
CN111159243A (en) User type identification method, device, equipment and storage medium
CN110825545A (en) Cloud service platform anomaly detection method and system
CN111652448A (en) Method, device and system for predicting defect rate of power transmission line
JP2007243459A (en) Traffic state extracting apparatus and method, and computer program
CN113343123B (en) Training method and detection method for generating confrontation multiple relation graph network
CN113065395A (en) Radar target new class detection method based on generation countermeasure network
CN111292182A (en) Credit fraud detection method and system
CN114244549B (en) GSSK-means abnormal flow detection method, memory and processor for industrial Internet
CN116008815A (en) Method, device, equipment, storage medium and vehicle for detecting short circuit in battery cell
CN111556017B (en) Network intrusion detection method based on self-coding machine and electronic device
CN115422831A (en) Power grid stability discrimination method and system considering cost sensitivity

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
GR01 Patent grant
GR01 Patent grant