Pictorial generation method, device, equipment and storage medium

Through image conversion and pictorial generation models, the character images and background are automatically determined and adjusted, and the problems of poor and low efficiency of poster design in the prior art are solved, and efficient and personalized pictorial generation is achieved.

CN114519754BActive Publication Date: 2025-01-03CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210143117.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-16
Publication Date
2025-01-03
Estimated Expiration
2042-02-16

AI Technical Summary

Technical Problem

Insurance agents and other agents have poor design effects and high cost when making posters. Existing neural network models are prone to errors when processing multiple portrait images, requiring manual adjustments, resulting in inefficiency.

Method used

A pictorial generation method is provided, which determines the target character image through an image conversion model, combines preset background image and introduction text, and uses the pictorial generation model to automatically adjust the colors and positions to generate efficient and personalized pictorials.

Benefits of technology

It improves the efficiency and quality of pictorial generation, reduces the cost of manual adjustment, realizes automated pictorial design, and improves design speed and effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114519754B_ABST
    Figure CN114519754B_ABST
Patent Text Reader

Abstract

The present application provides a pictorial generation method, device, equipment and computer-readable storage medium, the method comprising: obtaining an image to be processed; based on an image conversion model, determining a target character image according to a character image in the image to be processed; obtaining a preset background image and an introduction text, and setting the target character image in a first area of ​​the background image, and setting the introduction text in a second area adjacent to the first area, to obtain a layout image; based on a pictorial generation model, adjusting the second color of the introduction text in the layout image according to the first color of the first area of ​​the layout image, to obtain a pictorial image. The present application can increase the rate of pictorial image generation and reduce the cost of designing pictorials. The present application also relates to blockchain technology, and pictorial images can be stored in a blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image processing, and in particular to a pictorial generation method, device, equipment and computer-readable storage medium. Background Art

[0002] When insurance agents or other agents introduce themselves to customers, they usually do so through business cards or posters. However, agents are not good at making business cards or posters, which results in poor viewing quality of posters designed by agents. Finding someone who is good at making posters will increase costs. In addition, in the current poster production process, some neural network models are used to perform style conversion on portraits. However, these neural network models may make errors when processing images containing multiple portraits. After obtaining the portrait image output by the neural network model, it is necessary to manually adjust the position of each portrait in the image, which increases labor costs and slows down the efficiency of poster production. Summary of the invention

[0003] The main purpose of this application is to provide a pictorial generation method, device, equipment and computer-readable storage medium, aiming to improve the efficiency of pictorial production.

[0004] In a first aspect, the present application provides a method for generating a pictorial, the method comprising the following steps:

[0005] Get the image to be processed;

[0006] Based on the image conversion model, determining the target person image according to the person image in the image to be processed;

[0007] Acquire a preset background image and introduction text, and set the target person image in a first area of ​​the background image, and set the introduction text in a second area adjacent to the first area, to obtain a layout image;

[0008] Based on the pictorial generation model, the second color of the introduction text in the layout image is adjusted according to the first color of the first area of ​​the layout image to obtain a pictorial image.

[0009] In a second aspect, the present application further provides a pictorial generating device, the pictorial generating device comprising:

[0010] An image acquisition module, used for acquiring an image to be processed;

[0011] An image conversion module, used for determining a target person image according to a person image in the image to be processed based on an image conversion model;

[0012] A layout image generation module, used to obtain a preset background image and introduction text, and set the target person image in a first area of ​​the background image, and set the introduction text in a second area adjacent to the first area, to obtain a layout image;

[0013] The pictorial generation module is used to adjust the second color of the introduction text in the layout image according to the first color of the first area of ​​the layout image based on the pictorial generation model to obtain a pictorial image.

[0014] In a third aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the pictorial generation method as described above are implemented.

[0015] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the pictorial generation method as described above are implemented.

[0016] The present application provides a pictorial generation method, device, equipment and computer-readable storage medium, the method comprising obtaining an image to be processed; determining a target character image according to a character image in the image to be processed based on an image conversion model; obtaining a preset background image and an introduction text, and setting the target character image in a first area of ​​the background image, and setting the introduction text in a second area adjacent to the first area, to obtain a layout image; adjusting the second color of the introduction text in the layout image according to a first color of the first area of ​​the layout image based on a pictorial generation model, to obtain a pictorial image, through the image conversion model, being able to perform style conversion processing on the character image in the image to be processed to obtain the character image in the pictorial, and being able to automatically adjust the position and color of the character image and the introduction text to achieve the purpose of automatically generating a pictorial, thereby improving the efficiency of pictorial generation and reducing costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 A schematic diagram of a flowchart of a method for generating a pictorial provided in an embodiment of the present application;

[0019] Figure 2A schematic diagram of a scenario for implementing the pictorial generation method provided in this embodiment;

[0020] Figure 3 A schematic block diagram of a model structure in a pictorial generation method provided in an embodiment of the present application;

[0021] Figure 4 A schematic block diagram of a pictorial generating device provided in an embodiment of the present application;

[0022] Figure 5 The present invention is a block diagram showing the structure of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0025] The embodiments of the present application provide a method, device, computer equipment and computer-readable storage medium for generating a pictorial. The pictorial generation method can be applied to a terminal device, which can be an electronic device such as a tablet computer, a laptop computer, a desktop computer, etc. It can also be applied to a server, which can be a separate server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0026] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0027] Please refer to Figure 1 , Figure 1 A flowchart of a method for generating a pictorial provided in an embodiment of the present application.

[0028] like Figure 1 As shown, the pictorial generating method includes steps S101 to S104.

[0029] Step S101, obtaining an image to be processed;

[0030] Exemplarily, the images to be processed may be group photos or team photos. It is understandable that a group photo includes several characters. By performing style conversion processing on the character images corresponding to these characters and generating pictorials based on the portraits after style conversion, pictorials with different styles can be obtained, thus avoiding the tediousness of designing pictorials, reducing the cost of designing pictorials and improving the rate of generating pictorials.

