Poster generation method and device

By obtaining the poster scene type and target object image, generating an image containing outline and background information and pasting the target object, ensuring that the poster background is generated based on the scene type, solving the problem of single poster style and achieving more diverse poster generation.

CN119251353APending Publication Date: 2025-01-03MICRO DREAM TECHTRONIC NETWORK TECH CHINACO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411141367.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The poster style generated in the existing poster generation technology is relatively single and lacks diversity.

Method used

By obtaining the image of the poster scene type and the target object to be generated, a second image containing outline information and background information is generated, and the image of the target object is pasted to the target area of ​​the second image to generate a poster corresponding to the poster scene type. Ensure that background information is generated based on the poster scene type.

Benefits of technology

It improves the style diversity of generated posters and solves the problem of single poster style.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251353A_ABST
    Figure CN119251353A_ABST
Patent Text Reader

Abstract

The invention discloses a poster generation method and device, and belongs to the field of image data processing. The poster generation method comprises the steps of obtaining a to-be-generated poster scene type and a first image comprising a target object; a second image is generated based on the first image and the poster scene type, the second image comprises a filling object corresponding to first contour information and background information generated based on the poster scene type, and the first contour information is contour information of the target object in the first image; a third image is pasted to a target area in the second image, a first poster corresponding to the target object and the poster scene type is generated, the third image is an image, corresponding to the target object and not including background information, in the first image, and the second image is an image, corresponding to the target object and not including background information, in the first image. The target area is a position area corresponding to the filling object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image data processing, and in particular to a poster generation method and device. Background Art

[0002] Currently, poster generation usually involves selecting a poster template, adding personalized text content, and then generating a poster. However, since the poster template is usually a fixed template, the poster generation method in the related art uses a relatively simple style. Summary of the invention

[0003] The present application discloses a poster generation method and device to solve the problem that the posters generated in the related art have a relatively single style.

[0004] In order to solve the above problems, this application adopts the following technical solutions:

[0005] In a first aspect, an embodiment of the present application provides a poster generation method, comprising: obtaining a poster scene type to be generated and a first image including a target object; generating a second image based on the first image and the poster scene type, wherein the second image includes a fill object corresponding to first contour information, and background information generated based on the poster scene type, and the first contour information is contour information of the target object in the first image; generating a first poster corresponding to the target object and the poster scene type by pasting a third image into a target area in the second image, wherein the third image is an image in the first image corresponding to the target object and not including background information, and the target area is a position area corresponding to the fill object.

[0006] In a second aspect, an embodiment of the present application provides a poster generating device, comprising: an acquisition module, for acquiring a poster scene type to be generated and a first image including a target object; a first generation module, for generating a second image based on the first image and the poster scene type, wherein the second image includes a filling object corresponding to first contour information, and background information generated based on the poster scene type, and the first contour information is contour information of the target object in the first image; a second generation module, for generating a first poster corresponding to the target object and the poster scene type by pasting a third image into a target area in the second image, wherein the third image is an image in the first image corresponding to the target object and not including background information, and the target area is a position area corresponding to the filling object.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0009] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.

[0011] The embodiment of the present application provides a poster generation method, by obtaining a poster scene type to be generated and a first image including a target object, based on the first image and the poster scene type, generating a second image including a fill object corresponding to the first outline information and background information generated based on the poster scene type, the first outline information being the outline information of the target object in the first image, and then by pasting a third image to a target area in the second image, generating a first poster corresponding to the target object and the poster scene type, the third image being an image in the first image corresponding to the target object and not including background information, and the target area being a location area corresponding to the fill object. Using the poster generation method of the present application, since the background information of the generated first poster is generated based on the poster scene type, the style of the generated first poster is more diverse, solving the problem of a relatively single style of the poster generated in the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A flowchart of a poster generation method disclosed in an embodiment of the present application;

[0013] Figure 2 A flowchart of a poster generation method disclosed in an embodiment of the present application;

[0014] Figure 3 A flowchart of a poster generation phase disclosed in an embodiment of the present application;

[0015] Figure 4 A schematic diagram of the structure of a poster generating device disclosed in an embodiment of the present application;

[0016] Figure 5 A schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0018] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0019] The poster generation method and device provided in the embodiments of the present application are described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0020] The embodiment of the present application provides a poster generation method. Figure 1 Schematic diagram of a poster generation method disclosed in an embodiment of the present application. Figure 1 As shown, the method includes the following steps.

[0021] S120: Acquire a poster scene type to be generated and a first image including a target object.

