Image desensitization and recognition method, device, computer equipment and readable storage medium

By constructing a face feature extraction model and feature distinction rules to filter the target face feature vector set, the problem of feature leakage in face recognition is solved, and an image desensitization method that protects user privacy while retaining recognition characteristics is realized.

CN114140853BActive Publication Date: 2025-08-05GUIYANG TIANYI HUIHE BIG DATA CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111465096.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-03
Publication Date
2025-08-05
Estimated Expiration
2041-12-03

AI Technical Summary

Technical Problem

The prior art has problems of feature leakage and privacy violations in facial recognition, and it is difficult to preserve the original feature distinction while protecting user privacy and security.

Method used

A face feature extraction model is constructed, a preset number of face images is randomly selected from the public face image database, the initial face feature vector set is extracted, the target face feature vector set is filtered according to the preset feature distinction rules, and the desensitized face feature vector is featured desensitized to generate a desensitized feature vector.

Benefits of technology

It realizes that while retaining recognition characteristics, effectively protect user privacy and prevent feature vector backtracking, and the desensitized feature vector can still be used for facial image feature clustering and recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114140853B_ABST
    Figure CN114140853B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses an image desensitization and recognition method, apparatus, computer equipment and readable storage medium, the method comprising: constructing a facial feature extraction model; extracting facial feature vectors of a preset number of facial images from a preset facial image database based on the facial feature extraction model to obtain an initial facial feature vector set; screening a target facial feature vector set from the initial facial feature vector set according to a preset feature distinction rule; and performing feature desensitization on facial feature vectors to be desensitized according to the target facial feature vector set to obtain desensitized feature vectors. The image desensitization method provided in the present application can obtain multi-dimensional desensitized feature vectors by collecting a large number of facial feature vectors and performing feature desensitization on facial images to be desensitized using a large number of facial feature vectors, thereby effectively protecting the user's personal privacy while retaining recognition characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an image desensitization and recognition method, device, computer equipment and readable storage medium. Background Art

[0002] Automatic face recognition is an important technology, but there are problems such as feature leakage and privacy infringement in the extraction of facial features.

[0003] In face recognition, current deep learning models learn from a large number of faces and convert them into fixed-dimensional feature codes. Numerous scientific research findings have shown that these feature codes can leak information about the original image and can even be used to infer the original image, creating the potential for data leaks.

[0004] Therefore, there is an urgent need for an image desensitization technology that can protect user privacy and security while retaining the original feature discrimination. Summary of the Invention

[0005] To solve the above technical problems, the present application provides an image desensitization and recognition method, apparatus, computer device, and readable storage medium. The specific solutions are as follows:

[0006] In a first aspect, an embodiment of the present application provides an image desensitization method, the method comprising:

[0007] Build a facial feature extraction model;

[0008] Extracting facial feature vectors of a preset number of facial images from a preset facial image database based on the facial feature extraction model to obtain an initial facial feature vector set;

[0009] Filtering a target facial feature vector set from the initial facial feature vector set according to a preset feature distinction rule;

[0010] The face feature vector to be desensitized is subjected to feature desensitization according to the target face feature vector set to obtain a desensitized feature vector.

[0011] According to a specific implementation of the embodiment of the present application, the step of screening the target facial feature vector set according to the preset feature distinction rule and the initial facial feature vector set includes:

[0012] Calculating a vector distance between a first facial feature vector and a second facial feature vector, where the first facial feature vector and the second facial feature vector are any two different facial feature vectors in the initial facial feature vector set;

[0013] A first facial feature vector and a second facial feature vector corresponding to multiple distances greater than a preset distance threshold are selected to form a target facial feature vector set, wherein the vector distances between the facial feature vectors in the target facial feature vector set are all greater than the preset distance threshold.

[0014] According to a specific implementation of the embodiment of the present application, the step of extracting facial feature vectors of a preset number of facial images from a preset facial image database based on the facial feature extraction model to obtain an initial facial feature vector set includes:

[0015] Randomly select a preset number of face images from a public face image database;

