An automobile modeling image generation method and system, and a computer readable storage medium
By generating car styling images using a Conditional Generative Adversarial Network (CGAN) model, the problem of insufficient data and low generation quality in deep learning for car styling design is solved. It achieves random generation and high-quality image output, inspiring design ideas.
Patent Information
- Application Number
- CN202110483135.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-30
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2041-04-30
AI Technical Summary
The application of deep learning in the field of automotive styling design is limited, mainly due to the lack of hand-drawn styling sketches, the limited amount of data, and the difficulty in generating high-resolution, high-quality renderings.
A conditional generative adversarial network (CGAN) model is adopted. By obtaining the user's input styling intention conditions and random vectors, the network is trained to output car styling images. The generation process is optimized by combining multiple convolutional layers and a discriminative network.
It enables the random generation of car styling images, inspiring designers' creativity and optimizing the product design process.
Smart Images

Figure CN115270282B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of automobile design, and particularly relates to an automobile modeling image generation method and system and a computer readable storage medium. BACKGROUND
[0002] At present, for automobile modeling design, automobile modeling designers conduct market research and finally manually draw modeling images by means of various creative ideas or construct modeling images by means of CAD tools. With the development of deep learning, deep learning is applied in more and more fields. However, at present, deep learning is rarely applied in the field of automobile modeling design, especially in the aspect of hand-drawing automobile modeling images. The reasons are as follows: first, deep learning needs a large amount of data sets, and the amount of hand-drawing modeling image data is very limited; second, deep learning generation technology has the problems of difficult training and difficult generation of high-resolution high-quality effect images. SUMMARY
[0003] The present application aims to provide an automobile modeling image generation method and system and a computer readable storage medium, which can randomly generate automobile modeling images according to the modeling intention conditions given by a user. The randomness of the automobile modeling images can help to quickly stimulate the creative inspiration of designers and optimize the product design process.
[0004] To achieve the above-mentioned purpose, the present application provides an automobile modeling image generation method, which comprises the following steps:
[0005] obtaining modeling intention conditions input by a user;
[0006] randomly obtaining a current random vector;
[0007] inputting the modeling intention conditions and the current random vector into a generation network of a pre-trained conditional generative adversarial network model to perform processing and output a current automobile modeling image; wherein the modeling intention conditions are used to guide the generation network to randomly generate the current automobile modeling image according to the current random vector.
[0008] Optionally, the method comprises the following steps:
[0009] repeating the steps of randomly obtaining a current random vector and inputting the modeling intention conditions and the current random vector into a generation network of a pre-trained conditional generative adversarial network model to perform processing and output a current automobile modeling image for multiple times to obtain multiple automobile modeling images.
[0010] Optionally, the generation network comprises multiple convolution layers, which are used to respectively perform deconvolution on the current random vector and the modeling intention conditions, and then sequentially perform deconvolution processing on the two deconvolution results obtained after being connected to output the current automobile modeling image.
[0011] Optionally, the training process of the generation network of the conditional generative adversarial network model is as follows:
[0012] Obtain a plurality of real automobile styling images;
[0013] Respectively process the plurality of real automobile styling images to obtain a plurality of corresponding automobile sketch samples, and generate an automobile sketch sample set according to the plurality of automobile sketch samples;
[0014] Obtain a plurality of styling intention conditions input by a user; wherein the styling intention condition is a category of automobile styling style;
[0015] Train the generation network of the original conditional generative adversarial network model according to the automobile sketch sample set, the plurality of styling intention conditions, a preset loss function, and a preset discriminant network of the conditional generative adversarial network model; wherein the current automobile styling image output by the generation network of the conditional generative adversarial network model is in the form of a sketch.
[0016] Optionally, the preset loss function is shown in the following expression:
[0017]
[0018] wherein z is a current random variable, y is a styling intention condition, is an error intention condition, x is a current automobile styling image output by the generation network, x=G(z|y), G() is a mathematical expression of the generation network, G(z|y) represents an output of the generation network when the input is z and y, represents an output of the generation network when the input is x and D() is a mathematical expression of the discriminant network, D(x|y) represents a matching degree of x and the styling intention condition, D(x) represents a matching degree of x and the automobile sketch sample, represents a matching degree of and the automobile sketch sample, represents a norm normalization of the gradient of the discriminant network, represents an expectation value of a plurality of processing results in the training process, and λ is a penalty factor.
[0019] The second aspect of the present application provides an automobile styling image generation system, comprising:
[0020] An intention condition acquisition unit is configured to acquire a styling intention condition input by a user;
[0021] A random vector acquisition unit is configured to randomly acquire a current random vector; and
[0022] An image generation unit is configured to input the styling intention condition and the current random vector into a generation network of a pre-trained conditional generative adversarial network model to output a current automobile styling image, wherein the styling intention condition is used to guide the generation network to randomly generate the current automobile styling image according to the current random vector.
[0023] Optionally, the generation network comprises a plurality of convolution layers, configured to respectively perform deconvolution on the current random vector and the styling intention condition, and then perform deconvolution on the two deconvolution results in sequence after being connected to output the current automobile styling image.
[0024] Optionally, the generation network of the conditional generative adversarial network model is obtained by training an original generation network of the conditional generative adversarial network model according to an automobile styling sketch sample set, a plurality of styling intention conditions, a preset loss function and a preset discriminator network of the conditional generative adversarial network model, wherein the current automobile styling image output by the conditional generative adversarial network model is in the form of a sketch, the automobile styling sketch sample set comprises a plurality of automobile styling sketch samples obtained by image processing on a plurality of automobile styling real images, and the styling intention condition is an automobile styling style category.
[0025] Optionally, the preset loss function is shown in the following expression:
[0026]
[0027] wherein z is a current random variable, y is a styling intention condition, is an error intention condition, x is a current automobile styling image output by the generation network, x=G(z|y), G() is a mathematical expression of the generation network, G(z|y) represents an output of the generation network when input is z and y, represents an output of the generation network when input is x and D() is a mathematical expression of the discriminator network, D(x|y) represents a matching degree of x and the styling intention condition, D(x) represents a matching degree of x and the automobile styling sketch sample, represents a matching degree of and the automobile styling sketch sample, represents a norm normalization of a gradient of the discriminator network, represents an expectation value of a plurality of processing results in a training process, and λ is a penalty factor.
[0028] A third aspect of the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the automobile styling image generation method of the first aspect.
[0029] The automobile modeling image generation method and system, and the computer readable storage medium have at least the following beneficial effects:
[0030] The generation network of the conditional generative adversarial network model is pre-trained, in the implementation of the embodiment of the present application, a user (an automobile modeling designer) inputs a modeling intention condition, inputs the modeling intention condition and a random variable into the generation network of the conditional generative adversarial network model for image random generation processing, and outputs an automobile modeling image; therefore, by continuously generating random variables and inputting the random variables into the generation network of the conditional generative adversarial network model, the automobile modeling image can be continuously randomly generated; the random generation of the automobile modeling image reflects innovation and uncertainty, and the innovation and uncertainty can help to quickly stimulate the creative inspiration of the designer and optimize the product design process.
[0031] Other features and advantages of the automobile modeling image generation method and system and the computer readable storage medium will be described in the subsequent description. BRIEF DESCRIPTION OF DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or the prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0033] Figure 1 A flow chart of an automobile modeling image generation method in an embodiment of the present application.
[0034] Figure 2 A structure diagram of a conditional generative adversarial network model in an embodiment of the present application.
[0035] Figure 3 An example diagram of an automobile modeling image output by a conditional generative adversarial network model in an embodiment of the present application.
[0036] Figure 4 A principle diagram of a conditional generative adversarial network model in an embodiment of the present application.
[0037] Figure 5 An example diagram of an automobile modeling real image in an embodiment of the present application.
[0038] Figure 6 A schematic diagram of an automobile modeling sketch sample obtaining process in an embodiment of the present application.
[0039] Figure 7 A loss diagram of a generation network and a discriminant network in a training process in an embodiment of the present application.
[0040] Figure 8 A comparison effect diagram for the CGAN, C-DCGAN and the embodiment method C-DCGAN+GP model of the present application to generate automobile modeling images.
[0041] Figure 9 A diagram of multiple automobile modeling images generated by the C-DCGAN+GP model of the present application.
[0042] Figure 10 A structural framework diagram of an automobile modeling image generation system of the present application. DETAILED DESCRIPTION
[0043] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In addition, in order to better illustrate the present application, numerous specific details are given in the specific embodiments below. Those skilled in the art will understand that the present application can be implemented without certain specific details. In some examples, means well known to those skilled in the art are not described in detail in order to highlight the main idea of the present application.
[0044] Referring to Figure 1 An embodiment of the present application proposes a method for generating automobile modeling images, comprising the following steps S11-S13:
[0045] Step S11, obtaining a modeling intention condition input by a user;
[0046] Specifically, the modeling intention can be understood as a given automobile modeling direction, so that the conditional generative adversarial network model (CGAN) can randomly generate automobile modeling images based on the automobile modeling direction. Specifically, the modeling intention condition is used as one of the input quantities of the conditional generative adversarial network model, which can be one of the various design styles set by the user in advance, such as sports car style, MVP style, off-road vehicle style, etc. Although the generation of automobile modeling images has randomness and uncertainty, it should be understood that it conforms to the design style corresponding to the modeling intention condition;
[0047] Step S12, randomly obtaining a current random vector;
[0048] Specifically, the random vector is used as another input quantity of the conditional generative adversarial network model, which is used to make the generation of automobile modeling images have randomness. The random vector is the noise input in the conditional generative adversarial network model;
[0049] Step S13, inputting the styling intention condition and the current random vector into a generation network of a pre-trained conditional generative adversarial network model to process and output a current automobile styling image;
[0050] In the formula, referring to Figure 2 , the conditional generative adversarial network model in the model training process includes a generation network and a discrimination network; the styling intention condition is used to guide the generation network to randomly generate the current automobile styling image according to the current random vector; the discrimination network is used to discriminate the authenticity of the current automobile styling image and output a corresponding authenticity value; the discrimination network is used to discriminate the image generation condition of the generation network, and after the training is completed, the generation network of the trained conditional generative adversarial network model is only needed to output the automobile styling image in the implementation of the embodiment method;
[0051] For example, the styling intention condition can be set as an animal style, and three animals, i.e., a cat, a cow and an alligator, are used to represent the animal style; the cat represents a cute style, the cow represents a powerful style, and the alligator represents a domineering style, and the corresponding automobile styling image is shown in Fig. 1. Figure 3
[0052] In the conditional generative adversarial network model CGAN, a constraint is added to the original GAN model (Generative Adversarial Nets), a conditional variable y is introduced into the generation network and the discrimination network, additional information is introduced into the model, and the image data can be generated in a guided manner; the conditional variable y in the embodiment is the styling intention condition. In the conditional generative adversarial network model, the generation of the automobile styling image by the generation network has randomness, and the generated automobile styling image may be unclear or not like a normal and real automobile styling image, therefore, the discrimination network is needed to discriminate the authenticity of the automobile styling image and output a corresponding authenticity value.
[0053] Further, the steps S12 to S13 are repeated multiple times to obtain multiple automobile styling images.
[0054] Specifically, the generation network of the conditional generative adversarial network model is pre-trained in the embodiment method, and in the implementation of the embodiment of the application, a user inputs a styling intention condition, inputs the styling intention condition and a random variable into the generation network of the conditional generative adversarial network model to process and output an automobile styling image; therefore, by continuously generating random variables and inputting the random variables into the generation network of the conditional generative adversarial network model, the automobile styling images can be continuously randomly generated; the random generation of the automobile styling images embodies the innovation and uncertainty, and the innovation and uncertainty can help to quickly stimulate the creative inspiration of the designers and optimize the product design process.
[0055] In one embodiment, the generation network includes multiple layers of convolutional layers, which are used to respectively perform deconvolution decov on the current random vector and the styling intention condition, and perform full connection concate on the two deconvolution results, and then perform deconvolution decov on the multiple layers of convolutional layers in sequence, and output the current automobile styling image;
[0056] The discriminator network includes multiple layers of convolutional layers, which are used to respectively perform convolution conv on the current automobile styling image output by the generation network and the styling intention condition, perform full connection concate on the two convolution results, and then perform convolution conv on the multiple layers of convolutional layers in sequence, and output the authenticity value of the current automobile styling image;
[0057] The traditional DCGAN (Deep Convolutional Conditional Generative Adversarial Nets) uses four layers of convolutional layers to output an image with a size of 64*64*3. In this embodiment, the DCGAN is combined with the CGAN, i.e., C-DCGAN, which is described in Figure 4 The generation network and the discriminator network of this embodiment have the same number of convolutional layers, which is six. It can be understood that the generation network and the discriminator network are opposite or symmetrical network structures. The generation network of the final conditional generative adversarial network model outputs an automobile styling image with a size of 256*256*1, which is in the form of a hand-drawn sketch.
[0058] In one embodiment, the training process of the conditional generative adversarial network model is as follows:
[0059] Step 1, obtaining multiple automobile styling real images;
[0060] Specifically, a sufficient number of automobile styling real images that meet the training requirements can be obtained through any channel. The automobile styling real images are, for example, Figure 5 as shown in the figure;
[0061] Step 2, respectively performing image processing on the multiple automobile styling real images to obtain corresponding multiple automobile styling sketch samples, and generating an automobile styling sketch sample set according to the multiple automobile styling sketch samples;
[0062] The obtained automobile styling real images are analyzed for automobile styling research, and key styling information is extracted. The key styling information is specifically that the vehicle is divided into 10 regions according to the outer contour, the window, the left rearview mirror, the right rearview mirror, the left headlamp, the right headlamp, the left fog lamp, the right fog lamp, the upper grille, and the lower grille. The processing method of each region is shown in Table 1 below.
[0063] Table 1
[0064]
[0065] For example, mimicking a designer's hand-drawn style, the vehicle's front fascia can be composed of lines, local feature details, and image brightness; the vehicle outline is extracted according to the method described in Table 1 above, and the resulting regional outlines constitute the vehicle's external contour, such as... Figure 6 As shown in (a), the headlights and grille are important features. The original features of this area are preserved. Specifically, the corresponding areas of the headlights and grille are sequentially subjected to grayscale conversion, Gaussian blurring, and adaptive binarization. The resulting image is then filled with... Figure 6 (a) formed Figure 6 (b) style; Figure 6 The process from (b) to (c) is obtained by two-dimensional image convolution operation that includes factors such as line direction, length and line width, and intersection processing;
[0066] Specifically, it can be based on the formula The gradient map G is calculated; where I is the input grayscale image, i.e. Figure 6 (b), and It is the pixel gradient difference in the x and y directions; in this embodiment of the invention, the convolution kernel is set to 10 in a size of 256*256*1; the image is divided into 26 regions, i.e., round(min(w,h) / 10)=26, each region is divided into 8 (360 / 48) directions according to 45 degrees, thus each region is l i The structure is (26,26,8), according to G. i =l i *G yields the gradient direction map, where * denotes convolution, which, for example, can be implemented using signal.convolv2d in Python; further, G is calculated. i The maximum gradient directions are identified in the middle 8 directions. The gradient G is retained in the direction of maximum gradient, while the gradients in the other 7 directions are set to zero. The resulting c is... i According to l i Perform the convolution operation again, and the final result is the sum of the 8 direction values of each pixel, then normalized. Figure 6 In the middle (c), it is understandable that the effect of the wireframe hand-drawn sketch reflects the scene structure, and the light and shadow of the sketch can reflect the spatial three-dimensionality. In order to further optimize the style, color levels are added on the basis of the wireframe structure diagram C, and the area between the vehicle front hood, the headlight and fog light, and the area between the upper and lower grilles are filled with different color levels respectively. The final effect diagram is shown in d of Figure (6).
[0067] Step 3, obtaining a plurality of styling intention conditions input by a user; wherein the styling intention condition is a category of automobile styling style;
[0068] Exemplarily, the styling intention condition can be a keyword, for example, cat, cow, and crocodile, that is, three representative animals, cat, cow, and crocodile, are selected to represent, cat exhibits a cute style of a vehicle, cow exhibits a powerful style, and crocodile exhibits a domineering style.
[0069] Step 4, training an original conditional generative adversarial network model according to the automobile styling sketch sample set, the plurality of styling intention conditions, a preset loss function, and a preset conditional generative adversarial network model discriminant network.
[0070] Specifically, in the training process, exemplarily, the generation network extracts the cat eye region and replaces it with a headlamp, and the vehicle is integrated with the cat feature.
[0071] Optionally, the preset loss function is shown in the following expression:
[0072]
[0073] wherein z is a current random variable, y is a styling intention condition, is an error intention condition, x is a current automobile styling image output by the generation network, x=G(z|y), G() is a mathematical expression of the generation network, G(z|y) represents an output of the generation network when input is z and y, represents an output of the generation network when input is x and D() is a mathematical expression of the discriminant network, D(x|y) represents a matching degree of x and the styling intention condition, D(x) represents a matching degree of x and the automobile styling sketch sample, and D(x) can be understood as a discriminant output that does not consider the intention condition and only considers the image, that is, an output of a basic GAN model discriminant network; represents a matching degree of and the automobile styling sketch sample, represents a norm normalization of a gradient of the discriminant network, represents an expectation value of a plurality of processing results in the training process, and λ is a penalty factor.
[0074] Specifically, G represents the generation network, D represents the discriminant network, D(x|y) is closer to 1, and D(G(x)) is closer to 0, so that 1-D(G(x)) is used in the actual application of the embodiment of the present application to add an error condition and a real picture loss term, that is, , and the output value of is closer to 0, so that is used as a constraint.
[0075] It should be noted that the GAN model has training difficulties, and the lack of meaningful indicators makes the generated images and quality associated, in order to make the model easy to train, easy to converge, the target function term adds gradient penalty (GP), the GP term is to solve the problem of gradient clipping (weight clipping) in the original w-gan network, and the weight clipping in wgan is different from the global gradient processing, gradient penalty only processes the gradient of the region and the intermediate transition zone in the true and false sample set, so that the gradient controllability is strong, that is, the conditional generative adversarial network model in the embodiment is C-DCGAN+GP; In the embodiment, it is embodied as During the training process The closer to 1, the better; during the training process, the training step number epochs is set to 200, the batch size is set to 64, the image size is set to 256*256, and the learning rate learning rate is set to 10 -4e ; the generator and discriminator LOSS change of the embodiment during training is as shown in Figure 7 ; the generated image effect comparison of CGAN, C-DCGAN and C-DCGAN+GP of the embodiment is as shown in Figure 8 ; when the loss function L converges, that is, the model parameters of the target model are obtained, the model training is completed, and the plurality of automobile modeling image schematic diagrams generated by the C-DCGAN+GP model trained by the embodiment can be referred to Figure 9 .
[0076] Referring to Figure 10 , another embodiment of the application provides an automobile modeling image generation system, which can be used to implement the automobile modeling image generation method described in the above embodiment method, the system of the embodiment comprises:
[0077] An intention condition acquisition unit 1 is configured to acquire a modeling intention condition input by a user;
[0078] A random vector acquisition unit 2 is configured to randomly acquire a current random vector; and
[0079] An image generation unit 3 is configured to input the modeling intention condition and the current random vector into a generation network of a pre-trained conditional generative adversarial network model to process and output a current automobile modeling image; wherein the modeling intention condition is used to guide the generation network to randomly generate the current automobile modeling image according to the current random vector.
[0080] The generation network comprises a plurality of convolution layers, and is configured to respectively perform deconvolution on the current random vector and the styling intention condition, and then perform deconvolution on the two deconvolution results in sequence through the plurality of convolution layers to output the current automobile styling image.
[0081] The generation network of the conditional generative adversarial network model is obtained by training the original generation network of the conditional generative adversarial network model according to the automobile styling sketch sample set, the plurality of styling intention conditions, a preset loss function and a preset discriminant network of the conditional generative adversarial network model; the current automobile styling image output by the conditional generative adversarial network model is in the form of a sketch; the automobile styling sketch sample set comprises a plurality of automobile styling sketches obtained by image processing on a plurality of automobile styling real images; and the styling intention condition is an automobile styling style category.
[0082] The system embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place or distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.
[0083] It should be noted that the system described in the above embodiment corresponds to the method described in the above embodiment, and therefore, the parts not described in detail in the system described in the above embodiment can be obtained by referring to the content of the method described in the above embodiment, i.e., the specific step content recorded in the above embodiment method can be understood as the function that the system of the embodiment can achieve, which will not be described here.
[0084] In addition, when the automobile styling image generation system described in the above embodiment is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
[0085] Another embodiment of the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the automobile styling image generation method described in the above embodiment.
[0086] Specifically, the computer readable storage medium can include any entity or device, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code.
[0087] Having described various embodiments of the application, it is to be understood that the above description is meant to be illustrative only and not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art, without departing from the scope and spirit of the described embodiments. The choice of words in this document is intended to best explain the principles of the embodiments, the practical application, or technical improvement over the existing technology, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method of generating an automobile styling image, characterized by, The method comprises: obtaining a user inputted styling intention condition; randomly obtaining a current random vector; inputting the styling intention condition and the current random vector into a generation network of a pre-trained conditional generative adversarial network model to process and output a current automobile styling image; wherein the styling intention condition is used to guide the generation network to randomly generate the current automobile styling image according to the current random vector; the training process of the generation network of the conditional generative adversarial network model is as follows: obtaining a plurality of automobile styling real images; respectively performing image processing on the plurality of automobile styling real images to obtain a plurality of corresponding automobile styling sketch samples, and generating an automobile styling sketch sample set according to the plurality of automobile styling sketch samples; obtaining a plurality of user inputted styling intention conditions; wherein the styling intention condition is a category of automobile styling style; training an original generation network of a conditional generative adversarial network model according to the automobile styling sketch sample set, the plurality of styling intention conditions, a preset loss function, and a preset discriminant network of the conditional generative adversarial network model; wherein the current automobile styling image outputted by the generation network of the conditional generative adversarial network model is in the form of a sketch.
2. The automobile styling image generation method according to claim 1, characterized by, The method comprises: repeating the steps of randomly obtaining a current random vector and inputting the styling intention condition and the current random vector into a pre-trained generation network of a conditional generative adversarial network model to process and output a current automobile styling image multiple times to obtain a plurality of automobile styling images.
3. The automobile styling image generation method according to claim 1 or 2, characterized by, The generation network comprises a plurality of convolution layers, which are used to respectively perform deconvolution on the current random vector and the styling intention condition, and then sequentially perform deconvolution on the connected two deconvolution results to output the current automobile styling image.
4. The automobile styling image generation method according to claim 1, characterized by, The preset loss function is shown in the following expression: wherein z is the current random variable, y is the styling intention condition, is the error intention condition, x is the current car styling image output by the generation network, x=G(z|y), G() is the mathematical expression of the generation network, G(z|y) represents the output of the generation network when the input is z and y, represents the output of the generation network when the input is x and , D() is the mathematical expression of the discriminant network, D(x|y) represents the matching degree of x and the styling intention condition, D(x) represents the matching degree of x and the car styling sketch sample, represents the matching degree of and the car styling sketch sample, represents the norm normalization of the gradient of the discriminant network, represents the expectation value of the processing results in multiple times in the training process, and λ is the penalty factor.
5. An automobile styling image generation system characterized by comprising: The method comprises: an intention condition obtaining unit configured to obtain a user inputted styling intention condition; a random vector obtaining unit configured to randomly obtain a current random vector; and an image generating unit configured to input the styling intention condition and the current random vector into a generation network of a pre-trained conditional generative adversarial network model to process and output a current automobile styling image; wherein the styling intention condition is used to guide the generation network to randomly generate the current automobile styling image according to the current random vector; the generation network of the conditional generative adversarial network model is obtained by training an original generation network of a conditional generative adversarial network model according to an automobile styling sketch sample set, a plurality of styling intention conditions, a preset loss function, and a preset discriminant network of the conditional generative adversarial network model; wherein the current automobile styling image outputted by the conditional generative adversarial network model is in the form of a sketch; the automobile styling sketch sample set comprises a plurality of automobile styling sketch samples obtained by performing image processing on a plurality of automobile styling real images; and the styling intention condition is a category of automobile styling style.
6. The automobile styling image generation system according to claim 5, characterized by, The generation network comprises multiple convolution layers, which are used for respectively deconvolving the current random vector and the styling intention condition, connecting the two deconvolution results, and then sequentially performing deconvolution on the connected result through the multiple convolution layers to output the current automobile styling image.
7. The automobile styling image generation system according to claim 5, characterized by, The preset loss function is shown in the following expression: wherein z is the current random variable, y is the styling intention condition, is the error intention condition, x is the current car styling image output by the generation network, x=G(z|y), G() is the mathematical expression of the generation network, G(z|y) represents the output of the generation network when the input is z and y, represents the output of the generation network when the input is x and D() is the mathematical expression of the discriminative network, D(x|y) represents the matching degree of x and the styling intention condition, D(x) represents the matching degree of x and the car styling sketch sample, represents the matching degree of the car styling sketch sample, represents the norm normalization of the gradient of the discriminative network, represents the expectation value of the processing results in the training process multiple times, and λ is the penalty factor.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the automobile styling image generation method in any one of claims 1 to 4.
Citation Information
Patent Citations
Method and device for reconstructing visual image by using electroencephalogram signal
CN111568412A