Intelligent image generation model construction method applied to diversified industries

Through intelligent image generation models and confrontation training methods, the problem of single -model use scenarios in the existing technology in the existing technology, realizing the image generation ability used in the application scenarios in the diversified industry, and improving the authenticity and rendering effect of the image Accuracy.

CN119338942AActive Publication Date: 2025-01-21XIAMEN SHIBAO NETWORK TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411850077.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-01-21
Estimated Expiration
2044-12-16

AI Technical Summary

Technical Problem

In the prior art, the use scenarios of the image generation model are relatively single, and it is difficult to adapt to diversified industry application scenarios, and the training process is complex, making it difficult to adapt to other usage scenarios.

Method used

By using an intelligent image generation model, based on the information and demand description information of different industry categories, images that are suitable for industry applications are generated. By combining loss functions and adversarial training methods, the model is trained to generate images that adapt to diversified industry application scenarios.

Benefits of technology

The extensive use of the intelligent image generation model in the application scenarios of the diversified industry can quickly build a model that adapts to the use scenarios that adapt to various industries, and improves the authenticity of the image and the accuracy of rendering effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338942A_ABST
    Figure CN119338942A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent image generation model construction method applied to diversified industries, and relates to the technical field of computer models. The method comprises the steps of obtaining a first description feature vector according to first industry category information and first demand description information, and inputting the first description feature vector into an intelligent image generation model to obtain a first training generation image; performing confrontation training according to the first training generation image, the first sample image set and the discrimination model group to obtain a trained intelligent image generation model; and inputting the second industry category information and the second demand description information into the trained intelligent image generation model to obtain a second training generation image, inputting the second demand description information into the special image generation model to obtain a third training generation image, and training the special image generation model. According to the invention, the intelligent image generation model can generate an image conforming to industry application, and a lightweight special image generation model suitable for use scenes of various industries can be quickly constructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer model technology, and in particular to a method for constructing an intelligent image generation model for diversified industry applications. Background Art

[0002] In the related art, CN118839789A discloses a model training method, an image generation method, a device and an electronic device. In this method, a basic image and a first description text are first obtained, and the basic image and the first description text are input into the image generation model to be trained, so that the image generation model determines the image features corresponding to the basic image and the text features corresponding to the first description text, and based on the image features corresponding to the basic image and the text features corresponding to the first description text, an image of the target object in a specified environment with the physical features of the reference object is generated as an output image, and a comprehensive loss function value is determined according to the feature deviation between the image features corresponding to the output image and the image features corresponding to the basic image, and the similarity between the features of the image content expressed by the output image and the text features corresponding to the first description text, and the image generation model is trained according to the comprehensive loss function value.

[0003] CN118114788A discloses a training method for an image generation model, an image generation method and related equipment. The method includes: obtaining multiple training data pairs; for a first training data pair, based on a text understanding module, understanding the first training text in the first training data pair to obtain a first vector; interacting the first vector with the embedding vector of the first training text to obtain a second vector; based on the second vector and a dimension mapping module, generating a third vector of the input feature dimension required by the image generation module; based on the image generation module and the third vector, generating a target image corresponding to the first training text; based on the target image corresponding to each training data pair, the positively correlated image and the negatively correlated image in each training data pair, determining the target loss; based on the target loss, freezing the parameters of the image generation module, training the text understanding module and the dimension mapping module, and obtaining the image generation model.

[0004] Therefore, in the related art, although the image generation model can be trained and text information can be used to generate images, the usage scenario of the model is relatively single and it is difficult to use it in diversified industry application scenarios. Moreover, due to the complexity of the training process, it is difficult to adapt the model to other usage scenarios.

[0005] The information disclosed in the background technology section of this application is only intended to deepen the understanding of the general background technology of this application, and should not be regarded as an admission or any form of suggestion that the information constitutes the prior art already known to those skilled in the art. Summary of the invention

[0006] The present invention provides a method for constructing an intelligent image generation model for diversified industry applications, which can solve the technical problems in related technologies that the image generation model has a single usage scenario and is difficult to adapt to other usage scenarios.

[0007] According to a first aspect of the present invention, a method for constructing an intelligent image generation model for diversified industry applications is provided, comprising: Obtaining a first description feature vector according to the first industry category information and the first requirement description information, wherein the first industry category information is used to describe the industry category corresponding to the generated image, and the first requirement description information is used to describe the content contained in the generated image; Processing the first description feature vector according to the intelligent image generation model to obtain a first training generated image; According to the first training generated images, including a first sample image set of first sample images of various industry categories, and a discriminant model group, a combined loss function of the intelligent image generation model and the discriminant model group is obtained; The intelligent image generation model is trained by using the combined loss function to obtain a trained intelligent image generation model; Obtaining a second training generated image according to the second industry category information and the second demand description information, and the trained intelligent image generation model; Input the second requirement description information into a dedicated image generation model corresponding to the second industry category information to obtain a third training generated image; Obtaining a dedicated loss function of a dedicated image generation model according to the third training generated image and the second training generated image; The dedicated image generation model is trained according to the dedicated loss function to obtain a trained dedicated image generation model.