[0016] A preset number of facial feature vectors are extracted from a preset number of facial images based on a facial feature extraction model to obtain an initial facial feature vector set.

[0017] According to a specific implementation of the embodiment of the present application, before the step of extracting facial feature vectors of a preset number of facial images from a preset facial image database based on the facial feature extraction model to obtain an initial facial feature vector set, the method further includes:

[0018] Obtain the face image to be desensitized;

[0019] The facial feature vector of the face image to be desensitized is extracted based on the facial feature extraction model to obtain the facial feature vector to be desensitized.

[0020] According to a specific implementation of the embodiment of the present application, the step of performing feature desensitization based on the target facial feature vector and the facial feature vector to be desensitized to obtain a desensitized feature vector includes:

[0021] Calculating the distances between the facial feature vector to be desensitized and each facial feature vector in the target facial feature vector set respectively to obtain a distance set corresponding to the number of facial feature vectors in the target facial feature vector set;

[0022] A desensitized feature vector is generated according to the distance set.

[0023] In a second aspect, an embodiment of the present application provides an image recognition method, the method comprising:

[0024] Obtain the image to be recognized;

[0025] Obtaining a desensitized feature vector of the image to be identified, wherein the desensitized feature vector of the image to be identified is obtained by processing the image to be identified according to the image desensitization method described in the first aspect;

[0026] Calculating the vector similarity between the desensitized feature vector and the reference recognition feature vector;

[0027] Comparing whether the vector similarity is greater than or equal to a preset similarity threshold;

[0028] If the vector similarity is greater than or equal to a preset similarity threshold, outputting a result indicating that the image to be identified has passed the recognition;

[0029] If the vector similarity is less than a preset similarity threshold, a result indicating that the image to be identified fails recognition is output.

[0030] In a third aspect, an embodiment of the present application provides an image desensitization device, comprising:

[0031] Model building module, used to build a facial feature extraction model;

[0032] A feature extraction module is used to extract facial feature vectors of a preset number of facial images from a preset facial image database based on the facial feature extraction model to obtain an initial facial feature vector set;

[0033] A feature calculation module, configured to filter a target facial feature vector set based on a preset feature distinction rule and the initial facial feature vector set;

[0034] The feature desensitization module is used to perform feature desensitization on the face feature vector to be desensitized according to the target face feature vector set to obtain a desensitized feature vector.

[0035] In a fourth aspect, an embodiment of the present application provides an image recognition device, comprising:

[0036] An image acquisition module, used to acquire an image to be identified;

[0037] an image desensitization module, configured to obtain a desensitized feature vector of the image to be identified, wherein the desensitized feature vector of the image to be identified is obtained by processing the image to be identified according to the image desensitization method described in the first aspect;

[0038] A similarity calculation module, used to calculate the vector similarity between the desensitized feature vector and the target recognition feature vector;

[0039] A similarity comparison module, configured to compare whether the vector similarity is greater than or equal to a preset similarity threshold;

[0040] A first execution module is configured to output a result indicating that the image to be identified has passed the recognition if the vector similarity is greater than or equal to a preset similarity threshold;

[0041] The second execution module is configured to output a result indicating that the image to be identified fails recognition if the vector similarity is less than a preset similarity threshold.

[0042] In a fifth aspect, an embodiment of the present application provides a computer device comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program runs on the processor, it executes the image desensitization method described in the first aspect and the image recognition method described in the second aspect.

[0043] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium. When the computer program runs on a processor, the image desensitization method described in the first aspect and the image recognition method described in the second aspect are executed.

[0044] The embodiments of the present application provide an image desensitization and recognition method, apparatus, computer equipment, and readable storage medium, the method comprising: constructing a facial feature extraction model; extracting facial feature vectors of a preset number of facial images from a preset facial image database based on the facial feature extraction model to obtain an initial facial feature vector set; screening a target facial feature vector set from the initial facial feature vector set according to a preset feature distinction rule; and performing feature desensitization on the facial feature vectors to be desensitized according to the target facial feature vector set to obtain a desensitized feature vector. The image desensitization method provided in the present application can obtain a multi-dimensional desensitized feature vector by collecting a large number of facial feature vectors and performing feature desensitization on the facial images to be desensitized using a large number of facial feature vectors, thereby effectively protecting the user's personal privacy while retaining the recognition characteristics. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope of protection of the present invention. In each of the drawings, similar components are numbered similarly.