[0022] In the present application, the acquired poster scene type to be generated is a text description, for example, the poster scene type to be generated may be items placed on a simple desktop, etc. The first image including the target object may be an image including the target object and having a white background.

[0023] S140: Generate a second image based on the first image and the poster scene type.

[0024] The second image includes a filling object corresponding to the first outline information and background information generated based on the poster scene type, and the first outline information is outline information of the target object in the first image.

[0025] It should be noted that the first contour information may include the shape, size and position of the target object in the first image, and the shape, size and position of the filled object in the second image correspond to the shape, size and position of the target object in the first image. The filled object may be different from the target object, and the filled object is an object generated based on the first contour information.

[0026] Exemplarily, when the poster scene type is objects placed on a simple desktop, the generated second image is filled objects placed on a simple desktop.

[0027] Furthermore, since the background information of the second image in the present application is generated based on the poster scene type, the style of the background information of the second image is more diverse. For example, when the poster scene type is an object placed on a simple desktop, the generated second image may be a filled object placed on the left side of the simple desktop, the generated second image may be a filled object placed on the right side of the simple desktop, or the generated second image may be a filled object placed in the middle of the simple desktop, and the table in the generated second image may be in a flat form or in a three-dimensional form.

[0028] S160: Generate a first poster corresponding to the target object and the poster scene type by pasting the third image to the target area in the second image.

[0029] The third image is an image in the first image that corresponds to the target object and does not include background information, and the target area is a position area corresponding to the filling object. The third image is equivalent to an image obtained by cutting off the background part of the first image and retaining only the target object part.

[0030] In the present application, by pasting the third image to the target area of ​​the second image so that the target object covers the filling object in the second image, a first poster corresponding to the target object and the poster scene type is generated to ensure the effect of the generated poster.

[0031] Exemplarily, when the poster scene type is an object placed on a simple desktop, the generated first poster is a target object placed on a simple desktop.

[0032] The embodiment of the present application provides a poster generation method, by obtaining a poster scene type to be generated and a first image including a target object, based on the first image and the poster scene type, generating a second image including a fill object corresponding to the first outline information and background information generated based on the poster scene type, the first outline information being the outline information of the target object in the first image, and then by pasting a third image to a target area in the second image, generating a first poster corresponding to the target object and the poster scene type, the third image being an image in the first image corresponding to the target object and not including background information, and the target area being a location area corresponding to the fill object. Using the poster generation method of the present application, since the background information of the generated first poster is generated based on the poster scene type, the style of the generated first poster is more diverse, solving the problem of a relatively single style of the poster generated in the related art.

[0033] In an embodiment of the present application, generating a second image based on the first image and the poster scene type may include: determining a first binary image corresponding to the first image based on the first image, wherein the first binary image is used to represent contour information of the target object in the first image; and obtaining a second image output by the control model by inputting the first image, the poster scene type, and the first binary image into a control model, wherein the control model is used to generate a template image of a style corresponding to the input poster scene type.

[0034] Exemplarily, in the first binary image corresponding to the first image, the position corresponding to the target object is marked as 1, and the other positions are marked as 0, so as to represent the contour information of the target object in the first image.

[0035] The control model is used to generate an image corresponding to the input poster scene type, and the contour information of the filled object in the generated image is controlled to be consistent with the contour information of the target object in the first image. By inputting the first image, the poster scene type and the first binary image into the control model, the control model outputs a second image including the filled object corresponding to the contour information of the target object in the first image and the background information generated based on the poster scene type.

[0036] When the background of the first image is a background corresponding to the poster scene type, the second image output by the control model can be obtained more quickly by inputting the first image, the poster scene type and the first binary image into the control model.

[0037] The above-mentioned control model can be a Controlnet model corresponding to the base model. The base model can use an open source stable diffusion model (such as sdxl, etc.). Since the open source model is a general model capability and is trained based on an open source data set, the modeling capability for a specific field may be poor. Therefore, before use, it can generally be fine-tuned with data in the field to improve the use effect of the model in the field. Moreover, when the base model is updated, the Controlnet model corresponding to the base model is also fine-tuned based on the new base model.

[0038] In one implementation, the control model may be a model trained with a target style image, and the control model is used to generate an image corresponding to the target style image and the input poster scene type. Exemplarily, when a user needs an indoor-style poster, the user may input multiple (e.g., 10) images of goods indoors, and the control model is trained based on multiple images of goods indoors, so that the control model can generate an indoor-style template image corresponding to the input poster scene type, and better adapt to the style required by the user. For example, when the control model is a model trained with multiple images of goods indoors, and the poster scene type is items placed on a simple desktop, the second image output by the control model is a simple desktop with filler objects placed indoors.