[0031] It can be understood that the generated pictorial can be introduced or promoted with text, and through the style transformation of each character image, a personalized pictorial that conforms to each character can be obtained.

[0032] Exemplarily, the image to be processed may be acquired by an image acquisition device, such as a photographing device, so as to generate a pictorial for the image to be processed.

[0033] Specifically, Figure 2 As shown, the server can obtain the image to be processed sent by the source terminal, generate a pictorial for the image to be processed, and then send the generated pictorial to the target terminal and / or the source terminal.

[0034] Step S102: Based on the image conversion model, determine the target person image according to the person image in the image to be processed.

[0035] Exemplarily, the image conversion model is used to perform style conversion on the person image in the image to be processed to obtain the target person image.

[0036] It can be understood that style conversion can be line drawing style conversion and cartoon style conversion. Specifically, the character image can be processed by edge contour extraction to complete the line drawing style conversion; similarly, the character image can be processed by adversarial network to complete the cartoon style conversion.

[0037] In some embodiments, before performing style conversion processing on a person image, the image to be processed is segmented to obtain a plurality of person images.

[0038] Exemplarily, the image to be processed may include several person images, and when the number of person images is greater than or equal to 2, the image to be processed is styled to obtain multiple person images.

[0039] For example, each character image obtained after segmentation can be subjected to style conversion processing to obtain a target character image for placement in a pictorial. It is understandable that the style conversion processing includes but is not limited to line drawing style conversion processing and cartoon style conversion processing. The line drawing style is used to indicate that the outline of the portrait is outlined by multiple simple lines so that the target character image achieves the same effect as a sketch. The cartoon style is used to indicate that the color of the portrait is adjusted and the portrait is cartoonized so that the target character image achieves the same effect as a cartoon character.

[0040] For example, in the same pictorial, different portraits may be in different styles to achieve the personalized expression of each person in the pictorial.

[0041] Exemplarily, the coordinate position of the person image in the image to be processed may be obtained, and the image to be processed may be segmented according to the coordinate position of the person image to obtain a plurality of person images.

[0042] Exemplarily, multiple character images may be processed in parallel to increase the rate of generating the pictorial.

[0043] In some embodiments, the image conversion model is based on determining the target person image according to the person image in the image to be processed, including: inputting the image to be processed into the first image processing sub-model of the image conversion model, and based on the vectorization processing network of the first image processing sub-model, performing edge enhancement processing on the person image in the image to be processed and extracting the contour features of the processed person image to obtain a first feature matrix; based on the convolution network of the first image processing sub-model, performing convolution processing on the first feature matrix to obtain a second feature matrix; based on the decoding network of the first image processing sub-model, performing weight calculation on the second feature matrix and decoding processing on the calculation result to obtain the target person image.

[0044] Exemplarily, the image conversion model includes a first image processing sub-model. It can be understood that the first image processing sub-model can be used to convert the character image into a line drawing style to obtain a target character image.

[0045] Exemplarily, the image to be processed can be input into the first image processing sub-model to determine the target person image based on the person image in the image to be processed; or the person image segmented from the image to be processed can be input into the first image processing sub-model to determine the target person image based on the person image.

[0046] For the convenience of description, the following is an example of inputting a person image segmented from an image to be processed into the first image processing sub-model.

[0047] The character image is input into the vector processing network of the first image processing sub-model. In the vector processing network, the character image is subjected to contour edge enhancement processing. Specifically, the character contour can be determined by the color corresponding to the character image, and the corresponding features can be adjusted so that the extracted eigenvalues ​​can highlight the character contour. Specifically, the eigenvalues ​​corresponding to the first feature matrix extracted by the feature can be scaled up to highlight the features of the character contour.

[0048] For example, the first feature matrix obtained by extracting contour features without edge enhancement processing can be:

[0049]

[0050] Among them, the feature values ​​in the first column, the third column, and the third row are used to indicate the outline of task salient;

[0051] If edge enhancement is performed and feature extraction is performed on the processed person image, the first feature matrix obtained can be:

[0052]

[0053] It can be understood that the first feature matrix obtained after the edge enhancement process can highlight the eigenvalues ​​corresponding to the contour in the calculation.

[0054] It can be understood that the above-mentioned first characteristic matrix is ​​only an example and does not limit the edge enhancement processing and the first characteristic matrix in the present application.

[0055] Exemplarily, the first feature matrix output from the vectorization processing network is input into the convolution network of the first image processing sub-model. In the convolution network, the first feature matrix is ​​convolved, and after the convolution, pooling is performed. It can be understood that the pooling process is to remove redundant eigenvalues ​​of the first feature matrix to speed up the calculation rate of the convolution and prevent overfitting. It can be understood that in the convolution network, multiple convolution layers and multiple pooling layers can be included to perform multiple convolution processes and pooling processes on the first feature matrix.

[0056] Exemplarily, after passing through the convolutional network, a second feature matrix is ​​obtained, and the second feature matrix is ​​input into the decoding network.

[0057] In the decoding network, the weight of the background information is calculated for the second feature matrix. It can be understood that the background information in the image can be further removed, and only the contour information is retained to obtain an image similar to the sketch style. The weight matrix corresponding to the background information and the second feature matrix can be calculated to eliminate the background information. After the weight calculation, the calculated feature matrix is ​​decoded by the decoder to obtain the target character image. In this way, the line drawing style conversion of the character image is completed.

[0058] Exemplarily, the background information can be determined during edge enhancement processing. It can be understood that when performing edge enhancement processing, while determining the edge contour information of the character image, the remaining information in the current character image except the edge contour information can be considered as background information, so that the weight matrix corresponding to the background information can be determined.

[0059] Exemplarily, the edge contour information of the person image includes but is not limited to the head contour, facial features contour, limb contour and body contour.

[0060] Through the first image processing sub-model in the image conversion model, the character image can be converted into a line drawing style, thereby obtaining a target character image placed in a pictorial.

[0061] Exemplarily, the image conversion model also includes a second image processing sub-model, and the second image processing sub-model can be used to convert the character image into a cartoon style.