[0008] Technical effect: According to the present invention, the intelligent image generation model can be trained through the first industry category information and the first demand description information of multiple industry categories, so that the intelligent image generation model can generate images that meet industry applications, which is convenient for use in diversified industry application scenarios, and the intelligent image generation model can be used to train the special image generation models of various industries, which is convenient for building lightweight special image generation models based on industries and fields, so that models that adapt to the usage scenarios of various industries can be quickly built. The first authenticity loss function can be determined by adversarial training, so that the purpose of improving the realism of the images generated by the intelligent image generation model while improving the discrimination ability of the authenticity discrimination model can be achieved, so that the performance of the two models can be balanced and the realism of the first training generated image can be improved. The first industry loss function can be determined by adversarial training, so that the intelligent image generation model can be improved to describe the industry characteristics, improve the accuracy of the rendering effect, and improve the ability of the industry category discrimination model to judge the industry category to which the image belongs, so that the performance of the two models can be balanced, and the authenticity of the first training generated image and the accuracy of the rendering effect can be further improved. The first content loss function can be determined by adversarial training, so that the accuracy of the content generated by the intelligent image generation model can be improved while the ability of the content category discrimination model to judge whether the image content is correct can be improved, so that the performance of the two models can be balanced, and the authenticity of the first training generated image and the accuracy of the content included can be further improved, so that the content in the image generated by the intelligent image generation model is more in line with expectations. The dedicated loss function can be determined based on the error in the pixel value of each pixel point between the third training generated image and the second training generated image, so as to improve the consistency of the image generated by the dedicated image generation model and the image generated by the intelligent image generation model for the industry, so that the dedicated image generation model can achieve similar effects as the intelligent image generation model when generating images of its corresponding industry, and can be more lightweight and easy to build and train.

[0009] It should be understood that the above general description and the following detailed description are exemplary and explanatory only and do not limit the present invention. Other features and aspects of the present invention will become more apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other embodiments can be obtained based on these drawings without creative work. Figure 1A flowchart of a method for constructing an intelligent image generation model for diversified industry applications according to an embodiment of the present invention is exemplarily shown. DETAILED DESCRIPTION

[0011] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0012] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0013] Figure 1 A flow chart of a method for constructing an intelligent image generation model for diversified industry applications according to an embodiment of the present invention is exemplarily shown, and the method includes: Step S101, obtaining a first description feature vector according to first industry category information and first requirement description information, wherein the first industry category information is used to describe the industry category corresponding to the generated image, and the first requirement description information is used to describe the content contained in the generated image; Step S102, processing the first description feature vector according to an intelligent image generation model to obtain a first training generated image; Step S103, obtaining a combined loss function of the intelligent image generation model and the discriminant model group based on the first training generated images, including a first sample image set of first sample images of multiple industry categories, and a discriminant model group; Step S104, training the intelligent image generation model through the combined loss function to obtain a trained intelligent image generation model; Step S105, obtaining a second training generated image according to the second industry category information and the second demand description information, and the trained intelligent image generation model; Step S106, inputting the second requirement description information into a dedicated image generation model corresponding to the second industry category information to obtain a third training generated image; Step S107, obtaining a dedicated loss function of a dedicated image generation model according to the third training generated image and the second training generated image; Step S108, training the dedicated image generation model according to the dedicated loss function to obtain a trained dedicated image generation model.

[0014] According to the method for constructing an intelligent image generation model for diversified industry applications of an embodiment of the present invention, the intelligent image generation model can be trained through the first industry category information and first requirement description information of multiple industry categories, so that the intelligent image generation model can generate images that meet the industry applications, which is convenient for use in diversified industry application scenarios. The intelligent image generation model can also be used to train special image generation models for various industries, which is convenient for constructing lightweight special image generation models based on industries and fields, so as to quickly construct models that adapt to usage scenarios of various industries.

