Key point adaptive generation and identification method based on control diffusion network

By generating diversified face data sets based on the method of controlled diffusion network, the problem of data imbalance in face key point recognition is solved, the generalization ability and recognition accuracy of the model are improved, and it is suitable for diversified application environments.

CN118552809APending Publication Date: 2024-08-27XIAMEN LIKE SWEET TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410653007.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Existing technologies suffer from data imbalance and lack of data in facial key point recognition, especially the scarcity of data of different races and postures, which results in limited model generalization capabilities and accuracy, making it difficult to handle recognition tasks in complex situations.

Method used

The key point adaptive generation and recognition method based on the controlled diffusion network is adopted, and facial key points and text information are used as control signals to generate a diverse face data set for training the facial key point recognition model, combining the control network and The diffusion network generates face data that includes multiple races, poses, and expressions, balancing the data set and improving model generalization capabilities.

Benefits of technology

It effectively solves the problem of data set deviation, improves the accuracy and robustness of facial key point recognition, reduces the dependence on manual annotation of data, improves recognition accuracy and system reliability, and is suitable for diversified application environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552809A
    Figure CN118552809A
Patent Text Reader

Abstract

The invention discloses a key point adaptive generation and identification method based on a control diffusion network. Wherein the control diffusion network comprises at least one diffusion network and at least one control network; obtaining first face image data and a user input text; face key points in the first face image data are extracted based on a first face key point recognition model to serve as first control information; based on a BLIP model, semantic information is extracted from the input text to serve as second control information; generating a control signal from the first control information and the second control information using the control network; generating at least one second image according to a control signal by using the diffusion network; and constructing a face image data set based on the at least one second image, wherein the face image data set is used for training a first face key point recognition model. According to the invention, data set expansion can be carried out by generating face data of different races and different postures to balance the data set, so that the accuracy and robustness of a face key point recognition network are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a processing method based on a neural network. Background Art

[0002] With the widespread application of face recognition technology, the demand for accurate recognition technology of facial key points is increasing. Traditional face key point recognition methods mostly rely on a large number of annotated data sets, but data in the real world is often unevenly distributed, especially data on different races and different postures are relatively scarce. For example, we can obtain more Asian face data, but there is relatively little data on African and European and American races. At the same time, there is also relatively little data on some special lighting scenes, which limits the generalization ability and accuracy of the model. In addition, most existing technologies cannot effectively cope with facial key point recognition tasks in complex situations, such as extreme expressions, occlusion, etc. Summary of the invention

[0003] In view of this, the purpose of the present invention is to propose a key point adaptive generation and recognition method based on a controlled diffusion network, which can expand the data set by generating face data of different races and different postures to balance the data set, thereby improving the accuracy and robustness of the face key point recognition network.

[0004] According to one aspect of the present invention, there is provided a method for adaptively generating and identifying key points based on a controlled diffusion network, wherein the controlled diffusion network comprises at least one diffusion network, and at least one control network;

[0005] Acquire first face image data and user input text;

[0006] Extracting facial key points in the first facial image data as first control information based on a first facial key point recognition model;

[0007] Extracting semantic information from the input text as the second control information based on a BLIP model;

[0008] generating a control signal using the control network according to the first control information and the second control information;

[0009] generating at least one second image using the diffusion network according to the control signal;

[0010] A facial image dataset is constructed based on at least one second image, and the facial image dataset is used to train a first facial key point recognition model.

[0011] In the above technical solution, the diffusion control network is an existing technology, but there are many different methods for how to control and how to effectively and accurately control the content of image generation. This case uses facial key points and text information as control signals, while some other methods use skeleton points and sparse facial points for control. A major problem with existing facial point positioning models is that the data is unbalanced or lacks certain data, such as an African woman with a strange hairstyle, a man with a birthmark on his face, and the like. It is not realistic to collect and label such pictures. This method generates such faces by fixing facial points and controlling the diffusion network to obtain image pairs with matching images and points, and then uses these images to train the face positioning model. Furthermore, this case can also use partially labeled facial points and pre-trained facial point locators to control the direction of generation through the locator, so that our generated image is more matched with the points. Use these data to iteratively train the locator. Furthermore, the above method has the following advantages:

[0012] (1) Enhance the diversity and balance of the data set: By combining the control network and the diffusion network to generate facial data of multiple races, different postures and expressions, the present invention can effectively solve the problem of poor training effect caused by data set bias in the prior art, thereby greatly improving the diversity and balance of the data set. This is crucial to improving the accuracy of facial key point recognition.

[0013] (2) Improve the generalization ability of the model: Since the generated data covers a variety of facial features and complex scenarios, the facial key point recognition model trained by the present invention has a stronger generalization ability and can more accurately handle facial key point recognition tasks of different races, postures and expressions. This is particularly important in a diversified application environment.

[0014] (3) Reduce labeling requirements and save resources: Traditional facial key point recognition methods rely heavily on manually labeled data. The present invention reduces the reliance on a large amount of manually labeled data by automatically generating training data using a control network and a diffusion network, thereby saving a lot of time and resources, and also reducing the probability of human labeling errors.

[0015] (4) Improved recognition accuracy and robustness: Due to the high quality and wide coverage of the training data provided by the present invention, the facial key point recognition network can more accurately capture and understand facial key points, and maintain high recognition performance even in complex situations such as occlusion and extreme expressions. This greatly improves the user experience and system reliability in practical applications.

[0016] In summary, the present invention not only solves the problem of insufficient and unbalanced data, but also achieves remarkable results in improving the accuracy, robustness and practicality of facial key point recognition technology, and provides valuable methods and tools for research and application in related fields.

[0017] In some embodiments, obtaining the first facial image data and the user input text further includes:

[0018] The original face image data is straitened and cropped.

[0019] In the above technical solution, the purpose of straightening and cropping the original data is to make the network focus on the face, which is regarded as a normalization operation of data size and position. This makes the network more focused on processing the generation of the face, and the effect is better.

[0020] In some embodiments, using the control network to generate a control signal according to the first control information and the second control information includes:

[0021] Inputting the first control information and the second control information into the control network to generate a plurality of characteristic graphs satisfying the first control information and the second control information;

[0022] Several feature maps form a set of image groups as control signals.

[0023] In the above technical solution, the target key points and semantic description text can be obtained by the above steps, but there is no image in the above features. The role of the control network is to generate a graph that satisfies the target key point position and description semantics. After obtaining the graph, there is an image group such as "image-key point-semantic description". These image groups are used as training data for subsequent key point network training to improve the key point positioning network. Furthermore, since the key points in this case are detected from real faces, rather than random points, they meet the real distribution of face points. By doing some random sampling within a certain range around the real points, we can get the "target key points" we need to achieve. Then let our control generation network generate some images with different descriptions. The positions of these image points are the same as our target key points, but other description information is different.

[0024] In some embodiments, generating at least one second image according to a control signal using the diffusion network includes:

[0025] The control signal is input into the diffusion network, and the processing signal of the control signal is extracted by using the Cross Attention module in the diffusion network;

[0026] Inputting the processed signal into a plurality of U-Net networks in the diffusion network, guiding the U-Net networks to perform image generation processing, and generating at least one second image;

[0027] In the above technical solution, the diffusion network starts from a noisy image, continuously removes noise and finally obtains a clean image. The control signal plays a guiding role in the process, so that the generation process is consistent with the control signal. The control signal here defines that the key face points of the face to be generated are consistent with the positions of the control face points, and the description that needs to be satisfied. Such face data is generated in this direction.

[0028] In some embodiments, constructing a face image dataset based on at least one second image includes:

[0029] Defining facial attributes respectively according to at least one second image, and marking according to the definition results;