[0062] In some embodiments, the method of determining a target person image based on a person image in the image to be processed based on the image conversion model includes: inputting the image to be processed into a second image processing sub-model of the image conversion model, and performing inverse convolution and batch normalization processing on the person image to be processed based on the input layer of the generator network of the second image processing sub-model to obtain a first feature image; performing nonlinear calculation on the first feature image based on the output layer of the generator network to obtain an image to be discriminated; performing convolution processing and batch normalization processing on the image to be discriminated based on the input layer of the discriminator network of the second image processing sub-model to obtain a second feature image corresponding to the image to be discriminated; performing a true or false judgment on the second feature image based on the output layer of the discriminator network, and if the judgment is true, taking the image to be discriminated corresponding to the second feature image as the target person image, and outputting the target person image.

[0063] Exemplarily, the cartoon style conversion of the character image can be completed through the adversarial network in the second image processing sub-model.

[0064] Exemplarily, the person image is input to the input layer of the generator network of the second image processing sub-model to extract features from the person image, and the extracted features are subjected to deconvolution processing and batch normalization processing to obtain a first feature image. In the deconvolution process, a noise vector is introduced. It can be understood that the noise vector can be preset or learned by the generator network based on multiple input person images. The noise vector can be used to change the features in the person image.

[0065] The first feature image output by the input layer is input into the output layer of the generator network to perform nonlinear calculation on the first feature image through a preset first activation function to obtain an image to be discriminated, wherein the preset first activation function can be a tanh function, and the expression is as follows:

[0066]

[0067] Among them, tanh is used to indicate the image to be judged, e is used to indicate the transcendental number, and x is used to indicate the first feature image.

[0068] Exemplarily, after obtaining the image to be judged, the image to be judged is input into the input layer of the discriminator network of the second image processing sub-model to perform convolution processing and batch normalization processing on the image to be judged to obtain a second feature image of the image to be judged, and the output layer of the discriminator network is used to judge whether the second feature image is true or false.

[0069] Exemplarily, the authenticity of the second feature image can be judged based on the second activation function. Specifically, the second feature image is divided into multiple sub-images, and the sub-images of the second feature image are classified and calculated using the second activation function. The classification results of each sub-image in the second feature image can be obtained, and the authenticity of the second feature image can be judged based on the classification results of each sub-image.

[0070] For example, if the number of sub-images determined to be true is greater than or equal to half of the total number of sub-images, the second feature image is determined to be a true image; if the number of sub-images determined to be true is less than half of the total number of sub-images, the second feature image is determined to be a false image.

[0071] For example, the total number of sub-images of the second characteristic image is 500. If the number of true sub-images is 280, the second characteristic image is determined to be a true image; if the number of true sub-images is 100, the second characteristic image is determined to be a false image.

[0072] It can be understood that when the discriminator network determines that the second feature image is a false image, the image conversion model does not output the image, and adjusts the parameters of the generator network, the parameters of the discriminator network, and at least one of the noise information to generate the image to be discriminated and discriminate the image to be discriminated again.

[0073] It can be understood that when the discriminator network determines that the second feature image is a frame image, the image to be discriminated corresponding to the second feature image is used as the target character image, and the target character image is output to complete the cartoon style conversion of the character image.

[0074] In some embodiments, before the method based on the image conversion model determines the target person image according to the person image in the image to be processed, it also includes: based on the image segmentation model, segmenting the person image to obtain the head area image and the body area image of the person image; the method based on the image conversion model, determining the target person image according to the person image in the image to be processed, includes: based on the first image processing sub-model of the image conversion model, performing edge contour extraction processing on the head area image to obtain a processed head area image; and performing edge contour extraction processing on the body area image to obtain a processed body area image; and / or based on the second image processing sub-model of the image conversion model, performing cartoon image conversion processing on the head area image to obtain a processed head area image; and performing cartoon image conversion processing on the body area image to obtain a processed body area image; determining the processed body area image corresponding to the processed head area image, and splicing the corresponding processed head area image and processed body area image to obtain the target person image.

[0075] Exemplarily, the person image can also be segmented based on the image segmentation model to obtain the head area image and the body area image corresponding to the person image, and the head area image and the body area image can be style converted respectively, and the corresponding head area image and body area image after the style conversion can be spliced ​​to obtain the target person image.

[0076] For example, the invention includes person images 1, 2, and 3, wherein person image 1 is segmented into head area image A and body area image a, person image 2 is segmented into head area image B and body area image b, and person image 3 is segmented into head area image C and body area image c, and style conversion processing is performed on images A, B, C, a, b, and c to obtain processed images A, B, C, a, b, and c, and the processed image a corresponding to the processed image A is determined, and the processed image A and the processed image a are spliced ​​to obtain a target person image corresponding to person image 1, and other images are processed in the same way as person image 1, which will not be described again here.

[0077] Exemplarily, in the image segmentation model, the head area in the character image can be identified based on a preset face detection algorithm, and based on the identified head area, the head area coordinates of the character image can be determined, and the image can be segmented according to the head area coordinates to obtain a head area image and a body area image.

[0078] Exemplarily, the image segmentation model may also include a U-Net network to segment character images, wherein the U-Net network is a fully convolutional structure, and the U-net network has a contracting path and an expansive path, wherein the contracting path and the expansive path include at least 4 processing layers and correspond one to one.

[0079] In the process of obtaining the head area image, the input character image is downsampled through each processing layer in the contracting path. It can be understood that each processing layer fills the edges and scales the character image input to the layer. After processing by several processing layers, the downsampling process is completed to obtain a 512×512 head feature image.

[0080] The obtained head feature image is input into the expansive path for upsampling. In the expansive path, each processing layer performs a deconvolution operation on the head feature image. Specifically, each processing layer doubles the size of the input head feature image, reduces the number by half, and splices it with the character image of the processing layer in the corresponding contracting path. Since the size of the character image of the processing layer in the contracting path is different from that of the head feature image of the processing layer in the corresponding expansive path, the character image of the processing layer in the contracting path is first cropped and then spliced. After the same number of deconvolutions and splicing as the number of downsampling, the upsampling process is completed to generate and output the head area image.

