CN115512127A - Image labeling method based on self-encoder - Google Patents

Image labeling method based on self-encoder Download PDF

Info

Publication number
CN115512127A
CN115512127A CN202211038093.8A CN202211038093A CN115512127A CN 115512127 A CN115512127 A CN 115512127A CN 202211038093 A CN202211038093 A CN 202211038093A CN 115512127 A CN115512127 A CN 115512127A
Authority
CN
China
Prior art keywords
label
image
labels
added
encoder
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211038093.8A
Other languages
Chinese (zh)
Inventor
夏为
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Huacheng Design And Development Co ltd
Original Assignee
Shenzhen Huacheng Design And Development 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 Huacheng Design And Development Co ltd filed Critical Shenzhen Huacheng Design And Development Co ltd
Priority to CN202211038093.8A priority Critical patent/CN115512127A/en
Publication of CN115512127A publication Critical patent/CN115512127A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Landscapes

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

Abstract

The invention discloses an image labeling method based on an auto-encoder, which belongs to the technical field of image labeling and comprises sample images, wherein the sample images comprise a large number of images with different types of characteristics, the sample images are input into the auto-encoder, the auto-encoder classifies each sample image into the same first-level classification according to the characteristics of the sample image, the sample images in the same first-level classification are classified into the same second-level classification according to the characteristics of the sample image, the same sample image can be classified into different first-level classifications or second-level classifications at the same time, the auto-encoder obtains corresponding labels through each classification, and the self-encoder inputs images to be added with labels. The method has the advantages that the user-defined label cannot be replaced by the newly determined label in the process of identifying the image with the user-defined label, the purpose of adaptively adjusting the image classification mode according to the image type is achieved, the flexibility is high, and the accuracy of the label prediction result can be improved.

Description