[0030] Count the amount of data in each category and obtain the category-quantity distribution statistics;

[0031] According to the category-quantity distribution statistics, a category with a small amount of data or a balanced distribution is obtained, and according to the category with a small amount of data or a balanced distribution, the first control information and the second control information are designed and regenerated;

[0032] Repeat the above steps until the preset requirements are met.

[0033] According to another aspect of the present invention, there is provided a training method for a controlled diffusion network, wherein the controlled diffusion network comprises at least one diffusion network, and at least one control network;

[0034] Acquire a number of facial image sample data, as well as the semantic information corresponding to each facial image sample data, and the first facial key point of each facial image sample data;

[0035] generating a control signal using the control network according to the first control information and the second control information;

[0036] generating at least one second image using the diffusion network according to the control signal;

[0037] Calculating a first loss value based on the first image and the second image;

[0038] Inputting the second image into a first facial key point recognition model to extract second facial key points in the second image data, and calculating a second loss value based on the first facial key points and the second facial key points;

[0039] Calculate the gradient of the key point coordinates based on the first face key point and the second face key point, and calculate the third loss value based on the first of the key point coordinates;

[0040] The controlled diffusion network is trained based on the first loss value, the second loss value, and the third loss value.

[0041] In the above technical solution, in the process of training the control network to generate face images, in addition to the commonly used reconstruction loss, an additional gradient penalty term is introduced to improve the accuracy and control ability of the generated image. According to the distance between the generated image face point and the target point, the gradient direction in the generation process is adjusted. If a generated image face point is closer to the target face point, the model will tend to further explore in this direction; conversely, if the generated image face point deviates far from the target, the model will reduce the exploration in this direction. This adjustment is achieved by modifying the gradient, specifically, by adding a gradient penalty term to the loss function, which is customized according to the distance between the generated image and the target state.

[0042]

[0043] In the above formula, the first term is the reconstruction loss, the second term is the gradient penalty loss, G(x) represents the generated image, P ytarget It represents the face point in the control signal, that is, the label signal. d represents the distance metric between the face point detected in the generated image and the label. The L2 loss is used in training.

[0044] According to another aspect of the present invention, there is provided a controlled diffusion network, comprising:

[0045] a control network configured to generate a control signal according to the first control information and the second control information;

[0046] a diffusion network configured to generate at least one second image according to the control signal;

[0047] In the above technical solution, in the network, the role of the facial key points is to control the key points of the generated face to be consistent with the control points, so that the image-point matching data pairs can be obtained. The text description features are used to obtain faces in various scenes and conditions. Through these two combinations, we can get the face images that meet the requirements and have corresponding facial feature points. For example: when the network is input with a set of facial points of a large side face + description features "This is a 98-year-old fashionable man wearing black lipstick and sunglasses". The network can obtain such data based on key points and semantics. In reality, it is difficult to sample such data.

[0048] According to another aspect of the present invention, a key point adaptive generation and identification device based on a controlled diffusion network is provided, based on the above method; comprising:

[0049] An acquisition module, used to acquire first face image data and user input text;

[0050] A key point module, used for extracting facial key points in the first facial image data as first control information based on a first facial key point recognition model;

[0051] A semantic module, used for extracting semantic information from the input text as the second control information based on a BLIP model;

[0052] A control module, configured to generate a control signal using the control network according to the first control information and the second control information;

[0053] a diffusion module, configured to generate at least one second image using the diffusion network according to a control signal;

[0054] A construction module is used to construct a facial image dataset based on at least one second image, where the facial image dataset is used to train a first facial key point recognition model.

[0055] In the above technical scheme, in order to better use the above method, the present application proposes a key point adaptive generation and identification device based on a controlled diffusion network. Each module corresponds to each step of the above method. The specific principles have been described above and will not be repeated here.

[0056] According to another aspect of the present invention, there is provided a key point adaptive generation and identification device based on a controlled diffusion network, comprising:

[0057] at least one processor and a memory communicatively coupled to the at least one processor;

[0058] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the above method.

[0059] In the above technical solution, in order to better run and process the method, the above method is stored in a memory, and the stored method is executed by a processor. It should be noted that the principle and effect of each step have been described above and will not be described in detail here.

[0060] According to another aspect of the present invention, a computer-readable storage medium is provided, storing a computer program, wherein the computer program implements the above method when executed by a processor.

[0061] In the above technical solution, in order to better run and use the method, the above method is stored in a computer-readable storage medium, and the above method is implemented by a processor. It should be noted that the principle and effect of each step have been described above and will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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 work.

[0063] Figure 1 It is a flow chart of an embodiment of a key point adaptive generation and identification method based on a controlled diffusion network of the present invention;

[0064] Figure 2 It is a schematic diagram of straightening and cropping the original face image data according to an embodiment of a key point adaptive generation and recognition method based on a controlled diffusion network of the present invention;

[0065] Figure 3 This is a schematic diagram of the S15 process of an embodiment of a key point adaptive generation and identification method based on a controlled diffusion network of the present invention;

[0066] Figure 4 It is a flow chart of an embodiment of a training method for a controlled diffusion network of the present invention;

[0067] Figure 5 It is a schematic diagram of the control diffusion network structure in the prior art;

[0068] Figure 6 It is a structural schematic diagram of an embodiment of a key point adaptive generation and identification device based on a controlled diffusion network of the present invention. DETAILED DESCRIPTION

[0069] The present invention will be further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only used to illustrate the present invention, but are not intended to limit the scope of the present invention. Similarly, the following examples are only partial embodiments of the present invention rather than all embodiments, and all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of protection of the present invention.

[0070] The present invention provides a key point adaptive generation and recognition method based on a controlled diffusion network, which can expand the data set by generating face data of different races and different postures to balance the data set, thereby improving the accuracy and robustness of the face key point recognition network.

[0071] Embodiment 1

[0072] See also Figure 1 ,A key point adaptive generation and identification method based on a controlled diffusion network, the controlled diffusion network includes at least one diffusion network, and ,at least one control network;

[0073] S11, obtaining first face image data and user input text;

[0074] Acquiring the first face image data and the user input text also includes:

[0075] The original face image data is rectified and cropped. Figure 2 , as follows:

[0076] 1. Obtain facial key points (data located by the detector and data of manually marked points)

[0077] 2. Calculate an affine transformation matrix between the standard template face.

[0078] 3. Apply the transformation matrix (rotation, scaling, and translation) to the face in the original image to obtain the warped face.

[0079] S12, extracting facial key points in the first facial image data as first control information based on a first facial key point recognition model;

[0080] S13, extracting semantic information from the input text as second control information based on a BL IP model;

[0081] S14, using the control network to generate a control signal according to the first control information and the second control information;

[0082] In this embodiment, S14, using the control network to generate a control signal according to the first control information and the second control information, includes:

[0083] Inputting the first control information and the second control information into the control network to generate a plurality of characteristic graphs satisfying the first control information and the second control information;

[0084] Several feature maps form a group of images as control signals.

[0085] S15, using the diffusion network to generate at least one second image according to the control signal;

[0086] In this embodiment, S15, using the diffusion network to generate at least one second image according to the control signal, includes:

[0087] The control signal is input into the diffusion network, and the processing signal of the control signal is extracted by using the Cross Attention module in the diffusion network;

[0088] Inputting the processed signal into a plurality of U-Net networks in the diffusion network, guiding the U-Net networks to perform image generation processing, and generating at least one second image;

[0089] The details are as follows:

[0090] The overall flow chart is as follows Figure 3 As shown:

[0091] 1. Input two control conditions: Condition 1 is a face key point image, providing geometric structure information; Condition 2 is a natural language description, providing semantic attribute information. Description of control signal: The face point signal uses 194 dense face points; the description signal uses the BL IP model to extract semantics.

