Image recognition method, device and system

By introducing unlabeled data sets to assist face recognition, filtering and balancing the similarity in the image library, the problem of false positives and false negatives caused by the similarity distribution between samples within a class is solved, and the accuracy of face recognition is improved, especially in complex scenarios.

CN118570503BActive Publication Date: 2024-10-25ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411034778.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-10-25
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

Due to the different similarity distributions between samples within a class, existing face recognition technology can easily lead to false positives or false negatives, reducing the recognition accuracy.

Method used

By using unlabeled data sets to assist face recognition, m images in the image library are screened for similarity equalization, and the target image is determined based on the equalized similarity, thereby reducing the interference of similarity distribution between samples within the class and improving recognition accuracy. sex.

Benefits of technology

It effectively improves the accuracy of face recognition, especially in blurry, low-quality, complex lighting and non-face scenes, reducing the false alarm rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570503B_ABST
    Figure CN118570503B_ABST
Patent Text Reader

Abstract

The present invention discloses an image recognition method, device and system. The method includes: extracting image features of an image to be recognized through a feature extraction network, wherein the feature extraction network is obtained by training an unlabeled data set and a labeled data set, wherein the unlabeled data set and the labeled data set correspond to different data categories; comparing the image features with an image base database, determining the first m images with the highest first similarity value, wherein m is a positive integer; comparing the image features with the unlabeled data set, determining the second similarity values ​​corresponding to the m images respectively; and determining the target image corresponding to the image to be recognized from the m images according to the first similarity value and the second similarity value. The above method can effectively reduce interference and improve the accuracy of image recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of face recognition technology, and in particular to an image recognition method, device and system. Background Art

[0002] When performing face recognition, the trained model is mainly used to extract features from the test sample, and based on the facial features extracted from the test sample, the cosine similarity is calculated with the image to be recognized, so as to determine the target image from the test sample based on the cosine similarity result.

[0003] Among them, the existing models mainly perform classification training on the existing N types of training samples to make the distribution of features within the class more compact and at the same time increase the distance between classes, so that the trained model has more discriminative power. However, this method often leads to false positives or false negatives due to the different similarity distributions between samples within the class, which reduces the recognition accuracy of the face recognition model.

[0004] Therefore, how to improve the accuracy of face recognition is an urgent problem that needs to be solved. Summary of the invention

[0005] The present invention provides an image recognition method, device and system for improving the accuracy of image recognition.

[0006] In a first aspect, the present invention provides an image recognition method, which can be performed by an image recognition device, and the method comprises:

[0007] The image features of the image to be identified are extracted through a feature extraction network, wherein the feature extraction network is trained through an unlabeled data set and a labeled data set, and the unlabeled data set and the labeled data set correspond to different data categories; based on the image features, the image features are compared with the image base database to determine the first m images with the highest first similarity values, where m is a positive integer; based on the image features, the second similarity values ​​corresponding to the m images are determined respectively; and according to the first similarity value and the second similarity value, a target image corresponding to the image to be identified is determined from the m images.

[0008] In a possible implementation, comparing the image feature with the unlabeled data set to determine the second similarity values ​​corresponding to the m images respectively includes:

[0009] Select k images with the highest similarity values ​​to the image features from the unlabeled data set; determine k similarity values ​​corresponding to each image in the m images based on the k images respectively; and determine the similarity value obtained after normalizing the k similarity values ​​corresponding to each image as the second similarity value corresponding to the image.

[0010] In a possible implementation manner, determining, from the m images, a target image corresponding to the image to be identified according to the first similarity value and the second similarity value, includes:

[0011] According to the first similarity value and the second similarity value corresponding to each image in the m images, a third similarity value corresponding to each image in the m images is determined; and the image with the highest third similarity value in the m images is determined as the target image corresponding to the image to be identified.

[0012] In a possible implementation manner, determining a third similarity value corresponding to each of the m images according to the first similarity value corresponding to each of the m images and the second similarity value includes:

[0013] A third similarity value corresponding to each image is calculated according to the weight corresponding to the first similarity value and the weight corresponding to the second similarity value.

