CN113269276A - Image recognition method, device, equipment and storage medium - Google Patents

Image recognition method, device, equipment and storage medium Download PDF

Info

Publication number
CN113269276A
CN113269276A CN202110723034.3A CN202110723034A CN113269276A CN 113269276 A CN113269276 A CN 113269276A CN 202110723034 A CN202110723034 A CN 202110723034A CN 113269276 A CN113269276 A CN 113269276A
Authority
CN
China
Prior art keywords
image
neural network
convolutional neural
network model
images
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.)
Granted
Application number
CN202110723034.3A
Other languages
Chinese (zh)
Other versions
CN113269276B (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.)
Shaanxi Qianyi Intelligent Technology Co ltd
Original Assignee
Shenzhen Inveno Technology Co ltd
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 Shenzhen Inveno Technology Co ltd filed Critical Shenzhen Inveno Technology Co ltd
Priority to CN202110723034.3A priority Critical patent/CN113269276B/en
Publication of CN113269276A publication Critical patent/CN113269276A/en
Application granted granted Critical
Publication of CN113269276B publication Critical patent/CN113269276B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • 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)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (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)
  • Computational Linguistics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses an image recognition method, an image recognition device, image recognition equipment and a storage medium, wherein the image recognition device comprises the following steps: acquiring images to be identified, and carrying out normalization processing on the images to obtain a normalized image set; determining normalized matrix data from the normalized image set; determining the class label of each image according to the normalized matrix data and a pre-trained convolutional neural network model; the image identification of the image to be identified is completed by carrying out normalization processing on the image in the image to be identified, determining normalized matrix data according to the image after the normalization processing, determining an image label according to the normalized matrix data and a pre-trained convolutional neural network, and marking each image according to the image label.

Description