[0092] 2. Generate a Gaussian noise image as the initial input.

[0093] 3. The noisy image enters the U-Net network of the Stabil Diffusion model. U-Net obtains information from two control conditions through the CrossAttention mechanism to guide the denoising process.

[0094] 4. The U-Net network performs multiple denoising operations (the flowchart only shows one U-Net module, but there are actually multiple modules), and continuously ref i ne the noisy image according to the control conditions, so that it gradually conforms to the structure and attributes of the target face. CrossAttention plays the role of injecting control signals into the generation process.

[0095] 5. Finally, the denoised image is decoded by Decoder into a high-resolution, realistic face image, which conforms to the geometric structure of the input face key points and reflects the semantic attributes mentioned in the language description.

[0096] Output the final composite face image.

[0097] S16. Construct a facial image dataset based on at least one second image, where the facial image dataset is used to train a first facial key point recognition model.

[0098] In this embodiment, S16, constructing a face image dataset based on at least one second image, includes:

[0099] Defining facial attributes respectively according to at least one second image, and marking according to the definition results;

[0100] Count the amount of data in each category and obtain the category-quantity distribution statistics;

[0101] According to the category-quantity distribution statistics, a category with a small amount of data or a balanced distribution is obtained, and according to the category with a small amount of data or a balanced distribution, the first control information and the second control information are designed and regenerated;

[0102] Repeat the above steps until the preset requirements are met.

[0103] The details are as follows:

[0104] 1. Define facial attribute categories: Based on facial attribute dimensions, such as gender, age group, skin color, hairstyle, expression, occlusion, etc., we use existing classifiers to label the data.

[0105] 2. Count the amount of data in each category: Count the attribute labeling results of the entire data set, calculate the number of samples in each category, and obtain a category-quantity distribution statistic.

[0106] 3. Analyze data distribution: Analyze the distribution of data in each category, find out the categories that have insufficient performance in the test set or are small in number or unevenly distributed in the training data. These categories need to be generated in a focused manner.

[0107] 4. Generate samples of the target category: Design the corresponding facial key points and language description conditions for the target category determined in step 3 to guide the Stab le Diffusion model to generate face images of the required category. For example, if there are few samples of elderly women, you can prepare a batch of corresponding key point maps and description texts to focus on generating images of this category.

[0108] 5. Merge the newly generated images into the original dataset: Add the newly generated images of specific categories in step 4 to the original dataset to expand the categories with insufficient data.

[0109] 6. Repeat steps 2-5 until the data is balanced: Repeat the above process, continuously iteratively generate and merge images until the number distribution of each category tends to be balanced and the diversity and representativeness of the dataset are improved.

[0110] 7. Evaluate the optimized dataset: Evaluate the expanded and optimized dataset from the perspectives of category coverage, image quality, attribute accuracy, etc. to ensure that the dataset meets the application requirements.

[0111] In this embodiment, the diffusion control network is an existing technology, but there are many different methods for how to control and how to effectively and accurately control the content of image generation. This case uses facial key points and text information as control signals, while some other methods use skeleton points and sparse facial points for control. A major problem with existing facial point positioning models is that the data is unbalanced or lacks certain data, such as an African woman with a strange hairstyle, a man with a birthmark on his face, and the like. It is not realistic to collect and label such pictures. This method generates such faces by fixing facial points and controlling the diffusion network to obtain image pairs with matching images and points, and then uses these images to train the face positioning model. Furthermore, this case can also use partially labeled facial points and pre-trained facial point locators to control the direction of generation through the locator, so that our generated image is more matched with the points. Use these data to iteratively train the locator. Furthermore, the above method has the following advantages:

[0112] (1) Enhance the diversity and balance of the data set: By combining the control network and the diffusion network to generate facial data of multiple races, different postures and expressions, the present invention can effectively solve the problem of poor training effect caused by data set bias in the prior art, thereby greatly improving the diversity and balance of the data set. This is crucial to improving the accuracy of facial key point recognition.