[0046] Figure 1 A schematic diagram of the method flow of the image desensitization method provided in an embodiment of the present application is shown;

[0047] Figure 2 A schematic diagram of the application process of the image desensitization method provided in an embodiment of the present application is shown;

[0048] Figure 3 A schematic diagram of the method flow of the image recognition method provided by an embodiment of the present application is shown;

[0049] Figure 4 A schematic diagram of a device module of an image desensitization device provided in an embodiment of the present application is shown;

[0050] Figure 5A schematic diagram of device modules of an image recognition device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0051] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0052] The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the figures is not intended to limit the scope of the claimed invention, but rather merely represents selected embodiments of the present invention. All other embodiments derived by those skilled in the art based on the embodiments of the present invention without inventive effort are intended to be within the scope of protection of the present invention.

[0053] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present invention, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or the possibility of adding one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.

[0054] Furthermore, the terms “first,” “second,” “third,” etc., are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0055] Unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by those skilled in the art to which the various embodiments of the present invention pertain. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meaning as in the context of the relevant technical field and will not be interpreted as having an idealized meaning or an overly formal meaning unless clearly defined in the various embodiments of the present invention.

[0056] In the application of some sensitive facial features, the features need to be desensitized. In order to solve the problem of facial feature desensitization, common desensitization methods include smoothing the features; reducing the dimension of feature extraction and reducing the amount of extracted features; encrypting the features and decrypting them only during feature comparison.

[0057] However, the above methods all have certain problems during use. The method of smoothing the features has too much computational complexity; the method of reducing the dimension of feature extraction and the amount of extracted features has the risk of feature leakage; the method of encrypting the features and decrypting them only when comparing the features cannot overcome the possibility of memory leakage.

[0058] In many scenarios, it is often not necessary for user recognition to reach an accuracy rate of more than 99%, but only partial satisfaction is sufficient. For example, to identify the gender characteristics of men and women, or the characteristics of age, it is still a waste of high-dimensional feature desensitization methods.

[0059] This application proposes an image desensitization method based on a low-latitude, non-100% retention of original feature characteristics and public face data sources.

[0060] refer to Figure 1 , is a method flow diagram of an image desensitization method provided in an embodiment of the present application. The image desensitization method provided in an embodiment of the present application includes:

[0061] Step S101, constructing a facial feature extraction model;

[0062] In a specific embodiment, the facial feature extraction model is used to detect the facial region image in the image to be desensitized and extract the feature vector corresponding to the facial region image. It should be noted that the specific construction method of the facial feature extraction model can be implemented using existing technologies and will not be described in detail here.

[0063] The facial features may be, for example, gender, age, face shape, etc.

[0064] After constructing the facial feature extraction model, the facial feature extraction model is set in advance in a terminal device with image acquisition and image analysis functions. When the terminal device performs facial feature recognition, the facial feature extraction model can be automatically called to extract facial features in the image.

[0065] According to a specific implementation of the embodiment of the present application, before the step of extracting facial feature vectors of a preset number of facial images from a preset facial image database based on the facial feature extraction model to obtain an initial facial feature vector set, the method further includes:

[0066] Obtain the face image to be desensitized;

[0067] The facial feature vector of the face image to be desensitized is extracted based on the facial feature extraction model to obtain the facial feature vector to be desensitized.

[0068] In a specific embodiment, the image desensitization method is applied to a terminal device with an image acquisition function. When a user needs to perform functions such as facial feature recognition, the terminal device captures a facial image through an image acquisition device and uses the facial image as the facial image to be desensitized.

[0069] After obtaining the facial image to be desensitized, the terminal device extracts the facial feature vector of the facial image to be desensitized through the facial feature extraction model, so as to facilitate the subsequent image desensitization step.