[0015] According to one embodiment of the present invention, in step S101, the first industry category information can be used to indicate the industry category to which the generated image belongs. For example, the generated image is used for advertising media or for scientific research, etc., and the requirements for the image are different. The image used for advertising media requires the beauty of the target object in the image to be reflected, so it is necessary to adjust the parameters such as brightness, contrast, saturation, etc., so as to render the image and enhance the beauty of the image, while the image used for scientific research mainly requires the authenticity of the image to be enhanced, and the state of the target object in the experimental scene can be truly reflected. The first industry category information can be text information used to describe the industry category. The first demand description information is used to describe the content contained in the generated image, that is, the target object contained in the image, the number of target objects, the environmental background, etc. The first demand description information can also be text information. The first description feature vector can be obtained by the natural language processing model for the first industry category information and the first demand description information. The natural language processing model can be a deep learning neural network model such as a recursive neural network. The present invention does not limit the specific type of the natural language processing model.

[0016] According to one embodiment of the present invention, in step S102, the intelligent image generation model is a deep learning neural network model such as a convolutional neural network model, which can generate an image based on an input vector. The first descriptive feature vector used to describe the industry category and the content included is input into the intelligent image generation model to generate a first training generated image. The content included in the first training generated image and the applicable industry may differ from the first demand description information and the first industry category information. Therefore, the intelligent image generation model can be trained to reduce the above differences.

[0017] According to one embodiment of the present invention, in step S103, the discriminant model group may include multiple discriminant models, which can be trained adversarially together with the intelligent image generation model, that is, the discriminant model group can improve the discrimination accuracy during training, and the intelligent image generation model can improve the authenticity and accuracy of the generated images during training.

[0018] According to one embodiment of the present invention, the discrimination model group includes an authenticity discrimination model, an industry category discrimination model and a content category discrimination model, wherein the authenticity discrimination model is used to judge the authenticity of an input image, the industry category discrimination model is used to judge the industry category corresponding to the input image, and the content category discrimination model is used to judge the category of content contained in the input image.

[0019] According to one embodiment of the present invention, based on the first training generated image, a first sample image set including first sample images of multiple industry categories, and a discriminant model group, a combined loss function of the intelligent image generation model and the discriminant model group is obtained, including: inputting the first training generated image or the first sample image into the authenticity discrimination model to obtain a first authenticity discrimination result; determining the first authenticity loss function of the authenticity discrimination model based on the first authenticity discrimination result; inputting the first training generated image or the first sample image into the industry category discrimination model to obtain a first industry category description vector; obtaining the first industry loss function of the industry category discrimination model based on the first industry category description vector, the first industry category information and the industry category of the first sample image; inputting the first training generated image or the first sample image into the content category discrimination model to obtain a first content description vector; obtaining the first content loss function of the content category discrimination model based on the first content description vector, the first demand description information and the content annotation information of the first sample image; obtaining the combined loss function based on the first authenticity loss function, the first industry loss function and the first content loss function.

[0020] According to one embodiment of the present invention, the first sample image is a real image, and the first training generated image is a generated image. Therefore, in theory, the authenticity discrimination model should judge the first sample image as a real image with a probability of 100%, and judge the first training generated image as a real image with a probability of 0. However, as the training process proceeds, the realism of the intelligent image generation model becomes higher and higher, resulting in an increase in the probability that the authenticity discrimination model judges the first training generated image as a real image. Moreover, as the authenticity discrimination model also improves its discrimination ability during training, the probability that the authenticity discrimination model judges the first training generated image as a real image may be reduced again. Ultimately, the performance of the authenticity discrimination model and the authenticity discrimination model may be balanced, so that when the discrimination accuracy of the authenticity discrimination model is very high, it is still difficult to judge whether the first training generated image generated by the intelligent image generation model is a real image, that is, the realism of the image generated by the intelligent image generation model is made higher.

[0021] According to an embodiment of the present invention, determining a first authenticity loss function of an authenticity discrimination model according to the first authenticity discrimination result includes: determining the first authenticity loss function of the authenticity discrimination model according to formula (1): , (1) in, is the i-th first sample image, is the probability that the i-th first sample image output by the authenticity discrimination model is a real image, Generate images for the jth first training, is the probability that the jth first training generated image output by the authenticity discrimination model is a real image, is the number of first sample images in a training batch, The number of images generated for the first training in a training batch.

[0022] According to one embodiment of the present invention, according to the above-mentioned training method for balancing the performance of the intelligent image generation model and the authenticity discrimination model, the authenticity discrimination model can be adjusted in a direction that maximizes the first authenticity loss function represented by formula (1), and the intelligent image generation model can be adjusted in a direction that minimizes the first authenticity loss function.

[0023] According to one embodiment of the present invention, in formula (1), if the input image is the first sample image, then in the training of the authenticity discrimination model, Maximize, that is, as close to 1 as possible, so that Maximize, thereby improving the accuracy of the authenticity discrimination model in judging real images. If the input image is the first training generated image, in the training of the authenticity discrimination model, Minimize, that is, as close to 0 as possible, so that Maximize, thereby improving the accuracy of the authenticity discrimination model in judging the generated images.