[0039] In the case where the control model is a Controlnet model, when the Controlnet model is trained based on the target style image, specifically, a Lora model in the Controlnet model may be trained based on the target style image.

[0040] Since there may be some edge jaggedness or inconsistent background around the target object in the generated first poster, after generating the first poster corresponding to the target object and the poster scene type, it may also include: obtaining a second binary image by expanding the contour information in the first binary image to a first preset size; inputting the first poster, the second binary image and the poster scene type into a first target model, and adjusting the background of the first poster in a coordinated manner, to obtain a second poster output by the first target model with the adjusted background, wherein the first target model is used to adjust the background of the first poster in a coordinated manner, and the second poster is a poster obtained by adjusting the background of the first poster in a coordinated manner by the first target model, and the second poster also includes the target object and background information corresponding to the poster scene type.

[0041] That is to say, after generating the first poster, the inpaint technology is used to expand the contour information in the first binary image to a first preset size, expand its edges (for example, fill in the gaps), and obtain a second binary image. Then, the first poster, the second binary image, and the poster scene type are input into the first target model to repair the background inconsistency around the target object in the first poster, and the adjusted second poster is output to improve the exquisiteness of the generated poster corresponding to the target object and the poster scene type. It should be noted that the presence of jagged edges around the target object in the first poster can be considered as a type of background inconsistency around the target object in the first poster. In addition, the first preset size can be set according to actual needs, and the present application does not impose specific restrictions on this.

[0042] Exemplarily, the first target model may be a base model corresponding to the Controlnet model described above.

[0043] In a possible implementation, the poster generation method may further include: acquiring target information corresponding to the target object; adding the target information to a target poster in a preset form, wherein the target poster includes the first poster or the second poster to improve the authenticity of the poster.

[0044] In the present application, the target information corresponding to the target object may include the name, efficacy, and ingredients corresponding to the target object.

[0045] In one implementation, the target object in the target poster can be determined by image recognition, and the target information corresponding to the target object can be obtained. It should be noted that when obtaining the target information corresponding to the target object, it can be obtained based on a pre-set offline library or based on network information, and this application does not make specific restrictions on this.

[0046] In another implementation manner, target information corresponding to the target object may be acquired through user input.

[0047] After obtaining the target information corresponding to the target object, the target information is added to the target poster in a preset format according to the automatic text adding program. It should be noted that the preset format may include but is not limited to a preset font, a preset font size, a preset placement position and a preset layout.

[0048] In an embodiment of the present application, the poster generation method may further include: obtaining the second contour information of the target object in the target poster, wherein the target poster includes the first poster or the second poster; determining the degree of overlap between the second contour information and the first contour information; and deleting the target poster if the degree of overlap is less than a first threshold. That is, if the degree of overlap between the second contour information of the target object in the target poster and the first contour information of the target object in the first image is less than a first threshold, the target poster is deleted; if the degree of overlap between the second contour information of the target object in the target poster and the first contour information of the target object in the first image is greater than or equal to the first threshold, the target poster is retained to improve the quality of the generated poster.

[0049] It should be noted that the second contour information of the target object in the target poster can also be represented by a binary image corresponding to the target poster. In addition, the size of the first threshold can be set according to actual needs, and this application does not make any specific limitations on this.

[0050] In an embodiment of the present application, the above-mentioned poster generation method may further include: obtaining a first object number and a second object number, wherein the first object number is the number of objects in the first image, the second object number is the number of objects in a target poster, and the target poster includes the first poster or the second poster; when the difference between the second object number and the first object number is greater than a second threshold, it indicates that the background in the target poster is cluttered, and the target poster is deleted; when the difference between the second object number and the first object number is less than or equal to the second threshold, the target poster is retained to improve the aesthetics of the generated poster.

[0051] It should be noted that the number of objects in the first image can be obtained by performing instance segmentation on the first image, and the number of objects in the target poster can be obtained by performing instance segmentation on the target poster. In addition, the size of the second threshold can be set according to actual needs, and this application does not make specific limitations on this.

[0052] In an embodiment of the present application, the poster generation method may further include: obtaining the saturation of a target poster, the target poster including the first poster or the second poster; when the saturation of the target poster exceeds a preset range, deleting the target poster to filter out low-quality posters. Exemplarily, obtaining the saturation of the target poster may specifically be calculating the saturation mean of the HSV space of the target poster. It should be noted that the preset range may be set according to actual needs, and the present application does not specifically limit this.

