Image feature updating method and apparatus, and electronic device
By acquiring the image feature set of historical image recognition models and generating restored images, the problem of low recognition model accuracy when the original image cannot be obtained is solved, and efficient updating and accurate recognition of target image recognition models are achieved.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- CHINA TELECOM ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
- Filing Date
- 2025-12-26
- Publication Date
- 2026-07-09
AI Technical Summary
When the original image is unavailable, the updated recognition model achieves lower accuracy when using features from the original image for image recognition.
The image feature set is obtained from the historical image recognition model and input into the target generator to generate the restored image. Then, the restored image is input into the target image recognition model to extract the updated features and store them in the target image recognition model.
It improves the accuracy of target image recognition model in recognizing target images, ensuring efficient image feature updating and recognition even when the original image cannot be obtained.
Smart Images

Figure CN2025146150_09072026_PF_FP_ABST
Abstract
Description
Image feature updating methods, apparatuses, and electronic devices
[0001] Related applications
[0002] This application claims priority to Chinese patent application filed on December 31, 2024, with application number 202411999356.0 and entitled "Method, Apparatus and Electronic Device for Updating Image Features", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of artificial intelligence, and more particularly to a method, apparatus, and electronic device for updating image features. Background Technology
[0004] In the field of modern information technology, recognition models, especially deep learning-based recognition models, have been widely used in image recognition. These models achieve high-precision recognition by extracting features from input images and comparing them with features in a database. With the continuous advancement of image recognition technology and the increasing diversification of application demands, recognition models need to be constantly updated to adapt to new challenges and scenarios.
[0005] In the process of updating recognition models, a crucial but often overlooked issue is the updating of the base database features. Since recognition models typically rely on specific feature extraction methods or algorithms, whenever the model is updated, the image features in the base database also need to be re-extracted accordingly to ensure compatibility with the new model. However, in practical applications, users often cannot provide the original images from the base database for every application due to various reasons (such as privacy protection, data loss, etc.), resulting in the inability to obtain accurate image features and thus reducing the recognition accuracy of the updated model.
[0006] There is currently no effective solution to the problem that the updated recognition model has low accuracy when using the features of the original image for image recognition in the absence of the original image. Summary of the Invention
[0007] This application provides a method, apparatus, and electronic device for updating image features to solve the problem in related technologies where the accuracy of image recognition using the original image features after the update is low when the original image cannot be obtained.
[0008] This application provides a method for updating image features in a first aspect. The method includes: determining a target image recognition model and obtaining a historical image recognition model corresponding to the target image recognition model, wherein both the target image recognition model and the historical image recognition model are used to recognize target images in a target image set, the versions of the target image recognition model and the historical image recognition model are different, and the target image set contains M target images, where M is a positive integer; obtaining image features of the target image set from a database in the historical image recognition model to obtain an image feature set, wherein the image feature set includes M sets of image features, each set of image features corresponding to a target image; inputting the image feature set into a target generator to obtain a restored image set, wherein the restored image set includes M restored images; sequentially inputting each restored image into the target image recognition model to obtain updated features for each image feature, and storing the M updated features in the target image recognition model.
[0009] In some embodiments, before obtaining the image features of the target image set from the historical image recognition model in the database, the method further includes: inputting each target image into the historical image recognition model, extracting the feature information of each target image through the historical image recognition model; obtaining the identification information of each target image, combining the feature information and identification information of each target image into the image features of each target image to obtain M sets of image features; and storing the M sets of image features in the database.
[0010] In some embodiments, before inputting the image feature set into the target generator, the method further includes: for any target image, determining whether the target image contains text data, wherein the text data is used to describe the target image in text form; if the target image contains text data, inputting the text data into a text encoder to obtain a first feature of the target image; combining the first feature of the target image with the image features of the target image to obtain an updated image feature, and inputting the updated image feature into the target generator.
[0011] In some embodiments, before inputting the image feature set into the target generator, the method further includes: for any target image, determining whether the target image has sketch data, wherein the sketch data is used to describe the target image in sketch form; if the target image has sketch data, inputting the sketch data into a sketch encoder to obtain a second feature of the target image; combining the second feature of the target image with the image features of the target image to obtain updated image features, and inputting the updated image features into the target generator.
[0012] In some embodiments, the text encoder is trained as follows: multiple first sample images are acquired, along with sample feature data and sample image description text for each first sample image; each first sample image, its corresponding sample feature data, and sample image description text are combined into sample data to obtain multiple sets of first sample data; the initial text encoder is trained using the multiple sets of first sample data until the similarity between the initial feature data output by the initial text encoder and the sample feature data is greater than a preset similarity, thus obtaining the text encoder.
[0013] In some embodiments, the sketch encoder is trained as follows: multiple second sample images are acquired, along with sample feature data and sample sketch data for each second sample image; each second sample image and its corresponding sample feature data and sample sketch data are combined into sample data to obtain multiple sets of second sample data; the initial sketch encoder is trained using the multiple sets of second sample data until the similarity between the initial feature data output by the initial sketch encoder and the sample feature data is greater than a preset similarity, thus obtaining the sketch encoder.
[0014] In some embodiments, the target generator is trained as follows: multiple third sample images and sample feature data of each third sample image are acquired; each third sample image and its corresponding sample feature data are combined into sample data to obtain multiple sets of third sample data; the initial generator is trained with multiple sets of third sample data until the similarity between the image generated by the initial generator based on the sample feature data and the corresponding third sample image is greater than a preset similarity, thus obtaining the target generator.
[0015] This application provides an image feature updating apparatus in a second aspect. The apparatus includes: a determining unit, configured to determine a target image recognition model and acquire a historical image recognition model corresponding to the target image recognition model, wherein both the target image recognition model and the historical image recognition model are used to recognize target images in a target image set, the versions of the target image recognition model and the historical image recognition model are different, and the target image set contains M target images, where M is a positive integer; a first acquiring unit, configured to acquire image features of the target image set from a database, obtaining an image feature set, wherein the image feature set includes M sets of image features, each set of image features corresponding to a target image; a first input unit, configured to input the image feature set into a target generator to obtain a restored image set, wherein the restored image set includes M restored images; and a second input unit, configured to sequentially input each restored image into the target image recognition model to obtain updated features of each image feature, and store the M updated features in the target image recognition model.
[0016] In some embodiments, the above-described apparatus further includes: a third input unit, configured to input each target image into a historical image recognition model and extract feature information of each target image through the historical image recognition model; a second acquisition unit, configured to acquire the identification information of each target image and combine the feature information and identification information of each target image into image features of each target image to obtain M sets of image features; and a storage unit, configured to store the M sets of image features into a database.
[0017] In some embodiments, the above apparatus further includes: a first determination unit, configured to determine whether any target image contains text data, wherein the text data is used to describe the target image in text form; a fourth input unit, configured to input the text data into a text encoder to obtain a first feature of the target image when the target image contains text data; and a first combination unit, configured to combine the first feature of the target image and the image features of the target image to obtain updated image features, and input the updated image features into a target generator.
[0018] In some embodiments, the above apparatus further includes: a second determining unit, configured to determine whether sketch data exists for any target image, wherein the sketch data is used to describe the target image in sketch form; a fifth input unit, configured to input the sketch data into a sketch encoder to obtain a second feature of the target image when sketch data exists in the target image; and a second combining unit, configured to combine the second feature of the target image and the image feature of the target image to obtain an updated image feature, and input the updated image feature into a target generator.
[0019] In some embodiments, the above apparatus further includes: a third acquisition unit, configured to acquire a plurality of first sample images, and sample feature data and sample image description text for each first sample image; a third combination unit, configured to combine each first sample image and its corresponding sample feature data and sample image description text into sample data to obtain multiple sets of first sample data; and a first training unit, configured to train an initial text encoder using multiple sets of first sample data until the similarity between the initial feature data output by the initial text encoder and the sample feature data is greater than a preset similarity, thereby obtaining a text encoder.
[0020] In some embodiments, the above apparatus further includes: a fourth acquisition unit, configured to acquire a plurality of second sample images, and sample feature data and sample sketch data for each second sample image; a fourth combination unit, configured to combine each second sample image and its corresponding sample feature data and sample sketch data into sample data to obtain multiple sets of second sample data; and a second training unit, configured to train an initial sketch encoder using multiple sets of second sample data until the similarity between the initial feature data output by the initial sketch encoder and the sample feature data is greater than a preset similarity, thereby obtaining a sketch encoder.
[0021] In some embodiments, the above apparatus further includes: a fifth acquisition unit, configured to acquire a plurality of third sample images and sample feature data of each third sample image; a fifth combination unit, configured to combine each third sample image and the corresponding sample feature data into sample data to obtain multiple sets of third sample data; and a third training unit, configured to train an initial generator using multiple sets of third sample data until the similarity between the image generated by the initial generator based on the sample feature data and the corresponding third sample image is greater than a preset similarity, thereby obtaining a target generator.
[0022] In a third aspect, this application also provides a non-volatile computer-readable storage medium having a computer program stored thereon, which, when run by a processor, causes the processor to implement the image feature updating method provided in the foregoing embodiments of this application.
[0023] In a fourth aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements an image feature updating method provided in the foregoing embodiments of this application.
[0024] In a fifth aspect, this application also provides an electronic device comprising one or more processors and a memory; the memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions, which, when executed by the processor, implement an image feature updating method provided in the foregoing embodiments.
[0025] This application employs the following steps: determining a target image recognition model and obtaining a corresponding historical image recognition model, wherein both the target image recognition model and the historical image recognition model are used to recognize target images in a target image set. The versions of the target image recognition model and the historical image recognition model are different. The target image set contains M target images, where M is a positive integer; obtaining image features of the target image set from the historical image recognition model in a database to obtain an image feature set, wherein the image feature set includes M sets of image features, each set of image features corresponding to a target image; inputting the image feature set into a target generator to obtain a restored image set, wherein the restored image set includes M restored images; sequentially inputting each restored image into the target image recognition model to obtain updated features for each image feature, and storing the M updated features in the target image recognition model. This solves the problem in related technologies where the updated recognition model uses the original image features for image recognition with low accuracy when the original image cannot be obtained. By acquiring the image feature set from the historical image recognition model, and restoring each target image using a target generator based on the image feature set, the restored images of each target image are obtained. Then, feature extraction is performed on the restored images based on the target image recognition model, thereby obtaining the image features of the original image corresponding to each image feature that are recognized by the target image recognition model. This completes the update operation of the image features of the target image, and stores the M updated features in the target image recognition model, thereby achieving the technical effect of improving the recognition accuracy of the target image recognition model for target images. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 is a flowchart of an image feature updating method according to an embodiment of this application.
[0028] Figure 2 is a flowchart of a method for generating a restored image according to an embodiment of this application.
[0029] Figure 3 is a schematic diagram of an image feature updating device according to an embodiment of this application.
[0030] Figure 4 is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0031] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The technical solutions of this application will now be described in detail with reference to the accompanying drawings and embodiments.
[0032] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application.
[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0034] It should be noted that the image feature updating method, apparatus, and electronic device determined in this disclosure can be used in the field of artificial intelligence, or in any field other than artificial intelligence. This disclosure does not limit the application field of the image feature updating method, apparatus, and electronic device determined in the embodiments.
[0035] It should be noted that all information, user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, and displayed data) used in this application are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with the relevant laws, regulations, and standards of the relevant regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse use. If the user chooses to refuse, the process proceeds to the expert decision-making process. For example, this system has interfaces with relevant users or institutions. Before obtaining relevant information, a request to obtain the information needs to be sent to the aforementioned user or institution through the interface, and the relevant information is obtained only after receiving consent from the aforementioned user or institution.
[0036] The embodiments or examples disclosed herein are not exhaustive, but merely illustrative of some embodiments or examples, and are not intended to limit the scope of protection of this disclosure. Unless otherwise specified, each step in a particular embodiment or example can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a particular embodiment or example can also be implemented as an independent embodiment, and the order of the steps in a particular embodiment or example can be arbitrarily interchanged. Furthermore, optional methods or examples in a particular embodiment or example can be arbitrarily combined; moreover, embodiments or examples can be arbitrarily combined. For example, some or all steps of different embodiments or examples can be arbitrarily combined, and a particular embodiment or example can be arbitrarily combined with optional methods or examples of other embodiments or examples.
[0037] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:
[0038] Generative Adversarial Networks (GANs) are deep learning models consisting of a generator and a discriminator. The generator produces data, while the discriminator judges the differences between the generated data and real data. They compete and learn from each other, allowing the generator to continuously improve the quality of the generated data, ultimately achieving a level of accuracy close to real-world data.
[0039] An encoder is used to transform input data into a more abstract and compact representation to better capture the important features of the input data. Encoders typically consist of multiple layers, each learning weights to map the input data to a hidden representation. This hidden representation, often called an encoding or feature vector, preserves key information from the input data and can be used to solve various machine learning tasks such as classification, clustering, and generation.
[0040] An embodiment of this application provides a method for updating image features. Figure 1 is a flowchart of the image feature updating method provided according to an embodiment of this application. As shown in Figure 1, the method includes the following steps S101 to S104.
[0041] Step S101: Determine the target image recognition model and obtain the historical image recognition model corresponding to the target image recognition model. Both the target image recognition model and the historical image recognition model are used to recognize the target images in the target image set. The versions of the target image recognition model and the historical image recognition model are different. The target image set contains M target images, where M is a positive integer.
[0042] It should be noted that the target image set can be a collection of multiple target images, each of which can be a portrait or an object image. The historical image recognition model can be the initial image recognition model trained using the original images of the target images. When the image to be recognized is acquired, the historical image recognition model can compare the features of the image with the features of each target image to determine whether the image corresponds to a certain target image. Then, by outputting the label of the target image, the recognition operation of the input image is completed.
[0043] For example, when a historical image recognition model receives a portrait, it determines whether the features of the portrait are the same as the features of an image of an employee in a certain organization. If they are the same, the received portrait is determined to be the portrait of that employee, and the employee's name can be output, thus completing the person recognition operation.
[0044] It should be noted that the target image recognition model can be an updated historical image recognition model. The accuracy of image recognition can be improved by modifying the model structure, model parameters, etc.
[0045] Specifically, after training the target image recognition model, in order for the target image recognition model to recognize the target images in the target image set, it is necessary to input the image features of each target image in the target image set into the target image recognition model. At this time, the historical image recognition model corresponding to the target image recognition model can be obtained first, and then the image features of the target image can be obtained from the historical image recognition model. The image features applied to the target image recognition model can be obtained by processing the image features in the historical image recognition model.
[0046] Step S102: Obtain the image features of the target image set in the historical image recognition model from the database to obtain the image feature set, wherein the image feature set includes M groups of image features, and each group of image features corresponds to a target image.
[0047] Specifically, if a historical image recognition model is obtained, the image features of the target image set in the historical image recognition model can be obtained from the database of the server running the historical image recognition model. These image features can also be stored in the model, and the storage location is not limited here.
[0048] After obtaining the image features, multiple image features can be divided according to the target image corresponding to the image features to obtain an image feature set. Each set of image features corresponds to a target image. The target image can be restored according to each set of image features to obtain a restored image. Then, the image feature recognition operation can be performed again according to the restored image to complete the image feature update operation.
[0049] Step S103: Input the image feature set into the target generator to obtain the restored image set, wherein the restored image set includes M restored images.
[0050] Specifically, after obtaining the image feature set, a set of image features corresponding to each target image can be input into the target generator in sequence. The target generator then performs image restoration operation based on the image features to obtain the restored image corresponding to each target image.
[0051] Step S104: Input each restored image into the target image recognition model in sequence to obtain the updated features of each image feature, and store the M updated features into the target image recognition model.
[0052] Specifically, after obtaining each restored image, since the restored images contain most of the image features of the original target image, each restored image can be input into the target image recognition model. The encoder in the target image recognition model then identifies the image features in each restored image, thereby allowing the updated target image recognition model to identify more accurate image features from the restored images. The updated features are then stored in the target image recognition model or in a database. This allows for more accurate identification based on the updated features when using the target image recognition model to identify the real person or object corresponding to the target image, thus completing the image feature update operation and ensuring the accuracy of object recognition by the target image recognition model.
[0053] The image feature updating method provided in this application embodiment determines a target image recognition model and obtains a historical image recognition model corresponding to the target image recognition model. Both the target image recognition model and the historical image recognition model are used to recognize target images in a target image set. The versions of the target image recognition model and the historical image recognition model are different. The target image set contains M target images, where M is a positive integer. Image features of the target image set in the historical image recognition model are obtained from a database to obtain an image feature set, which includes M sets of image features, each set corresponding to a target image. The image feature set is input into a target generator to obtain a restored image set, which includes M restored images. Each restored image is sequentially input into the target image recognition model to obtain updated features for each image feature, and the M updated features are stored in the target image recognition model. This solves the problem in related technologies where the updated recognition model has low accuracy when using the original image features for image recognition in situations where the original image cannot be obtained. By acquiring the image feature set from the historical image recognition model, and restoring each target image using a target generator based on the image feature set, the restored images of each target image are obtained. Then, feature extraction is performed on the restored images based on the target image recognition model, thereby obtaining the image features of the original image corresponding to each image feature that are recognized by the target image recognition model. This completes the update operation of the image features of the target image, and stores the M updated features in the target image recognition model, thereby achieving the technical effect of improving the recognition accuracy of the target image recognition model for target images.
[0054] In some embodiments, in the image feature updating method provided in this application, before obtaining the image features of the target image set from the database and the image feature set, the method further includes: inputting each target image into the historical image recognition model, extracting the feature information of each target image through the historical image recognition model; obtaining the identification information of each target image, combining the feature information and identification information of each target image into the image features of each target image to obtain M sets of image features; and storing the M sets of image features in the database.
[0055] It should be noted that historical image recognition models refer to deep learning models that have been previously trained and used to recognize and classify facial images, such as models based on algorithms like Arcface and Cosface. These models can extract key facial feature information from images and determine whether the current facial image matches images stored in a database, thereby determining whether the user undergoing facial verification has passed. Identification information can be the individual identity information corresponding to each target image, existing in the form of tags or IDs, used to distinguish different facial images.
[0056] Specifically, before acquiring image features, accurate image features need to be generated first. First, each target image in the target image set needs to be input into the historical image recognition model. Through the model's forward propagation, its feature information is extracted from each target image. This leverages the feature extraction capabilities of the historical model to ensure that the features of each image are accurately encoded, providing a foundation for subsequent image feature combination and storage.
[0057] After obtaining image features, in order to determine the target image corresponding to the image features, it is necessary to obtain the identification information of each target image in the target image set. The identification information can be obtained based on the image's metadata or pre-entered identity tags, thereby ensuring that the ownership of each image feature is clear and providing a basis for subsequent image feature management and query.
[0058] After obtaining the identification information, the feature information of each target image can be combined with the identification information to form the image features of each target image. This integrates the feature information and the identification information into a more comprehensive data unit, which includes both visual features and identity identifiers. In subsequent processes, the model can operate based on the feature information containing the identity identifiers, ensuring that the generated images not only have consistent visual features but also accurately correspond to specific individuals. Furthermore, it ensures that the correspondence between each image feature and the original target image is clear during storage, facilitating subsequent retrieval and use.
[0059] This embodiment improves the efficiency and accuracy of subsequent image reconstruction by accurately extracting and combining the feature information and identification information of the target image before acquiring image features.
[0060] In some embodiments, the image feature updating method provided in this application further includes, before inputting the image feature set into the target generator: for any target image, determining whether the target image contains text data, wherein the text data is used to describe the target image in text form; if the target image contains text data, inputting the text data into a text encoder to obtain a first feature of the target image; combining the first feature of the target image and the image features of the target image to obtain updated image features, and inputting the updated image features into the target generator.
[0061] Specifically, in order to improve the accuracy of the restored image generated by the target generator, before inputting the image features into the target generator, it can be determined whether the target image corresponding to the image features has text data. The text data can be a sentence used to describe the target image, and it can be determined whether the target image has additional text description information by querying the database.
[0062] When text data is available, it can be input into a pre-trained text encoder. The text encoder can convert natural language descriptions into high-dimensional feature vectors, i.e., the first features of the target image, thereby obtaining the image features corresponding to the target image based on the text data.
[0063] After obtaining the first feature of the target image, the first feature of the target image can be fused with the image features extracted by the historical image recognition model. For example, weighted averaging or specific feature splicing can be performed in the feature space. This combines the image features corresponding to the text data with the image features pre-stored in the model to obtain more accurate updated image features. This ensures that the generated image contains both the visual features of the original image and reflects the attribute information of the text description. The restored image is then generated through the updated image features, thereby improving the accuracy of the restored image.
[0064] This embodiment effectively utilizes textual description information by adding a textual data inspection and fusion step before inputting the image feature set into the target generator. This increases the feature information of the image, ensuring a high degree of consistency between the generated image and the base database features. Furthermore, guided by the textual description, it enables precise control and adjustment of specific image attributes, thereby generating a more accurate and high-quality restored image.
[0065] In some embodiments, the image feature updating method provided in this application further includes, before inputting the image feature set into the target generator: for any target image, determining whether the target image has sketch data, wherein the sketch data is used to describe the target image in sketch form; if the target image has sketch data, inputting the sketch data into a sketch encoder to obtain a second feature of the target image; combining the second feature of the target image and the image feature of the target image to obtain an updated image feature, and inputting the updated image feature into the target generator.
[0066] Specifically, in order to improve the accuracy of the target generator in generating the restored image, before inputting the image features into the target generator, it can be determined whether the target image corresponding to the image features has sketch data. The sketch data can be a low-accuracy image used to describe the target image, and it can be determined whether the target image has additional sketch data by querying the database.
[0067] If sketch data exists, it can be input into a pre-trained sketch encoder. The sketch encoder can extract image features from the sketch to obtain a high-dimensional feature vector, which is the second feature of the target image. Thus, the image features corresponding to the target image can be obtained based on the sketch data.
[0068] After obtaining the second feature of the target image, the second feature of the target image can be fused with the image features extracted by the historical image recognition model. For example, weighted averaging or specific feature splicing can be performed in the feature space. This combines the image features corresponding to the sketch data with the image features pre-stored in the model to obtain more accurate updated image features. This ensures that the generated image contains both the visual features of the original image and reflects the attribute information carried in the sketch. The restored image is then generated through the updated image features, thereby improving the accuracy of the restored image.
[0069] This embodiment adds a sketch data inspection and fusion step before inputting the image feature set into the target generator. This effectively utilizes the feature information carried in the sketch to supplement the initial feature information of the target image. This not only ensures a high degree of consistency between the generated image and the base database features, but also enriches the content of the feature information through the feature information in the sketch, thereby generating a more accurate and high-quality restored image.
[0070] It should be noted that in some scenarios, the first feature can be obtained by text encoder and the second feature can be obtained by sketch encoder. The first feature, the second feature and the image feature can be combined to obtain more accurate and comprehensive feature information of the target image.
[0071] In some embodiments, in the image feature update method provided in this application, the text encoder is trained as follows: acquiring multiple first sample images, and sample feature data and sample image description text for each first sample image; combining each first sample image and its corresponding sample feature data and sample image description text into sample data to obtain multiple sets of first sample data; training the initial text encoder with the multiple sets of first sample data until the similarity between the initial feature data output by the initial text encoder and the sample feature data is greater than a preset similarity, thereby obtaining the text encoder.
[0072] It should be noted that the first sample image can be an image sample used to train the text encoder, such as a face image. The sample feature data can be a high-dimensional image feature vector extracted from the first sample image by the historical image recognition model. The sample image description text can be text information associated with the first sample image, used to describe the features of the face in the image. The initial text encoder is an untrained text encoder model, whose function is to convert the text description into a vector representation similar to the image feature data. The initial feature data is the feature vector obtained after the initial text encoder encodes the sample image description text. The preset similarity is a threshold used to evaluate the similarity between the initial feature data and the sample feature data. This threshold can be used to determine whether the text encoder training has met the requirements.
[0073] Specifically, before using the text encoder, it needs to be trained using first sample data to ensure its accuracy. First, multiple first sample images can be acquired, which can be facial images. Then, a historical image recognition model is used to extract sample feature data from these first sample images, along with the sample image description text.
[0074] Furthermore, the sample feature data and sample image description text can be input into the model. The text encoder performs feature extraction on the sample image description text to obtain initial feature data. The initial feature data is then compared with the sample feature data to obtain a comparison result. If the similarity indicated by the comparison result is greater than the preset similarity, it is determined that the text encoder can accurately generate feature information based on the text information. This completes the training operation of the text encoder, resulting in a usable text encoder, thereby ensuring the accuracy of the feature information generated by the text encoder.
[0075] It should be noted that the objective function for training the text encoder can be expressed as:
[0076] Among them, L t Let x be the objective function. t Here, x represents the text information, and E represents the target image. v (·) is the image encoder, E t (·) is the text encoder, and f(·) is a non-linear mapping network used to align the projection spaces of the text encoder and the image encoder.
[0077] This embodiment details the training process of the text encoder, ensuring that the model can accurately extract information highly corresponding to facial image features from the text description. This not only enhances the flexibility of facial feature reconstruction and enables precise control over facial attributes through text description, but also improves the accuracy and diversity of image reconstruction. The efficient training and application of the text encoder provides technical support for updating the database of the face recognition system, especially when the original image cannot be directly obtained. It can reconstruct high-quality facial images based on feature data and text description, thereby improving the accuracy of generating updated image features from the reconstructed image.
[0078] In some embodiments, in the image feature update method provided in this application, the sketch encoder is trained as follows: acquiring multiple second sample images, and sample feature data and sample sketch data for each second sample image; combining each second sample image and its corresponding sample feature data and sample sketch data into sample data to obtain multiple sets of second sample data; training the initial sketch encoder with the multiple sets of second sample data until the similarity between the initial feature data output by the initial sketch encoder and the sample feature data is greater than a preset similarity, thereby obtaining the sketch encoder.
[0079] Specifically, before using the sketch encoder, it needs to be trained with second sample data to ensure its accuracy. First, multiple second sample images can be acquired, which can be face images. Sample feature data is extracted from the second sample images using a historical image recognition model, and sample sketch data of the second sample images is also acquired. The sample sketch data can be a sketch of the target image.
[0080] Furthermore, sample feature data and sample sketch data can be input into the model. The sketch encoder performs feature extraction on the sample sketch data to obtain initial feature data. The initial feature data is then compared with the sample feature data to obtain a comparison result. If the similarity indicated by the comparison result is greater than the preset similarity, it is determined that the sketch encoder can accurately generate feature information based on the sketch, thereby completing the training operation of the sketch encoder and obtaining a usable sketch encoder. This ensures the accuracy of the feature information generated by the sketch encoder.
[0081] It should be noted that the objective function for training the sketch encoder can be expressed as:
[0082] Among them, L s Let x be the objective function. s Here is the sketch information, x is the target image, and E is... v (·) is the image encoder, E s (·) is the sketch encoder.
[0083] This embodiment details the training process of the sketch encoder, ensuring that the model can accurately extract information highly corresponding to facial image features from the sketch. This not only enhances the flexibility of facial feature reconstruction and enables precise control over facial attributes through the sketch, but also improves the accuracy and diversity of image reconstruction. The efficient training and application of the sketch encoder provides technical support for updating the database of the face recognition system, especially when the original image cannot be directly obtained. It can reconstruct high-quality facial images based on feature data and sketches, thereby improving the accuracy of generating updated image features from the reconstructed image.
[0084] In some embodiments, in the image feature update method provided in this application, the target generator is trained as follows: acquiring multiple third sample images and sample feature data of each third sample image; combining each third sample image and its corresponding sample feature data into sample data to obtain multiple sets of third sample data; training the initial generator with multiple sets of third sample data until the similarity between the image generated by the initial generator based on the sample feature data and the corresponding third sample image is greater than a preset similarity, thereby obtaining the target generator.
[0085] It should be noted that the third sample image can be a set of images used to train the target generator, including face images of different styles, to ensure that the generator can learn a wide range of face image generation patterns. The sample feature data can be a high-dimensional feature vector extracted from the historical image recognition model corresponding to the third sample image, containing feature information of the faces in the image. The initial generator can be an unoptimized face image generation network before training, with an architecture based on StyleGAN or other similar generative models, used to convert high-dimensional features into face images.
[0086] Specifically, before using the target generator, it needs to be trained with third-party sample data to ensure its accuracy. First, multiple third-party sample images can be acquired, which can be facial images. Then, a historical image recognition model is used to extract sample feature data from these third-party sample images.
[0087] Furthermore, the third sample image and sample feature data can be input into the model. The target generator generates the corresponding third sample image based on the sample feature data, and the generated image is compared with the corresponding third sample image to obtain the comparison result. If the similarity indicated by the comparison result is greater than the preset similarity, it is determined that the target generator can accurately generate images based on the feature information, thereby completing the training operation of the target generator and obtaining a usable target generator, thus ensuring the accuracy of the restored image generated by the target generator.
[0088] It should be noted that the sample features can also include text features and sketch features. The target generator can be trained by different feature combinations to ensure that the target generator can generate accurate restored images based on different features.
[0089] This embodiment trains a target generator to generate a reconstructed image that is highly similar to the original face image based on the input high-dimensional feature data. This not only improves the accuracy of image generation, but also enables the reconstruction of a high-quality face image from the feature data even without the original image. This allows for more accurate image features to be obtained through the target image recognition model, ensuring the accuracy of face recognition through the target image recognition model.
[0090] Figure 2 is a flowchart of an optional method for generating a restored image according to an embodiment of this application. As shown in Figure 2, image features of the target image can be obtained from a historical image recognition model, and the text description of the target image can be input into a text encoder to obtain text features. The sketch of the target image can be input into a sketch encoder to obtain sketch features. Then, the image features, sketch features, and text features are input into a target generator, and a restored image is generated through the target generator. This ensures the accuracy of the restored image and indirectly improves the accuracy of the target image recognition model in obtaining image features, thereby achieving the technical effect of improving the recognition accuracy of the target image recognition model for the target image.
[0091] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system by a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0092] This application also provides an image feature updating apparatus. It should be noted that the image feature updating apparatus of this application can be used to execute the image feature updating method provided in this application. The image feature updating apparatus provided in this application will be described below.
[0093] Figure 3 is a schematic diagram of an image feature updating device according to an embodiment of this application. As shown in Figure 3, the device includes: a determining unit 31, a first acquiring unit 32, a first input unit 33, and a second input unit 34.
[0094] The determining unit 31 is used to determine the target image recognition model and obtain the historical image recognition model corresponding to the target image recognition model. Both the target image recognition model and the historical image recognition model are used to recognize the target images in the target image set. The versions of the target image recognition model and the historical image recognition model are different. The target image set contains M target images, where M is a positive integer.
[0095] The first acquisition unit 32 is used to acquire image features of the target image set in the historical image recognition model from the database to obtain an image feature set, wherein the image feature set includes M groups of image features, and each group of image features corresponds to a target image.
[0096] The first input unit 33 is used to input the image feature set into the target generator to obtain the restored image set, wherein the restored image set includes M restored images.
[0097] The second input unit 34 is used to sequentially input each restored image into the target image recognition model to obtain the updated features of each image feature, and store the M updated features into the target image recognition model.
[0098] The image feature updating device provided in this application embodiment determines a target image recognition model through a determining unit 31 and obtains a historical image recognition model corresponding to the target image recognition model. Both the target image recognition model and the historical image recognition model are used to recognize target images in a target image set. The versions of the target image recognition model and the historical image recognition model are different. The target image set contains M target images, where M is a positive integer. A first obtaining unit 32 obtains image features from the target image set in the historical image recognition model from a database, resulting in an image feature set. The image feature set includes M sets of image features, each set corresponding to a target image. A first input unit 33 inputs the image feature set into a target generator to obtain a restored image set, which includes M restored images. A second input unit 34 sequentially inputs each restored image into the target image recognition model to obtain updated features for each image feature, and stores the M updated features in the target image recognition model. This solves the problem in related technologies where the updated recognition model has low accuracy when using the original image features for image recognition in the absence of the original image. By acquiring the image feature set from the historical image recognition model, and restoring each target image using a target generator based on the image feature set, the restored images of each target image are obtained. Then, feature extraction is performed on the restored images based on the target image recognition model, thereby obtaining the image features of the original image corresponding to each image feature that are recognized by the target image recognition model. This completes the update operation of the image features of the target image, and stores the M updated features in the target image recognition model, thereby achieving the technical effect of improving the recognition accuracy of the target image recognition model for target images.
[0099] In some embodiments, in the image feature updating apparatus provided in this application, before obtaining the image features of the target image set from the historical image recognition model in the database to obtain the image feature set, the apparatus further includes: a third input unit, used to input each target image into the historical image recognition model and extract the feature information of each target image through the historical image recognition model; a second acquisition unit, used to acquire the identification information of each target image and combine the feature information and identification information of each target image to obtain the image features of each target image to obtain M sets of image features; and a storage unit, used to store the M sets of image features in the database.
[0100] In some embodiments, the image feature updating apparatus provided in this application further includes, before inputting the image feature set into the target generator: a first determining unit, configured to determine whether any target image contains text data, wherein the text data is used to describe the target image in text form; a fourth input unit, configured to input the text data into a text encoder to obtain a first feature of the target image if the target image contains text data; and a first combining unit, configured to combine the first feature of the target image and the image features of the target image to obtain updated image features, and input the updated image features into the target generator.
[0101] In some embodiments, the image feature updating apparatus provided in this application further includes, before inputting the image feature set into the target generator: a second determining unit, configured to determine whether sketch data exists for any target image, wherein the sketch data is used to describe the target image in sketch form; a fifth input unit, configured to input the sketch data into a sketch encoder to obtain a second feature of the target image if sketch data exists in the target image; and a second combining unit, configured to combine the second feature of the target image and the image features of the target image to obtain updated image features, and input the updated image features into the target generator.
[0102] In some embodiments, in the image feature updating apparatus provided in this application, the text encoder is trained in the following manner: a third acquisition unit is used to acquire multiple first sample images, as well as sample feature data and sample image description text for each first sample image; a third combination unit is used to combine each first sample image and its corresponding sample feature data and sample image description text into sample data to obtain multiple sets of first sample data; and a first training unit is used to train the initial text encoder with multiple sets of first sample data until the similarity between the initial feature data output by the initial text encoder and the sample feature data is greater than a preset similarity, thereby obtaining the text encoder.
[0103] In some embodiments, in the image feature updating apparatus provided in this application, the sketch encoder is trained in the following manner: a fourth acquisition unit is used to acquire multiple second sample images, as well as sample feature data and sample sketch data for each second sample image; a fourth combination unit is used to combine each second sample image and its corresponding sample feature data and sample sketch data into sample data to obtain multiple sets of second sample data; and a second training unit is used to train the initial sketch encoder with multiple sets of second sample data until the similarity between the initial feature data output by the initial sketch encoder and the sample feature data is greater than a preset similarity, thereby obtaining the sketch encoder.
[0104] In some embodiments, in the image feature updating apparatus provided in this application, the target generator is trained in the following manner: a fifth acquisition unit is used to acquire multiple third sample images and sample feature data of each third sample image; a fifth combination unit is used to combine each third sample image and the corresponding sample feature data into sample data to obtain multiple sets of third sample data; a third training unit is used to train the initial generator with multiple sets of third sample data until the similarity between the image generated by the initial generator based on the sample feature data and the corresponding third sample image is greater than a preset similarity, thereby obtaining the target generator.
[0105] The image feature updating device includes a processor and a memory. The determining unit 31, the first acquiring unit 32, the first input unit 33, the second input unit 34, etc., are all stored in the memory as program units. The processor executes the program units stored in the memory to realize the corresponding functions.
[0106] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured. By adjusting the kernel parameters, the problem in related technologies where the updated recognition model uses features from the original image for image recognition when the original image is unavailable is addressed.
[0107] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0108] In one embodiment of this application, a computer-readable storage medium is also provided, on which a program is stored, which, when executed by a processor, implements the above-described method for updating image features.
[0109] In one embodiment of this application, a processor is also provided, the processor being used to run a program, wherein the program executes the above-described image feature update method during runtime.
[0110] Figure 4 is a schematic diagram of an electronic device according to an embodiment of this application. As shown in Figure 4, this application provides an electronic device 40, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: determining a target image recognition model and obtaining a historical image recognition model corresponding to the target image recognition model. Both the target image recognition model and the historical image recognition model are used to recognize target images in a target image set. The versions of the target image recognition model and the historical image recognition model are different. The target image set contains M target images, where M is a positive integer. Image features of the target image set in the historical image recognition model are obtained from a database to obtain an image feature set. The image feature set includes M sets of image features, each set corresponding to a target image. The image feature set is input into a target generator to obtain a restored image set, which includes M restored images. Each restored image is sequentially input into the target image recognition model to obtain updated features for each image feature, and the M updated features are stored in the target image recognition model. The device in this application embodiment can be a server, PC, PAD, mobile phone, etc.
[0111] In one embodiment of this application, a computer program product is also provided. When executed on a data processing device, it is suitable for executing an initialization program with the following method steps: determining a target image recognition model and obtaining a historical image recognition model corresponding to the target image recognition model, wherein both the target image recognition model and the historical image recognition model are used to recognize target images in a target image set, the versions of the target image recognition model and the historical image recognition model are different, and the target image set contains M target images, where M is a positive integer; obtaining image features of the target image set in the historical image recognition model from a database to obtain an image feature set, wherein the image feature set includes M sets of image features, each set of image features corresponding to a target image; inputting the image feature set into a target generator to obtain a restored image set, wherein the restored image set includes M restored images; sequentially inputting each restored image into the target image recognition model to obtain updated features of each image feature, and storing the M updated features into the target image recognition model.
[0112] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0113] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams.
[0114] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0115] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0116] In a specific configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0117] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0118] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0119] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0120] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0121] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for updating image features, comprising: A target image recognition model is determined, and a historical image recognition model corresponding to the target image recognition model is obtained. Both the target image recognition model and the historical image recognition model are used to recognize target images in a target image set. The versions of the target image recognition model and the historical image recognition model are different. The target image set contains M target images, where M is a positive integer. Image features of the target image set in the historical image recognition model are obtained from the database to obtain an image feature set, wherein the image feature set includes M groups of image features, and each group of image features corresponds to a target image; The image feature set is input into the target generator to obtain a set of restored images, wherein the set of restored images includes M restored images; and Each restored image is sequentially input into the target image recognition model to obtain the updated features of each image feature, and the M updated features are stored in the target image recognition model.
2. The method according to claim 1, wherein before obtaining the image feature set by retrieving the image features of the target image set from the database in the historical image recognition model, the method further includes: Each target image is input into the historical image recognition model, and the feature information of each target image is extracted through the historical image recognition model. Obtain the identification information of each target image, and combine the feature information and the identification information of each target image to obtain the image features of each target image, thus obtaining M sets of image features; The M sets of image features are stored in the database.
3. The method of claim 1, wherein before inputting the image feature set into the target generator, the method further comprises: For any target image, determine whether the target image contains text data, wherein the text data is used to describe the target image in text form; If the target image contains the text data, the text data is input into a text encoder to obtain the first feature of the target image; The first feature of the target image and the image features of the target image are combined to obtain the updated image features, and the updated image features are input into the target generator.
4. The method of claim 1, wherein before inputting the image feature set into the target generator, the method further comprises: For any target image, determine whether the target image contains sketch data, wherein the sketch data is used to describe the target image in sketch form; If the sketch data exists in the target image, the sketch data is input into the sketch encoder to obtain the second feature of the target image; The second feature of the target image and the image feature of the target image are combined to obtain the updated image feature, and the updated image feature is input into the target generator.
5. The method according to claim 3, wherein the text encoder is trained in the following manner: Acquire multiple first sample images, along with sample feature data and sample image description text for each first sample image; Each first sample image, its corresponding sample feature data, and the sample image description text are combined to form sample data, resulting in multiple sets of first sample data. The initial text encoder is trained using the multiple sets of first sample data until the similarity between the initial feature data output by the initial text encoder and the sample feature data is greater than a preset similarity, thus obtaining the text encoder.
6. The method of claim 4, wherein the sketch encoder is trained in the following manner: Acquire multiple second sample images, as well as sample feature data and sample sketch data for each second sample image; Each second sample image, its corresponding sample feature data, and sample sketch data are combined to form sample data, resulting in multiple sets of second sample data. The initial sketch encoder is trained using the multiple sets of second sample data until the similarity between the initial feature data output by the initial sketch encoder and the sample feature data is greater than a preset similarity, thus obtaining the sketch encoder.
7. The method according to claim 1, wherein the target generator is trained in the following manner: Acquire multiple third sample images and the sample feature data of each third sample image; The third sample images and their corresponding sample feature data are combined to form sample data, resulting in multiple sets of third sample data. The initial generator is trained using the multiple sets of third sample data until the similarity between the image generated by the initial generator based on the sample feature data and the corresponding third sample image is greater than a preset similarity, thus obtaining the target generator.
8. An image feature updating apparatus, comprising: A determining unit is used to determine a target image recognition model and obtain a historical image recognition model corresponding to the target image recognition model. The target image recognition model and the historical image recognition model are both used to recognize target images in a target image set. The versions of the target image recognition model and the historical image recognition model are different. The target image set contains M target images, where M is a positive integer. The first acquisition unit is used to acquire image features of the target image set in the historical image recognition model from the database to obtain an image feature set, wherein the image feature set includes M groups of image features, and each group of image features corresponds to a target image; The first input unit is used to input the image feature set into the target generator to obtain a restored image set, wherein the restored image set includes M restored images; The second input unit is used to sequentially input each restored image into the target image recognition model to obtain the updated features of each image feature, and store the M updated features into the target image recognition model.
9. The apparatus according to claim 8, further comprising: The third input unit is used to input each target image into the historical image recognition model, and extract the feature information of each target image through the historical image recognition model. The second acquisition unit is used to acquire the identification information of each target image, and combine the feature information and identification information of each target image to obtain the image features of each target image, thus obtaining M sets of image features; A storage unit is used to store the M sets of image features into a database.
10. The apparatus according to claim 8, further comprising: The first judgment unit is used to determine whether any target image contains text data, wherein the text data is used to describe the target image in text form; The fourth input unit is used to input the text data into a text encoder to obtain the first feature of the target image when the target image contains text data; The first combination unit is used to combine the first feature of the target image and the image feature of the target image to obtain the updated image feature, and input the updated image feature into the target generator.
11. The apparatus according to claim 8, further comprising: The second determination unit is used to determine whether any target image has sketch data, wherein the sketch data is used to describe the target image in sketch form; The fifth input unit is used to input the sketch data into the sketch encoder to obtain the second feature of the target image when the target image has sketch data; The second combination unit is used to combine the second feature of the target image and the image feature of the target image to obtain the updated image feature, and input the updated image feature into the target generator.
12. The apparatus of claim 10, further comprising: The third acquisition unit is used to acquire multiple first sample images, as well as sample feature data and sample image description text for each first sample image; The third combination unit is used to combine each first sample image, the corresponding sample feature data, and the sample image description text into sample data to obtain multiple sets of first sample data. The first training unit is used to train the initial text encoder using the multiple sets of first sample data until the similarity between the initial feature data output by the initial text encoder and the sample feature data is greater than a preset similarity, thereby obtaining the text encoder.
13. The apparatus of claim 11, further comprising: The fourth acquisition unit is used to acquire multiple second sample images, as well as sample feature data and sample sketch data for each second sample image; The fourth combination unit is used to combine each second sample image, the corresponding sample feature data, and the sample sketch data into sample data to obtain multiple sets of second sample data. The second training unit is used to train the initial sketch encoder using the multiple sets of second sample data until the similarity between the initial feature data output by the initial sketch encoder and the sample feature data is greater than a preset similarity, thereby obtaining the sketch encoder.
14. The apparatus of claim 8, further comprising: The fifth acquisition unit is used to acquire multiple third sample images and sample feature data of each third sample image; The fifth combination unit is used to combine each third sample image and the corresponding sample feature data into sample data to obtain multiple sets of third sample data; The third training unit is used to train the initial generator using the multiple sets of third sample data until the similarity between the image generated by the initial generator based on the sample feature data and the corresponding third sample image is greater than a preset similarity, thereby obtaining the target generator.
15. A non-volatile computer-readable storage medium having a computer program stored thereon, wherein, When the computer program is run by the processor, the processor performs the image feature update method according to any one of claims 1 to 7.
16. A computer program product comprising a computer program, wherein when executed by a processor, the computer program causes the processor to implement the method for updating image features according to any one of claims 1 to 7.
17. An electronic device comprising: Memory, which stores computer programs; A processor for running the computer program, wherein the computer program, when run by the processor, performs the image feature update method according to any one of claims 1 to 7.