[0081] It can be understood that the parameters of the U-Net network can be adjusted so that the U-Net network can segment the character image to obtain the body area image. For the specific implementation steps, please refer to the above process and will not be discussed here.

[0082] It can be understood that since the image conversion model performs more accurate style conversion on the head region, and in some cases, the head region and the body region may be converted in different proportions or in different styles, the head region image and the corresponding body region image are respectively input into the image conversion model, so that the edge contour extraction process is performed on the head region image and / or the corresponding body region image based on the first image processing sub-model in the image conversion model; and / or the cartoon image conversion process is performed on the head region image and / or the corresponding body region image based on the second image processing sub-model in the image conversion model.

[0083] In some embodiments, before the head area image is subjected to edge contour extraction processing and / or cartoon image conversion processing, it also includes: based on a preset feature coordinate difference calculation rule, performing difference calculation on the coordinates corresponding to the eye features in the head area image to obtain the eye feature coordinate difference; if the eye feature coordinate difference is less than a preset eye feature coordinate difference threshold, performing affine transformation processing on the head area image to obtain a position-corrected head area image, wherein the coordinate values ​​corresponding to the eye features in the position-corrected head area image are greater than or equal to the preset eye feature coordinate difference threshold.

[0084] Exemplarily, when performing style conversion on a head area image, the front face of the portrait can improve the accuracy of the style conversion and avoid the situation where style conversion cannot be performed or the image after style conversion is unclear. Therefore, it is determined whether the horizontal deflection angle of the head in the head area image is less than a preset horizontal deflection angle threshold, and the head area image is processed according to the determination result.

[0085] For example, if it is determined that the horizontal deflection angle of the head in the head area image is less than a preset horizontal deflection angle threshold, image conversion processing is performed on the head area image; if it is determined that the horizontal deflection angle of the head in the head area image is greater than the preset horizontal deflection angle threshold, affine transformation processing is performed on the head area image so that the horizontal deflection angle of the head in the head area image is less than the preset horizontal deflection angle threshold.

[0086] For example, a difference calculation may be performed using eye features or ear features in the head region image, and the calculation result may be compared with a coordinate difference threshold to determine whether the horizontal deflection angle of the head in the head region image is greater than a preset horizontal deflection angle threshold.

[0087] Specifically, the head area image includes the left eye and the right eye; or the left ear and the right ear, determine the coordinates corresponding to the left eye and the coordinates corresponding to the right eye, calculate the difference between the left eye coordinates and the right eye coordinates, obtain the eye feature coordinate difference, and compare the eye feature coordinate difference with the coordinate difference threshold to determine whether the horizontal deflection angle of the head is greater than the preset horizontal deflection angle threshold, and perform corresponding processing.

[0088] It can be understood that performing position correction processing before performing style conversion on the image can improve the success rate and authenticity of the image style conversion.

[0089] Step S103, obtaining a preset background image and introduction text, and setting the target person image in a first area of ​​the background image, and setting the introduction text in a second area adjacent to the first area, to obtain a layout image.

[0090] Exemplarily, a preset background image and an introduction text are obtained. It can be understood that the preset background image can be a pre-designed background image or a solid color background image; the introduction text is used to introduce the group or team in the pictorial, such as a team profile, a team slogan, etc.

[0091] Exemplarily, a target person image and an introduction text are added to the acquired background image to obtain a layout image, wherein due to layout requirements, the target person image and the introduction text cannot overlap, and thus the target person image is set in the first area of ​​the background image, and the introduction text is set in the second area of ​​the background image, wherein the first area is adjacent to the second area to avoid overlap between the target person image and the introduction text.

[0092] In some embodiments, setting the target person image in a first area of ​​the background image and setting the introduction text in a second area adjacent to the first area includes: in response to an area determination instruction, determining a first area and a second area in the background image, wherein the first area is adjacent to the second area; determining a first center coordinate of the first area and a first symmetric center coordinate of the target person image, determining a first target position of the target person image according to the first center coordinate and the first symmetric center coordinate, and adjusting the size of the target person image so that the target person image is in the first area and accounts for a first target proportion in the background image; determining a second center coordinate of the second area and a second symmetric center coordinate of the introduction text, determining a second target position of the introduction text according to the second center coordinate and the second symmetric center coordinate, and adjusting at least one of the character size, line spacing, and character spacing in the introduction text so that the introduction text is in the second area and accounts for a second target proportion in the background image.

[0093] Exemplarily, in response to an area determination instruction input by a user, a first area and a second area are determined in the background image. Specifically, the first area and the second area may be determined by a plurality of endpoint coordinates, wherein the first area is adjacent to the second area.

[0094] After determining the first area, the first center coordinates of the first area are determined according to the endpoints of the first area. For example, if the first area is a square and the coordinates of the four endpoints are (0,0), (2,0), (0,2), and (2,2), the center coordinates of the first area can be determined to be (1,1). In addition, according to the symmetry of the target person image, the first symmetric center coordinates of the target person image can be determined. Specifically, the length and width of the target person image can be calculated, and the first symmetric center coordinates can be determined according to the length and width.

[0095] Exemplarily, the target person image may be fitted into a rectangle to facilitate calculation of the first symmetry center. It is understandable that if multiple target person images are included, the multiple target person images may be spliced ​​and fitted into a rectangle to determine the first symmetry center of the rectangle based on the length and width of the rectangle.

[0096] After determining the first center coordinates and the first symmetric center coordinates, adjust the first symmetric center coordinates to coincide with the first center coordinates so that the target person image is located in the first area; and adjust the size of the target person image so that the proportion of the target person image in the background image belongs to the first target proportion, such as a proportion of 20%.

[0097] Similarly, determine the second center coordinates of the second area, and determine the second symmetric center coordinates of the introduction text. It can be understood that the introduction text can be represented by a text box, and the second symmetric center coordinates of the introduction text can be obtained by obtaining the length and width of the text box.