Image labeling method based on self-encoder
Technical Field
The invention relates to the field of image labeling, in particular to an image labeling method based on an auto-encoder.
Background
The self-encoder enables a class of daily artificial neural networks used in board supervised learning and unsupervised learning to perform characteristic learning on output learning by taking input information as a learning target, the self-encoder comprises an encoder and a decoder, the self-encoder in the safety learning range can be divided into a contraction self-encoder, a regular self-encoder and a variation self-encoder, wherein strong two are discriminant models, the latter is a generation model, the self-encoder can enable a neural network with a feedforward structure or a recursion structure to have the function of a characteristic learning algorithm in a general sense and be applied to dimension reduction and abnormal value detection, and the self-encoder comprising laminated construction can be applied to computer vision problems including image noise reduction, neural style migration and the like.
With the rapid development of the internet, an image recognition technology is also widely applied to many scenes around us, the image recognition is finished through the image recognition, and a label is added to the image through a recognition result to express the characteristic content of the image, so that a user can search for things related to the image content by using the image, for example, a label such as "fish", "grass carp" or one of four big fishes "can be added to one image containing fish after scanning, however, in the prior art, if the image is recognized, a user-defined label is replaced by a newly determined label, and in a real use scene, many images do not need too many labels, too many expressions can be beset to a user, and too many labels need stronger computing power, more occupied computing resources, longer computing time, and lower efficiency.
The above prior art has the following problems:
(1) In the process of identifying the image with the custom label, the custom label can be replaced by a newly determined label;
(2) When labels are added to a plurality of images without excessive label quantity, the existing algorithm can add excessive labels, so that excessive computing resources are occupied, the operation time is in the process, and inconvenience is brought to users.
Disclosure of Invention
The present invention is directed to an image labeling method based on an auto-encoder, so as to solve the problems in the background art.
The technical scheme of the invention is as follows: the method comprises the steps of including sample images, inputting the sample images into an automatic encoder, classifying each sample image into the same first-class classification according to the characteristics of the sample image by the automatic encoder, classifying the sample images in the same first-class classification into the same second-class classification according to the characteristics of the sample images, obtaining corresponding labels by the automatic encoder through each classification, inputting images to be added with the labels into the self encoder, reducing the dimension of the images by the self encoder to obtain a feature map of the images, wherein the feature map and each classification have corresponding feature vectors, each feature vector under the classification comprises a plurality of points, and a probability value is arranged between each point and the corresponding classification, determining the first N labels with the highest probability value as labels to be added to the image according to the probability value, wherein N can be a preset value not less than 1, judging whether a user-defined label exists in the image, if the user-defined label exists in the image and the user-defined label exists in the labels to be added, reserving the user-defined label, updating other labels except the user-defined label in the current labels to be added to the image of the current image, wherein the number of the labels to be added corresponding to the image of the labels to be added is A, the number of the labels to be added is a preset value not less than 1, the number of the labels to be added plus the number of the user-defined labels is = A, and when the number of the labels to be added plus the number of the user-defined labels is greater than A, deleting is started from the labels with smaller probability value in the labels to be added until the number of the labels to be added plus the number of the user-defined labels = A.
Further, before the self-encoder classifies the sample images, the method further includes establishing corresponding sample images for each classification; initializing an image label classification model; and carrying out classification training on the self-encoder based on the labels corresponding to the sample images in each classification.
Further, the image processing method further comprises analyzing remark information of the image when the image is received, wherein the remark information is added as a self-defined label of the image.
Further, the user-defined label is provided with a preset first identifier, and whether a label to be added which is overlapped with the user-defined label exists in the label to be added is detected.
Further, after detecting whether a user-defined label exists in the labels to be added, if the user-defined label exists in the labels to be added, all the user-defined labels in the labels to be added are taken out, the image labels are covered with the positioning labels of the labels to be added, if the user-defined label does not exist in the images to be added, the label to be added with the lowest probability value in all the labels to be added is removed, and the rest labels to be added are set as the labels of the changed images.
Further, the step of inputting the image to be tagged into the self-encoder to obtain the feature map comprises the steps of inputting the image to be tagged into the self-encoder, determining a first feature map of the icon to be tagged, and performing dimension reduction processing on the first feature map to obtain a second feature map; and carrying out average pooling on the second characteristic diagram to obtain a characteristic vector corresponding to the second characteristic diagram.
The present invention provides an image labeling method based on an auto-encoder by improving the following improvements and advantages compared with the prior art:
one is as follows: the method comprises the steps of setting a preset first identifier for a custom label, detecting whether a label to be added which is overlapped with the custom label exists in the labels to be added or not, detecting whether an image label with the first identifier exists in the labels to be added or not, if the label to be added which is provided with the first identifier exists in all the labels to be added, judging that the label to be added with the first identifier exists in the labels to be added, if the label to be added which is provided with the first identifier does not exist in all the labels to be added, judging that the label to be added which is not provided with the first identifier does not exist in the labels to be added, after detecting whether the custom label exists in the labels to be added or not, taking out the custom label in all the labels to be added, positioning and covering the image label with the residual label to be added, if the custom label does not exist in the image to be added, removing the lowest label to be added in the probability value of all the labels to be added, and setting the residual label to be added as a label of an image to be changed, so that the image with the custom label cannot be replaced by a newly determined label in the process of identifying the image with the custom label;
and the second step is as follows: the method uses a convolutional neural network as a trained sample set, adopts a back propagation algorithm to minimize a cross entropy loss function so as to adjust the weight of the convolutional neural network for training, and reloads the weight of the trained convolutional neural network so as to extract a sample network feature set of the trained sample set and a test network feature set of an image to be marked; calculating the probability that the image to be labeled belongs to each type of label in the label set according to the sample network feature set, the test network feature set and the label set, and generating a label probability set; finally, according to the label probability set, performing image training on one or more self-encodings for label labeling of an image to be labeled, training a label identification model comprising a plurality of semantic hierarchy classifiers, inputting the image into a convolutional neural network, determining a feature map of the image through the convolutional neural network, inputting the feature map into each semantic hierarchy classifier in a multi-label model, respectively predicting and outputting labels matched with the image through each semantic hierarchy classifier, wherein each semantic hierarchy classifier represents different semantic hierarchies, so that the output labels represent the labels of different hierarchies, accurately identifying the category of the image, inputting the image into a self-encoder of a convolutional framework, determining the feature map of the image, classifying and analyzing the corresponding labels of the feature map, selecting the first-level classification with the highest A probability values, then respectively selecting the second-level classification in the first-level classifications, and then selecting A labels with the probabilities to the maximum in the first-level classifications and the second-level classifications, thus performing label prediction according to the image type adaptability, thereby achieving the purpose of adjusting the image classification type adaptability, and improving the accuracy of the label prediction result.
Drawings
The invention is further explained below with reference to the figures and examples:
FIG. 1 is a flow chart illustrating steps of an image labeling method based on an auto-encoder according to the present invention;
fig. 2 is a schematic structural diagram of steps of an image labeling method based on an auto-encoder according to the present invention.
Detailed Description
The present invention will be described in detail with reference to fig. 1 to 2, and the technical solutions in the embodiments of the present invention will be clearly and completely described below. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides an image labeling method based on a self-encoder by improving, as shown in fig. 1-2, the image labeling method comprises sample images, the sample images comprise a plurality of images with different types of characteristics, the sample images are input into the automatic encoder, the automatic encoder classifies each sample image into the same class according to the characteristics of the sample image, the sample images in the same class are classified into the same class according to the characteristics of the sample images, wherein the same sample image can be classified into different classes simultaneously, the self encoder obtains corresponding labels through each class, images to be labeled are input into the self encoder, the images are subjected to dimensionality reduction by the self encoder to obtain a characteristic diagram of the images, the characteristic diagram and each class have corresponding characteristic vectors, each characteristic vector under the classification comprises a plurality of points, and a probability value exists between each point and the corresponding class, determining the first N labels with the highest probability value as labels to be added of the image according to the probability value, wherein N can be a preset value which is not less than 1, judging whether the image has a custom label, if the image has the custom label and the labels to be added have the custom label, reserving the custom label, updating other labels except the custom label in the current labels to be added of the image to be added to the labels to be added of the image, wherein the number of the labels to be added which correspond to the image of the label to be added is A, the value of A is a preset value which is not less than 1, the number of the labels to be added plus the number of the custom labels = A, and when the number of the labels to be added plus the number of the custom labels is more than A, deleting the labels with smaller probability value from the labels to be added until the number of the labels to be added plus the number of the custom labels = A, in the process of identifying the image with the custom label, the custom label cannot be replaced by the newly determined label, the image classification mode is adjusted according to the image type adaptability, the flexibility is high, and the accuracy of the label prediction result can be improved.
Before the self-encoder classifies the sample images, the method also comprises the steps of establishing corresponding sample images aiming at each classification; initializing an image label classification model; and the self-encoder is subjected to classification training based on the labels corresponding to the sample images in each classification, so that the self-encoder can classify the images to be added with the labels conveniently in the later stage.
The image processing method further comprises the steps of analyzing remark information of the image when the image is received, adding the remark information into a self-defined label of the image, and confirming whether the image to be added with the label carries the self-defined label or not.
The user-defined label sets up predetermined first sign, whether have in the detection is waited to add the label with the user-defined label coincidence wait to add the label include, whether there is the image label that is provided with first sign in the detection is waited to add the label, if there is the label of waiting to add that is provided with first sign in all waiting to add the label, then judge to have the label of waiting to add that has first sign in waiting to add the label, if all wait to add not have the label of waiting to add that is provided with first sign in the label, then judge to wait to add the label that does not have first sign in the label, judge whether contain the user-defined label in waiting to add the label.
After detecting whether there is the custom label in waiting to add the label, then take out all custom labels in waiting to add the label, remain and wait to add the label location lid image label, if there is not the custom label in waiting to add the image, then the label that waits to add that probability value is the lowest is got rid of in all waiting to add the label, remain and wait to add the label and set as the label that changes the image, be convenient for get rid of the custom label in waiting to add the label.
Inputting the image to be added with the label into a self-encoder to obtain a feature map, wherein the step of inputting the image to be added with the label into the self-encoder, determining a first feature map of an icon to be added with the label, and performing dimension reduction processing on the first feature map to obtain a second feature map; and performing average pooling on the second characteristic diagram to obtain a characteristic vector corresponding to the second characteristic diagram, and obtaining the characteristic diagram to obtain the label to be added for the image to be added with the label at the later stage.
The working principle is as follows: training a plurality of self-encoders to train a label recognition model comprising a plurality of semantic hierarchy classifiers, inputting an image into a convolutional neural network to determine a feature map of the image through the convolutional neural network, inputting the feature map into each semantic hierarchy classifier in the multi-label model, predicting and outputting labels matched with the image through each semantic hierarchy classifier respectively, wherein the semantic hierarchy classifiers represent different semantic hierarchies, so that the output labels represent the different hierarchies, and the classes of the image are accurately recognized, namely, inputting a sample into the self-encoder, and determining the feature map comprises the following steps: training one or more than one self-encoder, inputting a large number of sample images into a self-encoder with a convolution framework for dimension reduction processing to obtain a feature map of the sample images, enabling the self-encoder to use the sign maps of the samples for classification training, dividing a large number of sample feature maps into a plurality of first-level classifications in the training process, then dividing the sample feature maps in the same first-level classification into a plurality of second-level classifications, and for some sample feature maps with only one label, independently placing the sample feature maps in the corresponding first-level classifications, and performing a second step: inputting the image to be tagged into a self-encoder, identifying the image based on a preset image identification algorithm to obtain a feature vector of the image, inputting the obtained feature vector of the image into a pre-trained tag picture model to obtain a confidence coefficient of the tag picture model, and determining the first N character tags with the highest confidence coefficient as the image tags to be tagged of the image, wherein the third step is as follows: the N may be a preset value not less than 1. Or the image can be segmented firstly to obtain at least one segmented image of the image, each segmented image of the image is respectively identified based on a preset image identification algorithm to obtain a feature vector of each segmented image, the feature vectors of each segmented image are respectively input into a pre-trained label picture model to obtain a probability value of the label picture model, a character label with the highest probability value is determined as an image label of the corresponding segmented image, and the image label of the image is determined by combining the image labels of each segmented image of the image. Specifically, the process of identifying the image based on the preset image identification algorithm to determine the image tag to be added to the image at this time may be implemented by referring to the prior art, which is not described herein again, and step four: firstly, determining whether the image is provided with a custom label, if not, positioning the label of the image to be added with the label, if so, analyzing whether the label is superposed with the custom label or not, if not, judging that the total number of the label to be added and the custom label is less than or equal to A, if so, removing the custom label in the label to be added, then judging that whether the total number of the label to be added and the custom label is less than A or not, if so, deleting the label to be added, starting deleting from the beginning with the smaller probability value until the number of the label to be added and the number of the custom labels added are less than or equal to A, adaptively calling a corresponding classification task according to the image type to perform label prediction, thereby achieving the purpose of adaptively adjusting the image classification mode according to the image type, having strong flexibility and improving the accuracy of a label prediction result,
the previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (6)

