CN109740679B - Target identification method based on convolutional neural network and naive Bayes - Google Patents

Target identification method based on convolutional neural network and naive Bayes Download PDF

Info

Publication number
CN109740679B
CN109740679B CN201910013650.2A CN201910013650A CN109740679B CN 109740679 B CN109740679 B CN 109740679B CN 201910013650 A CN201910013650 A CN 201910013650A CN 109740679 B CN109740679 B CN 109740679B
Authority
CN
China
Prior art keywords
neural network
convolutional neural
naive bayes
layer
training
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.)
Expired - Fee Related
Application number
CN201910013650.2A
Other languages
Chinese (zh)
Other versions
CN109740679A (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201910013650.2A priority Critical patent/CN109740679B/en
Publication of CN109740679A publication Critical patent/CN109740679A/en
Application granted granted Critical
Publication of CN109740679B publication Critical patent/CN109740679B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a target recognition method based on a convolutional neural network and naive Bayes, belonging to the field of image processing and pattern recognition and characterized by comprising the following steps: (1) determining coordinates (x ', y ') of translated and normalized picture pixel points in a training set sample A to obtain a new training set A '; (2) training the convolutional neural network and updating the connection weight omegai(ii) a (3) Extracting a feature vector X; (4) taking the feature vector X as the input of a naive Bayes model, and establishing the naive Bayes model for training; (5) the test set samples are used as input and sent to the combined network for classification to obtain classification results. The target identification method based on the convolutional neural network and the naive Bayes replaces a Softmax classifier in the traditional convolutional neural network with the naive Bayes to realize classification prediction, and fully utilizes the characteristic information of the characteristic vector output by the full-connection layer of the convolutional neural network. Through a plurality of groups of data experiments, the method is accurate and reliable in calculation and relatively stable in data result, and a stable identification method on the basis of ensuring accurate classification is provided for image target identification.

Description

Target identification method based on convolutional neural network and naive Bayes
Technical Field
The invention relates to the field of picture processing and pattern recognition, in particular to a method for recognizing a picture target.
Background
At present, most of technologies cannot achieve high accuracy, are unstable and have poor robustness aiming at the problem of image target identification. Some techniques, while capable of achieving high accuracy, require some complex pre-processing steps. Taking handwritten digit recognition as an example, handwritten digit pictures are often subjected to operations such as expanding a training set by distortion deformation and preprocessing images by simulating various dithering operations, so that high accuracy can be achieved, but the practicability is reduced to a certain extent, and the stability requirement cannot be met. In the classical pattern recognition, features are generally extracted in advance, after a plurality of features are extracted, correlation analysis is carried out on the features to find out the feature which can represent the characters most, and the feature which is irrelevant to classification is removed. However, the extraction of these features is too dependent on human experience and subjective awareness, the different classification performance of the extracted features is greatly affected, and even the order of the extracted features may affect the final classification performance. Meanwhile, the quality of image preprocessing also affects the extracted features.
At present, the digital identification technology in the picture target is often associated with economy and business, and the technology put into use must ensure higher accuracy, because if the identification is wrong, even a very small error can cause a series of business disputes, even bring about huge loss, and cause irrecoverable results. Therefore, in the process of research and development, in order to avoid a series of problems, an accurate and reliable handwritten digit recognition model must be established, so that when the model recognizes handwritten digits, the model simultaneously meets higher accuracy and stronger robustness, meets the requirements of the fields of economy, commerce and the like on handwritten digit recognition, thereby saving time and money, improving efficiency and saving cost.
Disclosure of Invention
In view of the problems in the prior art, the technical problem to be solved by the present invention is to provide an accurate and stable image target identification method, and the specific flow of the method is shown in fig. 1.
The technical scheme comprises the following implementation steps:
(1) determining coordinates (x ', y ') of the translated and normalized picture pixel points in the training set sample A to obtain a new training set A ':
according to the original coordinates (x) of the picture pixel points in the sample set0,y0) Maximum x of horizontal coordinate of pixel point after translation operationmaxMinimum value xminMaximum value y of ordinatemaxMinimum value yminAnd dx and dy respectively represent the moving size of the pixel point on the x axis and the y axis, and the coordinate of the pixel point of the training sample set is determined as follows:
Figure GDA0002524173720000021
Figure GDA0002524173720000022
Figure GDA0002524173720000023
(2) training the convolutional neural network and updating the connection weight omegai
Constructing a convolutional neural network, setting convolutional layers of the convolutional neural networkM, number of pooling layers n, convolutional layer convolution kernel size(s)1,s2,...,sm) Size of the pooling layer (t)1,t2,...,tn) Convolution layer step length r1Step length r of the pooling layer2The number N of neurons in the full connection layer, an activation function f and iteration times l. Method for applying back propagation algorithm and BP algorithm to connection weight omega in convolutional neural networkiUpdating:
Figure GDA0002524173720000024
Figure GDA0002524173720000025
Figure GDA0002524173720000026
wherein the content of the first and second substances,
Figure GDA0002524173720000027
is the actual output value, yiEta is the step length per update, omega'iJ is the cost function of the neural network for the updated connection weight.
(3) Extracting a feature vector X:
and reserving the alternately connected parts of the convolutional layer and the pooling layer in front of the fully-connected layer of the convolutional neural network, removing the Softmax layer behind the fully-connected layer, and recording the fully-connected layer of the convolutional neural network as C. And after the training of the convolutional neural network model is finished, the output of the full connection layer C is the extracted feature vector X.
(4) And taking the feature vector X obtained in the last step as the input of a naive Bayes model, establishing the naive Bayes model for training, and realizing the classification of different training samples. Naive bayes rule is as follows:
Figure GDA0002524173720000028
wherein C isiIs class, P (C)i|xi) Is shown as having xiIs characterized by being divided into CiThe probability of (c).
(5) And (4) taking the test set sample as input, sending the test set sample to a combined network for classification to obtain a classification result, and completing the image target identification based on the convolutional neural network and naive Bayes.
Compared with the prior art, the invention has the advantages that:
(1) the invention adopts a mode of combining the convolutional neural network and the naive Bayes, replaces a Softmax classifier in the traditional convolutional neural network with the naive Bayes to realize classification prediction, fully utilizes the characteristic information of the characteristic vector output by the full connection layer of the convolutional neural network, and improves the accuracy.
(2) The invention does not need to carry out complex preprocessing operation on the image, only needs to carry out normalization operation on the image when carrying out feature extraction by using the convolutional neural network, and simplifies the fussy preprocessing flow.
(3) The invention performs experiments on a plurality of groups of data, and compared with the prior art, the experimental results have obvious advantages and the data results are relatively stable. The method improves the stability of the model on the basis of ensuring the accurate classification and can better complete the task of image target identification.
Drawings
For a better understanding of the present invention, reference is made to the following further description taken in conjunction with the accompanying drawings.
FIG. 1 is a flowchart of the steps for building a convolutional neural network and naive Bayes based target recognition model;
FIG. 2 is a flow chart of an algorithm for building a target recognition model based on a convolutional neural network and naive Bayes;
FIG. 3 is a sample of a MNIST dataset of handwritten digital pictures;
FIG. 4 is a simplified neural network architecture diagram;
FIG. 5 is a block diagram of a convolutional neural network;
FIG. 6 is a schematic diagram of a combined network architecture according to the present invention;
FIG. 7 is a comparison of experimental results for various models;
FIG. 8 is a comparison of results of multiple sets of simulation experiments;
detailed description of the preferred embodiments
The present invention will be described in further detail below with reference to examples.
Taking handwritten digit recognition as an example, the dataset chosen is the MNIST public dataset, the samples in the MNIST dataset being shown in FIG. 3, which is a database of handwritten digits established by Corinna cortex of the Google laboratory and by YannleCun, the Koron research institute of New York university. The handwritten digital picture shown in fig. 2 is taken as an original handwritten digital picture data set, a part of the handwritten digital picture data set is marked as a training set, a part of the handwritten digital picture data set is marked as a testing set, and 60000 training sample sets and 10000 testing sample sets are provided. The picture sizes were all 28X 28.
The whole flow of the handwritten number recognition method provided by the invention is shown in figure 1, and the specific steps are as follows:
(1) determining coordinates (x ', y ') of the translated and normalized picture pixel points in the training set sample A to obtain a new training set A ':
according to the original coordinates (x) of the picture pixel points in the sample set0,y0) Maximum value x of pixel point after translation operationmaxMinimum value xminDetermining the coordinates of the pixel points of the training sample set:
Figure GDA0002524173720000041
Figure GDA0002524173720000042
Figure GDA0002524173720000043
(2) training the convolutional neural network and updating the connection weight omegai
Constructing a convolutional neural network, setting the number m of convolutional layers of the convolutional neural network as 2, the number n of pooling layers as 2,The number of convolutional layer convolutional cores is 32 and 64, the number of pooling layer cores is 32 and 32, and the convolutional layer step length r1Is 1, step length r of the pooling layer 22, the number N of neurons in the full connecting layer is 200, the activation function f (x) adopts a ReLu function, and the iteration number l is 30. Method for applying back propagation algorithm and BP algorithm to connection weight omega in convolutional neural networkiUpdating:
f(x)=max(0,x)
Figure GDA0002524173720000044
Figure GDA0002524173720000045
Figure GDA0002524173720000046
wherein the content of the first and second substances,
Figure GDA0002524173720000047
is the actual output value, yiFor an ideal output value, η is the step size of each update.
(3) Extracting a feature vector X:
and reserving the alternately connected parts of the convolutional layer and the pooling layer in front of the fully-connected layer of the convolutional neural network, removing the Softmax layer behind the fully-connected layer, and recording the fully-connected layer of the convolutional neural network as C. And after the model training is finished, the output of the full connection layer C is the extracted feature vector X.
(4) And taking the feature vector X obtained in the last step as the input of a naive Bayes model, establishing the naive Bayes model for training, and realizing the classification of different training samples. Naive bayes rule is as follows:
Figure GDA0002524173720000048
wherein C isiAre of the classes 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, P (C)i|xi) Is shown as having xiProbability under the feature of being classified into these 10 categories.
(5) And (4) taking the test set sample as input, sending the test set sample to a combined network for classification to obtain a classification result, and completing handwritten digit recognition based on the convolutional neural network and naive Bayes.
In order to verify the accuracy of the invention in identifying the picture target, a plurality of groups of handwritten number identification simulation experiments are carried out on the invention, and the results are compared with some model algorithms for identifying handwritten numbers, wherein the simulation results are shown in tables 1 and 2. The simulation result shows that the handwritten number recognition method established by the invention can achieve higher accuracy rate without complex preprocessing, and has better stability under the condition of ensuring that the accuracy rate is not reduced.
TABLE 1 comparison of experimental results for various models
Experimental methods Identification accuracy (%)
Handwritten digit recognition based on convolutional neural network 99.20
Maxout network 99.55
Handwritten digit recognition based on convolutional neural network and support vector machine 99.60
The invention 99.80
As can be seen from the simulation result table 1, in the case of using the same data set, the recognition accuracy can reach 99.8% after the simple picture pixel normalization preprocessing. Compared with the other three methods, the method has higher accuracy. The target identification method established by the invention is accurate, provides an effective method for establishing an accurate image target identification model, and is more suitable for practical use.
TABLE 2 comparison of multiple sets of simulation experiments
Serial number Identification accuracy (%)
1 99.70
2 99.77
3 99.75
4 99.82
5 99.85
As can be seen from the simulation result table 2, after a plurality of groups of experiments are carried out by using the same data set, the recognition accuracy is 99.7-99.9%, and the fluctuation range is only 0.2%, which shows that the target recognition method established by the invention has higher stability on the basis of keeping higher accuracy, and can meet the handwritten number recognition in most scenes. The method adopted by the invention is accurate and reliable, and a reliable method is provided for establishing an accurate image target identification model.

