Method for generating image by using neural network

Through the combination of the adversarial neural network generator and the discriminator, it solves the problem of image generation in the existing technology that is difficult for users to grasp and the generated pictures are stiff, and achieves efficient generation of realistic images that meet the visual quality and object relationships required by users.

CN118537431APending Publication Date: 2024-08-23GUANGXI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410714210.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing technology has problems in image generation that are difficult for users to master, the generated images are stiff and unnatural, and cannot meet clear needs. In particular, the randomness generated through manual interference, local replacement and adversarial networks is insufficient.

Method used

Adopting a method based on adversarial neural networks, by obtaining a variety of real image information, constructing a sample set, training the generator and discriminator networks, the generator network generates new images, the discriminator network determines the authenticity of the image, and uses the Frequency Tuned algorithm to perform Gaussian Smoothing ensures the quality of the resulting image.

Benefits of technology

It achieves efficient generation of images with high visual quality and correct object relationships based on user needs. The generator network generates realistic images through game learning to meet user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537431A
    Figure CN118537431A
Patent Text Reader

Abstract

The invention discloses a method for generating an image by using a neural network, and the method comprises the steps: obtaining various kinds of real image information, inputting the information into a VQGAN system, obtaining a real image code and an image feature node set, constructing a sample set through the image feature node set, constructing a neural network model, and generating an adversarial network. The adversarial network comprises a generator network and a discriminator network, the generator network is responsible for generating a new image sample, and the discriminator network is responsible for judging the property of an input image, training a neural network model by using a constructed sample set, optimizing model parameters, generating an image for the optimized model through a random input vector, and outputting the image. And evaluating the generated image. Compared with the prior art, the method for generating the image by using the neural network has the advantages that based on the adversarial neural network, picture information can be generated based on user needs, and images with high visual quality and correct relation between objects can be efficiently generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of neural network, and in particular to a method for generating images using a neural network. Background Art

[0002] As an important carrier of information in the objective world, images are the main source and means for humans to obtain and identify external information. High-quality images can bring people richer information and content, and even give people a sense of beauty.

[0003] Neural networks are machine learning models that use one or more layers of nonlinear units to predict outputs for received inputs. Some neural networks contain one or more hidden layers in addition to an output layer. The output of each hidden layer is used as input to the next layer in the network—the next hidden or output layer. Each layer of the network generates an output from the received inputs based on the current values ​​of a corresponding set of parameters.

[0004] With the development of electronic devices, especially smart phones, there are more and more demands for image generation, for example, how to modify a photo of an expressionless face into a smiling face. Existing image generation generally adopts the following methods: generating a new image through human intervention or manual modification based on the original image; generating a new image by partially replacing two images; generating a new image by modifying some pixels of the original image; generating a new image through deep learning adversarial networks.

[0005] However, the above technology has the following problems: the method of generating new images through human intervention / manual modification is complicated and time-consuming, and requires certain professional skills that ordinary users cannot master, such as modifying images through Photoshop.

[0006] Generating a new image by partially replacing two images requires the user to provide a replacement image, which limits the usage scenarios.

[0007] The new image is generated by modifying some pixels of the original image. The generated image is stiff and unnatural, and is often severely distorted compared to the original image.

[0008] In recent years, Generative Adversarial Networks (GAN) has made great progress in the field of generating realistic images. It creates high-quality images with rich content that humans cannot distinguish between true and false from pixel-level images.

[0009] However, the images generated by GAN are random and cannot specify clear generation effects, which cannot meet the needs of users. Summary of the invention

[0010] The technical problem to be solved by the present invention is to provide a method for generating images using a neural network based on an adversarial neural network, which can generate picture information based on user needs and can efficiently generate images with high visual quality and relatively correct relationships between objects.

[0011] To solve the above technical problems, the technical solution provided by the present invention is: a method for generating images using a neural network, comprising obtaining a variety of real image information, inputting a VQGAN system to obtain real image encoding and an image feature node set, constructing a sample set through the image feature node set, constructing a neural network model to generate an adversarial network, the adversarial network comprising a generator network and a discriminator network, wherein the generator network is responsible for generating new image samples, and the discriminator network is responsible for judging the nature of the input image, using the constructed sample set to train the neural network model, optimizing model parameters, generating images for the optimized model through random input vectors, and evaluating the generated images.