[0014] In a possible implementation, the feature extraction network is obtained by performing a first-stage training on the labeled data set, and after completing the first-stage training, performing a second-stage training on the unlabeled data set and the labeled data set.

[0015] In a possible implementation, the similarity of the unlabeled data set in the feature extraction network obtained after completing the second stage of training to each data category in the labeled data set is lower than a threshold similarity.

[0016] In a possible implementation manner, the unlabeled data set is obtained according to the labeled training set used to train the feature extraction network.

[0017] Exemplarily, the unlabeled data set is obtained by extracting features from the labeled data set through the feature extraction network and performing normalization processing based on the extracted features.

[0018] In a second aspect, an embodiment of the present invention provides an image recognition device, the device comprising:

[0019] An acquisition module is used to extract image features of the image to be identified through a feature extraction network, wherein the feature extraction network is trained by an unlabeled data set and a labeled data set, and the unlabeled data set and the labeled data set correspond to different data categories;

[0020] A processing module is used to compare the image features with the image database to determine the first m images with the highest first similarity values, where m is a positive integer; compare the image features with the unlabeled data set to determine the second similarity values ​​corresponding to the m images respectively; and determine the target image corresponding to the image to be identified from the m images according to the first similarity value and the second similarity value.

[0021] In a possible implementation manner, the processing module is specifically configured to:

[0022] Select k images with the highest similarity values ​​to the image features from the unlabeled data set; determine k similarity values ​​corresponding to each image in the m images based on the k images respectively; and determine the similarity value obtained after normalizing the k similarity values ​​corresponding to each image as the second similarity value corresponding to the image.

[0023] In a possible implementation manner, the processing module is specifically configured to:

[0024] According to the first similarity value and the second similarity value corresponding to each image in the m images, a third similarity value corresponding to each image in the m images is determined; and the image with the highest third similarity value in the m images is determined as the target image corresponding to the image to be identified.

[0025] In a possible implementation manner, the processing module is specifically configured to:

[0026] A third similarity value corresponding to each image is calculated according to the weight corresponding to the first similarity value and the weight corresponding to the second similarity value.

[0027] In a possible implementation, the feature extraction network is obtained by performing a first-stage training on the labeled data set, and after completing the first-stage training, performing a second-stage training on the unlabeled data set and the labeled data set.

[0028] In a possible implementation, the similarity of the unlabeled data set in the feature extraction network obtained after completing the second stage of training to each data category in the labeled data set is lower than a threshold similarity.

[0029] In a possible implementation manner, the unlabeled data set is obtained according to the labeled training set used to train the feature extraction network.

[0030] In a third aspect, an embodiment of the present invention further provides an image recognition device, comprising a memory and a processor, wherein the memory is used to store computer programs or instructions; the processor is used to call the computer programs or instructions stored in the memory to execute a method in any possible implementation of the first aspect.

[0031] In a fourth aspect, an embodiment of the present application provides a chip system, comprising: a processor and an interface, the processor being used to call and execute a computer program from the interface, and when the processor executes the computer program, the method described in the above-mentioned first aspect or any possible design of the first aspect can be implemented.

[0032] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium has a computer program for executing the method described in the above-mentioned first aspect or any possible design of the first aspect.

[0033] In a sixth aspect, an embodiment of the present application further provides a computer program product, including a computer program, which, when executed, can implement the method described in the above-mentioned first aspect or any possible design of the first aspect.

[0034] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:

[0035] Because the embodiments of the present application, when performing image recognition, for example, in the process of face recognition, introduce an evaluation set consisting of unlabeled data to assist in face recognition, perform similarity equalization on m images screened from the image base, and determine the target image corresponding to the image to be recognized from the m images based on the similarity after equalization, it is possible to reduce the interference caused by the different similarity distributions between samples in different classes during the recognition process, perform recognition more comprehensively, and effectively improve the accuracy of face recognition, especially for some blurred, low-quality, complexly illuminated, non-face and other scenes, which can greatly reduce false alarms. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0037] Figure 1 A schematic diagram of a distribution diagram of images of different qualities in a feature space provided by an embodiment of the present invention;