[0024] According to one embodiment of the present invention, on the other hand, in formula (1), if the input image is the first training generated image, then in the training of the intelligent image generation model, Maximize, that is, as close to 1 as possible, so that Minimization increases the probability that the first training generated image generated by the intelligent image generation model is recognized as a real image by the authenticity discrimination model, thereby improving the realism of the image generated by the intelligent image generation model and improving the performance of the intelligent image generation model.

[0025] In this way, the first authenticity loss function can be determined through adversarial training, so that the purpose of improving the realism of the images generated by the intelligent image generation model can be achieved while improving the discrimination ability of the authenticity discrimination model, thereby balancing the performance of the two models and improving the realism of the images generated by the first training.

[0026] According to one embodiment of the present invention, the industry category discrimination model can analyze the style, brightness, contrast, saturation and other information of the first training generated image or the first sample image to determine the industry field to which the image is applied, and output a first industry category description vector, which can be used to describe the industry category.

[0027] According to one embodiment of the present invention, according to the first industry category description vector, the first industry category information and the industry category of the first sample image, a first industry loss function of an industry category discrimination model is obtained, including: obtaining rendering parameter vectors of multiple first sample images of each industry category in the first sample image set, wherein each component of the rendering parameter vector is a rendering parameter, and the rendering parameters include light and shadow contrast parameters, saturation parameters, brightness parameters, and the area ratio of the target area and the background area; determining an average rendering parameter vector for each industry category according to the rendering parameter vectors of multiple first sample images; obtaining a training rendering parameter vector of a first training generated image or a first sample image input to the industry category discrimination model; determining the first industry loss function of the industry category discrimination model according to the training rendering parameter vector, the average rendering parameter vector, the first industry category description vector and the first industry category information.

[0028] According to one embodiment of the present invention, the style of the image applied by each industry category can be determined, and the rendering parameter vector of the first sample image of each industry category can be obtained. Each component of the rendering parameter vector is a rendering parameter, and the rendering parameter includes a light and shadow contrast parameter, a saturation parameter, a brightness parameter, and an area ratio between the target area and the background area. There are significant differences in the rendering parameters of images used in different industries. For example, the objects contained in the images used in the media industry and the images used in scientific research may be the same, but the rendering parameters of the two are different. In order to improve the aesthetics, the images used in the media industry can use higher contrast, saturation and other parameters, while the images used in scientific research need to minimize the difference between the objects in the image and the human eye directly observing the objects, so as to maximize the authenticity. Therefore, the rendering parameter vectors of the first sample images used in different industries can be different from each other. In addition, the rendering parameter vectors of multiple first sample images of each industry category can be averaged to obtain the average rendering parameter vector of each industry category, thereby reflecting the average level of the rendering parameters of the images used in each industry category. Further, the training rendering parameter vector of the first training generated image or the first sample image can be obtained for comparison with the above average rendering parameter vector.

[0029] According to an embodiment of the present invention, determining the first industry loss function of the industry category discrimination model according to the training rendering parameter vector, the average rendering parameter vector, the first industry category description vector and the first industry category information includes: determining the first industry loss function of the industry category discrimination model according to formula (2): , (2) in, is the first industry category description vector of the i-th first sample image output by the industry category discrimination model, for The transposed vector of is the category description vector determined according to the industry category of the i-th first sample image, is the first industry category description vector of the jth first training generated image output by the industry category discrimination model, for The transposed vector of is a category description vector determined according to the first industry category information of the j-th first training generated image, is the training rendering parameter vector for the jth first training generated image, for The transposed vector of The average rendering parameter vector for the first industry category for the jth first training generated image.

[0030] According to an embodiment of the present invention, the above-mentioned adversarial training method can still be used. In formula (2), if the input image is the first sample image, then in the training of the industry category discrimination model, Maximize, that is, maximize the similarity between the processing result of the industry category discrimination model on the first sample image and the category description vector of the industry category to which the first sample image belongs, that is, as close to 1 as possible, so that Maximize, thereby improving the accuracy of the industry classification model in determining the industry category to which the real image belongs. If the input image is the first training generated image, in the training of the industry classification model, minimize, that is, as close to 0 as possible, so that Maximize, so that when the industry category discrimination model determines that the generated image belongs to an industry category, it determines that it is a generated image and does not belong to any industry, thereby improving the accuracy of the industry category discrimination model, where, is the similarity between the processing result of the industry category discrimination model on the first training generated image and the category description vector determined based on the first industry category information of the first training generated image, is the probability that the first training generated image is a real image, The similarity between the training rendering parameter vector of the first training generated image and the average rendering parameter vector of the first industry category of the first training generated image is made so that the above product is as close to 0 as possible, that is, even if the authenticity discrimination model determines that the probability that the first training generated image is a real image is not 0, and there is a certain similarity between the training rendering parameter vector and the average rendering parameter vector of the industry to which it belongs, the industry category discrimination model can still determine that the first training generated image is not similar to the first industry category information, that is, output the first industry category description vector that does not belong to any industry, so that it is not similar to the category description vector determined according to the first industry category information.