Image recognition method, device, equipment and storage medium
Technical Field
The present invention relates to the field of image recognition technologies, and in particular, to an image recognition method, an image recognition apparatus, an image recognition device, and a storage medium.
Background
With the continuous development of artificial intelligence and deep learning, the mature application of high and new technologies provides more convenient assistance for human life and work, simplifies the complex and mechanical operation that the human needs to engage in years ago, and greatly improves the working efficiency and life quality of people. With the coming of the big data era of the internet, the number of images uploaded and browsed by users in the network is exponentially increased, but the quality of the images in the network is uneven, so that the users can conveniently obtain rich image resources, and the number of non-compliant images is gradually increased and the images are enriched in the internet. Therefore, how to screen and filter the non-compliant images existing in the network by an effective means and also provide a clean network environment for the user is a necessary and significant task.
In the prior art, generally, a manual screening mode is adopted to screen pictures which do not comply with the network so as to achieve the effect of purifying the network space, and important information and characteristics in the images can be automatically extracted through a computer so as to effectively classify and screen the images, so that screening and filtering of pictures which do not comply with the network are realized.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide an image identification method, an image identification device, image identification equipment and a storage medium, and aims to solve the technical problem of low image identification accuracy rate in the prior art.
In order to achieve the above object, the present invention provides an image recognition method, comprising the steps of:
acquiring an image to be identified, and carrying out normalization processing on each image in the image to be identified to obtain a normalized image set;
determining a normalization matrix corresponding to the image to be identified according to the normalization image set;
determining the category label of each image in the image to be identified according to the normalization matrix and a pre-trained convolutional neural network model;
and marking each image in the images to be recognized according to the category label of each image so as to finish the recognition of the images to be recognized.
Optionally, before the obtaining of the image to be identified and the normalization processing of each image in the image to be identified to obtain the normalized image set, the method further includes:
acquiring an original image, and dividing the original image into a training image set and a test image set;
training an initial convolutional neural network model according to the training image set;
when the training error of the initial convolutional neural network model is converged, obtaining an error convergence convolutional neural network model;
determining a test error according to the test image set and the error convergence convolutional neural network model;
when the test error is smaller than or equal to a preset error, acquiring a labeled image;
determining the prediction accuracy of the labeled image according to the labeled image and the error convergence convolutional neural network model;
judging whether the prediction accuracy is smaller than a preset accuracy;
and if the prediction accuracy is not less than the preset accuracy, taking the error convergence convolutional neural network model as a pre-trained convolutional neural network model.
Optionally, after determining whether the prediction accuracy is smaller than a preset accuracy, the method further includes:
if the prediction accuracy is smaller than a preset accuracy, obtaining an image with a prediction error in the labeled image;
and taking the image with the wrong prediction as an original image, returning to execute the step of obtaining the original image, dividing the original image into a training image and a testing image, and taking an error convergence convolutional neural network model when the prediction accuracy is greater than or equal to a preset accuracy as a pre-trained convolutional neural network model.
Optionally, the determining a normalization matrix corresponding to the image to be identified according to the normalization image set includes:
carrying out size reconstruction on each normalized image in the normalized image set to obtain a normalized reconstructed image set;
and determining a normalization matrix corresponding to the image to be identified according to the normalization reconstructed image set.
Optionally, the determining the category label of each image in the image to be recognized according to the normalization matrix and a pre-trained convolutional neural network model includes:
inputting the normalization matrix into a pre-trained convolutional neural network model so that the pre-trained convolutional neural network model performs batch classification on the normalization matrix;
when the batch classification is finished, obtaining the category label of each image in the images to be identified
Optionally, the marking, according to the category label of each image, each image in the images to be recognized to complete recognition of the images to be recognized includes:
marking each image in the images to be identified according to the category label of each image;
and storing the marked images into a database to complete the identification of the image to be identified.
Optionally, the dividing the original image into a training image and a test image includes:
and dividing the original image into a training image and a test image according to a preset proportion.
In addition, to achieve the above object, the present invention also provides an image recognition apparatus, comprising:
the acquisition module is used for acquiring images to be identified and normalizing each image in the images to be identified to obtain a normalized image set;
the determining module is used for determining a normalization matrix corresponding to the image to be identified according to the normalization image set;
the class label determining module is used for determining class labels of all images in the images to be recognized according to the normalized matrix and a pre-trained convolutional neural network model;
and the marking module is used for marking each image in the images to be identified according to the category label of each image so as to finish the identification of the images to be identified.
Further, to achieve the above object, the present invention also provides an image recognition apparatus comprising: a memory, a processor and an image recognition program stored on the memory and executable on the processor, the image recognition program being configured to implement the steps of the image recognition method as described above.
Furthermore, to achieve the above object, the present invention also proposes a storage medium having stored thereon an image recognition program which, when executed by a processor, implements the steps of the image recognition method as described above.
The method comprises the steps of obtaining an image to be identified, and carrying out normalization processing on each image in the image to be identified to obtain a normalized image set; determining a normalization matrix corresponding to the image to be identified according to the normalization image set; determining the category label of each image in the image to be identified according to the normalization matrix and a pre-trained convolutional neural network model; the images in the images to be recognized are marked according to the category labels of the images, and the recognition of the images to be recognized is completed.
Drawings
FIG. 1 is a schematic diagram of an image recognition device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an image recognition method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating an image recognition method according to a second embodiment of the present invention;
FIG. 4 is a flowchart illustrating an image recognition method according to a third embodiment of the present invention;
FIG. 5 is a block diagram of an image recognition apparatus according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an image recognition device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the image recognition apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the image recognition apparatus, and may include more or less components than those shown, or combine certain components, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a data storage module, a network communication module, a user interface module, and an image recognition program.
In the image recognition apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 of the image recognition apparatus of the present invention may be provided in the image recognition apparatus which calls the image recognition program stored in the memory 1005 through the processor 1001 and executes the image recognition method provided by the embodiment of the present invention.
An embodiment of the present invention provides an image recognition method, and referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of the image recognition method according to the present invention.
In this embodiment, the image recognition method includes the following steps:
step S10: acquiring an image to be identified, and carrying out normalization processing on each image in the image to be identified to obtain a normalized image set.
It should be noted that the execution main body of the embodiment may be a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, or an upper computer, or an electronic device, an image recognition device, and the like capable of implementing the above functions. The present embodiment and the following embodiments are described below by taking an image recognition apparatus as an example, and are not to be construed as limiting the present embodiment.
It can be understood that the image to be recognized is an unidentified image uploaded by a user, the image to be recognized includes a plurality of images, and at least one of a legal image and an illegal image is included in the image to be recognized.
It should be understood that each pixel of the image may be represented by three primary color components of red, green and blue, the normalization process is a process of calculating an average value of the red, green and blue components of each pixel of the image, respectively, subtracting the average value from the value of the red, green and blue components of each pixel, and dividing the result by the variance corresponding to each pixel color, and the normalization process is performed on the image to obtain a normalized image corresponding to the image, and the normalized images corresponding to the images form a normalized image set.
Step S20: and determining a normalization matrix corresponding to the image to be identified according to the normalization image set.
It can be understood that the normalized images in the normalized image set are subjected to image size reconstruction processing, the normalized images can be processed into normalized images with uniform sizes after the size reconstruction processing, a matrix with a preset size can be randomly cut out from the normalized images with uniform sizes, the size of the matrix can be set according to a specific scene, and after each image in the normalized image set is subjected to the processing, the processed normalized images are combined to obtain a normalized matrix corresponding to the image to be identified.
Step S30: and determining the class label of each image in the image to be recognized according to the normalization matrix and a pre-trained convolutional neural network model.
It should be understood that the class label is a label capable of distinguishing the class of the image to be identified according to a set standard, the pre-trained convolutional neural network model is a convolutional neural network model which is in accordance with a use standard after being trained and tested, the normalization matrix is input into the pre-trained convolutional neural network model, and the pre-trained convolutional neural network model identifies the normalization matrix to obtain the class label of each corresponding normalized image in the normalization matrix.
Step S40: and marking each image in the images to be identified according to the category label of each image to finish the identification of the images to be identified.
It can be understood that each image has a category label, the category labels correspond to the image categories one by one, and the images can be labeled as different pictures according to the category labels, such as legal pictures and illegal pictures, color pictures and black and white pictures, and the like, which can be determined according to specific usage scenarios, which is not limited in this embodiment.
In particular implementations, for example: acquiring various images to be processed uploaded to a server by a user, processing the images in the images to be processed by a third party Python library, converting the images in the images to be processed from UINT8 integer data to FLOAT32 floating point data of 0 to 1, carrying out normalization processing by using the color average value and variance of the images in the images to be processed to obtain a normalized image set, reconstructing the size of the normalized images in the normalized image set to be a uniform size of 256 × 256, randomly cutting out a matrix of 224 × 224 size from each normalized image after the size is reconstructed, merging all the normalized images subjected to the processing into a four-dimensional floating point matrix, if 32 images exist in the images to be processed, expressing the size of the four-dimensional floating point matrix to be 32 × 3 × 224, wherein the four-dimensional floating point matrix is a normalized matrix, and inputting the convolution matrix into a pre-trained neural network model, the pre-trained convolutional neural network model may be a pre-trained RESNEXT50 convolutional neural network model, the model processes input data to obtain a category label of each image in the image to be recognized, the category label may be represented by 0 and 1, an image with the category label of 1 may be labeled as an illegal image according to the category label of each image, and an image with the category label of 0 is labeled as a legal image, thereby completing image recognition of the image to be recognized.
Further, in order to obtain the category label of each image more accurately, the step S30 includes: inputting the normalization matrix into a pre-trained convolutional neural network model so that the pre-trained convolutional neural network model performs batch classification on the normalization matrix; and when the batch classification is finished, obtaining the category label of each image in the images to be identified.
It can be understood that the normalization matrix corresponding to the image to be recognized is input into the pre-trained convolutional neural network model, the pre-trained convolutional neural network model performs batch classification on the input normalization matrix, and the batch classification is performed by performing batch labeling classification on the input normalization matrix, where the batch classification may be batch two classification, that is, the input normalization matrix data is divided into two classes, one class may be represented by 1, and the other class may be represented by 0, after the above processing, each image is obtained with a class label, for example, the class label 1 represents an illegal picture, the class label 0 represents a legal picture, and other symbols may also be used to represent class labels, such as letters, symbols, and the like, which is not limited in this embodiment.
Further, in order to improve the efficiency of image recognition, the step S40 includes: marking each image in the images to be identified according to the category label of each image; and storing the marked images into a database to complete the identification of the image to be identified.
It can be understood that the image is marked as a specific image according to the label category of the image, for example, if the label category of a certain image is 1, the image is marked as an illegal image, if the label category of a certain image is 0, the image is marked as a legal image, each image in the image data to be processed is marked, and the image after the marking is stored in the database, so that the identification of the image to be identified is completed.
In the embodiment, a normalized image set is obtained by acquiring an image to be identified and normalizing each image in the image to be identified; determining a normalization matrix corresponding to the image to be identified according to the normalization image set; determining the category label of each image in the image to be identified according to the normalization matrix and a pre-trained convolutional neural network model; the image identification of the image to be identified is completed by performing normalization processing on the image in the image to be identified, determining a normalization matrix corresponding to the image to be identified according to the image after the normalization processing, determining an image label according to the normalization matrix and a pre-trained convolutional neural network, and marking each image according to the image label.
Referring to fig. 3, fig. 3 is a flowchart illustrating an image recognition method according to a second embodiment of the present invention.
Based on the first embodiment, in this embodiment, before the step S10, the method further includes:
step S01: an original image is acquired and divided into a training image set and a test image set.
It should be understood that the original image is an image selected for training and testing the initial convolutional neural network model, the original image may be a certain number of legal images and illegal images collected from the network, and the proportion of the legal images and illegal images in the original image can be controlled to be balanced during the collection process, so as to achieve better training and testing effects.
It should be understood that the training image set is a set of images used to train the initial convolutional neural network, and the test image set is a set of images used to test the accuracy of the trained initial convolutional neural network.
Step S02: and training an initial convolutional neural network model according to the training image set.
It should be appreciated that the initial convolutional neural network model is trained and parameter optimized by inputting a set of training images into the initial convolutional neural network model.
Step S03: and when the training error of the initial convolutional neural network model is converged, obtaining an error converged convolutional neural network model.
It can be understood that, in the process of training the initial convolutional neural network model, when the value of the error function of the initial convolutional neural network model is smaller than the preset error value, the training error of the initial convolutional neural network model is converged, and at this stage, the training of the model is completed, so as to obtain the error-converged convolutional neural network model.
Step S04: and determining a test error according to the test image set and the error convergence convolutional neural network model.
It can be understood that the test image set is input into the error convergence convolutional neural network model, the class label of each image in the test image set can be obtained after the error convergence convolutional neural network model is processed, the images with the class labels are examined, the pictures marked by the error convergence convolutional neural network with the class labels are marked out, and then the test error of the error convergence convolutional neural network can be obtained according to the number of the total test image data.
Step S05: and when the test error is less than or equal to a preset error, acquiring labeled image data.
It should be understood that when the test error of the error convergence convolutional neural network model is less than or equal to the preset error, the tagged image data is obtained, and the tagged image data may be data with an image tag that is manually screened and identified, that is, each image in the image data is marked with an image tag after being manually reviewed, for example, is marked as a legal image or an illegal image.
It can be understood that when the test error is greater than the preset error, new original image data can be continuously acquired, and the convolutional neural network model is trained and tested until the test error is less than or equal to the preset error.
Step S06: and determining the prediction accuracy of the labeled image according to the labeled image and the error convergence convolutional neural network model.
It should be understood that the labeled image is input into the error converging convolutional neural network, the error converging convolutional neural network model processes the input labeled image and labels the input labeled image, and the prediction accuracy of the error converging convolutional neural network model is determined according to the labeled image of the input error converging convolutional neural network model and the class label of the image data output by the error converging convolutional neural network model, for example: and (3) the data of the labeled images are 100 labeled images, and after the data are processed by an error convergence convolutional neural network model, the category labels of 5 images are inconsistent with the original labels, so that the prediction accuracy is 95%.
Step S07: and judging whether the prediction accuracy is smaller than a preset accuracy.
It should be understood that the preset accuracy is an accuracy that is preset to meet the current usage scenario, and different usage scenarios have different requirements on the accuracy of the model, and the preset accuracy may be set according to a specific usage scenario in this embodiment.
Step S08: and if the prediction accuracy is not less than the preset accuracy, taking the error convergence convolutional neural network model as a pre-trained convolutional neural network model.
It can be understood that if the preset accuracy is not less than the preset accuracy, the error convergence convolutional neural network model is represented to meet the current use scenario, and the error convergence convolutional neural network model is used on line as a pre-trained convolutional neural network model.
Further, in order to improve the accuracy of image recognition, after the step S07, the method further includes: if the prediction accuracy is smaller than a preset accuracy, obtaining an image with a prediction error in the labeled image; and taking the image with the wrong prediction as an original image, returning to execute the step of obtaining the original image, dividing the original image into a training image set and a testing image set, and taking an error convergence convolutional neural network model when the prediction accuracy is greater than or equal to a preset accuracy as a pre-trained convolutional neural network model.
It should be understood that if the prediction accuracy is smaller than the preset accuracy, it indicates that the model cannot meet the current use scenario, at this time, an image with a prediction error in the labeled image is collected, the step of obtaining an original image is executed in a return mode, the original image is divided into a training image set and a testing image set, iterative training is performed on the initial convolutional neural network model until the prediction accuracy of the error convergence convolutional neural network model is greater than or equal to the preset accuracy, and at this time, the corresponding error convergence convolutional neural network model is used on line as the convolutional neural network model which is trained in advance.
It can be understood that, in order to save the time of model training and improve the efficiency of model training, if the prediction accuracy is less than the preset accuracy, an image with a prediction error in the labeled image is obtained, the image with the prediction error is divided into a training image set and a test image set, the error convergence convolutional neural network model obtained last time is used as an initial convolutional neural network model for iterative training, until the prediction accuracy is greater than or equal to the preset accuracy, the corresponding error convergence convolutional neural network model is used online as the pre-trained convolutional neural network model.
Further, in order to improve the picture recognition accuracy, the dividing the original image into a training image set and a testing image set includes: and dividing the original image set into a training image set and a test image set according to a preset proportion.
It should be understood that the preset ratio may be determined according to a specific application scenario, for example, if the preset ratio is 10:1, the ratio of the training image set to the test image set in the original image set is divided into 10:1, and may also be set to other ratios according to the specific application scenario.
In the embodiment, the original image is divided into the training image set and the testing image set, when the initial convolutional neural network model is subjected to error convergence after being trained by the training image data, the testing error of the error convergence convolutional neural network is determined according to the testing image set, when the test error is less than or equal to the preset error, the prediction accuracy of the label image test error convergence convolutional neural network model is used, when the prediction accuracy is greater than or equal to the preset accuracy, the error convergence convolutional neural network model is used on line as a pre-trained convolutional neural network model, when the prediction accuracy is smaller than the preset accuracy, iterative training is carried out on the error convergence convolutional neural network model by using the image with the wrong prediction, the technical problem of low model image identification accuracy in the prior art is solved, and the model training efficiency and the image identification accuracy are improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating an image recognition method according to a third embodiment of the present invention.
Based on the foregoing embodiments, in this embodiment, the step S20 includes:
step S201: and carrying out size reconstruction on each normalized image in the normalized image set to obtain a normalized reconstructed image set.
It should be understood that after performing the size reconstruction of each normalized image in the normalized image set, the images in the normalized image set have a uniform size, and a normalized reconstructed image set is obtained, for example, the images in the normalized image set may be reconstructed to a size of 256 × 256.
Step S202: and determining a normalization matrix corresponding to the image to be identified according to the normalization reconstructed image set.
It should be understood that a matrix with a preset size is randomly cut out from the planning reconstructed images in the normalized reconstructed image set, and after all the normalized reconstructed images are processed, the processed images are combined into a four-dimensional floating point matrix, which is the normalized matrix.
In the embodiment, the normalized image is subjected to size reconstruction, and the image subjected to size reconstruction is cut and finally combined into the four-dimensional floating point matrix, so that the efficiency of image identification is improved.
Furthermore, an embodiment of the present invention further provides a storage medium, on which an image recognition program is stored, and the image recognition program, when executed by a processor, implements the steps of the image recognition method as described above.
Referring to fig. 5, fig. 5 is a block diagram of an image recognition apparatus according to a first embodiment of the present invention.
As shown in fig. 5, an image recognition apparatus according to an embodiment of the present invention includes: an acquisition module 10, a determination module 20, a category label determination module 30, and a labeling module 40.
The acquisition module 10 is configured to acquire an image to be identified, and perform normalization processing on each image in the image to be identified to obtain a normalized image set;
a determining module 20, configured to determine, according to the normalized image set, a normalized matrix corresponding to the image to be identified;
a category label determination module 30, configured to determine a category label of each image in the image to be identified according to the normalization matrix and a pre-trained convolutional neural network model;
and the marking module 40 is configured to mark each image in the images to be recognized according to the category label of each image, so as to complete recognition of the images to be recognized.
In this embodiment, an obtaining module 10 obtains an image to be identified, and performs normalization processing on each image in the image to be identified to obtain a normalized image set; the determining module 20 determines a normalization matrix corresponding to the image to be identified according to the normalization image set; the category label determining module 30 determines a category label of each image in the image to be recognized according to the normalized matrix and a pre-trained convolutional neural network model; the labeling module 40 labels each image in the image to be recognized according to the category label of each image to complete the recognition of the image to be recognized, because the image in the image to be recognized is normalized, the normalization matrix corresponding to the image to be recognized is determined according to the image after the normalization processing, the image label is determined according to the normalization matrix and the pre-trained convolutional neural network, and each image is labeled according to the image label, the recognition of the image to be recognized is completed, the technical problem of high misjudgment rate when a large number of images are recognized in the prior art is solved, and the accuracy of the image recognition is improved.
A second embodiment of the image recognition apparatus of the present invention is proposed based on the above-described first embodiment of the image recognition apparatus of the present invention.
In this embodiment, the obtaining module 10 is further configured to obtain an original image, and divide the original image into a training image set and a testing image set; training an initial convolutional neural network model according to the training image set; when the training error of the initial convolutional neural network model is converged, obtaining an error convergence convolutional neural network model; determining a test error according to the test image set and the error convergence convolutional neural network model; when the test error is smaller than or equal to a preset error, acquiring a labeled image; determining the prediction accuracy of the labeled image according to the labeled image and the error convergence convolutional neural network model; judging whether the prediction accuracy is smaller than a preset accuracy; and if the prediction accuracy is not less than the preset accuracy, taking the error convergence convolutional neural network model as a pre-trained convolutional neural network model.
The obtaining module 10 is further configured to obtain an image with a prediction error in the labeled image if the prediction accuracy is smaller than a preset accuracy; and taking the image with the wrong prediction as an original image, returning to execute the step of obtaining the original image, dividing the original image into a training image and a testing image, and taking an error convergence convolutional neural network model when the prediction accuracy is greater than or equal to a preset accuracy as a pre-trained convolutional neural network model.
The determining module 20 is further configured to perform size reconstruction on each normalized image in the normalized image set to obtain a normalized reconstructed image set; and determining a normalization matrix corresponding to the image to be identified according to the normalization reconstructed image set.
The class label determining module 30 is further configured to input the normalization matrix into a pre-trained convolutional neural network model, so that the pre-trained convolutional neural network model performs batch classification on the normalization matrix; and when the batch classification is finished, obtaining the category label of each image in the images to be identified.
The marking module 40 is further configured to mark each image in the images to be identified according to the category label of each image; and storing the marked images into a database to complete the identification of the image to be identified.
The obtaining module 10 is further configured to divide the original image into a training image and a test image according to a preset ratio.
Other embodiments or specific implementation manners of the image recognition apparatus of the present invention may refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., a rom/ram, a magnetic disk, an optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An image recognition method, characterized in that the method comprises:
acquiring an image to be identified, and carrying out normalization processing on each image in the image to be identified to obtain a normalized image set;
determining a normalization matrix corresponding to the image to be identified according to the normalization image set;
determining the category label of each image in the image to be identified according to the normalization matrix and a pre-trained convolutional neural network model;
and marking each image in the images to be recognized according to the category label of each image so as to finish the recognition of the images to be recognized.
2. The method of claim 1, wherein before obtaining the image to be identified and normalizing each image in the image to be identified to obtain a normalized image set, the method further comprises:
acquiring an original image, and dividing the original image into a training image set and a test image set;
training an initial convolutional neural network model according to the training image set;
when the training error of the initial convolutional neural network model is converged, obtaining an error convergence convolutional neural network model;
determining a test error according to the test image set and the error convergence convolutional neural network model;
when the test error is smaller than or equal to a preset error, acquiring a labeled image;
determining the prediction accuracy of the labeled image according to the labeled image and the error convergence convolutional neural network model;
judging whether the prediction accuracy is smaller than a preset accuracy;
and if the prediction accuracy is not less than the preset accuracy, taking the error convergence convolutional neural network model as a pre-trained convolutional neural network model.
3. The method of claim 2, wherein after determining whether the predicted accuracy is less than a predetermined accuracy, the method further comprises:
if the prediction accuracy is smaller than a preset accuracy, obtaining an image with a prediction error in the labeled image;
and taking the image with the wrong prediction as an original image, returning to execute the step of obtaining the original image, dividing the original image into a training image and a testing image, and taking an error convergence convolutional neural network model when the prediction accuracy is greater than or equal to a preset accuracy as a pre-trained convolutional neural network model.
4. The method of claim 1, wherein determining a normalized matrix corresponding to the image to be identified from the normalized image set comprises:
carrying out size reconstruction on each normalized image in the normalized image set to obtain a normalized reconstructed image set;
and determining a normalization matrix corresponding to the image to be identified according to the normalization reconstructed image set.
5. The method of claim 1, wherein determining the class label of each image in the images to be recognized according to the normalization matrix and a pre-trained convolutional neural network model comprises:
inputting the normalization matrix into a pre-trained convolutional neural network model so that the pre-trained convolutional neural network model performs batch classification on the normalization matrix;
and when the batch classification is finished, obtaining the category label of each image in the images to be identified.
6. The method of claim 1, wherein the marking of each image of the images to be recognized according to the category label of each image to complete the recognition of the image to be recognized comprises:
marking each image in the images to be identified according to the category label of each image;
and storing the marked images into a database to complete the identification of the image to be identified.
7. The method of claim 3, wherein said dividing the original image into a training image and a test image comprises:
and dividing the original image into a training image and a test image according to a preset proportion.
8. An image recognition apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring images to be identified and normalizing each image in the images to be identified to obtain a normalized image set;
the determining module is used for determining a normalization matrix corresponding to the image to be identified according to the normalization image set;
the class label determining module is used for determining class labels of all images in the images to be recognized according to the normalized matrix and a pre-trained convolutional neural network model;
and the marking module is used for marking each image in the images to be identified according to the category label of each image so as to finish the identification of the images to be identified.
9. An image recognition apparatus, characterized in that the apparatus comprises: memory, a processor and an image recognition program stored on the memory and executable on the processor, the image recognition program being configured to implement the steps of the image recognition method according to any one of claims 1 to 7.
10. A storage medium, characterized in that the storage medium has stored thereon an image recognition program which, when executed by a processor, implements the steps of the image recognition method according to any one of claims 1 to 7.
CN202110723034.3A 2021-06-28 2021-06-28 Image recognition method, device, equipment and storage medium Active CN113269276B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110723034.3A CN113269276B (en) 2021-06-28 2021-06-28 Image recognition method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110723034.3A CN113269276B (en) 2021-06-28 2021-06-28 Image recognition method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113269276A true CN113269276A (en) 2021-08-17
CN113269276B CN113269276B (en) 2024-10-01