[0053] In one implementation, when there are multiple second images, multiple first posters, and multiple second posters, the poster generation method may further include: by inputting each target poster into the second target model, obtaining the aesthetic score value corresponding to each target poster output by the second target model, wherein the target poster includes any first poster or any second poster, and the aesthetic score value represents the degree of recommendation of the target poster by the second target model; and selecting a preset number of target posters with the highest ranking from the multiple target posters in descending order of the aesthetic score value for display, so as to ensure that the displayed posters are posters with higher aesthetics. It should be noted that the preset number can be set according to actual needs, and this application does not make specific restrictions on this.

[0054] In an embodiment of the present application, obtaining the poster scene type to be generated may include: obtaining a poster scene description word; and obtaining the poster scene type to be generated corresponding to the poster scene description word by translating and polishing the poster scene description word.

[0055] In the present application, the poster scene description words obtained can be poster scene description words input by the user, or can be pre-set poster scene description words. Since the base model mentioned above currently supports English better, after obtaining the poster scene description words, they can be translated from the current language into English, and then the translated poster scene description words can be expanded and polished using language models such as chatgpt, so that the obtained poster scene type is more in line with the characteristics of the model described above, so as to improve the quality of the model-generated image. Of course, after obtaining the poster scene description words, the obtained poster scene description words can also be directly expanded and polished using language models such as chatgpt to obtain the poster scene type corresponding to the poster scene description words. For example, in the case where the poster scene description word is "cosmetics", the poster scene type obtained after polishing and expansion can be "cosmetics, real, ultra-clear, 4K, ultra-detailed".

[0056] In addition, expanding and polishing the acquired poster scene description words in the manner described above can lower the threshold for users to describe the poster scene.

[0057] In an embodiment of the present application, obtaining a first image including a target object may include: receiving an original image including the target object; obtaining a fourth image by segmenting the original image, wherein the fourth image is an image in the original image that corresponds to the target object and does not include background information; obtaining a fifth image by adjusting the fourth image to a second preset size; and obtaining the first image by pasting the fifth image to a target template.

[0058] In the present application, the original image including the target object can be a photo with a clean and simple background uploaded by the user. After receiving the original image, the meta-information of the original image can be parsed to obtain information such as the width, height and size of the original image, and then the super-resolution model is used to improve the clarity of the original image. By segmenting the original image, the interference of background noise in the original image is removed to obtain a fourth image in the original image that corresponds to the target object and does not include background information. Then, by adjusting the fourth image to a second preset size, a fifth image is obtained. By pasting the fifth image to the target template, the first image is obtained, so as to facilitate the subsequent better generation of posters.

[0059] It should be noted that the target template may be a template initially generated based on the poster scene type, or may be a preset template (eg, a pure white template), and the pasting position of the fifth image in the target template may also be preset.

[0060] In addition, the models described above are all trained using existing training methods, and this application will not go into details here.

[0061] like Figure 2 As shown, the poster generation method of the present application includes a user interaction stage, a poster generation stage, and a poster screening stage. In the user interaction stage, the user inputs the poster scene description words and the original image. In the poster generation stage, by parsing the image information of the original image and performing image processing, a first image and a first binary image corresponding to the first image are obtained, and by translating and polishing the poster scene description words, a poster scene type to be generated corresponding to the poster scene description words is obtained. Based on the first image, the poster scene type and the first binary image, a second poster is generated, and then the target information is added to the second poster. In the poster screening stage, screening can be performed based on the degree of overlap between the second contour information of the target object in the generated poster and the first contour information of the target object in the first image, or based on the difference between the number of objects in the generated poster and the number of objects in the first image, or based on the saturation of the generated poster. It should be noted that the specific implementation of the generation of the first image, the specific implementation of the generation of the poster scene type, the specific implementation of the generation of the second poster, and the specific implementation of the addition of the target information are all consistent with the above, and the present application will not repeat them here. In addition, Figure 2 The customized control model in is the control model trained by the target style image mentioned above.