[0031] According to one embodiment of the present invention, in formula (2), if the input image is the first training generated image, then in the training of the intelligent image generation model, maximize, that is, as close to 1 as possible, so that Minimize, thereby further improving the probability that the first training generated image is a real image and the similarity between the training rendering parameter vector and the average rendering parameter vector. The value of makes the first industry category description vector of the first training generated image closer to the first industry category information, thereby improving the ability of the images generated by the intelligent image generation model to more accurately describe the industry characteristics and obtain more accurate rendering effects, thereby improving the performance of the intelligent image generation model and improving the authenticity of the images generated by the intelligent image generation model.

[0032] In this way, the first industry loss function can be determined through adversarial training, so that while improving the intelligent image generation model's ability to describe industry characteristics and improve the accuracy of rendering effects, the industry category discrimination model can also be improved to determine the industry category to which the image belongs. This balances the performance of the two models and further improves the authenticity of the first training generated images and the accuracy of the rendering effects.

[0033] According to an embodiment of the present invention, the content category discrimination model may be used to determine whether the content included in the input first training generated image or the first sample image is correct.

[0034] According to an embodiment of the present invention, the first content description vector includes a first target type description vector, a first target state description vector and a first target scene description vector, and the first requirement description information includes first target type description information, first target state description information and first target scene description information; obtaining a first content loss function of a content category discrimination model according to the first content description vector, the first requirement description information and content annotation information of the first sample image includes: obtaining the first content loss function of the content category discrimination model according to formula (3) , (3) in, is the first target type description vector of the i-th first sample image output by the content category discrimination model, for The transposed vector of is the target type description vector determined according to the content annotation information of the i-th first sample image, is the first target state description vector of the i-th first sample image output by the content category discrimination model, for The transposed vector of is the target state description vector determined according to the content annotation information of the i-th first sample image, is the first target scene description vector of the i-th first sample image output by the content category discrimination model, for The transposed vector of is the target scene description vector determined according to the content annotation information of the i-th first sample image, is the first target type description vector of the jth first training generated image output by the content category discrimination model, for The transposed vector of is the target type description vector determined according to the first target type description information of the j-th first training generated image, is the first target state description vector of the jth first training generated image output by the content category discrimination model, for The transposed vector of is a target state description vector determined according to the first target state description information of the j-th first training generated image, is the first target scene description vector of the jth first training generated image output by the content category discrimination model, for The transposed vector of is a target scene description vector determined according to the first target scene description information of the jth first training generated image, and min is a minimum value function.

[0035] According to an embodiment of the present invention, the above-mentioned adversarial training method can still be used. In formula (3), if the input image is the first sample image, then in the training of the content category discrimination model, Maximize, where is the similarity between the first target type description vector and the target type description vector of the content annotation information (error-free annotation information) of the first sample image, is the similarity between the first target state description vector and the target state description vector of the content annotation information of the first sample image, The similarity between the first target scene description vector and the target scene description vector of the content annotation information of the first sample image is maximized, that is, the three similarities are maximized, that is, close to 1, so that the content category discrimination model can accurately identify the type, state (for example, action, posture, expression, etc.) and scene (for example, the environment, location, etc.) of the target object in the first sample image. If the input image is the first training generated image, then in the training of the content category discrimination model, minimize, that is, as close to 0 as possible, so that Maximize, so that when the content classification model identifies the content in the generated image, it determines that it is a generated image and does not contain any real content, thereby improving the accuracy of the content classification model. is the similarity between the first target type description vector and the target type description vector of the first target type description information, is the similarity between the first target state description vector and the target state description vector of the first target state description information, It is the similarity between the first target scene description vector and the target scene description vector of the first target scene description information. Therefore, even if the authenticity discrimination model determines that the probability that the first training generated image is a real image is not 0, the content category discrimination model can still determine that the above three similarities are close to 0, that is, it is determined that the first training generated image does not contain real content.

[0036] According to one embodiment of the present invention, in formula (3), if the input image is the first training generated image, then in the training of the intelligent image generation model, maximize, that is, as close to 1 as possible, so that Minimize, so that under the influence of the probability that the first training generated image is a real image, the values ​​of the three similarities are improved, so that the content of the first training generated image is more in line with expectations, the performance of the intelligent image generation model is improved, and the authenticity of the images generated by the intelligent image generation model is improved.