[0038] Figure 2A schematic diagram of a flow chart corresponding to an image recognition method provided by an embodiment of the present invention;

[0039] Figure 3 A schematic diagram of a training phase provided by an embodiment of the present invention;

[0040] Figure 4 A schematic diagram of a different method for calculating similarity between N-dimensional features provided by an embodiment of the present invention;

[0041] Figure 5 A schematic diagram of the structure of an image recognition device provided by an embodiment of the present invention;

[0042] Figure 6 A schematic diagram of the structure of an image recognition device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] When performing image recognition, for example, in the process of face recognition, the main process is to extract features from the test sample through the trained model, and calculate the cosine similarity with the image to be recognized based on the facial features extracted from the test sample, so as to determine the target image from the test sample based on the cosine similarity result.

[0045] Among them, the model used in the related technology is mainly to classify and train the existing N types of training samples to make the distribution of features within the class more compact, while increasing the distance between classes, so that the trained model has more discriminative power. However, due to the different similarity distributions between samples within the class, this method often leads to false positives or false negatives, reducing the recognition accuracy of the face recognition model.

[0046] Exemplarily, after the classification model is trained, the model is used to extract features from relevant data and normalize the features.

[0047] Among them, Figure 1 As shown in a in the figure, by selecting some pictures and comparing the feature distribution of face pictures and pictures, the embodiment of the present application can preliminarily analyze that for pictures with good image quality and small angles, the feature distribution is sparse and the distance between features is large.

[0048] And as Figure 1As shown in (b), in some blurry, complex lighting, and large-angle scenes, some features are distributed more closely, and the distance between features is small or even tends to overlap.

[0049] Therefore, it is understandable that when performing face recognition, the relevant technical solutions often fail to generate high-score false positives in these scenes due to the feature extraction network not being able to learn the images of these scenes well during recognition.

[0050] In summary, how to improve the accuracy of image recognition is a problem that needs to be solved urgently.

[0051] Based on this, the present application provides an image recognition method. For example, in the process of face recognition, an evaluation set composed of unlabeled data is introduced to assist in face recognition, and the similarity of m images screened from the image library is balanced. According to the similarity after balance, the target image corresponding to the image to be identified is determined from the m images. This can reduce the interference caused by the different similarity distributions between samples in different classes during the recognition process, perform recognition more comprehensively, and effectively improve the accuracy of face recognition, especially for some blurred, low-quality, complex lighting, non-face and other scenes. Pictures can greatly reduce false alarms.

[0052] Among them, in order to better introduce the image recognition method provided by the present application, the full text has been introduced using face recognition as an example. It should be noted that the face recognition scenario described in the present application is only an application scenario of the image recognition method of the present application, and does not constitute a limitation on the embodiments of the present application. Any other recognition scenarios applicable to the image recognition method of the present application belong to the protection scope of the present application.

[0053] Figure 2 A schematic diagram of a flow chart corresponding to the image recognition method provided in an embodiment of the present invention.

[0054] This process can be performed by an image recognition device, which can be implemented by software, hardware, or a combination of software and hardware. Figure 2 As shown, the process includes the following steps:

[0055] Step 201 : extracting image features of an image to be identified through a feature extraction network, wherein the feature extraction network is trained through an unlabeled data set and a labeled data set.

[0056] Among them, the unlabeled data set and the labeled data set described in the embodiment of the present application correspond to different data categories.

[0057] As an example, the feature extraction network described in the embodiment of the present application is obtained by performing a first-stage training with the labeled data set, and after completing the first-stage training, performing a second-stage training again with the unlabeled data set and the labeled data set.

[0058] As an example, after completing the second stage of training, the similarity of the unlabeled data set in the feature extraction network obtained with respect to each data category in the labeled data set is lower than a threshold similarity, so that the feature distribution of the unlabeled data set is not biased towards any category in the labeled data set.

[0059] As an example, assuming that the current application scenario is a face recognition scenario, the labeled data set described in the embodiment of the present application can be understood as a data set with face identities, and the evaluation set of unlabeled data can be understood as an intersection with the labeled data set that does not have the same face identities. Among them, this part of the unlabeled data set may include but is not limited to images of various scenes such as normal scenes, very blurred scenes, complex lighting, large angles, and non-face scenes.