[0098] Adjust the second symmetric center coordinates to coincide with the second center coordinates so that the introduction text is in the second area, and adjust the size of the text box corresponding to the introduction text. It can be understood that the size of the text box can be adjusted by adjusting at least one of the font size, line spacing and character spacing in the introduction text so that the proportion of the adjusted introduction text in the background image is the second target proportion, such as 15%.

[0099] Exemplarily, the target person image and the introduction text are embedded in the corresponding positions of the background image and the corresponding proportions are adjusted to obtain a layout image. It is understandable that since the color has not been adjusted, the background image may have the same color as the introduction text and / or the target person image, resulting in a situation where the image cannot be displayed. Therefore, the color of the layout image needs to be adjusted.

[0100] Step S104 : Based on the pictorial generation model, the second color of the introduction text in the layout image is adjusted according to the first color of the first area of ​​the layout image to obtain a pictorial image.

[0101] Exemplarily, through the pictorial generation model, the second color of the introduction text can be adjusted according to the first color of the first area of ​​the layout image, thereby avoiding the situation where the colors are the same and the introduction text cannot be displayed.

[0102] Specifically, the second color of the characters in the introduction text may be adjusted according to the first color of the image of the target person in the first area.

[0103] It can be understood that the first color of the target person image and the second color of the introduction text are distinguished to avoid similar or identical colors, which would result in a poor viewing experience of the pictorial, and to avoid the situation where the target person image and the introduction text cannot be displayed due to color reasons.

[0104] For example, Figure 3 As shown, the image to be processed is input into the image conversion model, and the background image and introduction text are input into the pictorial generation model to obtain a pictorial image.

[0105] Exemplarily, the pictorial image can be stored in the blockchain so that when other terminal devices need to obtain the pictorial image, they can broadcast it to the blockchain to obtain the pictorial image. The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. The blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer.

[0106] In some embodiments, the pictorial generation model adjusts the second color of the introduction text in the layout image according to the first color of the first area of ​​the layout image, including: determining a first HSV value according to the first color and a second HSV value according to the second color based on a preset color transformation rule; performing a difference calculation on the first HSV value and the second HSV value, and if the difference between the first HSV value and the second HSV value is less than a preset HSV threshold, adjusting the first HSV value and / or the second HSV value so that the difference between the first HSV value and the second HSV value is greater than the preset HSV threshold.

[0107] Exemplarily, the preset color transformation rule can be a color transformation formula, for example, determining the first HSV value through the RGB value in the first color. It can be understood that H is used to indicate the hue (Hue) of the color, S is used to indicate the saturation (Saturation) of the color, and V is used to indicate the value (Value) of the color.

[0108] Exemplarily, after obtaining the first HSV value corresponding to the target person image and the second HSV value corresponding to the introduction text, the difference between the first HSV value and the second HSV value is calculated to obtain the difference between the first HSV value and the second HSV value, and the difference between the first HSV value and the second HSV value and the preset HSV threshold is determined, so as to adjust the first HSV value and / or the second HSV value according to the result of the determination. For example, if the difference between the first HSV value and the second HSV value is less than the preset HSV threshold, the first HSV value is increased and / or the second HSV value is decreased so that the difference between the first HSV value and the second HSV value is greater than the preset HSV threshold. It can be understood that the difference between the first HSV value and the second HSV value is greater than the preset HSV threshold, which can enable customers to have sufficient color recognition when viewing the target person image and the introduction text, thereby increasing the viewing experience of the poster image.

[0109] In other embodiments, the layout image also includes a third area, wherein the third area is adjacent to the first area and the second area, and the third area is used to indicate an area where neither the target person image nor the introduction text exists, determine a third HSV value of the third area, and adjust the first HSV value and / or the second HSV value based on the third HSV value.

[0110] It is understandable that if the color in the third area is similar or the same as that in the first area or the second area, the target person image or introduction text may not be displayed well in the layout image, and therefore the first HSV value and / or the second HSV value need to be adjusted according to the third HSV value corresponding to the third area.

[0111] Exemplarily, a first difference between the first HSV value and the third HSV value is calculated, and a second difference between the second HSV value and the third HSV value is calculated, and the magnitude of the first difference and the second preset HSV value, and the magnitude of the second difference and the second preset HSV value are determined, and the first HSV value and the second HSV value are adjusted according to the determination result. It can be understood that if the first difference is less than the second preset HSV value, the first HSV value is adjusted; if the second difference is less than the second preset HSV value, the second HSV value is adjusted; and the adjusted first HSV value and second HSV value satisfy that the difference between the first HSV value and the second HSV value is less than the preset HSV value.

[0112] By adjusting the HSV values ​​of different areas, we can avoid the inability to fully display the image due to the same color, and enhance the viewing experience of the picture.

[0113] The pictorial generation method provided in the above embodiment obtains an image to be processed; based on an image conversion model, a target character image is determined according to the character image in the image to be processed; a preset background image and introduction text are obtained, and the target character image is set in a first area of ​​the background image, and the introduction text is set in a second area adjacent to the first area to obtain a layout image; based on a pictorial generation model, the second color of the introduction text in the layout image is adjusted according to the first color of the first area of ​​the layout image to obtain a pictorial image. By performing style conversion on the character image in the image to be processed through the image conversion model, and automatically generating a pictorial through the preset background image, introduction text and target character image, the rate of pictorial generation can be increased and the cost of designing a pictorial can be reduced.

[0114] See also Figure 4 , Figure 4 is a schematic diagram of a pictorial generating device 100 provided in an embodiment of the present application. The pictorial generating device 100 can be configured in a server or a terminal to execute the aforementioned pictorial generating method.

[0115] like Figure 4 As shown, the pictorial generating device 100 includes: an image acquiring module 110 , an image converting module 120 , a layout image generating module 130 , and a pictorial generating module 140 .

[0116] The image acquisition module 110 is used to acquire an image to be processed.