[0113] (2) Improve the generalization ability of the model: Since the generated data covers a variety of facial features and complex scenarios, the facial key point recognition model trained by the present invention has a stronger generalization ability and can more accurately handle facial key point recognition tasks of different races, postures and expressions. This is particularly important in a diversified application environment.

[0114] (3) Reduce labeling requirements and save resources: Traditional facial key point recognition methods rely heavily on manually labeled data. The present invention reduces the reliance on a large amount of manually labeled data by automatically generating training data using a control network and a diffusion network, thereby saving a lot of time and resources, and also reducing the probability of human labeling errors.

[0115] (4) Improved recognition accuracy and robustness: Due to the high quality and wide coverage of the training data provided by the present invention, the facial key point recognition network can more accurately capture and understand facial key points, and maintain high recognition performance even in complex situations such as occlusion and extreme expressions. This greatly improves the user experience and system reliability in practical applications.

[0116] In summary, the present invention not only solves the problem of insufficient and unbalanced data, but also achieves remarkable results in improving the accuracy, robustness and practicality of facial key point recognition technology, and provides valuable methods and tools for research and application in related fields.

[0117] Embodiment 2

[0118] See also Figure 4 ,A training method for a controlled diffusion network, the controlled diffusion network comprising at least one diffusion network, and ,at least one control network;

[0119] S21, obtaining a number of facial image sample data, and the semantic information corresponding to each facial image sample data, and the first facial key point of each facial image sample data;

[0120] S22, using the control network to generate a control signal according to the first control information and the second control information;

[0121] S23, using the diffusion network to generate at least one second image according to the control signal;

[0122] S24, calculating a first loss value based on the first image and the second image;

[0123] S25, inputting the second image into a first facial key point recognition model to extract second facial key points in the second image data, and calculating a second loss value based on the first facial key points and the second facial key points;

[0124] S26, calculating the gradient of the key point coordinates based on the first face key point and the second face key point, and calculating the third loss value based on the first of the key point coordinates;

[0125] S27. Training the controlled diffusion network based on the first loss value, the second loss value, and the third loss value.

[0126] In this embodiment, in the process of training the control network to generate face images, in addition to the commonly used reconstruction loss, an additional gradient penalty term is introduced to improve the accuracy and control ability of the generated image. According to the distance between the generated image face point and the target point, the gradient direction in the generation process is adjusted. If a generated image face point is closer to the target face point, the model will tend to further explore in this direction; conversely, if the generated image face point deviates far from the target, the model will reduce the exploration in this direction. This adjustment is achieved by modifying the gradient, specifically, by adding a gradient penalty term to the loss function, which is customized according to the distance between the generated image and the target state.

[0127]

[0128] In the above formula, the first term is the reconstruction loss, the second term is the gradient penalty loss, G(x) represents the generated image, P ytarget It represents the face point in the control signal, that is, the label signal. d represents the distance metric between the face point detected in the generated image and the label. The L2 loss is used in training.

[0129] The training process is as follows:

[0130] In the process of training the Stab le Diffus ion control network to generate face images, in addition to the commonly used reconstruction loss, an additional gradient penalty term is introduced to improve the accuracy and control ability of the generated image. The training process can be described as follows:

[0131] 1. Prepare training data: We have labeled 100k+ face data and generate corresponding language descriptions for each image. The image, key points and description constitute training sample pairs.

[0132] 2. Preprocessing: Perform data augmentation operations such as normalization and random cropping on the original image. Normalize the key point coordinates to the range [0,1]. Perform tokenization and padding on the language description.

[0133] 3. Forward propagation: The preprocessed image is input into the UNet network of SD, and the key points and language description are integrated into the multi-layer denoising process of UNet through the Cross Attention mechanism. UNet gradually denoises and generates a face image that matches the control condition.