[0060] Step 202: compare the image features with the image database to determine the first m images with the highest first similarity values, where m is a positive integer.

[0061] Step 203 : comparing the image features with the unlabeled data set to determine second similarity values ​​corresponding to the m images respectively.

[0062] As an example, the embodiment of the present application may determine the second similarity values ​​respectively corresponding to the m images in the following manner:

[0063] First, the embodiment of the present application can first select k images with the highest similarity values ​​with the image features from the unlabeled data set. Then, k similarity values ​​corresponding to each image in the m images based on the k images are determined. Finally, the similarity value obtained after normalizing the k similarity values ​​corresponding to each image is determined as the second similarity value corresponding to the image.

[0064] Step 204: Determine a target image corresponding to the image to be identified from the m images according to the first similarity value and the second similarity value.

[0065] As an example, the embodiment of the present application may determine the target image corresponding to the image to be identified from the m images in the following manner:

[0066] Exemplarily, an embodiment of the present application can determine the third similarity value corresponding to each of the m images based on the first similarity value and the second similarity value corresponding to each of the m images, and then determine the image with the highest third similarity value among the m images as the target image corresponding to the image to be identified.

[0067] Furthermore, when determining the third similarity value corresponding to each of the m images based on the first similarity value and the second similarity value corresponding to each of the m images, the third similarity value corresponding to each image can be calculated based on the weight corresponding to the first similarity value and the weight corresponding to the second similarity value.

[0068] Furthermore, in order to better understand the contents described in the embodiments of the present application, the following embodiments are used to introduce the image recognition method provided by the present application in detail in different scenarios:

[0069] Scenario 1: Feature extraction network training.

[0070] Among them, in the embodiment of the present application, during the feature extraction network training process in scenario 1, the following can be done: Figure 3 As shown, the feature extraction network training is divided into two stages.

[0071] Phase 1: Feature extraction network training using labeled data sets.

[0072] By performing classification training on the existing N types of training samples, that is, labeled data sets, margin is added to the loss function to make the distribution of features within the class more dense, while increasing the distance between classes, making the trained model more discriminative, and thus obtaining the feature extraction network A.

[0073] Phase 2: Combine unlabeled datasets to assist in feature extraction network training.

[0074] Specifically, in the embodiment of the present application, the unlabeled data set can be added to the training set according to the target ratio, and used together with the labeled data set as the training set to train the feature extraction network A again.

[0075] As an optional solution, during the training process of stage two, the embodiment of the present application can calculate the correction value of each sample in the corresponding class and the final classification probability; then, select the k categories with the highest classification probability from the N categories of labels to calculate the unlabeled loss; finally, add different weights to the loss generated during the classification training of the training samples corresponding to the N categories of labels and the unlabeled data loss, and optimize the feature extraction network A based on the weights to obtain the feature extraction network B.

[0076] Exemplarily, after completing the first stage of feature extraction network training and obtaining feature extraction network A, the embodiment of the present application adds the unlabeled data set to the training set in a certain proportion for the second stage of training.

[0077] Furthermore, the embodiment of the present application calculates the corrected value (logits) of each sample in the corresponding class and the final classification probability.

[0078] Among them, according to the actual calculation analysis, when it is found that the categories with higher probability account for a very small number of the total number of categories, that is, the similarity between these few categories and the samples is relatively high, at this time, from the perspective of calculation efficiency, the k categories with the highest classification probability can be selected from the N categories to calculate the unlabeled loss. The probability of the k categories can be expressed as:

[0079]

[0080] Furthermore, by continuously reducing probability to achieve the optimization of the goal.

[0081] Among them, the probability Satisfies the following formula 1:

[0082] Formula 1

[0083] Wherein, n in Formula 1 is the total number of labeled categories.