[0117] The image conversion module 120 is used to determine a target person image according to the person image in the image to be processed based on an image conversion model.

[0118] The layout image generation module 130 is used to obtain a preset background image and introduction text, and to set the target person image in a first area of ​​the background image, and to set the introduction text in a second area adjacent to the first area, so as to obtain a layout image.

[0119] The pictorial generation module 140 is used to adjust the second color of the introduction text in the layout image according to the first color of the first area of ​​the layout image based on the pictorial generation model to obtain a pictorial image.

[0120] Exemplarily, the image conversion module 120 also includes a vectorization processing submodule, a convolution processing submodule, and a decoding processing submodule.

[0121] A vectorized processing submodule is used to input the image to be processed into the first image processing submodel of the image conversion model, and based on the vectorized processing network of the first image processing submodel, perform edge enhancement processing on the person image in the image to be processed and extract the contour features of the processed person image to obtain a first feature matrix.

[0122] A convolution processing submodule is used to perform convolution processing on the first feature matrix based on the convolution network of the first image processing submodel to obtain a second feature matrix.

[0123] The decoding processing submodule is used to perform weight calculation on the second feature matrix based on the decoding network of the first image processing submodel and decode the calculation result to obtain the target person image.

[0124] Exemplarily, the image conversion module 120 includes an input layer submodule of the generator network, an output layer submodule of the generator network, an input layer submodule of the discriminator network, and an output layer submodule of the discriminator network.

[0125] The input layer submodule of the generator network is used to input the image to be processed into the second image processing submodel of the image conversion model, and based on the input layer of the generator network of the second image processing submodel, perform deconvolution and batch normalization on the character image to be processed to obtain a first feature image.

[0126] The output layer submodule of the generator network is used to perform convolution processing and batch normalization processing on the image to be discriminated based on the input layer of the discriminator network of the second image processing submodel to obtain a second feature image corresponding to the image to be discriminated.

[0127] The input layer submodule of the discriminator network is used to downsample the processed first fusion matrix based on the pooling network of the first feature calculation submodel to obtain a second fusion matrix.

[0128] The output layer submodule of the discriminator network is used to judge the true or false of the second feature image based on the output layer of the discriminator network, and if it is judged to be true, use the image to be judged corresponding to the second feature image as the target person image, and output the target person image.

[0129] Exemplarily, the layout image generation module 130 also includes a region determination submodule, a target person image adjustment submodule, and an introduction text adjustment submodule.

[0130] The region determination submodule is used to determine a first region and a second region in the background image in response to a region determination instruction, wherein the first region is adjacent to the second region.

[0131] The target person image adjustment submodule is used to determine the first center coordinates of the first area and the first symmetric center coordinates of the target person image, determine the first target position of the target person image according to the first center coordinates and the first symmetric center coordinates, and adjust the size of the target person image so that the target person image is in the first area and its proportion in the background image belongs to the first target proportion.

[0132] The introduction text adjustment submodule is used to determine the second center coordinates of the second area and the second symmetrical center coordinates of the introduction text, determine the second target position of the introduction text according to the second center coordinates and the second symmetrical center coordinates, and adjust at least one of the character size, line spacing and character spacing in the introduction text so that the introduction text is in the second area and its proportion in the background image belongs to the second target proportion.

[0133] Exemplarily, the pictorial generation module 140 further includes a color conversion submodule and a color adjustment submodule.

[0134] The color conversion submodule is used to determine a first HSV value according to the first color and a second HSV value according to the second color based on a preset color conversion rule.

[0135] The color adjustment submodule is used to calculate the difference between the first HSV value and the second HSV value. If the difference between the first HSV value and the second HSV value is less than a preset HSV threshold, the first HSV value and / or the second HSV value is adjusted so that the difference between the first HSV value and the second HSV value is greater than the preset HSV threshold.

[0136] Exemplarily, the pictorial generating device 100 further includes an image segmentation module, and the image conversion module 120 further includes an image stitching submodule.

[0137] The image segmentation module is used to segment the character image based on the image segmentation model to obtain a head area image and a body area image of the character image.

[0138] The image conversion module 120 is further configured to perform edge contour extraction processing on the head region image based on the first image processing sub-model of the image conversion model to obtain a processed head region image; and perform edge contour extraction processing on the body region image to obtain a processed body region image; and / or perform cartoon image conversion processing on the head region image based on the second image processing sub-model of the image conversion model to obtain a processed head region image; and perform cartoon image conversion processing on the body region image to obtain a processed body region image;

[0139] The image stitching submodule is used to determine the processed body region image corresponding to the processed head region image, and stitch the corresponding processed head region image and processed body region image to obtain the target person image.

[0140] Exemplarily, the pictorial generating device 100 further includes a feature calculation module and an image adjustment module.

[0141] The feature calculation module is used to perform difference calculation on the coordinates corresponding to the eye features in the head area image based on a preset feature coordinate difference calculation rule to obtain the eye feature coordinate difference.

[0142] The image adjustment module is used to perform affine transformation processing on the head area image to obtain a position-corrected head area image if the eye feature coordinate difference is less than a preset eye feature coordinate difference threshold, wherein the coordinate value corresponding to the eye feature in the position-corrected head area image is greater than or equal to the preset eye feature coordinate difference threshold.

[0143] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0144] The method of the present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0145] Exemplarily, the above method and apparatus may be implemented in the form of a computer program. The computer program may be implemented in Figure 5 Runs on the computer device shown.

[0146] See also Figure 5 , Figure 5 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. The computer device may be a server or a terminal.

[0147] like Figure 5 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a storage medium and an internal memory.

[0148] The storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any one of the pictorial generation methods.

[0149] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0150] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute any one of the pictorial generation methods.

[0151] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0152] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0153] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0154] Get the image to be processed;

[0155] Based on the image conversion model, determining the target person image according to the person image in the image to be processed;

[0156] Acquire a preset background image and introduction text, and set the target person image in a first area of ​​the background image, and set the introduction text in a second area adjacent to the first area, to obtain a layout image;