1. An image labeling method based on an auto-encoder, characterized by: the method comprises the steps of inputting sample images which contain a large number of images with different types of characteristics into an automatic encoder, classifying each sample image into the same first-class classification according to the characteristics of the sample image by the automatic encoder, classifying the sample images in the same first-class classification into the same second-class classification according to the characteristics of the sample images, obtaining corresponding labels by the automatic encoder through each classification, inputting images to be added with the labels into the self encoder, reducing the dimension of the images by the self encoder to obtain a feature map of the images, wherein the feature map and each classification have corresponding feature vectors, each feature vector under the classification contains a plurality of points, and a probability value exists between each point and the corresponding classification, determining the first N labels with the highest probability value as labels to be added to the image according to the probability value, wherein N can be a preset value not less than 1, judging whether a user-defined label exists in the image, if the user-defined label exists in the image and the user-defined label exists in the labels to be added, reserving the user-defined label, updating other labels except the user-defined label in the current labels to be added to the image labels to be added of the image, wherein the number of the labels to be added corresponding to the image of the labels to be added is A, the numerical value of A is a preset numerical value not less than 1, the number of the labels to be added plus the number of the user-defined labels = A, and when the number of the labels to be added plus the number of the user-defined labels is greater than A, deleting is started from the labels with smaller probability value until the number of the labels to be added plus the number of the user-defined labels in the labels to be added = A .
2. The image labeling method based on self-encoder as claimed in claim 1, characterized in that: before the self-encoder classifies the sample images, the method also comprises the steps of establishing corresponding sample images aiming at each classification; initializing an image label classification model; and carrying out classification training on the self-encoder based on the labels corresponding to the sample images in each classification.
3. The image labeling method based on self-encoder as claimed in claim 1, characterized in that: the image processing method further comprises analyzing remark information of the image when the image is received, wherein the remark information is added as a self-defined label of the image.
4. An auto-encoder based image labeling method according to claim 3, characterized in that: the self-defined label sets up predetermined first sign, detects whether have in waiting to add the label with self-defined label coincidence wait to add the label include, detect whether there is the image label that is provided with first sign in waiting to add the label, if all wait to add the label in having the label of waiting to add that is provided with first sign, then judge to wait to add the label that has first sign in waiting to add the label, if all wait to add not have the label of waiting to add that is provided with first sign in the label, then judge to wait to add the label that does not have first sign in waiting to add the label.
5. The image labeling method based on self-encoder as claimed in claim 4, wherein: after detecting whether a user-defined label exists in the labels to be added or not, if the user-defined label exists in the labels to be added, taking out all the user-defined labels in the labels to be added, and remaining the labels to be added to position the image labels, if the user-defined label does not exist in the images to be added, removing the label to be added with the lowest probability value in all the labels to be added, and setting the remaining labels to be added as the labels of the changed images.
6. The image labeling method based on self-encoder as claimed in claim 1, characterized in that: inputting the image to be added with the label into a self-encoder to obtain a feature map, wherein the step of inputting the image to be added with the label into the self-encoder, determining a first feature map of the icon to be added with the label, and performing dimension reduction processing on the first feature map to obtain a second feature map; and carrying out average pooling on the second characteristic diagram to obtain a characteristic vector corresponding to the second characteristic diagram.
CN202211038093.8A 2022-08-26 2022-08-26 Image labeling method based on self-encoder Pending CN115512127A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211038093.8A CN115512127A (en) 2022-08-26 2022-08-26 Image labeling method based on self-encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211038093.8A CN115512127A (en) 2022-08-26 2022-08-26 Image labeling method based on self-encoder