[0012] As an improvement, the generator network includes multiple pixels arranged in a two-dimensional mapping, each pixel has a corresponding color value for each of a plurality of color channels, and for each of the plurality of color channels, a corresponding score distribution on a discrete set of possible color values ​​is generated, wherein the RGB color model has three channels of red, green and blue, and the color values ​​are 0 to 255.

[0013] As an improvement, the image segmentation process is performed after preprocessing the multiple real image information, and the segmentation results are input into the VQGAN system to obtain the real image coding and the image feature node set.

[0014] As an improvement, when a random input vector is used to generate an image, the generator network obtains the data information in the sample set, and splices the real image encoding and image feature nodes and multiple pixel points after image segmentation to generate a new image.

[0015] As an improvement, the Frequency Tuned algorithm is used to perform Gaussian smoothing on the image segmentation information to remove high-frequency information in the image data.

[0016] As an improvement, the discriminator network judges the image information generated by the generator network, outputs the image information when the image is true, and the generator network regenerates the image when the image is false.

[0017] As an improvement, when obtaining a variety of real image information, including through expert manuals, Internet downloads, and industry data information databases, preliminary information judgment is performed after obtaining the image information to screen out duplicate images and incomplete images.

[0018] The advantages of the present invention compared with the prior art are: in this application, based on the sample set, the adversarial network can generate pictures based on user needs, and can accurately obtain the relationship between pictures and usage needs. At the same time, the generator network is responsible for generating new image samples, and the discriminator network is responsible for judging whether the input image is a real image or a generated image. The two networks learn from each other through game theory, and finally the generator network can generate realistic images. Since the image data set comes from the field required by the user, the relationship between the picture and usage needs is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic diagram of the process of obtaining image data information. DETAILED DESCRIPTION

[0020] The present invention is described in further detail below.

[0021] References to embodiments of the present invention will now be provided in detail, one or more examples of which are described below. Each example is provided as an explanation rather than a limitation of the present invention. In fact, it will be apparent to those skilled in the art that various modifications and variations may be made to the present invention without departing from the scope or spirit of the present invention. For example, a feature illustrated or described as part of one embodiment may be used in another embodiment to produce a further embodiment.

[0022] Therefore, it is intended that the present invention covers such modifications and variations that fall within the scope of the appended claims and their equivalents. Other objects, features and aspects of the present invention are disclosed in or are obvious from the following detailed description. Those of ordinary skill in the art will appreciate that this discussion is only a description of exemplary embodiments and is not intended to limit the broader aspects of the present invention.

[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0024] The term "comprises", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprising one..." do not exclude the presence of other identical elements in the process, method, article or device comprising the elements. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the invention, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In the description of the present invention, the meaning of "several" is at least one, such as one, two, etc., unless otherwise clearly and specifically defined.

[0025] Except as shown in the operating examples or otherwise indicated, all numbers used in the specification and claims to indicate the amount of ingredients, physicochemical properties, etc. are understood to be adjusted by the term "about" in all cases. For example, therefore, unless otherwise indicated, the numerical parameters listed in the above specification and the attached claims are approximate values, and those skilled in the art can use the teachings disclosed herein to seek to obtain the desired properties and appropriately change these approximate values. The use of numerical ranges expressed as endpoints includes all numbers within the range and any range within the range, for example, 1 to 5 includes 1, 1.1, 1.3, 1.5, 2, 2.75, 3, 3.80, 4 and 5, etc.

[0026] Combined with Figure 1 As shown, a method for generating images using a neural network includes obtaining a variety of real image information, inputting into a VQGAN system to obtain real image coding and an image feature node set, constructing a sample set through the image feature node set, obtaining a variety of real image information for preprocessing and then performing image segmentation processing, and inputting into a VQGAN system according to the segmentation result to obtain a real image coding and an image feature node set, wherein obtaining a variety of real image information includes obtaining from expert manuals, Internet downloads, and industry data information databases, and performing preliminary information judgment after obtaining the image information to screen out duplicate images and incomplete images.

[0027] A neural network model is constructed to generate an adversarial network. The adversarial network includes a generator network and a discriminator network. The generator network is responsible for generating new image samples, while the discriminator network is responsible for judging the properties of the input image. The generator network includes multiple pixels arranged in a two-dimensional map, each pixel has a corresponding color value for each color channel in multiple color channels, and for each color channel in the multiple color channels, a corresponding score distribution on a discrete set of possible color values ​​is generated, wherein the RGB color model has three channels of red, green and blue, and the color values ​​are 0 to 255.