[0157] Based on the pictorial generation model, the second color of the introduction text in the layout image is adjusted according to the first color of the first area of ​​the layout image to obtain a pictorial image.

[0158] In one embodiment, when the processor determines the target person image according to the person image in the image to be processed based on the image conversion model, it is used to implement:

[0159] Input the image to be processed into the first image processing sub-model of the image conversion model, and based on the vector processing network of the first image processing sub-model, perform edge enhancement processing on the person image in the image to be processed and extract the contour features of the processed person image to obtain a first feature matrix;

[0160] Based on the convolution network of the first image processing sub-model, convolution processing is performed on the first feature matrix to obtain a second feature matrix;

[0161] Based on the decoding network of the first image processing sub-model, the second feature matrix is ​​weighted and the calculation result is decoded to obtain the target person image.

[0162] In one embodiment, when the processor determines the target person image according to the person image in the image to be processed based on the image conversion model, it is used to implement:

[0163] Inputting the image to be processed into the second image processing sub-model of the image conversion model, and performing deconvolution and batch normalization processing on the person image to be processed based on the input layer of the generator network of the second image processing sub-model to obtain a first feature image;

[0164] Based on the output layer of the generator network, nonlinear calculation is performed on the first feature image to obtain an image to be judged;

[0165] Based on the input layer of the discriminator network of the second image processing sub-model, performing convolution processing and batch normalization processing on the image to be discriminated to obtain a second feature image corresponding to the image to be discriminated;

[0166] Based on the output layer of the discriminator network, the second feature image is judged to be true or false, and if it is judged to be true, the image to be judged corresponding to the second feature image is used as the target person image, and the target person image is output.

[0167] In one embodiment, when the processor sets the target person image in a first area of ​​the background image and sets the introduction text in a second area adjacent to the first area, the processor is configured to: determine a first area and a second area in the background image in response to an area determination instruction, wherein the first area is adjacent to the second area;

[0168] Determine the first center coordinates of the first area, and determine the first symmetric center coordinates of the target person image, determine the first target position of the target person image according to the first center coordinates and the first symmetric center coordinates, and adjust the size of the target person image so that the target person image is in the first area and accounts for a first target proportion in the background image;

[0169] Determine the second center coordinates of the second area and the second symmetric center coordinates of the introduction text, determine the second target position of the introduction text according to the second center coordinates and the second symmetric center coordinates, and adjust at least one of the character size, line spacing and character spacing in the introduction text so that the introduction text is in the second area and its proportion in the background image belongs to the second target proportion.

[0170] In one embodiment, when the processor implements the pictorial generation model and adjusts the second color of the introduction text in the layout image according to the first color of the first area of ​​the layout image, it is configured to implement:

[0171] Based on a preset color transformation rule, determining a first HSV value according to the first color, and determining a second HSV value according to the second color;

[0172] The first HSV value and the second HSV value are difference calculated. If the difference between the first HSV value and the second HSV value is less than a preset HSV threshold, the first HSV value and / or the second HSV value are adjusted so that the difference between the first HSV value and the second HSV value is greater than the preset HSV threshold.

[0173] In one embodiment, before determining the target person image according to the person image in the image to be processed based on the image conversion model, the processor is further configured to implement:

[0174] Based on the image segmentation model, the person image is segmented to obtain a head area image and a body area image of the person image;

[0175] When the processor determines the target person image according to the person image in the image to be processed based on the image conversion model, it is used to implement:

[0176] Based on the first image processing sub-model of the image conversion model, the head region image is subjected to edge contour extraction processing to obtain a processed head region image; and the body region image is subjected to edge contour extraction processing to obtain a processed body region image; and / or based on the second image processing sub-model of the image conversion model, the head region image is subjected to cartoon image conversion processing to obtain a processed head region image; and the body region image is subjected to cartoon image conversion processing to obtain a processed body region image;

[0177] A processed body region image corresponding to the processed head region image is determined, and the corresponding processed head region image and the processed body region image are spliced ​​to obtain a target person image.

[0178] In one embodiment, before performing edge contour extraction processing and / or cartoon image conversion processing on the head region image, the processor is further used to implement:

[0179] Based on a preset feature coordinate difference calculation rule, performing difference calculation on the coordinates corresponding to the eye features in the head region image to obtain eye feature coordinate difference;

[0180] If the eye feature coordinate difference is less than a preset eye feature coordinate difference threshold, the head area image is subjected to affine transformation processing to obtain a position-corrected head area image, wherein the coordinate values ​​corresponding to the eye features in the position-corrected head area image are greater than or equal to the preset eye feature coordinate difference threshold.

[0181] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described pictorial generation can refer to the corresponding process in the aforementioned pictorial generation control method embodiment, and will not be repeated here.

[0182] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the pictorial generation method of the present application.

[0183] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0184] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0185] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including 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 system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.

[0186] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for generating a pictorial, characterized in that: include: Get the image to be processed; Based on the image conversion model, determining the target person image according to the person image in the image to be processed; Acquire a preset background image and introduction text, and set the target person image in a first area of ​​the background image, and set the introduction text in a second area adjacent to the first area, to obtain a layout image; Based on the pictorial generation model, adjusting the second color of the introduction text in the layout image according to the first color of the first area of ​​the layout image to obtain a pictorial image; Wherein, the step of determining the target person image according to the person image in the image to be processed based on the image conversion model includes: Input the image to be processed into the first image processing sub-model of the image conversion model, and based on the vector processing network of the first image processing sub-model, perform edge enhancement processing on the person image in the image to be processed and extract the contour features of the processed person image to obtain a first feature matrix; Based on the convolution network of the first image processing sub-model, convolution processing is performed on the first feature matrix to obtain a second feature matrix; Based on the decoding network of the first image processing sub-model, weight calculation is performed on the second feature matrix and the calculation result is decoded to obtain the target person image; The step of placing the target person image in a first area of ​​the background image and placing the introduction text in a second area adjacent to the first area comprises: In response to the region determination instruction, determining a first region and a second region in the background image, wherein the first region is adjacent to the second region; Determine the first center coordinates of the first area, and determine the first symmetric center coordinates of the target person image, determine the first target position of the target person image according to the first center coordinates and the first symmetric center coordinates, and adjust the size of the target person image so that the target person image is in the first area and accounts for a first target proportion in the background image; Determine the second center coordinates of the second area and the second symmetric center coordinates of the introduction text, determine the second target position of the introduction text according to the second center coordinates and the second symmetric center coordinates, and adjust at least one of the character size, line spacing and character spacing in the introduction text so that the introduction text is in the second area and its proportion in the background image belongs to the second target proportion.