[0062] like Figure 3 As shown, Figure 2The poster generation stage in includes a preprocessing stage, a text-generated image stage, a picture-generated image stage, and a text-adding stage. In the preprocessing stage, by translating and polishing the poster scene description words, the poster scene type to be generated corresponding to the poster scene description words is obtained, and by parsing the image information of the original image and performing image processing, a first image and a first binary image corresponding to the first image are obtained. In the text-generated image stage, a first poster is generated based on the first image, the poster scene type, and the first binary image. In the picture-generated image stage, the contour information in the first binary image is expanded to a first preset size to obtain a second binary image, and then the first poster, the second binary image, and the poster scene type are input into the first target model, and the background of the first poster is coordinated and adjusted to obtain the second poster after the background adjustment output by the first target model. In the text-adding stage, target information is added to the second poster. It should be noted that the specific implementation of the generation of the first image, the specific implementation of the generation of the poster scene type, the specific implementation of the generation of the first poster, the specific implementation of the generation of the second poster, and the specific implementation of the addition of the target information are all consistent with the above, and this application will not repeat them here.

[0063] The poster generation method provided in the embodiment of the present application can be executed by a poster generation device. In the embodiment of the present application, the poster generation device executing the poster generation method is taken as an example to illustrate the poster generation device provided in the embodiment of the present application.

[0064] Figure 4 Schematic diagram of the structure of a poster generating device disclosed in an embodiment of the present application. Figure 4 As shown, the poster generating device 400 includes: an acquisition module 410 , a first generating module 420 and a second generating module 430 .

[0065] In the present application, an acquisition module 410 is used to acquire a poster scene type to be generated and a first image including a target object; a first generation module 420 is used to generate a second image based on the first image and the poster scene type, wherein the second image includes a filling object corresponding to the first contour information, and background information generated based on the poster scene type, and the first contour information is the contour information of the target object in the first image; a second generation module 430 is used to generate a first poster corresponding to the target object and the poster scene type by pasting a third image into a target area in the second image, wherein the third image is an image in the first image corresponding to the target object and not including background information, and the target area is a position area corresponding to the filling object.

[0066] In one implementation, the first generation module 420 generates a second image based on the first image and the poster scene type, including: determining a first binary image corresponding to the first image based on the first image, wherein the first binary image is used to represent contour information of the target object in the first image; and obtaining a second image output by the control model by inputting the first image, the poster scene type, and the first binary image into a control model, wherein the control model is used to generate a template image of a style corresponding to the input poster scene type.

[0067] In one implementation, the control model is a model obtained by training a target style image, and the control model is used to generate a template image of a style corresponding to the target style image and an input poster scene type.

[0068] In one implementation, the above-mentioned device also includes: a first obtaining module, which is used to obtain a second binary image by expanding the contour information in the first binary image to a first preset size after generating a first poster corresponding to the target object and the poster scene type; the first obtaining module is also used to input the first poster, the second binary image and the poster scene type into a first target model to coordinately adjust the background of the first poster, so as to obtain a second poster with the background adjusted output by the first target model.

[0069] In one implementation, the above-mentioned device also includes: the acquisition module 410, which is also used to obtain target information corresponding to the target object; and an adding module, which is used to add the target information to a target poster in a preset form, wherein the target poster includes the first poster or the second poster.

[0070] In one implementation, the above-mentioned device also includes: the acquisition module 410, which is also used to obtain the second contour information of the target object in the target poster, wherein the target poster includes the first poster or the second poster; a determination module, which is used to determine the overlap between the second contour information and the first contour information; and a first deletion module, which is used to delete the target poster when the overlap is less than a first threshold.

[0071] In one implementation, the above-mentioned device also includes: the acquisition module 410, which is also used to obtain the first object number and the second object number, wherein the first object number is the number of objects in the first image, and the second object number is the number of objects in the target poster, and the target poster includes the first poster or the second poster; a second deletion module, which is used to delete the target poster when the difference between the second object number and the first object number is greater than a second threshold.

[0072] In one implementation, when there are multiple second images, there are multiple first posters, and there are multiple second posters, the above-mentioned device also includes: a second obtaining module, used to obtain the aesthetic score value corresponding to each target poster output by the second target model by inputting each target poster into a second target model, wherein the target poster includes any first poster or any second poster, and the aesthetic score value represents the degree of recommendation of the target poster by the second target model; a display module, used to select a preset number of target posters with the top ranking from multiple target posters for display in order of the aesthetic score value from large to small.

[0073] In one implementation, the acquisition module 410 acquires the poster scene type to be generated, including: acquiring a poster scene description word; and translating and polishing the poster scene description word to obtain the poster scene type to be generated corresponding to the poster scene description word.

[0074] In one implementation, the acquisition module 410 acquires a first image including a target object, including: receiving an original image including the target object; obtaining a fourth image by segmenting the original image, wherein the fourth image is an image in the original image corresponding to the target object and excluding background information; obtaining a fifth image by adjusting the fourth image to a second preset size; and obtaining the first image by pasting the fifth image to a target template.