Family

ID=77236108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110723034.3A Active CN113269276B (en) 2021-06-28 2021-06-28 Image recognition method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113269276B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114494767A (en) * 2021-12-24 2022-05-13 广州粤建三和软件股份有限公司 Method, device, equipment and storage medium for identifying number of reinforcing steel bars

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108229379A (en) * 2017-12-29 2018-06-29 广东欧珀移动通信有限公司 Image-recognizing method, device, computer equipment and storage medium
CN110348381A (en) * 2019-07-11 2019-10-18 电子科技大学 Video behavior identification method based on deep learning
CN110399912A (en) * 2019-07-12 2019-11-01 广东浪潮大数据研究有限公司 A kind of method of character recognition, system, equipment and computer readable storage medium
CN110502975A (en) * 2019-07-09 2019-11-26 平安科技(深圳)有限公司 A kind of batch processing system that pedestrian identifies again
CN111598095A (en) * 2020-03-09 2020-08-28 浙江工业大学 Deep learning-based urban road scene semantic segmentation method
US10824922B1 (en) * 2018-12-12 2020-11-03 Amazon Technologies, Inc. Similarity detection system
WO2020221177A1 (en) * 2019-04-30 2020-11-05 深圳数字生命研究院 Method and device for recognizing image, storage medium and electronic device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108229379A (en) * 2017-12-29 2018-06-29 广东欧珀移动通信有限公司 Image-recognizing method, device, computer equipment and storage medium
US10824922B1 (en) * 2018-12-12 2020-11-03 Amazon Technologies, Inc. Similarity detection system
WO2020221177A1 (en) * 2019-04-30 2020-11-05 深圳数字生命研究院 Method and device for recognizing image, storage medium and electronic device
CN110502975A (en) * 2019-07-09 2019-11-26 平安科技(深圳)有限公司 A kind of batch processing system that pedestrian identifies again
CN110348381A (en) * 2019-07-11 2019-10-18 电子科技大学 Video behavior identification method based on deep learning
CN110399912A (en) * 2019-07-12 2019-11-01 广东浪潮大数据研究有限公司 A kind of method of character recognition, system, equipment and computer readable storage medium
CN111598095A (en) * 2020-03-09 2020-08-28 浙江工业大学 Deep learning-based urban road scene semantic segmentation method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KYUNG‑MO KOO 等: "Image recognition performance enhancements using image normalization", 《HUMAN-CENTRIC COMPUTING AND INFORMATION SCIENCES》, 19 November 2017 (2017-11-19), pages 1 - 11, XP021250672, DOI: 10.1186/s13673-017-0114-5 *
郝婕: "基于视频图像序列分析的植物物种识别系统", 《中国优秀硕士学位论文全文数据库 基础科学辑》, no. 02, 15 February 2021 (2021-02-15), pages 006 - 1238 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114494767A (en) * 2021-12-24 2022-05-13 广州粤建三和软件股份有限公司 Method, device, equipment and storage medium for identifying number of reinforcing steel bars