Publications (1)

Publication Number Publication Date
CN115512127A true CN115512127A (en) 2022-12-23

Family

ID=84501631

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211038093.8A Pending CN115512127A (en) 2022-08-26 2022-08-26 Image labeling method based on self-encoder

Country Status (1)

Country Link
CN (1) CN115512127A (en)

Similar Documents

Publication Publication Date Title
CN109241317B (en) Pedestrian Hash retrieval method based on measurement loss in deep learning network
CN111639544B (en) Expression recognition method based on multi-branch cross-connection convolutional neural network
CN112131978B (en) Video classification method and device, electronic equipment and storage medium
CN107683469A (en) A kind of product classification method and device based on deep learning
US20070196013A1 (en) Automatic classification of photographs and graphics
CN109472209B (en) Image recognition method, device and storage medium
CN110619051B (en) Question sentence classification method, device, electronic equipment and storage medium
CN109902202B (en) Video classification method and device
JP6897749B2 (en) Learning methods, learning systems, and learning programs
MX2014012866A (en) Method for binary classification of a query image.
CN111860193B (en) Text-based pedestrian retrieval self-supervision visual representation learning system and method
CN111428028A (en) Information classification method based on deep learning and related equipment
CN110751027B (en) Pedestrian re-identification method based on deep multi-instance learning
CN111401145A (en) Visible light iris recognition method based on deep learning and DS evidence theory
US20230215125A1 (en) Data identification method and apparatus
CN114882521A (en) Unsupervised pedestrian re-identification method and unsupervised pedestrian re-identification device based on multi-branch network
CN112115957A (en) Data stream identification method and device and computer storage medium
CN110751191A (en) Image classification method and system
CN110852263B (en) Mobile phone photographing garbage classification recognition method based on artificial intelligence
CN110647897B (en) Zero sample image classification and identification method based on multi-part attention mechanism
CN114328942A (en) Relationship extraction method, apparatus, device, storage medium and computer program product
CN105844299B (en) A kind of image classification method based on bag of words
CN112270334A (en) Few-sample image classification method and system based on abnormal point exposure
CN116206201A (en) Monitoring target detection and identification method, device, equipment and storage medium
CN113920573B (en) Face change decoupling relativity relationship verification method based on counterstudy

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