[0075] The poster generating device in the embodiment of the present application may be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or other devices other than a terminal.

[0076] The poster generation device provided in the embodiment of the present application can implement each process implemented in the poster generation method embodiment, and will not be described again here to avoid repetition.

[0077] Alternatively, if Figure 5 As shown, an embodiment of the present application further provides an electronic device 500, including a processor 501 and a memory 502, wherein the memory 502 stores programs or instructions that can be executed on the processor 501, and when the program or instructions are executed by the processor 501, the various steps of the above-mentioned poster generation method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.

[0078] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0079] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned poster generation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0080] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0081] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned poster generation method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0082] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0083] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned poster generation method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0084] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0085] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0086] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A poster generation method, characterized in that: include: Acquire a poster scene type to be generated and a first image including a target object; generating a second image based on the first image and the poster scene type, wherein the second image includes a filling object corresponding to the first contour information and background information generated based on the poster scene type, and the first contour information is contour information of the target object in the first image; A first poster corresponding to the target object and the poster scene type is generated by pasting a third image into a target area in the second image, wherein the third image is an image in the first image corresponding to the target object and does not include background information, and the target area is a position area corresponding to the fill object.

2. The method according to claim 1, characterized in that The generating a second image based on the first image and the poster scene type includes: Based on the first image, determining a first binary image corresponding to the first image, wherein the first binary image is used to represent contour information of the target object in the first image; By inputting the first image, the poster scene type and the first binary image into a control model, a second image output by the control model is obtained, wherein the control model is used to generate a template image of a style corresponding to the input poster scene type.

3. The method according to claim 2, characterized in that After generating the first poster corresponding to the target object and the poster scene type, the method further includes: A second binary image is obtained by expanding the contour information in the first binary image to a first preset size; By inputting the first poster, the second binary image and the poster scene type into a first target model, a background adjustment is performed on the first poster to obtain a second poster with the background adjusted, which is output by the first target model.

4. The method according to any one of claims 1 to 3, characterized in that: Also includes: Acquiring target information corresponding to the target object; The target information is added to a target poster in a preset form, wherein the target poster includes the first poster or the second poster.

5. The method according to any one of claims 1 to 3, characterized in that: Also includes: Acquire second outline information of the target object in a target poster, wherein the target poster includes the first poster or the second poster; determining a degree of overlap between the second profile information and the first profile information; When the overlap degree is less than a first threshold, the target poster is deleted.

6. The method according to any one of claims 1 to 3, characterized in that: Also includes: Acquire a first object number and a second object number, wherein the first object number is the number of objects in the first image, and the second object number is the number of objects in a target poster, and the target poster includes the first poster or the second poster; When the difference between the second number of objects and the first number of objects is greater than a second threshold, the target poster is deleted.

7. The method according to any one of claims 1 to 3, characterized in that: In the case where there are multiple second images, there are multiple first posters, and there are multiple second posters, the further comprising: By inputting each target poster into the second target model, obtaining an aesthetic score value corresponding to each target poster output by the second target model, wherein the target poster includes any first poster or any second poster, and the aesthetic score value represents the degree of recommendation of the target poster by the second target model; In descending order of aesthetic score values, a preset number of target posters with the highest rankings are selected from multiple target posters for display.

8. The method according to claim 1, characterized in that Get the poster scene type to be generated, including: Get the poster scene description words; By translating and polishing the poster scene description words, a poster scene type to be generated corresponding to the poster scene description words is obtained.

9. The method according to claim 1, characterized in that: Acquiring a first image including a target object comprises: Receiving an original image including a target object; By segmenting the original image, a fourth image is obtained, wherein the fourth image is an image in the original image corresponding to the target object and excluding background information; Obtaining a fifth image by adjusting the fourth image to a second preset size; The first image is obtained by pasting the fifth image to the target template.

10. A poster generating device, characterized in that: include: An acquisition module, used for acquiring a poster scene type to be generated and a first image including a target object; A first generating module, configured to generate a second image based on the first image and the poster scene type, wherein the second image includes a filling object corresponding to the first contour information and background information generated based on the poster scene type, and the first contour information is contour information of the target object in the first image; The second generating module is used to generate a first poster corresponding to the target object and the poster scene type by pasting a third image into the target area in the second image, wherein the third image is an image in the first image corresponding to the target object and does not include background information, and the target area is a position area corresponding to the fill object.