[0070] Step S102, extracting facial feature vectors of a preset number of facial images from a preset facial image database based on the facial feature extraction model to obtain an initial facial feature vector set;

[0071] In a specific embodiment, the preset face image database may be any public image database, such as the publicly available CASIA-FaceV5 face collection.

[0072] The terminal device randomly extracts a preset number of facial images from a public image database, and extracts facial feature vectors corresponding to the preset number of facial images through a facial feature extraction model constructed in advance, thereby obtaining an initial facial feature vector set with a preset number of facial feature vectors.

[0073] The facial feature vector may be a 256-dimensional vector or a 512-dimensional vector. The specific number of dimensions may be adaptively changed according to the facial feature extraction model used and is not limited here.

[0074] In the step of randomly extracting a preset number of facial images from a public image database, the terminal device may extract the facial images according to a random algorithm. The setting of the random algorithm ensures that different initial facial feature vector sets are used when performing feature desensitization on different images to be desensitized. Furthermore, after feature desensitization is performed on the images to be desensitized, the user cannot trace the initial facial feature vector set.

[0075] Step S103, filtering a target facial feature vector set from the initial facial feature vector set according to a preset feature distinction rule;

[0076] In a specific embodiment, after obtaining the initial facial feature vector set, it is necessary to perform a preset screening step on the initial facial feature vector set to obtain a target facial feature vector set that can distinguish features.

[0077] The preset feature differentiation rule is to divide the facial feature vectors in the initial facial feature vector set according to feature types, and filter out facial feature vectors of different types to form a target facial feature vector set.

[0078] According to a specific implementation of the embodiment of the present application, the step of screening the target facial feature vector set according to the preset feature distinction rule and the initial facial feature vector set includes:

[0079] Calculating a vector distance between a first facial feature vector and a second facial feature vector, where the first facial feature vector and the second facial feature vector are any two different facial feature vectors in the initial facial feature vector set;

[0080] A first facial feature vector and a second facial feature vector corresponding to multiple distances greater than a preset distance threshold are selected to form a target facial feature vector set, wherein the vector distances between the facial feature vectors in the target facial feature vector set are all greater than the preset distance threshold.

[0081] In a specific embodiment, after the initial facial feature vector set is obtained, a step of calculating vector distance is performed. The step of calculating vector distance includes calculating the distance between any two facial feature vectors in the initial facial feature vector set.

[0082] The distance calculation formula may be a vector distance calculation formula such as Euclidean distance, cosine distance or Manhattan distance.

[0083] The preset distance threshold is adaptively set according to the distance calculation formula, and is not specifically limited here. It should be noted that the selection of the preset distance threshold can make the facial feature vectors in the target facial feature vector set have higher discrimination.

[0084] After calculating the distances between any two facial feature vectors in the initial facial feature vector set, the calculated distances are arranged in descending order, and the target facial feature vector is selected starting from the maximum distance.

[0085] M target facial feature vectors whose distances between any two facial feature vectors are greater than a preset distance threshold are selected to form a target facial feature vector set, where M is an arbitrary positive integer.

[0086] The number of target facial feature vectors can be adaptively changed according to the setting of a preset distance threshold. Since the facial feature vectors in the initial facial feature vector set are selected based on a random algorithm, the number of target facial feature vectors is not fixed for different facial images to be desensitized.

[0087] It should be noted that if the facial feature vectors in the initial facial feature vector set are screened according to a preset distance threshold, and the number of target facial feature vectors screened out is greater than the preset number or less than the preset number, the terminal device can re-acquire the initial facial feature vector set and set a new distance threshold for iterative screening so that the number of target facial feature vectors can retain sufficient feature discrimination.

[0088] Step S104: performing feature desensitization on the face feature vector to be desensitized according to the target face feature vector set to obtain a desensitized feature vector.

[0089] In a specific embodiment, Figure 2 As shown, the face feature vector to be desensitized is desensitized according to the target face feature vector set, thereby obtaining a desensitized feature vector with M distances.