Also Published As

Publication number Publication date
CN113269276B (en) 2024-10-01

Similar Documents

Publication Publication Date Title
CN109658042B (en) Review method, device, equipment and storage medium based on artificial intelligence
CN110555372A (en) Data entry method, device, equipment and storage medium
CN111190939A (en) User portrait construction method and device
CN108090511B (en) Image classification method and device, electronic equipment and readable storage medium
KR102002024B1 (en) Method for processing labeling of object and object management server
CN111931809A (en) Data processing method and device, storage medium and electronic equipment
CN110781925B (en) Software page classification method and device, electronic equipment and storage medium
CN111814828B (en) Intelligent space planning method, device, equipment and storage medium
CN111784665A (en) OCT image quality assessment method, system and device based on Fourier transform
CN110737687A (en) Data query method, device, equipment and storage medium
CN114463284A (en) PCB defect detection method, device, equipment and storage medium
CN112926601A (en) Image recognition method, device and equipment based on deep learning and storage medium
CN112633341A (en) Interface testing method and device, computer equipment and storage medium
CN113269276B (en) Image recognition method, device, equipment and storage medium
CN112069315A (en) Method, device, server and storage medium for extracting text multidimensional information
CN111401465A (en) Training sample optimization method, device, equipment and storage medium
CN113255766A (en) Image classification method, device, equipment and storage medium
CN110956093A (en) Big data-based model identification method, device, equipment and medium
CN113988316A (en) Method and device for training machine learning model
CN114742741A (en) Video picture quality evaluation method, device, equipment and storage medium
CN112950167A (en) Design service matching method, device, equipment and storage medium
CN113626075A (en) Similar code detection method, device, equipment and computer storage medium
CN111784563A (en) Background blurring method and device, computer equipment and storage medium
CN111932447A (en) Picture processing method, device, equipment and storage medium
CN111104936A (en) Text image recognition method, device, equipment and storage medium

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240903

Address after: Room B072, Building A, Hanyun Pavilion, Xi'an Software Park, No. 68 Keji 2nd Road, High tech Zone, Xi'an City, Shaanxi Province 710000

Applicant after: Shaanxi Qianyi Intelligent Technology Co.,Ltd.

Country or region after: China

Address before: 518000 Room 501, west block, Skyworth semiconductor design building, No.18, Gaoxin South 4th Road, high tech Zone community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: SHENZHEN INVENO TECHNOLOGY CO.,LTD.

Country or region before: China

GR01 Patent grant
GR01 Patent grant