[0134] 4. Calculate reconstruction loss: Compare the pixel-level differences between the generated image and the original image, usually using the L1 loss function. The reconstruction loss measures the visual similarity of the generated image.

[0135] 5. Calculate the key point accuracy loss: Input the generated image into our existing key point detection network to predict the key point coordinates of the generated image. Calculate the distance loss between the predicted coordinates and the original key point coordinates. This loss term is used to measure the accuracy of the generated image in terms of geometric structure.

[0136] 6. Calculate the gradient penalty: Calculate the gradient of the key point coordinates for the generated image and the original image respectively, and then calculate the L2 distance between the two gradients. The gradient penalty encourages the generated image to have a similar gradient distribution as the original image at the key point position, improving the accuracy of details.

[0137] 7. Weighted merge loss: The reconstruction loss, key point accuracy loss and gradient penalty term are weighted and summed according to the preset weight coefficient to obtain the total training loss.

[0138] 8. Backpropagation and optimization: Calculate the gradient based on the total loss and use an optimizer (such as Adam) to update the parameters of the SD control network to optimize it in the direction of reducing reconstruction error, improving key point accuracy and gradient consistency.

[0139] 9. Iterative training: Repeat steps 3-8 and perform iterative training for multiple epochs on the training samples until the model converges or reaches the preset number of iterations.

[0140] 10. Verification, evaluation and next round of iteration.

[0141] Embodiment 3

[0142] See also Figure 5 , a controlled diffusion network, comprising:

[0143] a control network configured to generate a control signal according to the first control information and the second control information;

[0144] a diffusion network configured to generate at least one second image according to the control signal;

[0145] In this embodiment, Figure 5 Only the schematic diagram of the stabilization network is drawn. Key point and semantic extraction can be regarded as two independent parts. They have their own models, but since they are not the focus of this method, the methods of these two parts will not be described in detail. Key point positioning is an existing technology, and semantic feature model is also a commonly used method. In the figure, text is a text control signal that describes the face.

[0146] Condition is the facial point control signal, which controls the position of the key points of the face.

[0147] Embodiment 4

[0148] See also Figure 6 , a key point adaptive generation and identification device based on a controlled diffusion network, based on the above method; comprising:

[0149] An acquisition module, used to acquire first face image data and user input text;

[0150] A key point module, used for extracting facial key points in the first facial image data as first control information based on a first facial key point recognition model;

[0151] A semantic module, used for extracting semantic information from the input text as the second control information based on a BL IP model;

[0152] A control module, configured to generate a control signal using the control network according to the first control information and the second control information;

[0153] a diffusion module, configured to generate at least one second image using the diffusion network according to a control signal;

[0154] A construction module is used to construct a facial image dataset based on at least one second image, where the facial image dataset is used to train a first facial key point recognition model.

[0155] In the above technical scheme, in order to better use the above method, the present application proposes a key point adaptive generation and identification device based on a controlled diffusion network. Each module corresponds to each step of the above method. The specific principles have been described above and will not be repeated here.

[0156] Embodiment 5

[0157] A key point adaptive generation and identification device based on a controlled diffusion network, comprising:

[0158] at least one processor and a memory communicatively coupled to the at least one processor;

[0159] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in one of the above embodiments or the second embodiment.

[0160] In the above technical solution, in order to better run and process the method described in Embodiment 1 or Embodiment 2, the above method is stored in a memory, and a processor is used to execute the stored method. It should be noted that the principle and effect of each step have been described above and will not be described in detail here.

[0161] Embodiment 7

[0162] A computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the method described in one or two embodiments is implemented.

[0163] In the above technical solution, in order to better run and use the method described in Embodiment 1 or Embodiment 2, the above method is stored in a computer-readable storage medium, and the above method is implemented using a processor. It should be noted that the principle and effect of each step have been described above and will not be described in detail here.