[0090] According to a specific implementation of the embodiment of the present application, the step of performing feature desensitization based on the target facial feature vector and the facial feature vector to be desensitized to obtain a desensitized feature vector includes:

[0091] Calculating the distances between the facial feature vector to be desensitized and each facial feature vector in the target facial feature vector set respectively to obtain a distance set corresponding to the number of facial feature vectors in the target facial feature vector set;

[0092] A desensitized feature vector is generated according to the distance set.

[0093] In a specific embodiment, after obtaining the facial feature vector to be desensitized and the target facial feature vector set, the distances between the facial feature vector to be desensitized and each target facial feature vector are calculated, so that M number of distances can be obtained. By combining the M number of distances, a desensitized feature vector with M dimensions can be obtained.

[0094] After obtaining the desensitized feature vector, the desensitized feature vector can be used to perform technical actions such as facial feature clustering and facial feature recognition.

[0095] The image desensitization method provided in the embodiments of the present application can perform feature desensitization on any facial image, and users cannot backtrack based on the desensitized feature vector, thereby effectively protecting the privacy of the user's image. In addition, the desensitized feature vector in the embodiments of the present application can still be used for facial image feature clustering and facial image feature recognition, while ensuring the convenience and privacy of desensitization while still retaining a certain degree of differentiation of the original features.

[0096] refer to Figure 3, is a method flow diagram of an image recognition method provided in an embodiment of the present application. The image recognition method provided in an embodiment of the present application includes:

[0097] Step S201, obtaining an image to be recognized;

[0098] In a specific embodiment, the image recognition method may be performed by using a terminal device having an image acquisition device, and the terminal device acquires a facial image to be recognized through the image acquisition device.

[0099] Step S202: obtaining a desensitized feature vector of the image to be identified, wherein the desensitized feature vector of the image to be identified is obtained by processing the image to be identified according to the image desensitization method in the above embodiment;

[0100] The image to be identified is subjected to feature desensitization by the specific implementation method in the above-mentioned image desensitization method embodiment to obtain a desensitized feature vector. The desensitization process can refer to the specific implementation process in the above-mentioned image desensitization method embodiment, and will not be repeated here.

[0101] Step S203, calculating the vector similarity between the desensitized feature vector and the reference recognition feature vector;

[0102] In a specific embodiment, the reference recognition feature vector is a face feature vector set in advance in the terminal device database. The setting of the reference recognition feature vector can be adaptively set according to the needs of face feature recognition in actual application, and is not a sole limitation here.

[0103] After obtaining the desensitized feature vector of the image to be identified, the vector similarity between the desensitized feature vector and the reference identification feature vector may be calculated by dot multiplication.

[0104] It should be noted that the calculation of the vector similarity may also adopt other existing similarity calculation methods. The specific similarity calculation method may be adaptively replaced according to the distance calculation formula in the above-mentioned image desensitization method embodiment, which is not limited here.

[0105] Step S204, comparing whether the vector similarity is greater than or equal to a preset similarity threshold;

[0106] Step S205: If the vector similarity is greater than or equal to a preset similarity threshold, outputting a result indicating that the image to be identified has passed the recognition;

[0107] Step S206: If the vector similarity is less than a preset similarity threshold, a result indicating that the image to be identified has failed recognition is output.

[0108] In a specific embodiment, after calculating the vector similarity between the desensitized feature vector of the image to be identified and the reference identification feature vector, the vector similarity is compared with a preset similarity threshold. If the vector similarity is greater than or equal to the similarity threshold, the image to be identified can be output as a positive identification result. The mobile device can then use the positive identification result or the desensitized feature vector of the image to be identified to continue performing other actions.

[0109] The image recognition method provided in the embodiment of the present application can complete the recognition of facial features in most scenarios. While being convenient to use, it can also maximize the privacy of the image to be recognized and prevent illegal users from tracing back to find the user's facial image based on the recognition results.

[0110] refer to Figure 4 , is a schematic diagram of a device module of an image desensitization device 400 provided in an embodiment of the present application. The image desensitization device 400 provided in an embodiment of the present application includes:

[0111] Model building module 401, used to build a facial feature extraction model;

[0112] A feature extraction module 402 is configured to extract facial feature vectors of a preset number of facial images from a preset facial image database based on the facial feature extraction model to obtain an initial facial feature vector set;

[0113] A feature calculation module 403 is configured to filter a target facial feature vector set based on a preset feature distinction rule and the initial facial feature vector set;

[0114] The feature desensitization module 404 is configured to perform feature desensitization on the face feature vector to be desensitized according to the target face feature vector set to obtain a desensitized feature vector.

[0115] refer to Figure 5 , is a schematic diagram of a device module of an image recognition device 500 provided in an embodiment of the present application. The image recognition device 500 provided in the present application includes:

[0116] An image acquisition module 501 is used to acquire an image to be identified;

[0117] An image desensitization module 502 is configured to obtain a desensitized feature vector of the image to be identified, wherein the desensitized feature vector of the image to be identified is obtained by processing the image to be identified according to the image desensitization method in the above embodiment;

[0118] A similarity calculation module 503 is used to calculate the vector similarity between the desensitized feature vector and the target recognition feature vector;

[0119] A similarity comparison module 504 is configured to compare whether the vector similarity is greater than or equal to a preset similarity threshold;

[0120] A first execution module 505 is configured to output a result indicating that the image to be identified has passed the recognition if the vector similarity is greater than or equal to a preset similarity threshold;

[0121] The second execution module 506 is configured to output a result indicating that the image to be identified fails recognition if the vector similarity is less than a preset similarity threshold.

[0122] In addition, an embodiment of the present application provides a computer device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program runs on the processor, it executes the image desensitization method and the image recognition method in the above-mentioned embodiment.

[0123] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is run on a processor, the image desensitization method and the image recognition method in the above-mentioned embodiment are executed.

[0124] In summary, the embodiments of the present application provide an image desensitization and recognition method, device, computer equipment and readable storage medium. The embodiments of the present application ensure the randomness of the desensitization calculation steps in the image desensitization process by randomly collecting a preset number of pictures in a public image database, thereby effectively preventing the user from backtracking through the desensitization feature vector and protecting the user's personal privacy. In addition, the image desensitization method in the embodiments of the present application can be used to perform feature desensitization for any facial image. The present application does not rely on a specific feature extraction model, and a more efficient model can be selected for feature desensitization. The image recognition method provided in the embodiments of the present application can achieve rapid recognition, and the desensitized feature vector has a certain degree of discrimination, so that it can be applied to more functions. In addition, the specific implementation methods of the image desensitization device, image recognition device, computer equipment and computer-readable storage medium provided in the embodiments of the present application can refer to the specific implementation methods of the above-mentioned image desensitization method embodiments and image recognition method embodiments, and will not be repeated here.

[0125] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or flowchart, and the combination of boxes in the structure diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.

[0126] In addition, the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0127] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0128] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered by the scope of protection of the present invention.

Claims

1. An image desensitization method, characterized in that: The method comprises: Build a facial feature extraction model; Extracting facial feature vectors of a preset number of facial images from a preset facial image database based on the facial feature extraction model to obtain an initial facial feature vector set; Filtering a target facial feature vector set from the initial facial feature vector set according to a preset feature distinction rule; Performing feature desensitization on the face feature vector to be desensitized according to the target face feature vector set to obtain a desensitized feature vector; The preset feature differentiation rule is to divide the facial feature vectors in the initial facial feature vector set according to feature types, and filter out facial feature vectors of different types to form a target facial feature vector set; The step of performing feature desensitization on the face feature vector to be desensitized according to the target face feature vector set to obtain a desensitized feature vector comprises: Calculating the distances between the facial feature vector to be desensitized and each facial feature vector in the target facial feature vector set respectively to obtain a distance set corresponding to the number of facial feature vectors in the target facial feature vector set; A desensitized feature vector is generated according to the distance set.

