Poster generation method and device, equipment, storage medium and computer program product
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies in large-screen media asset business scenarios suffer from low poster generation quality and efficiency, failing to meet the needs for flexibility and adaptability. In particular, they face difficulties in the precise segmentation of copyrighted artistic titles and do not support batch production and fine-tuning of sizes.
By combining AI with human interaction, the system extracts images of the main characters and artistic title words from the original poster images. It then uses text detection and image segmentation models to perform background repair and expansion, and synthesizes the target poster in response to user layout instructions.
It achieves high-quality and efficient poster generation, improves the flexibility and adaptability of poster generation, supports batch production of posters of different sizes, and meets the needs of large-screen media asset operation.
Smart Images

Figure CN121788652A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a poster generation method, apparatus, device, storage medium, and computer program product. Background Technology
[0002] Currently, AI-generated smart poster technology mainly uses deep learning algorithms to quickly generate poster designs that meet user requirements based on information such as keywords, themes, or images. It is primarily used in marketing, event promotion, e-commerce product display, and social media promotion.
[0003] In large-screen media asset operations, the EPG (Electronic Program Guide) interface offers different operational plans based on time and location, requiring posters for the same media asset to have different themes and sizes. The text-to-image and image-to-image methods mentioned above cannot meet the needs of business scenarios with clearly defined operational content. Their service objectives require high levels of prior material preparation, and the posters they provide have limited flexibility and adaptability, also failing to support the need for batch production and fine-tuning. Therefore, how to accurately and efficiently generate operational posters for large-screen media asset business scenarios has become an urgent problem to be solved. Summary of the Invention
[0004] This application provides a poster generation method, apparatus, device, storage medium, and computer program product to address the shortcomings of low quality and efficiency in the generation of operational posters for large-screen media asset business scenarios in the prior art, and to improve the quality and efficiency of poster generation through a combination of AI and human interaction.
[0005] This application provides a poster generation method, including the following steps: The main character image and the artistic title image are extracted from the original poster image; the artistic title image is extracted using a text detection model and an image segmentation model. The original poster image is subjected to background restoration and expansion processing to generate a background image that conforms to the first target size; In response to the user's layout operation command for the main character image and the artistic title image, the main character image and the artistic title image are combined with the background image to generate the target poster.
[0006] According to a poster generation method provided in this application, the artistic font title image is extracted based on the following method: Using the text detection model, the coarse localization region of the artistic title in the original poster image is determined; Based on the coarse localization region, the image segmentation model is used to segment the artistic title to obtain the artistic title image.
[0007] According to the poster generation method provided in this application, the step of determining the coarse localization region of the artistic title in the original poster image using the text detection model includes: The original poster image is input into the text detection model to obtain the polygonal outline of the artistic title output by the text detection model; The polygonal outline is converted into the bounding rectangle of the artistic title, and the bounding rectangle is used as the coarse positioning area.
[0008] According to a poster generation method provided in this application, the step of segmenting the artistic title using the image segmentation model based on the coarse positioning region to obtain the artistic title image includes: Using the coarse localization region as input to the image segmentation model, the image segmentation model is used to perform local segmentation of the artistic title within the outer rectangle to obtain the image segmentation result; The image segmentation results are subjected to erosion and dilation operations to generate a Trimap image; The Trimap image is processed to extract an artistic title area with detailed edges; Based on the artistic title area, the artistic title image is extracted from the original poster image.
[0009] According to the poster generation method provided in this application, the image segmentation model is trained based on the following method: Construct a title image dataset based on media asset poster title images and media asset still images; The initial image segmentation model was trained using the aforementioned title image dataset to obtain an image segmentation model for pixel-level extraction of media asset poster titles.
[0010] According to the poster generation method provided in this application, the poster generation method further includes: In response to the batch generation command for posters, obtain the set of target sizes; The original poster image or the target poster is input into the subject recognition model to obtain the visual subject region in the original poster image or the target poster output by the subject recognition model; the visual subject region is the region used to identify the main character image and / or the artistic title image; Calculate the cropping frame that matches the visual subject area based on the aspect ratio of each second target size in the target size set; The original poster image or the target poster is cropped according to each of the cropping frames to generate a cropped poster that conforms to the second target size.
[0011] According to a poster generation method provided in this application, the subject recognition model is trained based on the following method: A training dataset is constructed based on poster images and their visual subject region labels; the visual subject region labels include the main character region label and the artistic title region label. The subject recognition model is obtained by training the specified neural network model using the training dataset.
[0012] This application also provides a poster generating device, including the following modules: The extraction module is used to extract the main character image and the artistic title image from the original poster image; the artistic title image is extracted using a text detection model and an image segmentation model. The background processing module is used to perform background repair and expansion processing on the original poster image to generate a background image that conforms to the first target size; The poster generation module is used to respond to the user's layout operation instructions on the main character image and the artistic title image, and to synthesize the main character image and the artistic title image with the background image to generate the target poster.
[0013] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the poster generation methods described above.
[0014] This application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the poster generation method as described above.
[0015] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the poster generation method as described above.
[0016] The poster generation method, apparatus, device, storage medium, and computer program product provided in this application extract the main character image and the artistic title image from the original poster image; the artistic title image is extracted using a text detection model and an image segmentation model; the original poster image undergoes background restoration and expansion processing to generate a background image conforming to a first target size; in response to user instructions on the layout of the main character image and the artistic title image, the main character image and the artistic title image are synthesized with the background image to generate the target poster. Based on the original poster image, this application, through front-end page interaction, utilizes an image segmentation model to achieve pixel-level extraction of the artistic title and the main character, and uses image restoration and expansion algorithms to redraw and recreate a new-sized background image. Simultaneously, through an interactive interface, the artistic title and the main character are rationally arranged with the background image to synthesize a new film and television poster. This combination of AI and human interaction improves the quality and efficiency of poster generation. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating the poster generation method provided in this application.
[0019] Figure 2 This is a flowchart illustrating the AI-based interactive movie poster generation method provided in this application.
[0020] Figure 3 This is a schematic diagram of the poster generation device provided in this application.
[0021] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] In related technologies, the application of poster generation for large-screen media asset business scenarios is still immature, especially in the accurate segmentation of copyrighted artistic titles, which is prone to incomplete and inaccurate segmentation. There is a lack of high-quality automatic poster generation systems that can assist large-screen operators. Based on this, this application proposes a poster generation method, specifically an AI-based interactive method for generating film and television posters.
[0024] The following is combined Figures 1-4 This application describes the poster generation method, apparatus, device, storage medium, and computer program product.
[0025] Figure 1 This is a flowchart illustrating the poster generation method provided in this application, such as... Figure 1 As shown, the method includes the following: Step 101: Extract the main character image and the artistic title image from the original poster image.
[0026] It should be understood that the main character refers to one or more figures that occupy a central position, have a significant size, and serve as the main visual focus in the visual composition of the poster image. Artistic title refers to a combination of text that has undergone graphic design and serves to convey core information; its visual form is significantly different from standard typeface text.
[0027] Obtain the original poster image. For example, based on the media asset name, search and download from a pre-built media asset poster library. This library is a relational database that contains at least a media asset name primary key and a poster image storage path field. If the search fails or the obtained image quality does not meet the preset requirements, a web crawler is launched to retrieve the original poster image from a specified film and television media asset information website. If the above methods fail to obtain a qualified image, the video file of the media asset is obtained. Frames are extracted from the video file, and based on image quality assessment and human salience detection algorithms, keyframes with prominent main characters and clear images are automatically selected from the frame sequence as alternative poster materials for subsequent processing.
[0028] The original poster image is input into an entity segmentation model, which extracts the main character image from the original poster image. For example, before inputting the original poster image into the model, a saliency detection model (such as U2-Net) is used to generate a saliency map of the image. Background pixels below a threshold in the saliency map are set to mean gray or subjected to Gaussian blurring to create a background-weakened version of the image, which is then input into the entity segmentation model. The image passes through the entity segmentation model, which outputs one or more instance segmentation masks, where each detected character entity corresponds to a binary pixel matrix (foreground 1, background 0). A character scoring mechanism is established, calculating the following for each detected character instance: the average score of the region containing the character instance in the original saliency map; the distance between the bounding box center of the character instance and the image center (closer distance, higher score); and the pixel area of the character instance (larger area, higher score). These three scores are weighted and summed, and the character instance mask with the highest total score is selected as the final alpha channel or binary mask for the main character image.
[0029] Optionally, morphological closing operations can be applied to the final selected protagonist mask to fill the small holes, and Gaussian filtering or bilateral filtering can be used to smooth the mask edges to obtain more natural and accurate segmentation boundaries.
[0030] Alternatively, the entity segmentation model can adopt the SegFormer or Mask2Former architecture, which utilizes global context understanding and Transformer attention mechanism to accurately distinguish between the main character and regions of similar color in the background.
[0031] Artistic title images are extracted from original poster images using text detection and image segmentation models. For example, an image element extraction algorithm framework is constructed using the SRFormer detection model and the BiRe-FNet image segmentation model. First, the SRFormer detection model is used to calculate the font region trimap for coarse localization. Then, the BiRe-FNet image segmentation model is used to segment the trimap into pixels to obtain the artistic title image, thereby improving the accuracy of small object segmentation in the image.
[0032] Step 102: Perform background repair and expansion processing on the original poster image to generate a background image that conforms to the first target size.
[0033] It should be understood that background restoration refers to the process of using image processing algorithms to intelligently fill the blank areas left by removing foreground elements (such as people or artistic titles) based on the known background area pixels in the original poster image, thereby generating a visually complete, coherent, and flawless background layer.
[0034] It should be understood that background expansion refers to the process of intelligently extending the canvas outward based on the content and semantics of the edges of the original background image when the target canvas size does not match the original background image size, thereby generating a new image area and adapting the entire background image to the target size.
[0035] It should be understood that the first target size refers to the specific width and height values (usually in pixels) or aspect ratio of the poster image required in the final operational release scenario.
[0036] Specifically, based on the extracted visual elements, background restoration is performed on the corresponding blank areas in the original poster image to obtain a complete initial background image. For example, using an image restoration model, the pixel information around the blank area is used as a reference to generate filling content that is visually consistent with the surrounding background. Simultaneously, the initial background image is intelligently expanded according to a first target size to generate a background image that conforms to the first target size. For example, the texture, color, and structural features of the edge areas of the initial background image are analyzed, and based on the analyzed features, a visually coherent and natural expanded area is generated along the canvas expansion direction.
[0037] Step 103: In response to the user's layout operation command for the main character image and the artistic title image, the main character image and the artistic title image are combined with the background image to generate the target poster.
[0038] It should be understood that layout operation commands refer to a set of operation commands issued by the user through the human-computer interaction interface to control and adjust the position, size, angle, and hierarchical relationship of visual elements (such as the main character image and artistic title image) on the canvas (i.e., the background image). These commands are captured and interpreted by the system in real time, ultimately driving the rendering engine to synthesize the target poster. Among them, layout operation commands can include translation commands, scaling commands, rotation commands, and hierarchy commands, etc.
[0039] It should be understood that a target poster refers to the final image file that is generated and meets specific operational needs.
[0040] The interactive interface provides a main character image layer, an artistic title image layer, and a background image layer. In response to user operations such as dragging, scaling, and rotating the main character image layer and the artistic title image layer, the preview effect of these layers on the background image is updated in real time. When a user confirmation command is received, the current position, scaling ratio, and rotation angle information of each layer are merged and rendered with the background image to generate the final target poster.
[0041] Optionally, the blending rendering can employ alpha blending technology, which combines the pixels of each foreground image layer with the pixels of the background image based on the transparency channel of each foreground image layer.
[0042] Optionally, the interactive interface may also provide auxiliary layout tools, which include at least one of the following: intelligent guides, used to automatically snap to the alignment lines of the canvas center, edge or other elements when dragging elements; layout templates, which provide a variety of preset composition styles, and after the user selects, the main character image and the artistic title image are automatically adapted to the predetermined position in the template.
[0043] Optionally, after generating the final target poster, it is also possible to check whether the artistic title image is fully contained within the canvas without unacceptable cropping, and whether the core part of the main character image is located in a prominent area of the canvas. If the check fails, a prompt message is sent to the user.
[0044] The poster generation method provided in this application extracts the main character image and the artistic title image from the original poster image. The artistic title image is extracted using a text detection model and an image segmentation model. The original poster image undergoes background restoration and expansion processing to generate a background image that conforms to a first target size. Responding to user commands for layout operations on the main character image and the artistic title image, the main character image and the artistic title image are synthesized with the background image to generate the target poster. Based on the original poster image, this application utilizes a front-end page interaction, employing an image segmentation model to achieve pixel-level extraction of the artistic title and the main character, and using image restoration and expansion algorithms to redraw and recreate a new-sized background image. Simultaneously, the interactive interface allows for the reasonable arrangement of the artistic title, the main character, and the background image, synthesizing a new film / TV poster. This combination of AI and human interaction improves the quality and efficiency of poster generation.
[0045] Based on the above embodiments, the artistic font title image is extracted in the following way: Using the text detection model, the coarse localization region of the artistic title in the original poster image is determined; Based on the coarse localization region, the image segmentation model is used to segment the artistic title to obtain the artistic title image.
[0046] It should be understood that the text detection model can be the SRFormer model based on the Swin Transformer architecture. Its built-in self-attention mechanism can effectively model the long-distance dependencies between strokes within the artistic font title and between the title and the poster background. This feature makes it suitable for detecting artistic font titles with complex backgrounds and irregular font shapes, because it can understand and locate the overall structure of the text from a global perspective, rather than relying solely on local features, thereby significantly improving the accuracy and robustness of coarse localization.
[0047] Using a text detection model, the coarse localization region of the artistic title in the original poster image is determined. It should be understood that the coarse localization region refers to one or more geometric regions in the image coordinate system used to identify and approximately surround the candidate artistic title. For example, the short side of the original poster image is scaled to a fixed size, the long side is scaled proportionally, and the pixel values are normalized. The preprocessed image is then input into the text detection model, which outputs a series of polygonal representations of text regions (usually composed of a set of coordinate points), each polygon corresponding to a detected text instance. Based on the polygonal representations output by the text detection model, the coarse localization region of the artistic title is determined.
[0048] It should be understood that the image segmentation model can be the BiRe-FNet model, which features a unique dual-branch architecture and bidirectional fusion mechanism. This allows it to simultaneously preserve the fine edge details of the artistic lettering strokes (through the detail branch) and effectively suppress interference from complex backgrounds using global contextual information (through the semantic branch). This characteristic makes it suitable for high-fidelity separation of artistic lettering titles with transparent backgrounds and precise outlines from complex visual materials such as movie posters, while also meeting the efficiency requirements of practical applications.
[0049] Based on the coarse localization region, an image segmentation model is used to segment the artistic title image, resulting in the artistic title image. For example, an image patch is cropped from the original image based on the coarse localization region. This patch is then scaled to the model input size and normalized before preprocessing. This reduces the processing scope from the entire poster to a specific region, significantly reducing computation and eliminating interference from irrelevant backgrounds. The preprocessed image patch is then input into the image segmentation model. The probability map output by the model is binarized, and the resulting binary mask undergoes post-processing operations including morphological closing and edge smoothing. The artistic title image is then determined based on the processed mask.
[0050] This application's embodiments achieve an optimal balance between efficiency and accuracy by constructing a two-stage cascaded processing flow of coarse localization and fine segmentation. The text detection model first quickly scans the entire image to lock onto candidate regions for the artistic title, effectively avoiding the computational overhead of directly segmenting the entire image at the pixel level, thus significantly improving processing speed. Then, the image segmentation model only needs to perform fine processing on the local regions after coarse localization, which not only concentrates computational resources but also greatly eliminates the interference of complex backgrounds in the entire image. As a result, while ensuring high-fidelity preservation of the details of the artistic strokes and complex contours, a final output image with a clean background and accurate edges is obtained.
[0051] Based on the above embodiments, determining the coarse localization region of the artistic title in the original poster image using the text detection model includes: The original poster image is input into the text detection model to obtain the polygonal outline of the artistic title output by the text detection model; The polygonal outline is converted into the bounding rectangle of the artistic title, and the bounding rectangle is used as the coarse positioning area.
[0052] The original poster image undergoes preprocessing, such as format standardization, size adaptation, and pixel normalization. The preprocessed image is then input into the SRFormer backbone network to extract multi-scale feature maps, including low-resolution feature maps to capture global semantic information and high-resolution feature maps to capture local details and locate key vertices such as edges and corners of the artistic text. The SRFormer decoder refines the feature maps progressively through self-attention and cross-attention mechanisms. Specifically, in the first stage, a coarse segmentation mask for the text region is generated, marking areas that may be text and excluding non-text areas such as backgrounds and figures. In the second stage, based on the segmentation mask, the polygon vertex coordinates of the text region are regressed. Furthermore, polygons with confidence levels below a set value are removed, retaining high-confidence artistic text regions; alternatively, polygons with excessively small areas are removed to avoid misinterpreting small annotations and decorative symbols on the poster as artistic text titles.
[0053] Irregular polygons are transformed into regular bounding rectangles (i.e., coarse localization regions) to simplify the processing range of subsequent image segmentation models, while ensuring that the rectangles completely cover the artistic text area. For example, after smoothing and simplifying the polygon outlines in preprocessing, its bounding rectangle is calculated. When calculating the bounding rectangle, the minimum horizontal bounding rectangle or the minimum area rotated rectangle is adaptively selected based on the polygon's tilt. Specifically, an axis-aligned minimum bounding rectangle can be used, meaning the rectangle's sides are parallel to the horizontal / vertical axis of the image, completely enclose the polygon, and have the smallest area (avoiding the inclusion of too much irrelevant background).
[0054] Optionally, after obtaining the circumscribed rectangle, the boundary of the circumscribed rectangle is extended outward by a predetermined offset, and the extended rectangle boundary is truncated within the valid boundary of the original poster image.
[0055] Optionally, if the WordArt title consists of multiple discrete characters, the model may output multiple independent polygons. Therefore, it is necessary to calculate the minimum bounding rectangle of all polygons and generate a merged bounding rectangle that includes all characters (to avoid splitting the same title into multiple coarse positioning regions).
[0056] Optionally, if the polygon's edge extends beyond the original poster boundary (e.g., the artistic text is at the poster edge), the x-coordinate of the left edge and the y-coordinate of the top edge of the circumscribed rectangle can be restricted to ≥0, the x-coordinate of the right edge can be restricted to ≤ the original image width, and the y-coordinate of the bottom edge can be restricted to ≤ the original image height (to avoid the rectangle's coordinates going out of bounds).
[0057] This application's embodiments employ a two-step conversion strategy from polygonal outlines to bounding rectangles, achieving both high accuracy and practicality. First, the pixel-level polygonal outlines output by the text detection model ensure tight and accurate initial positioning for artistic text titles of any shape and orientation. Then, the complex polygons are transformed into regular bounding rectangles, greatly simplifying subsequent image cropping, alignment, and segmentation model processing, improving the overall system's processing efficiency and engineering feasibility. While maintaining detection accuracy, the stability and processing efficiency of the process are optimized.
[0058] Based on the above embodiments, the step of segmenting the artistic font title using the image segmentation model according to the coarse positioning region to obtain the artistic font title image includes: Using the coarse localization region as input to the image segmentation model, the image segmentation model is used to perform local segmentation of the artistic title within the outer rectangle to obtain the image segmentation result; The image segmentation results are subjected to erosion and dilation operations to generate a Trimap image; The Trimap image is processed to extract an artistic title area with detailed edges; Based on the artistic title area, the artistic title image is extracted from the original poster image.
[0059] Based on the bounding rectangle coordinates output by SRFormer, the ROI (Region of Interest) is cropped from the original poster image. If the cropping coordinates exceed the original image range, the cropping is performed according to the previously limited valid coordinates. Then, using the bi-branch architecture of BiRe-FNet, pixel-level segmentation of the ROI is performed to initially distinguish the foreground and background of the artistic text, providing a foundation for subsequent Trimap generation. Specifically, the detail branch and semantic branch of BiRe-FNet work together. The detail branch (high-resolution features) focuses on the stroke edges, corners, and gradient areas of the artistic text (such as the flying white strokes in calligraphy and the three-dimensional shadow edges of the artistic text), extracting local texture features through a shallow CNN (Convolutional Neural Network) to preserve pixel-level details. The semantic branch (low-resolution features) captures the global context (such as the semantic differences between the artistic text and the surrounding background) through a deep CNN+Transformer, suppressing interference from complex backgrounds (such as figures and patterns). At the same time, a bi-directional fusion mechanism fuses detail features and semantic features through cross-branch attention modules (such as feature concatenation + convolution), outputting a refined initial segmentation mask (i.e., the image segmentation result). Furthermore, the initial segmentation mask is binarized. For example, regions with pixel values ≥ 0.5 in the mask are marked as foreground candidate regions, and regions with pixel values < 0.5 in the mask are marked as background candidate regions, resulting in a binarized mask (distinguishing between the initial foreground and background). At the same time, connected regions with an area smaller than a set number of pixels in the binarized mask are removed (filtering out noise, such as isolated bright spots in the background).
[0060] A trimap is a three-region image (ternary grayscale image), a special type of image mask that explicitly divides the pixels in an image into three non-overlapping regions (defined foreground, defined background, and unknown region). It should be understood that the initial segmentation mask output by an image segmentation model forces mixed pixels to be classified as foreground or background, resulting in jagged edges, white borders, or loss of detail in the final extracted image. Introducing a trimap allows difficult-to-determine boundary regions to be marked as unknown, guiding subsequent matting algorithms to focus all computational resources on analyzing and calculating the precise transparency of each pixel within the unknown region, rather than wasting computational resources on defined foreground and background regions.
[0061] By performing morphological operations (such as erosion and dilation) in a specific order and with specific parameters, the initial segmentation mask is subjected to uncertain expansion of the boundary region, generating a Trimap image containing a defined foreground, a defined background, and an unknown region. For example, performing an erosion operation on the initial segmentation mask identifies the eroded region as the defined background region in the Trimap image; performing a dilation operation on the initial segmentation mask identifies the portion between the newly added region after the dilation operation and the defined background region as the unknown transition region in the Trimap image; and identifying the original segmentation mask region unaffected by erosion and dilation operations as the defined foreground region in the Trimap image. Optionally, the structuring element shape used during erosion and dilation operations can be circular, rectangular, or elliptical. Furthermore, structuring elements with the same pixel radius can be used for both erosion and dilation operations.
[0062] It should be understood that the purpose of the dilation operation is to expand the boundaries of the initial segmentation mask outward to cover a mixed area that may contain part of the foreground (such as semi-transparent edges or hair strands) and part of the background. For example, a structuring element of suitable size and shape is selected and slid across the initial segmentation mask. For each pixel corresponding to the center of the structuring element, if at least one pixel within the area covered by the structuring element belongs to the foreground (value 1), then that center pixel is set to 1 in the output. After the dilation operation, the foreground area becomes larger, and the boundaries expand outward.
[0063] It should be understood that the purpose of the erosion operation is to shrink the boundaries of the initial segmentation mask inward to identify the core regions belonging to the foreground. For example, using the same or similar structuring element as the dilation operation, the structuring element is slid across the initial segmentation mask. For each pixel corresponding to the center of the structuring element, the center pixel is only set to 1 in the output if the entire area covered by the structuring element belongs to the foreground (all values are 1). After the erosion operation, the foreground region becomes smaller, and the boundaries shrink inward.
[0064] The Trimap image is processed to obtain an artistic title region with detailed edges. For example, the original poster image and the corresponding Trimap image are input into the image matting algorithm. The image matting algorithm estimates the transparency value of each pixel in the unknown transition area of the Trimap image as belonging to the foreground. Based on the transparency values of all pixels, the final artistic title mask (i.e., artistic title region) with detailed edges is generated.
[0065] Alternatively, the image matting algorithm can be a data-driven matting algorithm based on deep learning, such as a neural network with an encoder-decoder structure, a matting network using an attention mechanism, or a matting network based on guided filtering.
[0066] Based on the artistic title area, extract the artistic title image from the original poster image. For example, using the artistic title area as the alphanumeric channel, it is composited with the corresponding color channels of the original poster image to generate a transparent background image file as the artistic title image. Specifically, if the artistic title area is a binary mask, where the first value represents the foreground and the second value represents the background, the extraction process is as follows: retain the original poster image color value corresponding to the pixel with the first value in the binary mask, and set the color value corresponding to the pixel with the second value to be completely transparent. If the artistic title area is an alphanumeric channel, where the value of each pixel represents its opacity, the extraction process is as follows: combine the alphanumeric channel with the RGB color channels of the original poster image to form a background transparent image containing four channels: RGBA.
[0067] Optionally, after generating the WordArt title image, the method further includes the step of anti-aliasing the edges of the WordArt title image to smooth the jagged edges generated by pixel-level segmentation.
[0068] This invention employs a cascaded processing flow of coarse localization, local segmentation, Trimap generation, and fine matting to decompose a single image segmentation task into multiple complementary steps, combining the efficiency of global segmentation with the accuracy of local matting. First, by performing local segmentation within the bounding rectangle, the accuracy of segmenting small targets (artistic text) is significantly improved while reducing computational load. Then, by generating and processing the Trimap image, the problem of edge details, which is difficult to segment directly, is transformed into a more easily solved transparency estimation problem. This achieves fully automated and efficient processing while ensuring extremely high edge detail quality, ultimately enabling high-precision and high-efficiency extraction of complex artistic text titles.
[0069] Based on the above embodiments, the image segmentation model is trained in the following manner: Construct a title image dataset based on media asset poster title images and media asset still images; The initial image segmentation model was trained using the aforementioned title image dataset to obtain an image segmentation model for pixel-level extraction of media asset poster titles.
[0070] The title logo image from the media asset poster is acquired to form the first image subset. For example, the image area containing the complete artistic title is extracted from the original media asset poster to form an initial image set. The initial image set is then filtered to remove images that do not meet the preset quality standards, thus forming the first image subset. Images that do not meet the preset quality standards may include low-resolution images with a resolution below a set threshold, images with incomplete artistic titles or obvious occlusion, and images where the contrast between the background and the artistic title colors is below a set threshold.
[0071] Images from media asset stills are acquired to form a second image subset. For example, title region detection is performed on the original media asset stills to locate the regions containing artistic titles; based on the location results, corresponding image regions are extracted from the original media asset stills to form the second image subset. Specifically, title region detection on the original media asset stills includes: scanning and reasoning on the original media asset stills using a text detection model to output the coordinate information of one or more candidate regions. After obtaining candidate regions using the text detection model, pseudo-text regions that do not conform to the characteristics of artistic titles are filtered out based on the geometric attributes or visual features of the candidate regions.
[0072] Pixel-level annotations are performed on the images in the first and second image subsets to generate corresponding artistic title segmentation labels. For example, for each image in the first and second image subsets, the artistic title area is labeled as foreground, and the non-artistic title area is labeled as background. The foreground and background annotation information is stored as a segmentation label file that corresponds one-to-one with the pixels of the original image. Annotation can be achieved through a combination of manual annotation and AI-assisted annotation. Specifically, a pre-trained initial segmentation model is used to predict the images and generate initial annotation results, which are then manually verified and corrected by annotators. Finally, the annotated first and second image subsets are combined to form the title image dataset.
[0073] The title image dataset is divided into training, validation, and test sets. The initial image segmentation model is trained iteratively on the training set to minimize the loss function between the predicted segmentation result and the true label. The training process is monitored and optimized based on the performance metrics on the validation set to obtain the optimal model parameters. The performance of the final image segmentation model is evaluated using the test set.
[0074] Optionally, the loss function can be a composite loss function, which is composed of binary cross-entropy loss and Dice loss combined with preset weights.
[0075] This application embodiment constructs a dedicated dataset by fusing media asset poster title images and media asset still images, and uses this dataset to train an image segmentation model, achieving accurate and robust extraction of artistic font titles. The title images ensure the model learns the standard structure and fine features of artistic fonts, while the still images with complex backgrounds and varied layouts enable the model to suppress interference and focus on the subject in real-world scenarios. This significantly improves the model's generalization ability and practicality in real-world applications, ultimately achieving high-precision and robust pixel-level extraction of artistic font titles from various media asset posters.
[0076] Based on the above embodiments, the poster generation method further includes: In response to the batch generation command for posters, obtain the set of target sizes; The original poster image or the target poster is input into the subject recognition model to obtain the visual subject region in the original poster image or the target poster output by the subject recognition model; the visual subject region is the region used to identify the main character image and / or the artistic title image; Calculate the cropping frame that matches the visual subject area based on the aspect ratio of each second target size in the target size set; The original poster image or the target poster is cropped according to each of the cropping frames to generate a cropped poster that conforms to the second target size.
[0077] It should be understood that a batch generation command is a system-level trigger signal that instructs the system to automatically generate a complete set of multi-size poster versions conforming to predetermined specifications for a given input source (original poster image or generated target poster). Batch generation requests can be triggered by users through batch operation controls on the graphical user interface; they can also be triggered by upstream business systems through application programming interfaces (APIs).
[0078] It should be understood that the target size set is a predefined, structured list that contains all the specific and distinct poster output size specifications that need to be generated in batches.
[0079] It should be understood that the visual subject area is the location information of the core elements in the image output by the subject recognition model after analyzing the input image. Specifically, it is the area used to identify the main character image and / or the artistic title image.
[0080] In response to a batch poster generation command, a set of target sizes is retrieved. For example, upon receiving a batch poster generation command, the request must contain at least a unique identifier for the target poster. Based on the unique identifier, a predefined set of target sizes corresponding to the target poster is associated with and retrieved. This predefined set of target sizes can be a list of one or more size specifications pre-configured in the system according to the placement specifications of downstream operating channels; each size specification in the size specification list is defined in the form of pixel aspect ratio.
[0081] Optionally, a configuration interface is also provided, allowing users to create, edit, or select different target size collection templates for different types of posters.
[0082] The input image (original poster image or target poster) is preprocessed by scaling or normalizing it to the input size required by the subject recognition model. The processed image data is then input into the subject recognition model to obtain one or more visual subject regions output by the model. Each visual subject region corresponds to at least one visual subject instance. The visual subject instances are categorized into "person" or "artistic title" categories, and the visual subject regions are associated with category labels.
[0083] Optionally, when multiple visual subject instances of the same category are identified, the optimal instance is selected as the subject region representing that category based on its area, degree of centrality in the image, or category confidence.
[0084] Based on the aspect ratio of each second target size in the target size set, a cropping box matching the visual subject region is calculated. For example, the first constraint is to completely include the artistic title area, and the second constraint is to ensure that the core part of the main character area is within the cropping box. Under the premise of satisfying the first and second constraints, the cropping box is calculated by sliding across the original image with the aspect ratio of the second target size as a fixed ratio, to find a cropping box that maximizes the coverage of the visual subject region. The process of calculating the cropping box can be implemented using an optimization algorithm. The objective function of this optimization algorithm is configured to maximize the overlap area between the cropping box and the visual subject region, while satisfying the first and second constraints.
[0085] Optionally, when it is not possible to find a cropping frame that can simultaneously and completely contain both the WordArt title area and the core part of the main character, the first constraint condition should be satisfied first, that is, to ensure the integrity of the WordArt title and to adaptively crop the main character area.
[0086] Extract pixel data from the rectangular area defined by the cropping box from the original poster image or the target poster. Scale the extracted pixel data to a resolution that perfectly matches the second target size to generate the cropped poster. For example, batch processing can be used: for each second target size and its corresponding cropping box in the target size set, automatically and sequentially perform cropping and scaling operations to generate an independent cropped poster file that conforms to its size specifications for each second target size.
[0087] Optionally, the cropped poster can be sharpened and / or denoised to improve the visual quality of the output image.
[0088] This application's embodiments achieve efficient batch production of posters in multiple sizes by constructing an automated pipeline driven by instructions, with intelligent recognition and adaptive cropping. First, a subject recognition model accurately locates the main character and title area, providing semantic basis for intelligent composition. Second, the optimal cropping frame is dynamically calculated for the aspect ratio of different target sizes, ensuring the integrity of the artistic title while highlighting the main character as much as possible, fundamentally solving the problems of title truncation and compositional imbalance caused by traditional cropping. Finally, the system can automatically and in parallel output a complete set of posters with reasonable composition, prominent main characters, and precise adaptation to various operational channels, greatly saving labor costs while significantly improving the quality and consistency of operational materials.
[0089] Based on the above embodiments, the subject recognition model is trained in the following manner: A training dataset is constructed based on poster images and their visual subject region labels; the visual subject region labels include the main character region label and the artistic title region label. The subject recognition model is obtained by training the specified neural network model using the training dataset.
[0090] It should be understood that the visual subject region labels are information that corresponds one-to-one with the training images at the pixel level and is used to guide the model's learning.
[0091] It should be understood that a defined neural network model refers to a deep learning model with a specific architecture selected or designed to achieve the specific task of visual subject recognition. This defined neural network model can be an instance segmentation model, a semantic segmentation model, or an object detection model, etc.
[0092] Multiple media asset poster images are acquired, for example, by crawling poster images from publicly available film and television media asset platforms, and / or by obtaining officially released poster images from partner media asset libraries. Based on the acquired media asset poster images, an initial image set is constructed. Each poster image in the initial image set is pixel-level annotated to generate corresponding visual subject area labels; wherein, the visual subject area labels include at least mutually independent main character area labels and artistic title area labels. It should be understood that pixel-level annotation of the poster images includes: using annotation tools, annotators manually outline the contours of the main character and the artistic title to generate segmentation mask labels.
[0093] Optionally, during the annotation process, for areas where the artistic title overlaps with the background or figures, a magnifying glass tool can be used to zoom in locally and outline it with pixel-level precision to ensure the integrity and continuity of the artistic font strokes.
[0094] Optionally, after generating the visual subject region labels, the poster image and the corresponding labels can be transformed synchronously to expand the dataset. The transformation includes at least one of random horizontal flipping, random cropping, color jittering, and scale scaling.
[0095] The training dataset consists of labeled poster images and their corresponding visual subject region labels. For example, the labeled poster images and their visual subject region labels are stored according to predefined file naming rules; at the same time, an index file is created, which records the mapping relationship between the file path of each poster image and the file path of its corresponding visual subject region label; based on the index file, all data is divided into a training set, a validation set, and a test set to jointly constitute the training dataset.
[0096] Optionally, before constructing the training dataset, it is also possible to check whether the visual subject region label accurately covers the target subject and does not contain irrelevant background pixels; and to check whether there is unreasonable overlap or truncation between the main character region label and the artistic title region label.
[0097] This application embodiment constructs a dedicated training set containing precise pixel-level labels (covering main characters and artistic titles), and uses this set to train a deep neural network model. Through domain-specific data and annotations, the model overcomes the limitations of general models and specifically learns the visual features and spatial relationships of complex artistic text and main characters in film and television posters. This enables high-precision and robust subject recognition and localization in business scenarios, solving the pain points of traditional methods such as incomplete artistic text segmentation and susceptibility to background interference. It provides a stable and reliable visual understanding capability guarantee for the subsequent automated poster generation process.
[0098] To further explain the poster generation method proposed in this application, please refer to the following embodiments.
[0099] This application provides an AI-based interactive method for generating film and television posters. Based on the original poster image, the method uses a pre-trained image segmentation model to extract the artistic title and main subject pixel-wise through front-end page interaction. It then uses image inpainting and image enlargement algorithms to redraw and generate a new background image of a different size. Simultaneously, through the interactive interface, the artistic title, main subject, and background image are rationally arranged to synthesize a new film and television poster. This combination of AI and human interaction significantly improves the quality and efficiency of poster generation.
[0100] refer to Figure 2 The AI-based interactive method for generating film and television posters mainly includes the following steps: (1) Obtain the original poster image: Based on the media asset name, the original poster image can be retrieved and downloaded from the pre-built media asset poster library, or obtained through a web crawler of the film and television media asset website. If the original poster is of poor quality or cannot be obtained, video frames can be extracted from the media asset to obtain high-quality frames with clear images of the main characters as poster material.
[0101] (2) Entity segmentation: Image element extraction is required for the original poster image of the media asset to extract the main character portraits or artistic text that need to be rearranged. It should be understood that in related technologies, entity segmentation algorithms generally perform general foreground segmentation without specific fine-tuning for stills or poster scenes. To improve the scene effect of the intelligent poster, a portrait dataset and a font extraction dataset are constructed for fine-tuning. Therefore, in this embodiment of the application, for font segmentation, in order to realize the automated image matting process, the SRFormer model is first used to detect polygons in the artistic text title, converting the polygons into bounding rectangles, and performing local segmentation of the artistic text in the bounding rectangles. At the same time, in order to perform more detailed edge processing, the segmented image result is processed by erosion and dilation to make a trimap input image, so that the edges of the image matting are more detailed.
[0102] It should be understood that the font matting dataset can be achieved in the following way: First, crawl the real logos of posters from the official poster website, including simple artistic font titles, artistic font titles with background images, complex artistic font titles, artistic font titles with white borders, etc., so as to approximate the distribution of real titles; then, randomly paste titles onto randomly crawled stills to generate a training set for training local font matting. The trained image segmentation model can be used to generate trimap and create a training set for the matting model.
[0103] (3) Generate title image: Due to copyright issues, the poster title is obtained from the artistic font extraction algorithm, and the original font shape is retained. The rest of the poster content is automatically generated by the specified font. The font and size can be customized.
[0104] (4) Adaptive Background of Any Size: After extracting or generating foreground elements, it is also necessary to adapt the poster background to the specified poster size. However, if it is simply scaled, it will change the proportion of the background objects, resulting in an unnatural poster. The redrawing / expansion algorithm provided in this application first automatically generates fill for the erased portrait and text, and then generates boundary fill according to the specified background size.
[0105] (5) Interactive and Automatic Cropping: To balance flexibility in adjusting requirements with rapid automation, the system supports interactive layout based on user needs, allowing users to place portraits or text in designated positions on the poster. Furthermore, to meet the operational needs of various poster sizes, save labor costs, and achieve mass production, an algorithm is trained for intelligent poster cropping, intelligently identifying the most prominent subject based on the required cropping size. In related technologies, subject recognition algorithms are primarily based on foreground elements such as people and animals. Therefore, to meet the requirements of intelligent poster title recognition, a training set based on the poster title and the main subject is constructed to train a subject recognition algorithm specifically for automated poster scenarios, optimizing the title text truncation problem and meeting the adaptive requirements of various sizes.
[0106] This application's embodiments construct an image element extraction algorithm framework using an SRFormer detection model and an image segmentation BiRe-FNet model. First, the SRFormer detection model calculates the font region trimap for coarse localization, then performs pixel segmentation on the trimap, improving the accuracy of small object segmentation in the image. This is suitable for poster art font business scenarios. Furthermore, based on media asset poster title logo images and media asset still images, a title image dataset is constructed to train an image segmentation model, enabling pixel-level extraction of media asset titles, thereby improving the accuracy of the foreground segmentation model in extracting art fonts from media asset posters. A training set based on poster titles and main figures is constructed to train a subject recognition and cropping algorithm specifically for automated poster scenarios, optimizing the title text truncation problem. Combined with the ability to expand background images of any size and automatic small-scale cropping, the function of batch production of multi-size operational posters is realized. The batch production of multi-size operational posters, combining interaction and automatic cropping, significantly improves the flexibility and efficiency of poster production for large-screen operators.
[0107] The poster generation apparatus provided in this application is described below. The poster generation apparatus described below and the poster generation method described above can be referred to in correspondence.
[0108] refer to Figure 3 The poster generation device provided in this application includes an extraction module 301, a background processing module 302, and a poster generation module 303.
[0109] Extraction module 301 is used to extract the main character image and the artistic title image from the original poster image; the artistic title image is extracted through a text detection model and an image segmentation model; Background processing module 302 is used to perform background repair and expansion processing on the original poster image to generate a background image that conforms to the first target size; The poster generation module 303 is used to respond to the user's layout operation command for the main character image and the artistic title image, and to synthesize the main character image and the artistic title image with the background image to generate the target poster.
[0110] The poster generation apparatus provided in this application extracts the main character image and the artistic title image from the original poster image. The artistic title image is extracted using a text detection model and an image segmentation model. The original poster image undergoes background restoration and expansion processing to generate a background image that conforms to a first target size. Responding to user instructions on the layout of the main character image and the artistic title image, the main character image and the artistic title image are synthesized with the background image to generate the target poster. Based on the original poster image, this application utilizes a front-end page interaction, employing an image segmentation model to extract the artistic title and the main character at the pixel level, and uses image restoration and expansion algorithms to redraw and recreate a new background image of a new size. Simultaneously, the interactive interface allows for the reasonable arrangement of the artistic title, the main character, and the background image, synthesizing a new film and television poster. This combination of AI and human interaction improves the quality and efficiency of poster generation.
[0111] In one embodiment, the extraction module 301 is further configured to: Using the text detection model, the coarse localization region of the artistic title in the original poster image is determined; Based on the coarse localization region, the image segmentation model is used to segment the artistic title to obtain the artistic title image.
[0112] In one embodiment, the extraction module 301 is further configured to: The original poster image is input into the text detection model to obtain the polygonal outline of the artistic title output by the text detection model; The polygonal outline is converted into the bounding rectangle of the artistic title, and the bounding rectangle is used as the coarse positioning area.
[0113] In one embodiment, the extraction module 301 is further configured to: Using the coarse localization region as input to the image segmentation model, the image segmentation model is used to perform local segmentation of the artistic title within the outer rectangle to obtain the image segmentation result; The image segmentation results are subjected to erosion and dilation operations to generate a Trimap image; The Trimap image is processed to extract an artistic title area with detailed edges; Based on the artistic title area, the artistic title image is extracted from the original poster image.
[0114] In one embodiment, the poster generation device further includes a model training module for: Construct a title image dataset based on media asset poster title images and media asset still images; The initial image segmentation model was trained using the aforementioned title image dataset to obtain an image segmentation model for pixel-level extraction of media asset poster titles.
[0115] In one embodiment, the poster generation module 303 is further configured to: In response to the batch generation command for posters, obtain the set of target sizes; The original poster image or the target poster is input into the subject recognition model to obtain the visual subject region in the original poster image or the target poster output by the subject recognition model; the visual subject region is the region used to identify the main character image and / or the artistic title image; Calculate the cropping frame that matches the visual subject area based on the aspect ratio of each second target size in the target size set; The original poster image or the target poster is cropped according to each of the cropping frames to generate a cropped poster that conforms to the second target size.
[0116] In one embodiment, the model training module is further configured to: A training dataset is constructed based on poster images and their visual subject region labels; the visual subject region labels include the main character region label and the artistic title region label. The subject recognition model is obtained by training the specified neural network model using the training dataset.
[0117] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4As shown, the electronic device may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, communications interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a poster generation method, which includes: extracting a main character image and an artistic title image from an original poster image; the artistic title image is obtained through a text detection model and an image segmentation model; performing background restoration and expansion processing on the original poster image to generate a background image conforming to a first target size; and, in response to a user's layout operation instruction on the main character image and the artistic title image, compositing the main character image and the artistic title image with the background image to generate a target poster.
[0118] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0119] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the poster generation method provided by the above methods. The method includes: extracting a main character image and an artistic title image from an original poster image; the artistic title image is extracted by a text detection model and an image segmentation model; performing background repair and expansion processing on the original poster image to generate a background image that conforms to a first target size; and, in response to a user's layout operation command on the main character image and the artistic title image, compositing the main character image and the artistic title image with the background image to generate a target poster.
[0120] In another aspect, this application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the poster generation method provided by the above methods. The method includes: extracting a main character image and an artistic title image from an original poster image; the artistic title image being extracted using a text detection model and an image segmentation model; performing background repair and expansion processing on the original poster image to generate a background image conforming to a first target size; and, in response to a user's layout operation instruction on the main character image and the artistic title image, compositing the main character image and the artistic title image with the background image to generate a target poster.
[0121] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0122] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0123] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A poster generation method, characterized in that, include: Extract the main character image and the artistic title image from the original poster image; The artistic font title image was extracted using a text detection model and an image segmentation model. The original poster image is subjected to background restoration and expansion processing to generate a background image that conforms to the first target size; In response to the user's layout operation command for the main character image and the artistic title image, the main character image and the artistic title image are combined with the background image to generate the target poster.
2. The poster generation method according to claim 1, characterized in that, The artistic font title image was extracted based on the following method: Using the text detection model, the coarse localization region of the artistic title in the original poster image is determined; Based on the coarse localization region, the image segmentation model is used to segment the artistic title to obtain the artistic title image.
3. The poster generation method according to claim 2, characterized in that, The step of using the text detection model to determine the coarse localization region of the artistic title in the original poster image includes: The original poster image is input into the text detection model to obtain the polygonal outline of the artistic title output by the text detection model; The polygonal outline is converted into the bounding rectangle of the artistic title, and the bounding rectangle is used as the coarse positioning area.
4. The poster generation method according to claim 2, characterized in that, The step of segmenting the artistic title image using the image segmentation model based on the coarsely located region to obtain the artistic title image includes: Using the coarse localization region as input to the image segmentation model, the image segmentation model is used to perform local segmentation of the artistic title within the outer rectangle to obtain the image segmentation result; The image segmentation results are subjected to erosion and dilation operations to generate a Trimap image; The Trimap image is processed to extract an artistic title area with detailed edges; Based on the artistic title area, the artistic title image is extracted from the original poster image.
5. The poster generation method according to claim 1, characterized in that, The image segmentation model was trained using the following method: Construct a title image dataset based on media asset poster title images and media asset still images; The initial image segmentation model was trained using the aforementioned title image dataset to obtain an image segmentation model for pixel-level extraction of media asset poster titles.
6. The poster generation method according to any one of claims 1 to 5, characterized in that, The poster generation method further includes: In response to the batch generation command for posters, obtain the set of target sizes; The original poster image or the target poster is input into the subject recognition model to obtain the visual subject region in the original poster image or the target poster output by the subject recognition model; the visual subject region is the region used to identify the main character image and / or the artistic title image; Calculate the cropping frame that matches the visual subject area based on the aspect ratio of each second target size in the target size set; The original poster image or the target poster is cropped according to each of the cropping frames to generate a cropped poster that conforms to the second target size.
7. The poster generation method according to claim 6, characterized in that, The subject recognition model was trained using the following method: A training dataset is constructed based on poster images and their visual subject region labels; the visual subject region labels include the main character region label and the artistic title region label. The subject recognition model is obtained by training the specified neural network model using the training dataset.
8. A poster generating device, characterized in that, include: The extraction module is used to extract the main character image and the artistic title image from the original poster image; The artistic font title image was extracted using a text detection model and an image segmentation model. The background processing module is used to perform background repair and expansion processing on the original poster image to generate a background image that conforms to the first target size; The poster generation module is used to respond to the user's layout operation instructions on the main character image and the artistic title image, and to synthesize the main character image and the artistic title image with the background image to generate the target poster.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the poster generation method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the poster generation method as described in any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the poster generation method as described in any one of claims 1 to 7.