Image generation method and device based on generalized zero-shot learning
By enhancing semantic features through the k-means algorithm and convergent evolution theory, and optimizing visual feature maps by combining the WGAN generator, the problem of instance-level features being ignored in generalized zero-shot learning is solved, thereby improving classification accuracy and model adaptability.
Patent Information
- Application Number
- CN202310491908.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-04
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2043-05-04
AI Technical Summary
Existing generalized zero-shot learning methods ignore the importance of instance-level features, resulting in inaccurate classification results.
The k-means algorithm and a pre-defined visual-semantic mapper are used to generate semantic features of visible instances. The convergent evolution theory is used to enhance the invisible semantic features. The pre-defined WGAN is used to generate optimized visual feature maps. The system is trained by combining basic loss, classification loss and contrastive loss.
It improves the classification accuracy and model performance of generalized zero-shot learning, and is adapted to the analysis of more invisible class samples.
Smart Images

Figure CN116524264B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an image generation method and apparatus based on generalized zero-shot learning. Background Technology
[0002] In zero-shot learning, the dataset is divided into visible and invisible classes. Furthermore, zero-shot learning can be divided into traditional zero-shot learning (ZSL) and generalized zero-shot learning (GZSL). Since in most cases, the trained model needs to be applicable to both visible and invisible classes, GZSL has become a mainstream research focus. Based on whether or not visual features of the invisible class are generated, zero-shot learning is transformed into a supervised task, and can also be divided into non-generative and generative methods.
[0003] Non-generative methods primarily utilize embedding strategies to associate visual and semantic features. Early approaches trained a mapper to map visual features to the semantic space; however, later researchers argued that mapping visual features to the semantic space causes a serious hub problem. While existing generative-based GZSL models have achieved significant results on many tasks, they often fail to adequately consider the importance of instance-level feature information. For example, semantic information describing a horse includes its limbs, head, and tail; however, the generator can only generate visual features containing all semantic information. Suppose there is a frontal photograph of a horse; if the tail is obscured by an angle, the classifier might misclassify it. Summary of the Invention
[0004] This application provides an image generation method and apparatus based on generalized zero-shot learning, which addresses the technical problem that existing technologies neglect the importance of instance-level features, resulting in insufficient discriminative power in the generalized zero-shot learning classification process and a lack of accuracy in the classification results.
[0005] In view of this, the first aspect of this application provides an image generation method based on generalized zero-shot learning, including:
[0006] The k-means algorithm and a preset visual-semantic map are used to generate visible instance semantic features based on the initial visible visual feature map, wherein the initial visible visual feature map includes the corresponding initial visible semantic features.
[0007] Based on the theory of convergent evolution, the differences between the semantic features of the visible instances and the initial visible semantic features are analyzed, and the differences are transferred to the invisible semantic features to obtain enhanced invisible semantic features;
[0008] An optimized visual feature map is generated using a preset WGAN based on the semantic features of the visible instances and the enhanced invisible semantic features. The preset WGAN includes a base loss, a classification loss, and a contrastive loss.
[0009] Preferably, the step of generating semantic features of visible instances based on the initial visible visual feature map using the k-means algorithm and a preset visual-semantic map includes:
[0010] The k-means algorithm is used to cluster the initial visible visual feature map into multiple clusters based on a preset squared difference loss, wherein each cluster includes a cluster center;
[0011] By using a preset visual-semantic mapper, the cluster centers are mapped to the semantic space to obtain the semantic features of visible instances.
[0012] Preferably, the step of analyzing the differences between the visible instance semantic features and the initial visible semantic features based on convergent evolution theory, and transferring the differences to the invisible semantic features to obtain enhanced invisible semantic features, includes:
[0013] Calculate the difference between the visible instance semantic features and the initial visible semantic features, and simultaneously calculate the distance between the initial visible semantic features and the initial invisible semantic features;
[0014] Based on the theory of convergent evolution, the differences are transferred to invisible semantic features according to the distance value, resulting in enhanced invisible semantic features.
[0015] Preferably, the step of generating an optimized visual feature map using a preset WGAN based on the semantic features of the visible instances and the enhanced invisible semantic features includes:
[0016] The visible instance semantic features and the enhanced invisible semantic features are mapped to the embedding layer by a pre-defined mapper of the contrast embedding layer to obtain the embedding layer features;
[0017] Based on preset Gaussian noise and the contrastive network layer in the preset contrastive embedding layer, a preset WGAN is used to generate an optimized visual feature map according to the semantic features of the visible instances and the enhanced invisible semantic features.
[0018] Preferably, the step of generating an optimized visual feature map using a preset WGAN based on the semantic features of the visible instances and the enhanced invisible semantic features, wherein the preset WGAN includes a base loss, a classification loss, and a contrastive loss, and further includes:
[0019] The optimized classifier is obtained by combining the optimized visual feature map and the real visual feature map to train the generalized zero-shot learning classifier.
[0020] The second aspect of this application provides an image generation apparatus based on generalized zero-shot learning, comprising:
[0021] The visible enhancement unit is used to generate visible instance semantic features based on the initial visible visual feature map using the k-means algorithm and a preset visual-semantic map, wherein the initial visible visual feature map includes the corresponding initial visible semantic features.
[0022] The invisible enhancement unit is used to analyze the difference between the semantic features of the visible instance and the initial visible semantic features based on the convergent evolution theory, and transfer the difference to the invisible semantic features to obtain enhanced invisible semantic features;
[0023] The visual generation unit is used to generate an optimized visual feature map based on the semantic features of the visible instances and the enhanced invisible semantic features using a preset WGAN, wherein the preset WGAN includes a base loss, a classification loss, and a contrastive loss.
[0024] Preferably, the visibility enhancement unit is specifically used for:
[0025] The k-means algorithm is used to cluster the initial visible visual feature map into multiple clusters based on a preset squared difference loss, wherein each cluster includes a cluster center;
[0026] By using a preset visual-semantic mapper, the cluster centers are mapped to the semantic space to obtain the semantic features of visible instances.
[0027] Preferably, the invisible enhancement unit is specifically used for:
[0028] Calculate the difference between the visible instance semantic features and the initial visible semantic features, and simultaneously calculate the distance between the initial visible semantic features and the initial invisible semantic features;
[0029] Based on the theory of convergent evolution, the differences are transferred to invisible semantic features according to the distance value, resulting in enhanced invisible semantic features.
[0030] Preferably, the visual generation unit is specifically used for:
[0031] The visible instance semantic features and the enhanced invisible semantic features are mapped to the embedding layer by a pre-defined mapper of the contrast embedding layer to obtain the embedding layer features;
[0032] Based on preset Gaussian noise and the contrastive network layer in the preset contrastive embedding layer, a preset WGAN is used to generate an optimized visual feature map according to the semantic features of the visible instances and the enhanced invisible semantic features.
[0033] Preferably, it further includes:
[0034] The model training unit is used to train the generalized zero-shot learning classifier by combining the optimized visual feature map and the real visual feature map to obtain the optimized classifier.
[0035] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0036] This application provides an image generation method based on generalized zero-shot learning, comprising: generating visible instance semantic features from an initial visible visual feature map using the k-means algorithm and a preset visual-semantic map, wherein the initial visible visual feature map includes the corresponding initial visible semantic features; analyzing the differences between the visible instance semantic features and the initial visible semantic features based on convergent evolution theory, and transferring the differences to the invisible semantic features to obtain enhanced invisible semantic features; and generating an optimized visual feature map from the visible instance semantic features and the enhanced invisible semantic features using a preset WGAN, wherein the preset WGAN includes a base loss, a classification loss, and a contrastive loss.
[0037] The image generation method based on generalized zero-shot learning provided in this application not only enhances both visible and invisible samples, but also extracts instance semantic features from the visual feature map. By expressing the visual map through instance semantic features, the characteristics of the real visual feature map in the actual scene are more consistent, thereby improving the accuracy of the generalized zero-shot learning classification results. Furthermore, enhancing the semantic features of the invisible class improves model performance and allows for the analysis of more invisible samples. Therefore, this application solves the technical problem of existing technologies neglecting the importance of instance-level features, leading to insufficient discriminative power in the generalized zero-shot learning classification process and resulting in inaccurate classification results. Attached Figure Description
[0038] Figure 1 A flowchart illustrating the image generation method based on generalized zero-shot learning provided in this application embodiment;
[0039] Figure 2 This is a schematic diagram of the structure of an image generation device based on generalized zero-shot learning provided in an embodiment of this application. Detailed Implementation
[0040] 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 of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0041] For easier understanding, please refer to Figure 1 The embodiments of the image generation method based on generalized zero-shot learning provided in this application include:
[0042] Step 101: Using the k-means algorithm and a preset visual-semantic mapper, generate visible instance semantic features based on the initial visible visual feature map. The initial visible visual feature map includes the corresponding initial visible semantic features.
[0043] Further, step 101 includes:
[0044] The k-means algorithm is used to cluster the initial visible visual feature map into multiple clusters based on a preset squared difference loss, where each cluster includes a cluster center;
[0045] By using a pre-defined visual-semantic mapper, cluster centers are mapped to the semantic space to obtain the semantic features of visible instances.
[0046] Specifically, assuming Let represent the initial set of visible visual feature maps for the i-th visible class. The k-means algorithm is used to cluster this initial set of visible visual feature maps. Multiple instance-level samples within a single visible class can be clustered into multiple clusters. This indicates that the sample of the i-th visible class has been clustered into 1 to n clusters. The clustering process is based on a preset squared error loss, which is specifically expressed as:
[0047]
[0048] in, Cluster The average vector is given by , where k represents the number of clusters to be formed. After clustering, multiple cluster centers are obtained. Then, the cluster centers of each cluster are mapped to the semantic space, replacing the original semantic features, i.e., the initial visible semantic features, to obtain the visible instance semantic features. This is the enhanced visible class semantic feature. The specific mapping process is as follows:
[0049]
[0050] in, For the semantic features of visible instances, x s Let s be the cluster center of the visible visual samples, representing the visible class. To ensure the accuracy of the mapping, this embodiment also uses initial visible semantic features to constrain the mapping process:
[0051]
[0052] Among them, Loss m A predefined loss function is used for mapping, where S is the total number of visible classes, and a sFor the initial visible semantic features, |||| F Let Frobenius norm be represented. If we assume... This represents the set of semantic features of the i-th visible class instance obtained after enhancement processing.
[0053] Compared to class-level features, instance-level features are closer to the characteristics of real samples and better reflect sample differences, thus improving the accuracy of zero-shot learning classification.
[0054] Step 102: Analyze the differences between the semantic features of visible instances and the initial visible semantic features based on the theory of convergent evolution, and transfer the differences to the invisible semantic features to obtain enhanced invisible semantic features.
[0055] Further, step 102 includes:
[0056] Calculate the difference between the visible instance semantic features and the initial visible semantic features, and simultaneously calculate the distance between the initial visible semantic features and the initial invisible semantic features;
[0057] Based on the theory of convergent evolution, the differences are transferred to invisible semantic features according to the distance value, resulting in enhanced invisible semantic features.
[0058] It should be noted that convergent evolution is a biological concept referring to the phenomenon where different species, under similar environments, independently evolve similar morphologies, structures, or behaviors. This convergent evolution may be due to similar selective pressures or because they face similar ecological niches. In this embodiment, the sample analysis principle based on convergent evolution is: by analyzing visible semantic features and enhancing similar invisible semantic features, enhanced invisible semantic features are obtained.
[0059] Since the visual features of invisible class samples cannot be accessed during the training phase, their visual feature maps cannot be used. Therefore, this embodiment utilizes the semantic features of visible instances to enhance the semantic features of invisible instances, thus obtaining semantic features of invisible instances—that is, enhancing the semantic features of invisible instances. Specifically, the difference between the semantic features of visible instances and the initial visible semantic features is first calculated:
[0060]
[0061] Based on this formula, the i-th initial visible semantic feature a can be obtained. i Samples in the j-th class of the i-th visible class Semantic distance, i.e., difference Next, calculate the s-th initial visible semantic feature in the i-th visible class. With the u-th initial invisible semantic feature in the j-th invisible class Distance values between:
[0062]
[0063] Through the above calculations, we can find the invisible class j that is most similar to the visible class i, if:
[0064]
[0065] Based on the theory of convergent evolution, differences are transferred to invisible semantic features according to distance values, resulting in enhanced invisible semantic features:
[0066]
[0067] in, This represents the enhanced invisible semantic feature of the j-th invisible class after enhancement processing, where α is a hyperparameter. This represents the visible class i that is closest to the invisible class j. Correspondingly, This represents the distance between the nearest visible class i and the invisible class j, i.e., the difference.
[0068] Step 103: Use a preset WGAN to generate an optimized visual feature map based on the semantic features of visible instances and the enhanced invisible semantic features. The preset WGAN includes basic loss, classification loss and contrastive loss.
[0069] Further, step 103 includes:
[0070] By using a pre-defined mapper for the contrast embedding layer, visible instance semantic features and enhanced invisible semantic features are mapped to the embedding layer to obtain embedding layer features.
[0071] Based on preset Gaussian noise and a preset contrastive embedding layer, a preset WGAN is used to generate an optimized visual feature map based on the semantic features of visible instances and enhanced invisible semantic features.
[0072] If we represent the visible instance semantic features and the enhanced invisible semantic features as a whole as A, then in this embodiment, z ~ N(0,1) represents the preset Gaussian noise, and the visual features generated by the preset WGAN are expressed as follows:
[0073] In this embodiment, the basic loss of WGAN is predefined as follows:
[0074]
[0075] The last term in the equation is the gradient penalty term for the generator, and γ~U(0;1), λ is the penalty coefficient. Let D(s,A) denote an interpolation point that is randomly sampled from the real data distribution and the generated data distribution. D(s,A) represents the estimate of the Wasserstein distance from the visible class samples and semantic features input to the discriminator D and output as the real data distribution. This represents the estimation of the generated data distribution by inputting the generated samples and semantic features into the discriminator D and outputting their Wasserstein distance.
[0076] To further validate the generated visual features, a classification loss is introduced:
[0077]
[0078] Where P is a conditional probability distribution, representing a given input Given parameters θ, the probability of outputting y is... The class labels are denoted by θ, where θ represents the parameters of the pre-trained auxiliary classifier. The base loss and classification loss can be used to obtain a preliminary fused loss:
[0079] Loss t =Loss wgan +βLoss cls
[0080] Where β is the balance coefficient.
[0081] To optimize the generation of higher-quality visual features using the preset WGAN in this embodiment, a preset contrastive embedding layer is introduced. This layer includes a mapper for mapping visible instance semantic features and enhanced invisible semantic features to the embedding layer, and a contrastive network layer C(e,a) for calculating the correlation between embedding layer feature e and semantic feature a. This contrastive network layer can be used as an auxiliary loss function during the training process of the preset WGAN, namely, the contrastive loss.
[0082]
[0083] Where ALL represents the total number of visible and invisible classes, a + For embedding layer features e i The matched positive semantic features, where μ is a hyperparameter. The calculated relevance score enables the generator to produce visual features that are of higher quality and closer to real data, ensuring that the association between visual features and semantic features remains consistent, thereby improving the model's generalization ability.
[0084] Furthermore, step 103, followed by:
[0085] By combining optimized visual feature maps and real visual feature maps, a generalized zero-shot learning classifier is trained to obtain an optimized classifier.
[0086] To facilitate understanding, this application provides an example using the AwA2 dataset, which contains 40 visible classes and 10 invisible classes. In this example, the visual features extracted using ResNet101 have a dimension of 2048×37322, while the corresponding semantic features have a dimension of 85×50. When using the k-means algorithm, the number of clusters in each iteration is set to 3. That is, the k-means algorithm is applied iteratively to the 40 visible classes, generating 3 instance-level inner classes for each class; after the k-means algorithm completes, the 40 visible classes are expanded into 120 instance-level visible classes. Next, a visual-semantic mapper is trained, using classification loss and L2 loss to guide the mapping process. After the mapper is trained, the cluster centers are mapped to the semantic space and used as the semantic features of the expanded visible classes. Then, the distance between the original visible class semantic features and the expanded visible class semantic features, as well as the similarity between the original visible class semantic features and the original invisible class semantic features, are calculated. Finally, using the aforementioned calculation formula, the 10 invisible classes are expanded into 30 instance-level invisible classes, and the corresponding semantic features are obtained.
[0087] Enhanced semantic features are input into the discriminator and generator in the WGAN generator for visual generation, resulting in optimized visual feature maps. To avoid the classifier from developing a bias towards synthetic or real visual features, this application combines the optimized visual feature maps and real visual feature maps to train a generalized zero-shot learning classifier, resulting in an optimized classifier. Furthermore, a test set can be prepared to test the model, and the accuracy and harmonic mean of the final classifier on the visible and invisible classes can be calculated to evaluate the overall model performance.
[0088] The image generation method based on generalized zero-shot learning provided in this application not only enhances both visible and invisible samples, but also extracts instance semantic features from the visual feature map. By expressing the visual map through instance semantic features, the characteristics of the real visual feature map in the actual scene are more consistent, thereby improving the accuracy of the generalized zero-shot learning classification results. Furthermore, enhancing the semantic features of the invisible class improves model performance and allows for the analysis of more invisible samples. Therefore, this application addresses the technical problem of existing technologies neglecting the importance of instance-level features, leading to insufficient discriminative power in the generalized zero-shot learning classification process and resulting in inaccurate classification results.
[0089] For easier understanding, please refer to Figure 2 This application provides an embodiment of an image generation apparatus based on generalized zero-shot learning, comprising:
[0090] Visible enhancement unit 201 is used to generate visible instance semantic features based on the initial visible visual feature map using the k-means algorithm and a preset visual-semantic map. The initial visible visual feature map includes the corresponding initial visible semantic features.
[0091] The invisible enhancement unit 202 is used to analyze the difference between the semantic features of the visible instance and the initial visible semantic features based on the convergent evolution theory, and transfer the difference to the invisible semantic features to obtain the enhanced invisible semantic features;
[0092] The visual generation unit 203 is used to generate an optimized visual feature map based on the semantic features of visible instances and the enhanced invisible semantic features using a preset WGAN. The preset WGAN includes a base loss, a classification loss, and a contrastive loss.
[0093] Furthermore, the enhancement unit 201 is specifically used for:
[0094] The k-means algorithm is used to cluster the initial visible visual feature map into multiple clusters based on a preset squared difference loss, where each cluster includes a cluster center;
[0095] By using a pre-defined visual-semantic mapper, cluster centers are mapped to the semantic space to obtain the semantic features of visible instances.
[0096] Furthermore, the invisible enhancement unit 202 is specifically used for:
[0097] Calculate the difference between the visible instance semantic features and the initial visible semantic features, and simultaneously calculate the distance between the initial visible semantic features and the initial invisible semantic features;
[0098] Based on the theory of convergent evolution, the differences are transferred to invisible semantic features according to the distance value, resulting in enhanced invisible semantic features.
[0099] Furthermore, the visual generation unit 203 is specifically used for:
[0100] By using a pre-defined mapper for the contrast embedding layer, visible instance semantic features and enhanced invisible semantic features are mapped to the embedding layer to obtain embedding layer features.
[0101] Based on preset Gaussian noise and a preset contrastive embedding layer, a preset WGAN is used to generate an optimized visual feature map based on the semantic features of visible instances and enhanced invisible semantic features.
[0102] Furthermore, it also includes:
[0103] The model training unit 204 is used to combine optimized visual feature maps and real visual feature maps to train a generalized zero-shot learning classifier for classification, thereby obtaining an optimized classifier.
[0104] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0105] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0106] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0107] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for executing all or part of the steps of the methods described in the various embodiments of this application through a computer device (which may be a personal computer, server, or network device, etc.). The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0108] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for image generation based on generalized zero-shot learning, characterized in that, The method comprises the steps of: generating visible instance semantic features from initial visible visual feature maps by using a k-means algorithm and a preset visual-semantic mapper, wherein the initial visible visual feature maps comprise corresponding initial visible semantic features, and the specific process is as follows: clustering the initial visible visual feature maps into a plurality of clusters by using a k-means algorithm based on a preset squared difference loss, wherein each cluster comprises a cluster clustering center; mapping the cluster clustering centers to a semantic space by using a preset visual-semantic mapper to obtain visible instance semantic features; analyzing the difference between the visible instance semantic features and the initial visible semantic features based on the theory of convergent evolution, and migrating the difference to invisible semantic features to obtain enhanced invisible semantic features, and the specific process is as follows: calculating the difference between the visible instance semantic features and the initial visible semantic features, and simultaneously calculating the distance value between the initial visible semantic features and initial invisible semantic features; migrating the difference to invisible semantic features based on the theory of convergent evolution according to the distance value to obtain enhanced invisible semantic features, which are expressed as: ; wherein, represents the enhanced invisible semantic feature of the jth invisible class after the enhancement processing, is a hyperparameter, represents the visible class i closest to the invisible class j, and correspondingly, represents the distance between the closest visible class i and the invisible class j, i.e., the difference, represents the distance between the jth invisible class and the visible class i closest to the invisible class j. generating optimized visual feature maps from the visible instance semantic features and the enhanced invisible semantic features by using a preset WGAN, wherein the preset WGAN comprises a basic loss, a classification loss and a contrast loss, and the specific process is as follows: mapping the visible instance semantic features and the enhanced invisible semantic features to an embedding layer by using a mapper of a preset contrast embedding layer to obtain embedding layer features; generating optimized visual feature maps from the visible instance semantic features and the enhanced invisible semantic features by using a preset WGAN based on a preset Gaussian noise and a contrast network layer in the preset contrast embedding layer.
2. The image generation method based on generalized zero-shot learning according to claim 1, characterized in that, The method of generating optimized visual feature maps from the visible instance semantic features and the enhanced invisible semantic features by using a preset WGAN, wherein the preset WGAN comprises a basic loss, a classification loss and a contrast loss, and the method further comprises the steps of: performing classification training on a generalized zero-shot learning classifier in combination with the optimized visual feature maps and real visual feature maps to obtain an optimized classifier.
3. The image generation apparatus based on generalized zero-shot learning, characterized by, The method comprises the steps of: a visible enhancement unit is configured to generate visible instance semantic features from initial visible visual feature maps by using a k-means algorithm and a preset visual-semantic mapper, wherein the initial visible visual feature maps comprise corresponding initial visible semantic features, and the visible enhancement unit is specifically configured to: cluster the initial visible visual feature maps into a plurality of clusters by using a k-means algorithm based on a preset squared difference loss, wherein each cluster comprises a cluster clustering center; map the cluster clustering centers to a semantic space by using a preset visual-semantic mapper to obtain visible instance semantic features; an invisible enhancement unit is configured to analyze the difference between the visible instance semantic features and the initial visible semantic features based on the theory of convergent evolution, and migrate the difference to invisible semantic features to obtain enhanced invisible semantic features, and the invisible enhancement unit is specifically configured to: calculate the difference between the visible instance semantic feature and the initial visible semantic feature, and simultaneously calculate the distance value between the initial visible semantic feature and an initial invisible semantic feature; According to the distance value, the difference is migrated to the invisible semantic feature based on the theory of convergent evolution, and an enhanced invisible semantic feature is obtained, which is expressed as: ; wherein, represents the enhanced invisible semantic feature of the jth invisible class after the enhancement processing, is a hyperparameter, represents the visible class i closest to the invisible class j, and correspondingly, represents the distance between the closest visible class i and the invisible class j, i.e., the difference, represents the distance between the jth invisible class and the visible class i closest to the invisible class j. A visual generation unit is configured to generate an optimized visual feature map based on the visible instance semantic feature and the enhanced invisible semantic feature by using a preset WGAN, wherein the preset WGAN includes a basic loss, a classification loss and a contrast loss, and the visual generation unit is specifically configured to: Map the visible instance semantic feature and the enhanced invisible semantic feature to an embedding layer by using a mapper of a preset contrast embedding layer to obtain an embedding layer feature; Based on a preset Gaussian noise and a contrast network layer in the preset contrast embedding layer, an optimized visual feature map is generated based on the visible instance semantic feature and the enhanced invisible semantic feature by using a preset WGAN.
4. The image generation apparatus based on generalized zero-shot learning according to claim 3, wherein, Further comprising: A model training unit is configured to perform classification training on a generalized zero-shot learning classifier by combining the optimized visual feature map and a real visual feature map to obtain an optimized classifier.
Citation Information
Patent Citations
Mixed generalized zero sample learning method based on feature optimization
CN115761355A