[0037] In this way, the first content loss function can be determined through adversarial training, so that while improving the accuracy of the content generated by the intelligent image generation model, the ability of the content category discrimination model to judge whether the image content is correct can be improved, thereby balancing the performance of the two models and further improving the authenticity of the first training generated image and the accuracy of the content contained therein, so that the content in the image generated by the intelligent image generation model is more in line with expectations.

[0038] According to an embodiment of the present invention, obtaining the combined loss function according to the first authenticity loss function, the first industry loss function and the first content loss function includes: obtaining the combined loss function according to formula (4): , (4) in, Indicates that The direction of minimization adjusts the parameters of the intelligent image generation model, Indicates that The parameters of the discriminant model group are adjusted in the direction of maximization. is the first authenticity loss function, is the first industry loss function, is the first content loss function.

[0039] According to one embodiment of the present invention, in formula (4), the above three loss functions can be summed and the summed loss function can be used for training. When training the intelligent image generation model, the training is performed in a manner that minimizes the summed loss function. When training the discriminant model group, the training is performed in a manner that maximizes the summed loss function. This balances the performance of the intelligent image generation model and the multiple models in the discriminant model group, thereby improving the performance of the intelligent image generation model while improving the discriminative ability of the discriminative model group.

[0040] According to one embodiment of the present invention, in step S104, the intelligent image generation model and the discriminant model group can be trained multiple times in the above manner. After the performance of the intelligent image generation model and the multiple models in the discriminant model group reaches a balance, the training can be completed to obtain the trained intelligent image generation model.

[0041] According to one embodiment of the present invention, in step S105, the above obtained intelligent image generation model applicable to multiple industry types can also be used to train a lightweight dedicated image generation model. The number of parameters of the dedicated image generation model is less than that of the intelligent image generation model, and it is dedicated to the image generation work of a specific industry. Compared with the intelligent image generation model, its complexity is lower, and the purpose of rapid construction and training can be achieved, so as to quickly obtain a lightweight model applicable to a specific industry. The second training generated image can be obtained according to the second industry category information and the second requirement description information, and the trained intelligent image generation model. For example, the description feature vector can be obtained based on the second industry category information and the second requirement description information and input into the trained intelligent image generation model to obtain the second training generated image. The second training generated image can be considered as an image that meets the industry characteristics of the second industry category information and contains content consistent with the description of the second requirement description information, and can be used as a reference for training the dedicated image generation model.

[0042] According to an embodiment of the present invention, in step S106, since the dedicated image generation model is dedicated to the industry corresponding to the second industry category information, it is not necessary to input the second industry category information, and only the second requirement description information is input, so as to train the dedicated image generation model to output an image that meets the characteristics of the industry and can accurately express the content contained in the second requirement description information. The dedicated image generation model can generate a third training generated image.

[0043] According to one embodiment of the present invention, in step S107, the error of the third training generated image can be determined with reference to the second training generated image, and the error can be reduced, so that the image generated by the dedicated image generation model is as consistent as possible with the image generated when the intelligent image generation model generates images for the industry.

[0044] According to one embodiment of the present invention, obtaining a dedicated loss function of a dedicated image generation model according to the third training generated image and the second training generated image includes: obtaining a dedicated loss function of a dedicated image generation model according to formula (5): , (5) in, The coordinates of the image generated for the second training are The pixel value of the pixel point, The coordinates of the image generated for the third training are The pixel value of the pixel point, L is the length of the second training generated image, and W is the width of the second training generated image.

[0045] According to one embodiment of the present invention, in formula (5), the error of the pixel value of each pixel point between the third training generated image and the second training generated image can be directly determined, and the sum of the errors is used as the loss function. During the training process, the loss function is minimized, thereby improving the consistency between the image generated by the dedicated image generation model and the image generated by the intelligent image generation model for the industry, so that the dedicated image generation model can also achieve the same degree of authenticity, content accuracy and rendering effect as the image generated by the intelligent image generation model when generating images for the industry.

[0046] In this way, a dedicated loss function can be determined based on the error in pixel values ​​at each pixel point between the third training generated image and the second training generated image, thereby improving the consistency between the image generated by the dedicated image generation model and the image generated by the intelligent image generation model for the industry, so that the dedicated image generation model can achieve similar effects to the intelligent image generation model when generating images of its corresponding industry, and can be more lightweight and easy to build and train.

[0047] According to one embodiment of the present invention, in step S108, a dedicated image generation model can be trained based on the above-mentioned dedicated loss function, and a trained dedicated image generation model can be obtained after multiple trainings, so that the trained dedicated image generation model can achieve a similar effect as when the intelligent image generation model generates images of the corresponding industry, and realize rapid construction and training.