[0084] During the optimization process, a preferred target optimization result is to optimize p1…pk to 1 / n as much as possible. This ideal situation indicates that the similarity between the model's unlabeled data set and the closest k categories in the training set is minimized. At this time, the feature distribution of the unlabeled data set is balanced with each data classification in the labeled data set.

[0085] Furthermore, the loss of the unlabeled data set in the embodiment of the present application can be calculated by the following formula 2:

[0086] Formula 2

[0087] in, represents the loss of unlabeled data.

[0088] Finally, different weights are added to the loss of the labeled dataset and the loss of the unlabeled dataset for comprehensive optimization. For details, see the following formula 3:

[0089] Formula 3

[0090] in, is the classification loss of the labeled dataset, and u is the adjustment The proportionality factor of the loss value.

[0091] The feature extraction network optimization method provided in the present application is easy to implement. The unlabeled data set in the embodiment of the present application can be added flexibly, and the specific scenarios and quantities can be freely selected according to factors such as the recognition scenario and machine computing power. Experiments have shown that a small amount of unlabeled data can achieve better results and increase the generalization ability of the model.

[0092] Scene 2: Image recognition.

[0093] Among them, when the embodiment of the present application performs identification in scenario 2, it can also be refined into the following stages.

[0094] Phase 1: extract image features of the image to be identified through the feature extraction network B, compare the image features with the image database, and determine the top m images with the highest first similarity values, where m is a positive integer.

[0095] For example, assuming that the current search scenario is a 1:N search scenario, that is, a snapshot to image base, based on this scenario, a snapshot can be used to search in a massive image base, and the top m images with the highest similarity ranking are taken as candidates, and then the features of the snapshot and the top m images are calculated to obtain the similarity .

[0096] In the second stage, unlabeled dataset features are introduced to assist in recognition calibration.

[0097] Exemplarily, the calibration of the similarity values ​​of the m images provided in the embodiment of the present application means that during the evaluation process, the obtained unlabeled data set features are used as the reference set for our evaluation. Instead of simply calculating and comparing the cosine similarity of the features of two faces to determine whether they are the same person, a comprehensive consideration of the cosine similarity of the two faces and the respective neighbor relationships of the two faces is used to make the final judgment.

[0098] For example, Figure 4 As shown in a, it means that the cosine similarity of the two features is calculated as the final evaluation score in the evaluation. Figure 4 The b in the figure indicates that while calculating the feature similarity, the image recognition method provided by the present application is used to comprehensively evaluate the influence of the samples of its neighbors.

[0099] Based on the two evaluation methods, it can be seen that when calculating feature similarity, the results of comprehensive evaluation by considering the influence of its neighboring samples are more accurate and more reliable.

[0100] Among them, the embodiment of the present application can perform calibration analysis based on the local similarity of the unlabeled data set. For example, from the representation of the loss function of ArcFace, the local relationship between two images and their neighbors can be expressed as the following formula 4:

[0101] Formula 4

[0102] in, is the coefficient;

[0103] It can be expressed as the following formula 5:

[0104] Formula 5

[0105] It can be expressed as the following formula 6:

[0106] Formula 6

[0107] Among them, the above Given The relationship representation with its respective k closest unlabeled samples.

[0108] The corrected similarity relationship between the features of two images is expressed as the following formula 7:

[0109] Formula 7

[0110] Where u is the coefficient, is the cosine similarity of the features of two images.

[0111] Furthermore, when applied to 1:N top1 retrieval, T needs to be normalized.

[0112] Specifically, when applied to 1:N top1 retrieval, the k local similarities are sorted, the maximum local similarity and the minimum local similarity are determined, and the normalized similarity is calculated for each local similarity; the m similarity values ​​are calibrated based on the normalized similarity.

[0113] Exemplarily, each of the first m base images is paired with the unlabeled dataset, and the k most similar images corresponding to each of the m base images are searched in the unlabeled dataset according to the above steps and the local similarities are calculated, and the first k local similarities are sorted and the maximum value T is recorded. max and minimum value T min , and calculate the normalized similarity for each local similarity.

[0114] Finally, the similarity of the first m calibrations can be expressed as the following formula 8:

[0115] Formula 8