[0028] The constructed sample set is used to train the neural network model, optimize the model parameters, generate images for the optimized model through random input vectors, and evaluate the generated images. In specific use, when randomly inputting vectors to generate images, the generator network obtains the data information in the sample set, and splices the real image encoding and image feature nodes and multiple pixel points after image segmentation to generate a new image. The Frequency Tuned algorithm is used to perform Gaussian smoothing on the image segmentation information to remove high-frequency information in the image data, thereby ensuring the quality of the generated image.

[0029] In specific use, the discriminator network judges the image information generated by the generator network, outputs the image information when the image is true, and the generator network regenerates the image when the image is false.

[0030] In the specific implementation of the present invention, an applicable field is selected, and a variety of real image information is obtained, including using expert manuals, Internet downloads, and industry data information databases. After obtaining the image information, preliminary information judgment is performed to screen out duplicate images and incomplete images, and the obtained image information is input into the VQGAN system to obtain the real image code and the image feature node set, and a sample set is constructed through the image feature node set. After obtaining a variety of real image information and performing preprocessing, image segmentation processing is performed, and the segmentation result is input into the VQGAN system to obtain the real image code and the image feature node set.

[0031] At this time, a neural network model is constructed to generate an adversarial network. The adversarial network includes a generator network and a discriminator network, wherein the generator network is responsible for generating new image samples, while the discriminator network is responsible for judging the nature of the input image. The neural network model is trained using the constructed sample set to optimize the model parameters, wherein the generator network includes a plurality of pixels arranged in a two-dimensional map, each pixel having a corresponding color value for each of a plurality of color channels, and a corresponding score distribution on a discrete set of possible color values ​​is generated for each of the plurality of color channels, wherein the RGB color model has three channels of red, green and blue, and the color values ​​are 0 to 255.

[0032] For the generated information, the Frequency Tuned algorithm is used to perform Gaussian smoothing on the image segmentation information to remove the high-frequency information in the image data. When a random input vector is used to generate an image, the generator network obtains the data information in the sample set, and splices the real image encoding and image feature nodes and multiple pixel points after the image segmentation processing to generate a new image. For the output result, the discriminator network judges the image information generated by the generator network, outputs the image information when the image is true, and regenerates the image when the image is false.

[0033] The contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field.

[0034] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0035] The present invention and its implementation methods are described above, and such description is not restrictive. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design structures and embodiments similar to the technical solution without creativity, which should all fall within the protection scope of the present invention.

Claims

1. A method for generating images using a neural network, Features: It includes obtaining a variety of real image information, inputting the VQGAN system to obtain real image encoding and image feature node sets, constructing a sample set through the image feature node set, constructing a neural network model to generate an adversarial network, the adversarial network includes a generator network and a discriminator network, where the generator network is responsible for generating new image samples, and the discriminator network is responsible for judging the nature of the input image, using the constructed sample set to train the neural network model, optimizing the model parameters, generating images for the optimized model through random input vectors, and evaluating the generated images.

2. A method for generating an image using a neural network according to claim 1, Features: The generator network includes a plurality of pixels arranged in a two-dimensional map, each pixel having a corresponding color value for each of a plurality of color channels, and generating a corresponding score distribution on a discrete set of possible color values ​​for each of the plurality of color channels, wherein the RGB color model has three channels of red, green and blue, and the color values ​​are 0 to 255.

3. A method for generating an image using a neural network according to claim 2, Features: The method obtains a plurality of real image information, performs image segmentation processing after preprocessing, and inputs the segmentation results into the VQGAN system to obtain the real image coding and the image feature node set.

4. A method for generating an image using a neural network according to claim 3, Features: When a random input vector is used to generate an image, the generator network obtains the data information in the sample set, and splices the real image encoding and image feature nodes and multiple pixel points after image segmentation to generate a new image.

5. A method for generating an image using a neural network according to claim 4, Features: The Frequency Tuned algorithm is used to perform Gaussian smoothing on the image segmentation information to remove high-frequency information in the image data.

6. A method for generating an image using a neural network according to claim 5, Features: The discriminator network judges the image information generated by the generator network, outputs the image information when the image is true, and the generator network regenerates the image when the image is false.

7. A method for generating an image using a neural network according to claim 1, Features: When obtaining a variety of real image information, including through expert manuals, Internet downloads, and industry data information databases, preliminary information judgment is performed after obtaining the image information to screen out duplicate images and incomplete images.