2. The pictorial generating method according to claim 1, characterized in that: The step of determining the target person image based on the person image in the image to be processed based on the image conversion model includes: Inputting the image to be processed into the second image processing sub-model of the image conversion model, and performing deconvolution and batch normalization processing on the person image to be processed based on the input layer of the generator network of the second image processing sub-model to obtain a first feature image; Based on the output layer of the generator network, nonlinear calculation is performed on the first feature image to obtain an image to be judged; Based on the input layer of the discriminator network of the second image processing sub-model, performing convolution processing and batch normalization processing on the image to be discriminated to obtain a second feature image corresponding to the image to be discriminated; Based on the output layer of the discriminator network, the second feature image is judged to be true or false, and if it is judged to be true, the image to be judged corresponding to the second feature image is used as the target person image, and the target person image is output.

3. The pictorial generating method according to claim 1 or 2, characterized in that: The step of adjusting the second color of the introduction text in the layout image based on the pictorial generation model according to the first color of the first area of ​​the layout image includes: Based on a preset color transformation rule, determining a first HSV value according to the first color, and determining a second HSV value according to the second color; The first HSV value and the second HSV value are difference calculated. If the difference between the first HSV value and the second HSV value is less than a preset HSV threshold, the first HSV value and / or the second HSV value are adjusted so that the difference between the first HSV value and the second HSV value is greater than the preset HSV threshold.

4. The pictorial generating method according to claim 1, characterized in that: Before determining the target person image according to the person image in the image to be processed based on the image conversion model, the method further includes: Based on the image segmentation model, the person image is segmented to obtain a head area image and a body area image of the person image; The step of determining the target person image based on the person image in the image to be processed based on the image conversion model includes: Based on the first image processing sub-model of the image conversion model, the head region image is subjected to edge contour extraction processing to obtain a processed head region image; and the body region image is subjected to edge contour extraction processing to obtain a processed body region image; and / or based on the second image processing sub-model of the image conversion model, the head region image is subjected to cartoon image conversion processing to obtain a processed head region image; and the body region image is subjected to cartoon image conversion processing to obtain a processed body region image; A processed body region image corresponding to the processed head region image is determined, and the corresponding processed head region image and the processed body region image are spliced ​​to obtain a target person image.

5. The pictorial generation method according to claim 4, characterized in that: Before the first image processing sub-model based on the image conversion model performs edge contour extraction processing on the head region image to obtain a processed head region image; and performs edge contour extraction processing on the body region image to obtain a processed body region image; and / or before the second image processing sub-model based on the image conversion model performs cartoon image conversion processing on the head region image to obtain a processed head region image; and performs cartoon image conversion processing on the body region image to obtain a processed body region image, the method further includes: Based on a preset feature coordinate difference calculation rule, performing difference calculation on the coordinates corresponding to the eye features in the head region image to obtain eye feature coordinate difference; If the eye feature coordinate difference is less than a preset eye feature coordinate difference threshold, the head area image is subjected to affine transformation processing to obtain a position-corrected head area image, wherein the coordinate values ​​corresponding to the eye features in the position-corrected head area image are greater than or equal to the preset eye feature coordinate difference threshold.

6. A pictorial generating device, characterized in that: The pictorial generating device comprises: An image acquisition module, used for acquiring an image to be processed; An image conversion module, used for determining a target person image according to a person image in the image to be processed based on an image conversion model; A layout image generation module, used to obtain a preset background image and introduction text, and set the target person image in a first area of ​​the background image, and set the introduction text in a second area adjacent to the first area, to obtain a layout image; A pictorial generation module, configured to adjust the second color of the introduction text in the layout image according to the first color of the first area of ​​the layout image based on the pictorial generation model to obtain a pictorial image; Wherein, the image conversion module further includes a vectorization processing submodule, a convolution processing submodule, and a decoding processing submodule; The vector processing submodule is used to input the image to be processed into the first image processing submodel of the image conversion model, and based on the vector processing network of the first image processing submodel, perform edge enhancement processing on the person image in the image to be processed and extract the contour features of the processed person image to obtain a first feature matrix; The convolution processing submodule is used to perform convolution processing on the first feature matrix based on the convolution network of the first image processing submodel to obtain a second feature matrix; The decoding processing submodule is used to perform weight calculation on the second feature matrix and decode the calculation result based on the decoding network of the first image processing submodel to obtain the target person image; The layout image generation module also includes a region determination submodule, a target person image adjustment submodule, and an introduction text adjustment submodule; The region determination submodule is configured to determine a first region and a second region in the background image in response to a region determination instruction, wherein the first region is adjacent to the second region; The target person image adjustment submodule is used to determine the first center coordinates of the first area and the first symmetric center coordinates of the target person image, determine the first target position of the target person image according to the first center coordinates and the first symmetric center coordinates, and adjust the size of the target person image so that the target person image is in the first area and accounts for a first target proportion in the background image; The introduction text adjustment submodule is used to determine the second center coordinates of the second area and the second symmetric center coordinates of the introduction text, determine the second target position of the introduction text according to the second center coordinates and the second symmetric center coordinates, and adjust at least one of the character size, line spacing and character spacing in the introduction text so that the introduction text is in the second area and its proportion in the background image belongs to the second target proportion.

7. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the pictorial generation method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the pictorial generating method according to any one of claims 1 to 5 are implemented.