Claims (1)

1. A target identification method based on a convolutional neural network and naive Bayes comprises the following specific identification steps:
(1) determining coordinates (x ', y ') of translated and normalized picture pixel points in a training set sample A to obtain a new training set A ';
according to the original coordinates (x) of the picture pixel points in the sample set0,y0) Maximum x of horizontal coordinate of pixel point after translation operationmaxMinimum value xminMaximum value y of ordinatemaxMinimum value yminThe dx and dy respectively represent the moving size of the pixel points on the x axis and the y axis, and the coordinates of the pixel points of the training sample set are determined;
Figure FDA0002524173710000011
Figure FDA0002524173710000012
Figure FDA0002524173710000013
(2) training the convolutional neural network and updating the connection weight omegai
Constructing a convolutional neural network, setting the number m of convolutional layers, the number n of pooling layers and the size(s) of convolutional layer convolutional core of the convolutional neural network1,s2,...,sm) Size of the pooling layer (t)1,t2,...,tn) Convolution layer step length r1Step length r of the pooling layer2The number N of neurons in the full connection layer, the activation function f and the iteration number l, and a connection weight omega in the convolutional neural network by adopting a back propagation algorithm and a BP algorithmiUpdating is carried out;
Figure FDA0002524173710000014
Figure FDA0002524173710000015
Figure FDA0002524173710000016
wherein the content of the first and second substances,
Figure FDA0002524173710000017
is the actual output value, yiFor ideal output value, η is the step length of each update, ωi' is the updated connection weight, J is the cost function of the neural network;
(3) extracting a feature vector X;
reserving the alternately connected parts of the convolutional layer and the pooling layer in front of the fully-connected layer of the convolutional neural network, removing a Softmax layer behind the fully-connected layer, recording the fully-connected layer of the convolutional neural network as C, and outputting the fully-connected layer C as the extracted feature vector X after the training of the convolutional neural network model is finished;
(4) taking the feature vector X obtained in the last step as the input of a naive Bayes model, establishing the naive Bayes model for training, and realizing the classification of different training samples, wherein the naive Bayes rule is as follows;
Figure FDA0002524173710000021
wherein C isiIs class, P (C)i|xi) Is shown as having xiIs characterized by being divided into CiThe probability of (d);
(5) and (4) taking the test set sample as input, sending the test set sample to a combined network for classification to obtain a classification result, and completing the image target identification based on the convolutional neural network and naive Bayes.
CN201910013650.2A 2019-01-13 2019-01-13 Target identification method based on convolutional neural network and naive Bayes Expired - Fee Related CN109740679B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910013650.2A CN109740679B (en) 2019-01-13 2019-01-13 Target identification method based on convolutional neural network and naive Bayes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910013650.2A CN109740679B (en) 2019-01-13 2019-01-13 Target identification method based on convolutional neural network and naive Bayes