[0048] According to the method for constructing an intelligent image generation model for diversified industry applications of an embodiment of the present invention, the intelligent image generation model can be trained through the first industry category information and the first requirement description information of multiple industry categories, so that the intelligent image generation model can generate images that meet industry applications, which is convenient for use in diversified industry application scenarios, and the intelligent image generation model can be used to train the dedicated image generation models of various industries, which is convenient for building lightweight dedicated image generation models based on industries and fields, so that models that adapt to the usage scenarios of various industries can be quickly built. The first authenticity loss function can be determined by adversarial training, so that the purpose of improving the realism of the image generated by the intelligent image generation model while improving the discrimination ability of the authenticity discrimination model can be achieved, so that the performance of the two models can be balanced and the realism of the first training generated image can be improved. The first industry loss function can be determined by adversarial training, so that the ability of the industry category discrimination model to judge the industry category to which the image belongs can be improved while improving the description of the industry characteristics of the intelligent image generation model and improving the accuracy of the rendering effect, so that the performance of the two models can be balanced, and the authenticity of the first training generated image and the accuracy of the rendering effect can be further improved. The first content loss function can be determined by adversarial training, so that the accuracy of the content generated by the intelligent image generation model can be improved while the ability of the content category discrimination model to judge whether the image content is correct can be improved, so that the performance of the two models can be balanced, and the authenticity of the first training generated image and the accuracy of the content included can be further improved, so that the content in the image generated by the intelligent image generation model is more in line with expectations. The dedicated loss function can be determined based on the error in the pixel value of each pixel point between the third training generated image and the second training generated image, so as to improve the consistency of the image generated by the dedicated image generation model and the image generated by the intelligent image generation model for the industry, so that the dedicated image generation model can achieve similar effects as the intelligent image generation model when generating images of its corresponding industry, and can be more lightweight and easy to build and train.

[0049] It should be understood by those skilled in the art that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The purpose of the present invention has been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments, and the embodiments of the present invention may be deformed or modified in any way without departing from the principles.

[0050] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for constructing an intelligent image generation model for diversified industry applications, characterized in that: include: Obtaining a first description feature vector according to the first industry category information and the first requirement description information, wherein the first industry category information is used to describe the industry category corresponding to the generated image, and the first requirement description information is used to describe the content contained in the generated image; Processing the first description feature vector according to the intelligent image generation model to obtain a first training generated image; According to the first training generated images, including a first sample image set of first sample images of various industry categories, and a discriminant model group, a combined loss function of the intelligent image generation model and the discriminant model group is obtained; The intelligent image generation model is trained by using the combined loss function to obtain a trained intelligent image generation model; Obtaining a second training generated image according to the second industry category information and the second demand description information, and the trained intelligent image generation model; Input the second requirement description information into a dedicated image generation model corresponding to the second industry category information to obtain a third training generated image; Obtaining a dedicated loss function of a dedicated image generation model according to the third training generated image and the second training generated image; The dedicated image generation model is trained according to the dedicated loss function to obtain a trained dedicated image generation model.

2. The method for constructing an intelligent image generation model for diversified industry applications according to claim 1, characterized in that: The discrimination model group includes an authenticity discrimination model, an industry category discrimination model and a content category discrimination model, wherein the authenticity discrimination model is used to judge the authenticity of an input image, the industry category discrimination model is used to judge the industry category corresponding to the input image, and the content category discrimination model is used to judge the category of content contained in the input image.

3. The method for constructing an intelligent image generation model for diversified industry applications according to claim 2, characterized in that: According to the first training generated images, including a first sample image set of first sample images of various industry categories, and a discriminant model group, a combined loss function of the intelligent image generation model and the discriminant model group is obtained, including: Inputting the first training generated image or the first sample image into an authenticity discrimination model to obtain a first authenticity discrimination result; Determining a first authenticity loss function of an authenticity discrimination model according to the first authenticity discrimination result; Inputting the first training generated image or the first sample image into an industry category discrimination model to obtain a first industry category description vector; Obtaining a first industry loss function of an industry category discrimination model according to the first industry category description vector, the first industry category information, and the industry category of the first sample image; Inputting the first training generated image or the first sample image into a content category discrimination model to obtain a first content description vector; Obtaining a first content loss function of a content category discrimination model according to the first content description vector, the first requirement description information, and content annotation information of the first sample image; The combined loss function is obtained according to the first authenticity loss function, the first industry loss function and the first content loss function.

4. The method for constructing an intelligent image generation model for diversified industry applications according to claim 3 is characterized in that: Determining a first authenticity loss function of an authenticity discrimination model according to the first authenticity discrimination result includes: According to the formula Determine the first authenticity loss function of the authenticity discrimination model ,in, is the i-th first sample image, is the probability that the i-th first sample image output by the authenticity discrimination model is a real image, Generate images for the jth first training, is the probability that the jth first training generated image output by the authenticity discrimination model is a real image, is the number of first sample images in a training batch, The number of images generated for the first training in a training batch.