[0116] In actual application scenarios, in 1:N retrieval, the image retrieved from the base database may not be the same person as the snapshot photo. It is possible that the base database corresponding to the snapshot photo is ranked second or fifth. By introducing unlabeled data for calibration, the similarity distribution of the corresponding images can be calibrated to a very close level, thereby improving the first-place hit rate of 1:N.

[0117] In addition, the face recognition method provided in the embodiment of the present application can also be applied to the special optimization of complex scenes. For example, for scenes in actual application scenes that are prone to high-score false alarms, such as blur, large-angle side faces, and occlusion, we can solve the false alarm problem in this regard in a targeted manner by constructing an unlabeled training set. For example, for the large-angle problem, a large number of samples containing large-angle faces can be added to the unlabeled data set. In the training stage, the distance between normal samples and large-angle face samples is widened so that the model can handle this problem well. In the 1:N test stage, false alarms can be reduced to a certain extent by recalibrating the similarity.

[0118] In addition, it should be understood that in this application, "multiple" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In the text description of this application, the character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0119] In addition, unless otherwise specified, the embodiments of the present application mention ordinal numbers such as "first" and "second" for distinguishing between multiple objects, and are not used to limit the order, timing, priority or importance of multiple objects, and the descriptions of "first" and "second" do not limit the objects to be different.

[0120] The various digital numbers involved in this application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. The size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and inherent logic. In this application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations, and any embodiment or design described as "exemplary" or "for example" should not be interpreted as being more preferred or more advantageous than other embodiments or designs. The use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.

[0121] Figure 5FIG. 5 is a schematic diagram of an internal module of an image recognition device 500 provided in an embodiment of the present invention. Figure 5 As shown, the device may include: an acquisition module 501 and a processing module 502, and optionally, a storage module, the storage module is used to store computer instructions or programs, and the processing module 502 can call the computer instructions or programs in the storage module.

[0122] An acquisition module 501 is used to extract image features of an image to be identified through a feature extraction network, wherein the feature extraction network is trained by an unlabeled data set and a labeled data set, and the unlabeled data set and the labeled data set correspond to different data categories;

[0123] The processing module 502 is used to compare the image features with the image database to determine the first m images with the highest first similarity values, where m is a positive integer; compare the image features with the unlabeled data set to determine the second similarity values ​​corresponding to the m images respectively; and determine the target image corresponding to the image to be identified from the m images according to the first similarity value and the second similarity value.

[0124] In a possible implementation, the processing module 502 is specifically configured to:

[0125] Select k images with the highest similarity values ​​to the image features from the unlabeled data set; determine k similarity values ​​corresponding to each image in the m images based on the k images respectively; and determine the similarity value obtained after normalizing the k similarity values ​​corresponding to each image as the second similarity value corresponding to the image.

[0126] In a possible implementation, the processing module 502 is specifically configured to:

[0127] According to the first similarity value and the second similarity value corresponding to each image in the m images, a third similarity value corresponding to each image in the m images is determined; and the image with the highest third similarity value in the m images is determined as the target image corresponding to the image to be identified.

[0128] In a possible implementation, the processing module 502 is specifically configured to:

[0129] A third similarity value corresponding to each image is calculated according to the weight corresponding to the first similarity value and the weight corresponding to the second similarity value.

[0130] In a possible implementation, the feature extraction network is obtained by performing a first-stage training on the labeled data set, and after completing the first-stage training, performing a second-stage training on the unlabeled data set and the labeled data set.

[0131] In a possible implementation, the similarity of the unlabeled data set in the feature extraction network obtained after completing the second stage of training to each data category in the labeled data set is lower than a threshold similarity.

[0132] In a possible implementation manner, the unlabeled data set is obtained according to the labeled training set used to train the feature extraction network.

[0133] Figure 6 FIG. 6 is a schematic diagram of a structure of an image recognition device 600 provided in an embodiment of the present invention. Figure 6 As shown, it includes at least one processor 601 and a memory 602 connected to the at least one processor 601. The specific connection medium between the processor 601 and the memory 602 is not limited in the embodiment of the present application. Figure 6 For example, the processor 601 and the memory 602 are connected via a bus. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0134] In the embodiment of the present invention, the memory 602 stores instructions that can be executed by at least one processor 601. The at least one processor 601 can implement the steps of the above-mentioned face recognition method by executing the instructions stored in the memory 602.