2. The image desensitization method according to claim 1, characterized in that: The step of screening the target facial feature vector set from the initial facial feature vector set according to the preset feature differentiation rule comprises: Calculating a vector distance between a first facial feature vector and a second facial feature vector, where the first facial feature vector and the second facial feature vector are any two different facial feature vectors in the initial facial feature vector set; A first facial feature vector and a second facial feature vector corresponding to multiple distances greater than a preset distance threshold are selected to form a target facial feature vector set, wherein the vector distances between the facial feature vectors in the target facial feature vector set are all greater than the preset distance threshold.

3. The image desensitization method according to claim 1, characterized in that: The step of extracting facial feature vectors of a preset number of facial images from a preset facial image database based on the facial feature extraction model to obtain an initial facial feature vector set includes: Randomly select a preset number of face images from a public face image database; A preset number of facial feature vectors are extracted from a preset number of facial images based on a facial feature extraction model to obtain an initial facial feature vector set.

4. The image desensitization method according to claim 1, characterized in that: Before the step of extracting facial feature vectors of a preset number of facial images from a preset facial image database based on the facial feature extraction model to obtain an initial facial feature vector set, the method further includes: Obtain the face image to be desensitized; The facial feature vector of the face image to be desensitized is extracted based on the facial feature extraction model to obtain the facial feature vector to be desensitized.

5. An image recognition method, characterized in that: The method comprises: Obtain the image to be recognized; Obtaining a desensitized feature vector of the image to be identified, wherein the desensitized feature vector of the image to be identified is obtained by processing the image to be identified using the image desensitization method according to any one of claims 1 to 4; Calculating the vector similarity between the desensitized feature vector and the reference recognition feature vector; Comparing whether the vector similarity is greater than or equal to a preset similarity threshold; If the vector similarity is greater than or equal to a preset similarity threshold, outputting a result indicating that the image to be identified has passed the recognition; If the vector similarity is less than a preset similarity threshold, a result indicating that the image to be identified fails recognition is output.

6. An image desensitization device, characterized in that: The device comprises: Model building module, used to build a facial feature extraction model; A feature extraction module is used to extract facial feature vectors of a preset number of facial images from a preset facial image database based on the facial feature extraction model to obtain an initial facial feature vector set; A feature calculation module, configured to filter a target face feature vector set from the initial face feature vector set according to a preset feature distinction rule; A feature desensitization module is used to perform feature desensitization on the face feature vector to be desensitized according to the target face feature vector set to obtain a desensitized feature vector; The preset feature differentiation rule is to divide the facial feature vectors in the initial facial feature vector set according to feature types, and filter out facial feature vectors of different types to form a target facial feature vector set; The step of performing feature desensitization on the face feature vector to be desensitized according to the target face feature vector set to obtain a desensitized feature vector includes: Calculating the distances between the facial feature vector to be desensitized and each facial feature vector in the target facial feature vector set respectively to obtain a distance set corresponding to the number of facial feature vectors in the target facial feature vector set; A desensitized feature vector is generated according to the distance set.

7. An image recognition device, characterized in that: The device comprises: An image acquisition module, used to acquire an image to be identified; an image desensitization module, configured to obtain a desensitized feature vector of the image to be identified, wherein the desensitized feature vector of the image to be identified is obtained by processing the image to be identified using the image desensitization method according to any one of claims 1 to 4; A similarity calculation module, used to calculate the vector similarity between the desensitized feature vector and the target recognition feature vector; A similarity comparison module, configured to compare whether the vector similarity is greater than or equal to a preset similarity threshold; A first execution module is configured to output a result indicating that the image to be identified has passed the recognition if the vector similarity is greater than or equal to a preset similarity threshold; The second execution module is configured to output a result indicating that the image to be identified fails recognition if the vector similarity is less than a preset similarity threshold.

8. A computer device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is run on the processor, the image desensitization method according to any one of claims 1 to 4 and the image recognition method according to claim 5 are executed.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when running on a processor, executes the image desensitization method according to any one of claims 1 to 4 and the image recognition method according to claim 5.

Citation Information

Patent Citations

  • Human face identification method, device and terminal device

    CN103745235A