Publications (2)

Publication Number Publication Date
CN109740679A CN109740679A (en) 2019-05-10
CN109740679B true CN109740679B (en) 2020-10-30

Family

ID=66363723

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910013650.2A Expired - Fee Related CN109740679B (en) 2019-01-13 2019-01-13 Target identification method based on convolutional neural network and naive Bayes

Country Status (1)

Country Link
CN (1) CN109740679B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110210682A (en) * 2019-06-12 2019-09-06 云南电网有限责任公司大理供电局 Distribution transforming heavy-overload method for early warning based on load data image conversion convolutional neural networks
CN110533629A (en) * 2019-07-10 2019-12-03 湖南交工智能技术有限公司 A kind of detection method and detection device of Bridge Crack
CN110515836B (en) * 2019-07-31 2023-08-11 杭州电子科技大学 Weighted naive Bayes method for software defect prediction
CN111343848B (en) * 2019-12-01 2022-02-01 深圳市智微智能软件开发有限公司 SMT position detection method and system
CN111524092B (en) * 2020-03-16 2024-03-12 中国农业科学院茶叶研究所 Nondestructive testing method for black tea withering degree index
CN113705594A (en) * 2020-05-21 2021-11-26 北京沃东天骏信息技术有限公司 Method and device for identifying image
CN112836571A (en) * 2020-12-18 2021-05-25 华中科技大学 Ship target detection and identification method, system and terminal in remote sensing SAR image
CN112949446B (en) * 2021-02-25 2023-04-18 山东英信计算机技术有限公司 Object identification method, device, equipment and medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105046268B (en) * 2015-06-18 2018-05-04 西安电子科技大学 Classification of Polarimetric SAR Image method based on Wishart depth networks
CN106407883B (en) * 2016-08-10 2019-12-27 北京工业大学 Complex form and identification method for handwritten numbers in complex form
CN108960001B (en) * 2017-05-17 2021-12-24 富士通株式会社 Method and device for training image processing device for face recognition
CN109670528B (en) * 2018-11-14 2023-04-18 中国矿业大学 Data expansion method facing pedestrian re-identification task and based on paired sample random occlusion strategy
CN109741288B (en) * 2019-01-04 2021-07-13 Oppo广东移动通信有限公司 Image processing method, image processing device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN109740679A (en) 2019-05-10