5. The method for constructing an intelligent image generation model for diversified industry applications according to claim 4, characterized in that: According to the first industry category description vector, the first industry category information and the industry category of the first sample image, a first industry loss function of the industry category discrimination model is obtained, including: Obtaining rendering parameter vectors of a plurality of first sample images of each industry category in the first sample image set, wherein each component of the rendering parameter vector is a rendering parameter, and the rendering parameters include a light and shadow contrast parameter, a saturation parameter, a brightness parameter, and an area ratio between a target area and a background area; Determine an average rendering parameter vector for each industry category based on the rendering parameter vectors of the plurality of first sample images; Obtaining a training rendering parameter vector of a first training generated image or a first sample image input into an industry category discrimination model; A first industry loss function of an industry category discrimination model is determined according to the training rendering parameter vector, the average rendering parameter vector, the first industry category description vector and the first industry category information.

6. The method for constructing an intelligent image generation model for diversified industry applications according to claim 5, characterized in that: Determining a first industry loss function of an industry category discrimination model according to the training rendering parameter vector, the average rendering parameter vector, the first industry category description vector, and the first industry category information includes: According to the formula Determine the first industry loss function of the industry category discrimination model ,in, is the first industry category description vector of the i-th first sample image output by the industry category discrimination model, for The transposed vector of is the category description vector determined according to the industry category of the i-th first sample image, The first industry category description vector of the jth first training generated image output by the industry category discrimination model, for The transposed vector of is a category description vector determined according to the first industry category information of the j-th first training generated image, is the training rendering parameter vector for the jth first training generated image, for The transposed vector of The average rendering parameter vector for the first industry category for the jth first training generated image.

7. The method for constructing an intelligent image generation model for diversified industry applications according to claim 4, characterized in that: The first content description vector includes a first target type description vector, a first target state description vector and a first target scene description vector, and the first requirement description information includes first target type description information, first target state description information and first target scene description information; Obtaining a first content loss function of a content category discrimination model according to the first content description vector, the first requirement description information, and the content annotation information of the first sample image includes: According to the formula Obtain the first content loss function of the content category discrimination model ,in, is the first target type description vector of the i-th first sample image output by the content category discrimination model, for The transposed vector of is the target type description vector determined according to the content annotation information of the i-th first sample image, is the first target state description vector of the i-th first sample image output by the content category discrimination model, for The transposed vector of is the target state description vector determined according to the content annotation information of the i-th first sample image, is the first target scene description vector of the i-th first sample image output by the content category discrimination model, for The transposed vector of is the target scene description vector determined according to the content annotation information of the i-th first sample image, is the first target type description vector of the jth first training generated image output by the content category discrimination model, for The transposed vector of is the target type description vector determined according to the first target type description information of the j-th first training generated image, is the first target state description vector of the jth first training generated image output by the content category discrimination model, for The transposed vector of is a target state description vector determined according to the first target state description information of the j-th first training generated image, is the first target scene description vector of the jth first training generated image output by the content category discrimination model, for The transposed vector of is a target scene description vector determined according to the first target scene description information of the jth first training generated image, and min is a minimum value function.

8. The method for constructing an intelligent image generation model for diversified industry applications according to claim 3, characterized in that: Obtaining the combined loss function according to the first authenticity loss function, the first industry loss function, and the first content loss function includes: According to the formula Get the combined loss function ,in, Indicates that The direction of minimization adjusts the parameters of the intelligent image generation model, Indicates that The parameters of the discriminant model group are adjusted in the direction of maximization. is the first authenticity loss function, is the first industry loss function, is the first content loss function.

9. The method for constructing an intelligent image generation model for diversified industry applications according to claim 1, characterized in that: Obtaining a dedicated loss function of a dedicated image generation model according to the third training generated image and the second training generated image, including: According to the formula Get a dedicated loss function for a dedicated image generation model ,in, The coordinates of the image generated for the second training are The pixel value of the pixel point, The coordinates of the image generated for the third training are The pixel value of the pixel point, L is the length of the second training generated image, and W is the width of the second training generated image.

Citation Information

Patent Citations

  • Training method of image generation model, image generation method and related equipment

    CN118114788A

  • Zero-sample image recognition method and system based on generative adversarial network

    CN111476294A

  • Image segmentation model training method and device, image segmentation method and device and electronic equipment

    CN112330685A

  • Image processing method and device, computer equipment and readable storage medium

    CN113705597A

  • Model training method and device, target detection method and device, electronic equipment and medium

    CN117829243A