CN114550240A - Image recognition method and device, electronic equipment and storage medium - Google Patents
Image recognition method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114550240A CN114550240A CN202210108176.3A CN202210108176A CN114550240A CN 114550240 A CN114550240 A CN 114550240A CN 202210108176 A CN202210108176 A CN 202210108176A CN 114550240 A CN114550240 A CN 114550240A
- Authority
- CN
- China
- Prior art keywords
- attribute
- image
- probability
- prediction model
- attribute data
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000012545 processing Methods 0.000 claims abstract description 46
- 238000012549 training Methods 0.000 claims description 32
- 238000013528 artificial neural network Methods 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 11
- 238000013473 artificial intelligence Methods 0.000 abstract description 3
- 238000013135 deep learning Methods 0.000 abstract description 2
- 230000008569 process Effects 0.000 description 30
- 238000012795 verification Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 8
- 238000000605 extraction Methods 0.000 description 7
- 238000004458 analytical method Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 230000004927 fusion Effects 0.000 description 3
- 238000007499 fusion processing Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000013527 convolutional neural network Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 230000002411 adverse Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000013145 classification model Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
- G06F18/254—Fusion techniques of classification results, e.g. of results related to same input data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning 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 present disclosure provides an image recognition method, an image recognition device, an electronic device and a storage medium, which relate to the technical field of artificial intelligence, specifically to the technical field of deep learning and computer vision, and can be applied to scenes such as face recognition, face image processing and the like. The specific implementation scheme is as follows: acquiring image characteristic information of an image to be processed; obtaining attribute data of a specified object in the image to be processed and the probability of each attribute category in at least two attribute categories to which the specified object belongs according to the image characteristic information; wherein, each attribute category corresponds to at least one classification mode; and adjusting the attribute data according to the probability of each attribute type to obtain the adjusted attribute data.
Description
Technical Field
The present disclosure relates to the field of artificial intelligence technology, specifically to the field of deep learning and computer vision technology, and can be applied to scenes such as face recognition and face image processing.
Background
With the development of scientific technology and social economy, quick and effective automatic identity verification becomes more and more urgent in the field of security protection. Among them, predictive analysis techniques based on image recognition are an important research aspect of identity verification.
At present, a predictive analysis method based on image recognition generally performs recognition processing on an acquired image by using a recognition model obtained by pre-training to obtain attribute data of a related object in the image, so as to perform identity verification on the related object.
Disclosure of Invention
The disclosure provides an image recognition method, an image recognition device, an electronic device and a storage medium.
According to an aspect of the present disclosure, there is provided a method of image recognition, including:
acquiring image characteristic information of an image to be processed;
obtaining attribute data of a specified object in the image to be processed and the probability of each attribute category in at least two attribute categories to which the specified object belongs according to the image characteristic information; wherein, each attribute category corresponds to at least one classification mode;
and adjusting the attribute data according to the probability of each attribute type to obtain the adjusted attribute data.
According to another aspect of the present disclosure, there is provided an apparatus for image recognition, including:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring image characteristic information of an image to be processed;
an obtaining unit, configured to obtain, according to the image feature information, attribute data of a specified object in the image to be processed and a probability of each attribute category of at least two attribute categories to which the specified object belongs; wherein, each attribute category corresponds to at least one classification mode;
and the adjusting unit is used for adjusting the attribute data according to the probability of each attribute type so as to obtain the attribute data after the adjustment.
According to still another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method of the aspects and any possible implementation described above.
According to yet another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of the above-described aspect and any possible implementation.
According to yet another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of the aspect and any possible implementation as described above.
According to the technical scheme, by acquiring the image feature information of the image to be processed, the attribute data of the specified object in the image to be processed and the probability of each of at least two attribute categories to which the specified object belongs are acquired according to the image feature information, so that the attribute data can be adjusted according to the probability of each attribute category to acquire the attribute data after adjustment processing.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure;
FIG. 2 is a schematic diagram according to a second embodiment of the present disclosure;
FIG. 3 is a schematic illustration of model training according to a second embodiment of the present disclosure;
FIG. 4 is a schematic diagram according to a third embodiment of the present disclosure;
fig. 5 is a block diagram of an electronic device for implementing a method of image recognition of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It is to be understood that the described embodiments are only a few, and not all, of the disclosed embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without inventive step, are intended to be within the scope of the present disclosure.
It should be noted that the terminal device involved in the embodiments of the present disclosure may include, but is not limited to, a mobile phone, a Personal Digital Assistant (PDA), a wireless handheld device, a Tablet Computer (Tablet Computer), and other intelligent devices; the display device may include, but is not limited to, a personal computer, a television, and the like having a display function.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter associated objects are in an "or" relationship.
With the development of scientific technology and social economy, quick and effective automatic identity verification becomes more and more urgent in the field of security protection. Because the intrinsic attribute characteristics of the biological objects have strong self-stability and individual difference, the intrinsic attribute characteristics of the biological objects are ideal bases for identity authentication. Among them, predictive analysis techniques based on image recognition are an important research aspect of identity verification.
At present, a predictive analysis method based on image recognition generally performs recognition processing on an acquired image by using a recognition model obtained by pre-training to obtain attribute data of a related object in the image, so as to perform identity verification on the related object.
However, due to the behavior habit, living environment, characteristics of the biological object and other factors, the prediction accuracy of the prediction analysis method based on image recognition in the related art is poor, and further adverse effects are brought to the authentication in the security field.
Therefore, it is highly desirable to provide an image recognition method, which can more accurately recognize the attribute of the identity verification object, thereby improving the reliability of the identity verification operation in the security field.
Fig. 1 is a schematic diagram according to a first embodiment of the present disclosure, as shown in fig. 1.
101. And acquiring image characteristic information of the image to be processed.
102. Obtaining attribute data of a specified object in the image to be processed and the probability of each attribute category in at least two attribute categories to which the specified object belongs according to the image characteristic information; wherein, each attribute type corresponds to at least one classification mode.
103. And adjusting the attribute data according to the probability of each attribute type to obtain the adjusted attribute data.
So far, the specified object may be subjected to corresponding authentication operation subsequently according to the obtained attribute data after the adjustment processing.
The obtained attribute data after the adjustment processing is the attribute data of the designated object after the adjustment processing.
It should be noted that the classification manner may be a classification manner of preset attributes. The classification manner may include at least one of a three-classification, a five-classification, and a ten-classification.
For example, tri-classification may refer to the division of the attributes of an object into three classes; five classifications may refer to classifying the attributes of an object into five classes; ten classes may refer to the division of the attributes of an object into ten classes.
It should be noted that part or all of the execution subjects 101 to 103 may be an application located at the local terminal, or may also be a functional unit such as a plug-in or Software Development Kit (SDK) set in the application located at the local terminal, or may also be a processing engine located in a server on the network side, or may also be a distributed system located on the network side, for example, a processing engine or a distributed system in an image processing platform on the network side, and the like, which is not particularly limited in this embodiment.
It is to be understood that the application may be a native application (native app) installed on the local terminal, or may also be a web page program (webApp) of a browser on the local terminal, which is not limited in this embodiment.
In this way, by acquiring the image feature information of the image to be processed, and further acquiring the attribute data of the designated object in the image to be processed and the probability of each of at least two attribute categories to which the designated object belongs according to the image feature information, the attribute data can be adjusted according to the probability of each attribute category to acquire the attribute data after adjustment processing.
Optionally, in a possible implementation manner of this embodiment, in 101, a preset neural network may be specifically utilized to perform feature extraction on an image to be processed, so as to obtain the image feature information.
In this implementation, the preset neural network may be a feature information extraction network. The preset Neural Networks may include, but are not limited to, Convolutional Neural Networks (CNNs), Graph Neural Networks (GNNs), and transformers (transformers).
Therefore, the image to be processed is subjected to feature extraction by utilizing the preset neural network so as to obtain the image feature information, more accurate and effective image feature information can be obtained, the follow-up process can be conveniently based on the image feature information, the attribute data of the object in the image can be obtained more accurately and effectively, and the accuracy of image identification can be improved.
Optionally, in a possible implementation manner of this embodiment, in 102, specifically, the image feature information may be respectively identified by using a preset attribute prediction model and at least one preset attribute category prediction model, so as to obtain attribute data of a specified object in the image to be processed and a probability of each attribute category of at least two attribute categories to which the specified object belongs.
In this implementation, the preset attribute category prediction model may be determined according to at least one classification manner of the attribute categories.
Specifically, the preset attribute category prediction model of at least one classification mode may be obtained according to at least one classification mode of the attribute categories
For example, if the classification manner is three-classification, the preset attribute type prediction model may be a three-classification preset attribute type prediction model.
For another example, if the classification manner is five-classification, the preset attribute type prediction model may be a five-classification preset attribute type prediction model.
For another example, if the classification manner is ten-odd, the preset attribute type prediction model may be a preset attribute type prediction model of ten-odd.
In this implementation, the probability of specifying the attribute category of the object may include specifying the attribute category of the object and a probability that the attribute of the specified object is the attribute category. For example, the attribute class of the object is designated as the first class, and the corresponding probability is 0.8.
In a specific implementation process of the implementation manner, the image feature information may be identified by using a preset attribute prediction model and a preset attribute category prediction model of three categories, so as to obtain attribute data of a specified object in the image to be processed and a probability of each attribute category of at least two attribute categories to which the specified object belongs.
In this specific implementation process, the image feature information may be input into a preset attribute prediction model and a three-class preset attribute category prediction model. Then, the attribute data of the specified object in the image and the probability of each attribute category of the three attribute categories to which the specified object belongs are output.
For example, the obtained image has attribute data of a designated object of 15, a probability of 0.5 that the designated object belongs to the first category, a probability of 0.5 that the designated object belongs to the second category, and a probability of 0.5 that the designated object belongs to the third category.
In another specific implementation process of the implementation manner, the image feature information may be respectively identified by using a preset attribute prediction model, a preset attribute category prediction model for the third category, and a preset attribute category prediction model for the fifth category, so as to obtain attribute data of a specified object in the image to be processed and a probability of each attribute category of at least two attribute categories to which the specified object belongs.
In the specific implementation process, the image feature information may be input into a preset attribute prediction model, a preset attribute category prediction model of the three classes, and a preset attribute category prediction model of the five classes. Then, attribute data of a specified object in the image, a probability of specifying each of three attribute categories to which the object belongs, and a probability of specifying each of five attribute categories to which the object belongs are output.
In another specific implementation process of the implementation manner, the image feature information may be respectively identified by using a preset attribute prediction model, a three-class preset attribute category prediction model, a five-class preset attribute category prediction model, and a ten-class preset attribute category prediction model, so as to obtain attribute data of a specified object in the image to be processed and a probability of each attribute category of at least two attribute categories to which the specified object belongs.
In the specific implementation process, the image feature information may be input into a preset attribute prediction model, a preset attribute category prediction model of three classes, a preset attribute category prediction model of five classes, and a preset attribute category prediction model of ten classes. Then, the attribute data of the specified object in the image, the probability of each of the three attribute categories to which the specified object belongs, the probability of each of the five attribute categories to which the specified object belongs, and the probability of each of the ten attribute categories to which the specified object belongs are output.
Thus, in the implementation manner, the image feature information can be respectively identified through the preset attribute prediction model and the at least one preset attribute category prediction model to obtain the attribute data of the designated object and the probability of each attribute category of the at least two attribute categories to which the designated object belongs, so that the attribute data of the designated object and the probability of each attribute category can be fused in the following process, and the adjustment of the attribute data of the designated object is realized, thereby further improving the accuracy of the attribute data of the object in the obtained image and improving the accuracy of image identification.
Furthermore, the probability of each of at least two attribute categories to which the designated object belongs is obtained by using at least one preset attribute category prediction model determined according to at least one classification manner corresponding to the attribute categories, and subsequently, the attribute data can be adjusted based on the probabilities of the plurality of attribute categories. Therefore, based on the refined classification of the attribute categories, the probability of the attribute category to which the object belongs can be identified more accurately, and the accuracy of the obtained adjusted attribute data is further improved.
It should be noted that, based on the various specific implementation processes provided in the implementation manner, the method for image recognition of the embodiment may be implemented by combining the various specific implementation processes provided in the foregoing implementation manner for acquiring the image feature information of the image to be processed. For a detailed description, reference may be made to the related contents in the foregoing implementation manners, and details are not described herein.
Optionally, in a possible implementation manner of this embodiment, in 103, weighting processing may be specifically performed on the attribute data and the probabilities of the attribute classes according to a first weight value corresponding to the attribute data and a second weight value corresponding to the probabilities of the attribute classes, and further, the attribute data after the adjustment processing may be obtained according to a result of the weighting processing.
In this implementation, the second weight value may be configured in advance according to the classification manner of the attribute category. The second weight value may include a plurality of weight values. One classification may correspond to a second weight value.
In a specific implementation process of the implementation manner, if the classification manner includes three classifications, the attribute data and the probabilities of the attribute classes may be weighted according to a first weight value corresponding to the attribute data and a second weight value corresponding to the probability of each of the three attribute classes to which the designated object belongs, and then the adjusted attribute data may be obtained according to a result of the weighting.
In another specific implementation process of the implementation manner, if the classification manner includes three classifications and five classifications, the attribute data and the probabilities of the attribute classes may be weighted according to a first weight value corresponding to the attribute data, a second weight value corresponding to the probability of each of the three attribute classes to which the designated object belongs, and a second weight value corresponding to the probability of each of the five attribute classes to which the designated object belongs, and the adjusted attribute data may be obtained according to the result of the weighting.
In a further specific implementation process of the implementation manner, if the classification manner includes three classifications, five classifications, and ten classifications, the attribute data and the probabilities of the attribute classes may be weighted according to a first weight value corresponding to the attribute data, a second weight value corresponding to a probability of each of three attribute classes to which the designated object belongs, a second weight value corresponding to a probability of each of five attribute classes to which the designated object belongs, and a second weight value corresponding to a probability of each of ten attribute classes to which the designated object belongs, and the adjusted attribute data may be obtained according to a result of the weighting.
In another specific implementation process of the implementation manner, according to the probability of each attribute category and the classification manner corresponding to the attribute category, pre-estimated attribute data corresponding to the classification manner and a second weight value corresponding to the pre-estimated attribute data can be determined. Then, according to a first weight value corresponding to the attribute data and a second weight value corresponding to the pre-estimated attribute data, performing weighted fusion processing on the attribute data and the pre-estimated attribute data to obtain a weighted fusion processing result. And finally, acquiring the attribute data of the specified object after the adjustment processing according to the result of the weighted fusion processing.
Specifically, the attribute data and the estimated attribute data may be weighted-average calculated according to a first weight value corresponding to the attribute data and a second weight value corresponding to the estimated attribute data, so as to obtain a calculation result.
It is understood that the classification manner may be multiple, and the determined pre-estimated attribute data may also be multiple. A predicted attribute data may correspond to a second weight value.
It can be understood that both the first weight value and the second weight value may be pre-configured according to actual service requirements. The first and second weight values may be the same or different. The first weight value may be one weight value, and the second weight value may include a plurality of weight values.
In this way, in the implementation manner, the attribute data of the specified object can be adjusted by using the probability of each attribute category of the object in the image, that is, fusion constraint can be performed on the attribute data of the object in the image and the probability of each attribute category, so that the obtained adjusted attribute data is more accurate, and the accuracy of image recognition is further improved.
It should be noted that, based on the multiple specific implementation processes provided in this implementation manner for obtaining the attribute data of the specified object after the adjustment processing, the method for image recognition of this embodiment may be implemented in combination with the multiple specific implementation processes provided in the foregoing implementation manner. For a detailed description, reference may be made to the related contents in the foregoing implementation manners, and details are not described herein.
Optionally, in a possible implementation manner of this embodiment, before 101, the image training data may be further utilized to train the attribute prediction model to be trained to obtain the preset attribute prediction model, and/or train the attribute category prediction model to be trained to obtain the preset attribute category prediction model.
In this implementation, the image training data may be image training sample data that includes an attribute value label and an attribute class label.
In a specific implementation process of the implementation manner, a preset attribute category prediction model of at least one classification manner may be obtained according to at least one classification manner of the attribute categories, and then the preset attribute category prediction model of at least one classification manner to be trained may be trained by using the image training data to obtain at least one preset attribute category prediction model.
In a specific implementation process, the attribute class labels of the image training data may include at least one classification mode of attribute class labels. For example, the attribute class labels of the image training data may include a three-class attribute class label, a five-class attribute class label, and a ten-class attribute class label.
In another specific implementation process of the implementation manner, a preset attribute category prediction model of at least one classification manner may be obtained according to at least one classification manner of the attribute categories, the attribute prediction model to be trained may be trained by using the image training data to obtain the preset attribute prediction model, and the preset attribute category prediction model of at least one classification manner to be trained may be trained by using the image training data to obtain the at least one preset attribute category prediction model.
Thus, in the implementation manner, model training can be performed by using the image training data, so that the preset attribute prediction model and the preset attribute category prediction model with better recognition effect can be obtained, and the accuracy of image recognition can be further improved, thereby further improving the reliability of the authentication operation based on the image recognition.
It should be noted that, based on the implementation of the model training provided in this implementation, the method for image recognition of this embodiment may be implemented by combining with various specific implementation processes provided in the foregoing implementation. For a detailed description, reference may be made to the related contents in the foregoing implementation manners, and details are not described herein.
In this embodiment, by obtaining the image feature information of the image to be processed, and further obtaining, according to the image feature information, the attribute data of the specified object in the image to be processed and the probability of each of the at least two attribute categories to which the specified object belongs, the attribute data can be adjusted according to the probability of each attribute category to obtain the attribute data after the adjustment processing.
In addition, by adopting the technical scheme provided by the embodiment, the image to be processed is subjected to feature extraction by utilizing the preset neural network so as to obtain the image feature information, more accurate and effective image feature information can be obtained, the follow-up process can obtain more accurate and effective attribute data of the object in the image based on the image feature information, and the accuracy of image identification is further improved
In addition, by adopting the technical scheme provided by this embodiment, the image feature information can be respectively identified through the preset attribute prediction model and the at least one preset attribute category prediction model to obtain the attribute data of the specified object and the probability of each of the at least two attribute categories to which the specified object belongs, so that the attribute data of the specified object and the probability of each attribute category can be fused in the following process, and the adjustment of the attribute data of the specified object is realized, thereby further improving the accuracy of the attribute data of the object in the obtained image and improving the accuracy of image identification.
Furthermore, the probability of each of at least two attribute categories to which the designated object belongs is obtained by using at least one preset attribute category prediction model determined according to at least one classification manner corresponding to the attribute categories, and subsequently, the attribute data can be adjusted based on the probabilities of the plurality of attribute categories. Therefore, based on the refined classification of the attribute categories, the probability of the attribute category to which the object belongs can be identified more accurately, and the accuracy of the obtained adjusted attribute data is further improved.
In addition, the attribute data of the specified object can be adjusted by utilizing the probability of each attribute category of the object in the image, namely, the fusion constraint of the attribute data of the object in the image and the probability of each attribute category can be realized, so that the obtained adjusted attribute data is more accurate, and the accuracy of image identification is further improved.
In addition, the preset attribute prediction model and the preset attribute category prediction model with better recognition effect can be obtained by performing model training by using the image training data, and the accuracy of image recognition can be further improved, so that the reliability of the identity verification operation based on the image recognition is further improved.
Fig. 2 is a schematic diagram according to a second embodiment of the present disclosure, as shown in fig. 2.
201. And acquiring an image to be processed.
In this embodiment, the image to be processed may include an acquired face image.
202. And extracting the features of the image to be processed by utilizing a preset neural network so as to obtain the image feature information.
203. And respectively identifying the image characteristic information by utilizing a preset attribute prediction model and at least one preset attribute category prediction model to obtain attribute data of a specified object in the image to be processed and the probability of each attribute category of at least two attribute categories to which the specified object belongs.
In this embodiment, the preset attribute prediction model may be a regression model, and the preset attribute category prediction model may be a classification model.
In this embodiment, the attribute prediction model to be trained may be trained by using the image training data to obtain a preset attribute prediction model, and the attribute category prediction model to be trained may be trained by using the image training data to obtain a preset attribute category prediction model.
Specifically, if the classification manner of the attribute class includes three classes, five classes, and ten classes, the process of model training may be as shown in fig. 3.
In the model training process, a neural network (backbone) can be used to perform feature extraction on the image training data to obtain image feature information. Then, inputting the image characteristic information into the attribute prediction model to be trained and at least one attribute category prediction model to be trained to obtain corresponding attribute data and the probability of each attribute category. And adjusting the attribute data according to the probability of each attribute category to obtain the adjusted attribute data. And finally, if the model training termination condition is met, a preset attribute prediction model and at least one preset attribute category prediction model can be obtained.
It is understood that the attribute category 1 may be a probability of an attribute category corresponding to a three-classification mode, the attribute category 2 may be a probability of an attribute category corresponding to a five-classification mode, and the attribute category 3 may be a probability of an attribute category corresponding to a ten-classification mode.
It is to be understood that the neural network, the predetermined attribute prediction model and the at least one predetermined attribute category prediction model may constitute an image recognition model. Therefore, the image recognition model to be trained may be trained using the image training data to obtain the image recognition model.
204. And weighting the attribute data and the probability of each attribute type according to the first weight value corresponding to the attribute data and the second weight value corresponding to the probability of each attribute type.
205. According to the result of the weighting process, the attribute data after the adjustment process is obtained.
So far, the specified object may be subjected to corresponding authentication operation subsequently according to the obtained attribute data after the adjustment processing.
It will be appreciated that the attribute data may be data including a biometric attribute characteristic, such as age, etc.
It is understood that for different classification manners of the attribute categories, if the classification manner is three-classification, the ages can be classified into three age groups, for example, 0 to 20 (children), 21 to 60 (middle-aged and young), 61 and above (old age).
If the classification is a five-point classification, the ages can be classified into five age groups, for example, 0 to 10 (children), 11 to 20 (teenagers), 21 to 40 (teenagers), 41 to 60 (middle-aged years), 61 and above (elderly).
If the classification is ten-degree, the ages may be classified into ten age groups, for example, 0 to 100, and one age group is 10 years old, and ten age groups are classified.
By adopting the technical scheme provided by the embodiment, the image characteristic information of the image to be processed is obtained, and then the attribute data of the designated object in the image to be processed and the probability of each of at least two attribute categories to which the designated object belongs can be obtained according to the image characteristic information, so that the attribute data can be adjusted according to the probability of each attribute category to obtain the attribute data after adjustment processing.
It is noted that while for simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present disclosure is not limited by the order of acts, as some steps may, in accordance with the present disclosure, occur in other orders and concurrently. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required for the disclosure.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
Fig. 4 is a schematic diagram according to a third embodiment of the present disclosure, as shown in fig. 4. The apparatus 400 for image recognition of the present embodiment may include an obtaining unit 401, an obtaining unit 402, and an adjusting unit 403, where the obtaining unit 401 is configured to obtain image feature information of an image to be processed; an obtaining unit 402, configured to obtain attribute data of a specified object in the image to be processed and a probability of each attribute category of at least two attribute categories to which the specified object belongs according to the image feature information; wherein, each attribute category corresponds to at least one classification mode; an adjusting unit 403, configured to perform adjustment processing on the attribute data according to the probability of each attribute category to obtain the attribute data after the adjustment processing.
It should be noted that, part or all of the image recognition apparatus in this embodiment may be an application located at the local terminal, or may also be a functional unit such as a plug-in or Software Development Kit (SDK) set in the application located at the local terminal, or may also be a processing engine located in a server on the network side, or may also be a distributed system located on the network side, for example, a processing engine or a distributed system in an image processing platform on the network side, and this embodiment is not particularly limited.
It is to be understood that the application may be a native application (native app) installed on the local terminal, or may also be a web page program (webApp) of a browser on the local terminal, which is not limited in this embodiment.
Optionally, in a possible implementation manner of this embodiment, the obtaining unit 401 may be specifically configured to perform feature extraction on the image to be processed by using a preset neural network, so as to obtain the image feature information.
Optionally, in a possible implementation manner of this embodiment, the obtaining unit 402 may be specifically configured to respectively identify the image feature information by using a preset attribute prediction model and at least one preset attribute category prediction model, so as to obtain attribute data of a specified object in the image to be processed and a probability of each attribute category of at least two attribute categories to which the specified object belongs.
Optionally, in a possible implementation manner of this embodiment, the adjusting unit 403 is specifically configured to perform weighting processing on the attribute data and the probabilities of the attribute classes according to a first weight value corresponding to the attribute data and a second weight value corresponding to the probabilities of the attribute classes, and obtain the attribute data after the adjustment processing according to a result of the weighting processing.
Optionally, in a possible implementation manner of this embodiment, the obtaining unit 401 may be further configured to train, by using the image training data, the attribute prediction model to be trained to obtain the preset attribute prediction model, and/or train the attribute category prediction model to be trained to obtain the preset attribute category prediction model.
In this embodiment, the obtaining unit obtains the image feature information of the image to be processed, and then the obtaining unit obtains, according to the image feature information, the attribute data of the specified object in the image to be processed and the probability of each of the at least two attribute categories to which the specified object belongs, so that the adjusting unit can perform adjustment processing on the attribute data according to the probability of each attribute category to obtain the attribute data after the adjustment processing.
In addition, by adopting the technical scheme provided by the embodiment, the image to be processed is subjected to feature extraction by utilizing the preset neural network so as to obtain the image feature information, more accurate and effective image feature information can be obtained, the follow-up process can obtain more accurate and effective attribute data of the object in the image based on the image feature information, and the accuracy of image identification is further improved
In addition, by adopting the technical scheme provided by this embodiment, the image feature information can be respectively identified through the preset attribute prediction model and the at least one preset attribute category prediction model to obtain the attribute data of the designated object and the probability of each of the at least two attribute categories to which the designated object belongs, so that the attribute data of the designated object and the probability of each attribute category can be fused in the following process, and the adjustment of the attribute data of the designated object is realized, thereby further improving the accuracy of the attribute data of the object in the obtained image and improving the accuracy of image identification.
Furthermore, the probability of each of at least two attribute categories to which the designated object belongs is obtained by using at least one preset attribute category prediction model determined according to at least one classification manner corresponding to the attribute categories, and subsequently, the attribute data can be adjusted based on the probabilities of the plurality of attribute categories. Therefore, based on the refined classification of the attribute categories, the probability of the attribute category to which the object belongs can be identified more accurately, and the accuracy of the obtained adjusted attribute data is further improved.
In addition, the attribute data of the specified object can be adjusted by utilizing the probability of each attribute category of the object in the image, so that the fusion constraint of the attribute data of the object in the image and the probability of each attribute category can be realized, the obtained adjusted attribute data is more accurate, and the accuracy of image identification is further improved.
In addition, the preset attribute prediction model and the preset attribute category prediction model with better recognition effect can be obtained by performing model training by using the image training data, and the accuracy of image recognition can be further improved, so that the reliability of the identity verification operation based on the image recognition is further improved.
In the technical scheme of the disclosure, the processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user, such as the image, the attribute data and the like of the user, are all in accordance with the regulations of the relevant laws and regulations, and do not violate the customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 5 illustrates a schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 can also be stored. The calculation unit 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in the electronic device 500 are connected to the I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, or the like; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508, such as a magnetic disk, optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 501 executes the respective methods and processes described above, such as the method of image recognition. For example, in some embodiments, the method of image recognition may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the method of image recognition described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured by any other suitable means (e.g., by means of firmware) to perform the method of image recognition.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.
Claims (13)
1. A method of image recognition, comprising:
acquiring image characteristic information of an image to be processed;
obtaining attribute data of a specified object in the image to be processed and the probability of each attribute category in at least two attribute categories to which the specified object belongs according to the image characteristic information; wherein, each attribute category corresponds to at least one classification mode;
and adjusting the attribute data according to the probability of each attribute type to obtain the adjusted attribute data.
2. The method according to claim 1, wherein the acquiring image feature information of the image to be processed comprises:
and extracting the characteristics of the image to be processed by utilizing a preset neural network so as to obtain the image characteristic information.
3. The method according to claim 1 or 2, wherein the obtaining attribute data of a specified object in the image to be processed and a probability of each of at least two attribute categories to which the specified object belongs according to the image feature information comprises:
and respectively identifying the image characteristic information by utilizing a preset attribute prediction model and at least one preset attribute category prediction model to obtain attribute data of a specified object in the image to be processed and the probability of each attribute category of at least two attribute categories to which the specified object belongs.
4. The method according to any one of claims 1 to 3, wherein the adjusting the attribute data according to the probability of each attribute category to obtain the attribute data after the adjusting comprises:
according to a first weight value corresponding to the attribute data and a second weight value corresponding to the probability of each attribute category, weighting the attribute data and the probability of each attribute category;
and obtaining the attribute data after the adjustment processing according to the weighting processing result.
5. The method according to any one of claims 1-4, wherein the obtaining image feature information of the image to be processed is preceded by:
and training the attribute prediction model to be trained by utilizing the image training data to obtain a preset attribute prediction model, and/or training the attribute category prediction model to be trained to obtain a preset attribute category prediction model.
6. An apparatus for image recognition, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring image characteristic information of an image to be processed;
an obtaining unit, configured to obtain, according to the image feature information, attribute data of a specified object in the image to be processed and a probability of each attribute category of at least two attribute categories to which the specified object belongs; wherein, each attribute category corresponds to at least one classification mode;
and the adjusting unit is used for adjusting the attribute data according to the probability of each attribute type so as to obtain the attribute data after the adjustment.
7. The apparatus according to claim 6, wherein the obtaining unit is specifically configured to:
and extracting the characteristics of the image to be processed by utilizing a preset neural network so as to obtain the image characteristic information.
8. The apparatus according to claim 6 or 7, wherein the obtaining unit is specifically configured to:
and respectively identifying the image characteristic information by utilizing a preset attribute prediction model and at least one preset attribute category prediction model to obtain attribute data of a specified object in the image to be processed and the probability of each attribute category of at least two attribute categories to which the specified object belongs.
9. The apparatus according to any one of claims 6 to 8, wherein the adjusting unit is specifically configured to:
according to a first weight value corresponding to the attribute data and a second weight value corresponding to the probability of each attribute category, carrying out weighting processing on the attribute data and the probability of each attribute category;
and obtaining the attribute data after the adjustment processing according to the weighting processing result.
10. The apparatus according to any one of claims 6-9, wherein the obtaining unit is further configured to:
and training the attribute prediction model to be trained by utilizing the image training data to obtain a preset attribute prediction model, and/or training the attribute category prediction model to be trained to obtain a preset attribute category prediction model.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
12. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-5.
13. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210108176.3A CN114550240A (en) | 2022-01-28 | 2022-01-28 | Image recognition method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210108176.3A CN114550240A (en) | 2022-01-28 | 2022-01-28 | Image recognition method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114550240A true CN114550240A (en) | 2022-05-27 |
Family
ID=81673418
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210108176.3A Pending CN114550240A (en) | 2022-01-28 | 2022-01-28 | Image recognition method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114550240A (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005184228A (en) * | 2003-12-17 | 2005-07-07 | Oen:Kk | Device, method, and program for distributing video content |
CN108665457A (en) * | 2018-05-16 | 2018-10-16 | 腾讯科技(深圳)有限公司 | Image-recognizing method, device, storage medium and computer equipment |
CN111144369A (en) * | 2019-12-31 | 2020-05-12 | 北京奇艺世纪科技有限公司 | Face attribute identification method and device |
CN111444813A (en) * | 2020-03-23 | 2020-07-24 | 北京字节跳动网络技术有限公司 | Method, device, equipment and storage medium for identifying attribute classification of target object |
CN113362852A (en) * | 2020-03-04 | 2021-09-07 | 深圳市腾讯网域计算机网络有限公司 | User attribute identification method and device |
WO2021227874A1 (en) * | 2020-05-11 | 2021-11-18 | 杭州萤石软件有限公司 | Falling behaviour detection method and device |
CN113673583A (en) * | 2021-07-30 | 2021-11-19 | 浙江大华技术股份有限公司 | Image recognition method, recognition network training method and related device |
CN113822199A (en) * | 2021-09-23 | 2021-12-21 | 浙江大华技术股份有限公司 | Object attribute identification method, device, storage medium and electronic device |
CN113902010A (en) * | 2021-09-30 | 2022-01-07 | 北京百度网讯科技有限公司 | Training method of classification model, image classification method, device, equipment and medium |
-
2022
- 2022-01-28 CN CN202210108176.3A patent/CN114550240A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005184228A (en) * | 2003-12-17 | 2005-07-07 | Oen:Kk | Device, method, and program for distributing video content |
CN108665457A (en) * | 2018-05-16 | 2018-10-16 | 腾讯科技(深圳)有限公司 | Image-recognizing method, device, storage medium and computer equipment |
CN111144369A (en) * | 2019-12-31 | 2020-05-12 | 北京奇艺世纪科技有限公司 | Face attribute identification method and device |
CN113362852A (en) * | 2020-03-04 | 2021-09-07 | 深圳市腾讯网域计算机网络有限公司 | User attribute identification method and device |
CN111444813A (en) * | 2020-03-23 | 2020-07-24 | 北京字节跳动网络技术有限公司 | Method, device, equipment and storage medium for identifying attribute classification of target object |
WO2021227874A1 (en) * | 2020-05-11 | 2021-11-18 | 杭州萤石软件有限公司 | Falling behaviour detection method and device |
CN113673583A (en) * | 2021-07-30 | 2021-11-19 | 浙江大华技术股份有限公司 | Image recognition method, recognition network training method and related device |
CN113822199A (en) * | 2021-09-23 | 2021-12-21 | 浙江大华技术股份有限公司 | Object attribute identification method, device, storage medium and electronic device |
CN113902010A (en) * | 2021-09-30 | 2022-01-07 | 北京百度网讯科技有限公司 | Training method of classification model, image classification method, device, equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113657269A (en) | Training method and device for face recognition model and computer program product | |
CN113627361B (en) | Training method and device for face recognition model and computer program product | |
CN114494784A (en) | Deep learning model training method, image processing method and object recognition method | |
CN113657483A (en) | Model training method, target detection method, device, equipment and storage medium | |
CN112800919A (en) | Method, device and equipment for detecting target type video and storage medium | |
CN112861885A (en) | Image recognition method and device, electronic equipment and storage medium | |
CN114186681A (en) | Method, apparatus and computer program product for generating model clusters | |
CN112926308A (en) | Method, apparatus, device, storage medium and program product for matching text | |
CN113051911A (en) | Method, apparatus, device, medium, and program product for extracting sensitive word | |
CN112818227A (en) | Content recommendation method and device, electronic equipment and storage medium | |
CN114490998A (en) | Text information extraction method and device, electronic equipment and storage medium | |
CN113191261B (en) | Image category identification method and device and electronic equipment | |
CN113657248A (en) | Training method and device for face recognition model and computer program product | |
CN115248890A (en) | User interest portrait generation method and device, electronic equipment and storage medium | |
CN112580666A (en) | Image feature extraction method, training method, device, electronic equipment and medium | |
CN115457329B (en) | Training method of image classification model, image classification method and device | |
CN113392920B (en) | Method, apparatus, device, medium, and program product for generating cheating prediction model | |
CN113032251B (en) | Method, device and storage medium for determining service quality of application program | |
CN114842541A (en) | Model training and face recognition method, device, equipment and storage medium | |
CN113806541A (en) | Emotion classification method and emotion classification model training method and device | |
CN114444514A (en) | Semantic matching model training method, semantic matching method and related device | |
CN114067805A (en) | Method and device for training voiceprint recognition model and voiceprint recognition | |
CN113554062A (en) | Training method, device and storage medium of multi-classification model | |
CN113903071A (en) | Face recognition method and device, electronic equipment and storage medium | |
CN114550240A (en) | Image recognition method and device, electronic 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 |