Similar Documents

Publication Publication Date Title
CN109740679B (en) Target identification method based on convolutional neural network and naive Bayes
CN111489358A (en) Three-dimensional point cloud semantic segmentation method based on deep learning
CN110717526A (en) Unsupervised transfer learning method based on graph convolution network
CN113486981B (en) RGB image classification method based on multi-scale feature attention fusion network
CN110619059B (en) Building marking method based on transfer learning
CN113222011B (en) Small sample remote sensing image classification method based on prototype correction
CN112070768B (en) Anchor-Free based real-time instance segmentation method
CN109033978B (en) Error correction strategy-based CNN-SVM hybrid model gesture recognition method
CN112784929B (en) Small sample image classification method and device based on double-element group expansion
CN110751027B (en) Pedestrian re-identification method based on deep multi-instance learning
WO2022062419A1 (en) Target re-identification method and system based on non-supervised pyramid similarity learning
CN115035418A (en) Remote sensing image semantic segmentation method and system based on improved deep LabV3+ network
CN113673482A (en) Cell antinuclear antibody fluorescence recognition method and system based on dynamic label distribution
CN114219824A (en) Visible light-infrared target tracking method and system based on deep network
CN112784921A (en) Task attention guided small sample image complementary learning classification algorithm
CN110598746A (en) Adaptive scene classification method based on ODE solver
CN112364747A (en) Target detection method under limited sample
CN112084895A (en) Pedestrian re-identification method based on deep learning
CN115272692A (en) Small sample image classification method and system based on feature pyramid and feature fusion
CN112967210B (en) Unmanned aerial vehicle image denoising method based on full convolution twin network
CN113033345B (en) V2V video face recognition method based on public feature subspace
WO2024060839A1 (en) Object operation method and apparatus, computer device, and computer storage medium
Sun et al. Deep learning based pedestrian detection
CN116883746A (en) Graph node classification method based on partition pooling hypergraph neural network
CN116433980A (en) Image classification method, device, equipment and medium of impulse neural network structure

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20201030

Termination date: 20220113

CF01 Termination of patent right due to non-payment of annual fee