[0164] The above descriptions are only some embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any equivalent device or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for adaptive generation and identification of key points based on controlled diffusion network, It is characterized in that The controlled diffusion network includes at least one diffusion network, and at least one control network; Acquire first face image data and user input text; Extracting facial key points in the first facial image data as first control information based on a first facial key point recognition model; Extracting semantic information from the input text as the second control information based on a BLIP model; generating a control signal using the control network according to the first control information and the second control information; generating at least one second image using the diffusion network according to the control signal; A facial image dataset is constructed based on at least one second image, and the facial image dataset is used to train a first facial key point recognition model.

2. A method for adaptively generating and identifying key points based on a controlled diffusion network as claimed in claim 1, It is characterized in that Acquiring the first face image data and the user input text also includes: The original face image data is straitened and cropped.

3. A method for adaptively generating and identifying key points based on a controlled diffusion network as claimed in claim 1, It is characterized in that Using the control network to generate a control signal according to the first control information and the second control information includes: The first control information and the second control information are input into the control network to generate several characteristic graphs satisfying the first control information and the second control information. Several feature maps form a set of image groups as control signals.

4. A method for adaptively generating and identifying key points based on a controlled diffusion network as claimed in claim 1, It is characterized in that Using the diffusion network to generate at least one second image according to the control signal, comprising: The control signal is input into the diffusion network, and the processing signal of the control signal is extracted using the Cross Attention module in the diffusion network; The processed signal is input into a plurality of U-Net networks in the diffusion network to guide the U-Net networks to perform image generation processing to generate at least one second image.

5. A method for adaptively generating and identifying key points based on a controlled diffusion network as claimed in claim 1, It is characterized in that Constructing a face image dataset based on at least one second image, comprising: Defining facial attributes respectively according to at least one second image, and marking according to the definition results; Count the amount of data in each category and obtain the category-quantity distribution statistics; According to the category-quantity distribution statistics, a category with a small amount of data or a balanced distribution is obtained, and according to the category with a small amount of data or a balanced distribution, the first control information and the second control information are designed and regenerated; Repeat the above steps until the preset requirements are met.

6. A training method for controlled diffusion networks, It is characterized in that The controlled diffusion network includes at least one diffusion network, and at least one control network; Acquire a number of facial image sample data, as well as the semantic information corresponding to each facial image sample data, and the first facial key point of each facial image sample data; generating a control signal using the control network according to the first control information and the second control information; generating at least one second image using the diffusion network according to the control signal; Calculating a first loss value based on the first image and the second image; Inputting the second image into a first facial key point recognition model to extract second facial key points in the second image data, and calculating a second loss value based on the first facial key points and the second facial key points; Calculate the gradient of the key point coordinates based on the first face key point and the second face key point, and calculate the third loss value based on the first of the key point coordinates; The controlled diffusion network is trained based on the first loss value, the second loss value, and the third loss value.

7. A controlled diffusion network, It is characterized in that include: a control network configured to generate a control signal according to the first control information and the second control information; The diffusion network is configured to generate at least one second image according to the control signal.

8. A key point adaptive generation and identification device based on controlled diffusion network, It is characterized in that A method according to any one of claims 1 to 6; comprising: An acquisition module, used to acquire first face image data and user input text; A key point module, used for extracting facial key points in the first facial image data as first control information based on a first facial key point recognition model; A semantic module, used for extracting semantic information from the input text as the second control information based on a BLIP model; A control module, configured to generate a control signal using the control network according to the first control information and the second control information; a diffusion module, configured to generate at least one second image using the diffusion network according to a control signal; A construction module is used to construct a facial image dataset based on at least one second image, where the facial image dataset is used to train a first facial key point recognition model.

9. A key point adaptive generation and identification device based on controlled diffusion network, It is characterized in that include: at least one processor and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as claimed in any one of claims 1 to 6.

10. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Image data set expansion method and system and storage medium

    CN116739106A

  • NeRF model construction method and device, equipment and storage medium

    CN117592511A