[0135] The processor 601 is the control center of the computer device, and can use various interfaces and lines to connect various parts of the computer device, and perform resource settings by running or executing instructions stored in the memory 602 and calling data stored in the memory 602. Optionally, the processor 601 may include one or more processing units, and the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 601. In some embodiments, the processor 601 and the memory 602 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.

[0136] Processor 601 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0137] The memory 602 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 602 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, and the like. The memory 602 is any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 602 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0138] Based on the same technical concept, an embodiment of the present application also provides a computer-readable storage medium, in which computer-readable instructions are stored. When a computer reads and executes the computer-readable instructions, the computer executes a method in any possible design of the first aspect mentioned above.

[0139] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0140] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0141] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0142] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0143] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. An image recognition method, characterized in that: The method comprises: Extracting image features of the image to be identified through a feature extraction network, wherein the feature extraction network is obtained by performing a first-stage training on a labeled data set, and after completing the first-stage training, performing a second-stage training again on an unlabeled data set and the labeled data set, wherein the unlabeled data set and the labeled data set correspond to different data categories; Based on the comparison between the image feature and the image base database, first m images having the highest first similarity value with the image feature are determined from the image base database, where m is a positive integer; Based on the m images and the image features, compare with the unlabeled dataset to determine a second similarity value corresponding to each image in the m images relative to some or all images in the unlabeled dataset; Determine a third similarity value corresponding to each of the m images according to the first similarity value and the second similarity value corresponding to each of the m images; The image with the highest third similarity value among the m images is determined as the target image corresponding to the image to be identified.

2. The method according to claim 1, characterized in that The comparing the m images and the image features with the unlabeled dataset to determine a second similarity value of each of the m images relative to part or all of the images in the unlabeled dataset includes: Based on the comparison between the image features and the unlabeled data set, k images having the highest similarity values ​​with the image features are selected from the unlabeled data set; Determine k similarity values ​​corresponding to each image in the m images based on the k images respectively; The similarity value obtained after normalizing the k similarity values ​​corresponding to each image is determined as the second similarity value corresponding to the image.

3. The method according to claim 1, characterized in that The determining, according to the first similarity value and the second similarity value corresponding to each image in the m images, a third similarity value corresponding to each image in the m images comprises: A third similarity value corresponding to each image is calculated according to the weight corresponding to the first similarity value and the weight corresponding to the second similarity value.

4. The method according to claim 1, characterized in that: After completing the second stage of training, the similarity of the unlabeled data set in the feature extraction network to each data category in the labeled data set is lower than a threshold similarity.

5. An image recognition device, characterized in that: include: An acquisition module is used to extract image features of the image to be identified through a feature extraction network, wherein the feature extraction network is obtained by performing a first-stage training on a labeled data set, and after completing the first-stage training, performing a second-stage training again on an unlabeled data set and the labeled data set, wherein the unlabeled data set and the labeled data set correspond to different data categories; A processing module is used to compare the image feature with an image base database based on the image feature, and determine the first m images with the highest first similarity value with the image feature from the image base database, where m is a positive integer; based on the m images and the image feature, compare with the unlabeled data set to determine a second similarity value corresponding to each of the m images with respect to some or all images in the unlabeled data set; According to the first similarity value and the second similarity value corresponding to each image in the m images, a third similarity value corresponding to each image in the m images is determined; and the image with the highest third similarity value in the m images is determined as the target image corresponding to the image to be identified.

6. An image recognition device, characterized in that: include: Memory, used to store computer programs or instructions; A processor, configured to call a computer program or instruction stored in the memory to execute the method according to any one of claims 1 to 4.

7. An image recognition system, characterized in that: The system comprises: A processor and an interface, wherein the processor is used to call and execute a computer program from the interface, and when the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when a computer reads and executes the instructions, the computer executes the method according to any one of claims 1 to 4.