Article display image generation method and device, computer equipment and storage medium

The method enhances image generation efficiency by using advanced algorithms for foreground extraction, edge segmentation, and image fusion, ensuring seamless integration of foreground and background elements in display images.

CN119090737APending Publication Date: 2024-12-06XIAMEN MEITUZHIJIA TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411188038.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Traditional methods for generating display images of objects require significant manual processing, leading to low efficiency and suboptimal visual integration of foreground and background elements.

Method used

A method involving foreground extraction, edge segmentation, and image fusion processes, utilizing advanced algorithms and models like transformer-based saliency detection, edge expansion/contraction, and image harmonization to align visual features and generate high-quality display images.

Benefits of technology

Facilitates rapid generation of high-quality images with coordinated visual effects by accurately separating and integrating foreground and background, improving efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090737A_ABST
    Figure CN119090737A_ABST
Patent Text Reader

Abstract

The invention relates to an article display image generation method and device, computer equipment, a computer readable storage medium and a computer program product, and can be applied to the technical field of image processing. The method comprises the following steps: performing foreground extraction processing on an initial image of an article to obtain a foreground image of the article; performing edge segmentation processing on the foreground image to obtain a processed foreground image of the article; according to the background image of the article, updating the processed foreground image to obtain a target foreground image of the article; the visual features of the target foreground image are matched with the visual features of the background image; and performing image fusion processing on the target foreground image and the background image to obtain a display image of the article. By adopting the method, the efficiency of generating the display image of the article can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for generating an item display image. Background Art

[0002] With the development of image processing technology, image processing technology is increasingly used in various fields. Among them, object image processing, as an important branch, plays an important role in product display and other aspects. Therefore, how to efficiently generate display images of objects has become an important research direction.

[0003] Traditional technology usually generates display images of objects through manual editing and processing; however, generating display images of objects in this way requires a lot of manual processing time, resulting in low efficiency in generating display images of objects. Summary of the invention

[0004] Based on this, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium and computer program product for generating an item display image, which can improve the efficiency of generating an item display image, in order to address the above technical problems.

[0005] In a first aspect, the present application provides a method for generating an item display image. The method comprises:

[0006] Performing foreground extraction processing on the initial image of the object to obtain a foreground image of the object;

[0007] Performing edge segmentation processing on the foreground image to obtain a processed foreground image of the object;

[0008] updating the processed foreground image according to the background image of the object to obtain a target foreground image of the object; the visual features of the target foreground image match the visual features of the background image;

[0009] The target foreground image and the background image are subjected to image fusion processing to obtain a display image of the object.

[0010] In one embodiment, performing edge segmentation processing on the foreground image to obtain the processed foreground image of the object includes:

[0011] Performing edge expansion processing and edge contraction processing on the foreground image to obtain an edge transition area of ​​the object;

[0012] The foreground image is subjected to edge segmentation processing according to the edge transition region to obtain a segmented image of the object as a processed foreground image of the object.

[0013] In one embodiment, updating the processed foreground image according to the background image of the object to obtain the target foreground image of the object includes:

[0014] extracting visual features of a background image of the object;

[0015] According to the visual features of the background image, the visual features of the processed foreground image are updated until the visual features of the updated foreground image match the visual features of the background image, and the updated foreground image is used as the target foreground image.

[0016] In one embodiment, before updating the processed foreground image according to the background image of the object to obtain the target foreground image of the object, the method further includes:

[0017] Obtaining background text description information corresponding to the item;

[0018] Inputting the background text description information into a pre-trained text feature extraction model to perform text feature extraction processing to obtain text features of the background text description information;

[0019] The text features are input into a pre-trained background generation model to perform background generation processing to obtain the background image.

[0020] In one embodiment, before updating the processed foreground image according to the background image of the object to obtain the target foreground image of the object, the method further includes:

[0021] In response to the background selection instruction, a target background image material is selected from a preset background image material library;

[0022] The target background image material is used as the background image of the object.

[0023] In one embodiment, performing foreground extraction processing on the initial image of the object to obtain the foreground image of the object includes:

[0024] Performing image feature extraction processing on the initial image through an image feature extraction model to obtain image features of the object;

[0025] According to the image features, foreground area recognition is performed on the initial image to obtain the foreground area of ​​the object;

[0026] The foreground image is extracted from the initial image according to the foreground area.

[0027] In one embodiment, the image feature extraction model includes a first image feature extraction model and a second image feature extraction model having a different model structure from the first image feature extraction model;

[0028] The performing image feature extraction processing on the initial image by using an image feature extraction model to obtain the image features of the object includes:

[0029] Performing image feature extraction processing on the initial image by using the first image feature extraction model to obtain a first image feature of the object;

[0030] Performing image feature extraction processing on the initial image by using the second image feature extraction model to obtain a second image feature of the object;

[0031] The first image feature and the second image feature are subjected to feature fusion processing to obtain the image feature of the object.

[0032] In a second aspect, the present application also provides a device for generating an item display image. The device comprises:

[0033] A foreground extraction module, used to perform foreground extraction processing on the initial image of the object to obtain a foreground image of the object;

[0034] An edge segmentation module, used for performing edge segmentation processing on the foreground image to obtain a processed foreground image of the object;

[0035] An image updating module, used to update the processed foreground image according to the background image of the object to obtain a target foreground image of the object; the visual features of the target foreground image match the visual features of the background image;

[0036] The image fusion module is used to perform image fusion processing on the target foreground image and the background image to obtain a display image of the object.

[0037] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0038] Performing foreground extraction processing on the initial image of the object to obtain a foreground image of the object;

[0039] Performing edge segmentation processing on the foreground image to obtain a processed foreground image of the object;

[0040] updating the processed foreground image according to the background image of the object to obtain a target foreground image of the object; the visual features of the target foreground image match the visual features of the background image;

[0041] The target foreground image and the background image are subjected to image fusion processing to obtain a display image of the object.

[0042] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0043] Performing foreground extraction processing on the initial image of the object to obtain a foreground image of the object;

[0044] Performing edge segmentation processing on the foreground image to obtain a processed foreground image of the object;

[0045] updating the processed foreground image according to the background image of the object to obtain a target foreground image of the object; the visual features of the target foreground image match the visual features of the background image;

[0046] The target foreground image and the background image are subjected to image fusion processing to obtain a display image of the object.

[0047] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0048] Performing foreground extraction processing on the initial image of the object to obtain a foreground image of the object;

[0049] Performing edge segmentation processing on the foreground image to obtain a processed foreground image of the object;

[0050] updating the processed foreground image according to the background image of the object to obtain a target foreground image of the object; the visual features of the target foreground image match the visual features of the background image;

[0051] The target foreground image and the background image are subjected to image fusion processing to obtain a display image of the object.

[0052] The above-mentioned method, device, computer equipment, computer-readable storage medium and computer program product for generating an object display image perform foreground extraction processing on the initial image of the object to obtain the foreground image of the object; perform edge segmentation processing on the foreground image to obtain the processed foreground image of the object; update the processed foreground image according to the background image of the object to obtain the target foreground image of the object; match the visual features of the target foreground image with the visual features of the background image; perform image fusion processing on the target foreground image and the background image to obtain the display image of the object. The scheme is conducive to accurately separating the foreground of the object and naturally merging it with the background through foreground extraction, edge segmentation, visual feature matching and image fusion processing, thereby facilitating the rapid generation of high-quality object display images with coordinated visual effects and rich details, and improving the efficiency and accuracy of generating display images of the object. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0054] Figure 1 It is a schematic diagram of a flow chart of a method for generating an item display image in one embodiment;

[0055] Figure 2 It is a schematic flow chart of a method for generating an item display image in another embodiment;

[0056] Figure 3 A flowchart of the steps of feature fusion in one embodiment;

[0057] Figure 4 A schematic flow chart of edge segmentation processing steps in one embodiment;

[0058] Figure 5 A schematic flow chart of the steps of image harmonization processing in one embodiment;

[0059] Figure 6 A network structure diagram of image harmonization processing in one embodiment;

[0060] Figure 7 A flowchart of the steps of background generation in one embodiment;

[0061] Figure 8 It is a structural block diagram of a device for generating an object display image in one embodiment;

[0062] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0064] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0065] In an exemplary embodiment, Figure 1 As shown, a method for generating an item display image is provided. This embodiment uses the method applied to a terminal as an example for illustration; it is understandable that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc.; the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. In this embodiment, the method includes the following steps:

[0066] Step S101, performing foreground extraction processing on the initial image of the object to obtain the foreground image of the object.

[0067] Step S102, performing edge segmentation processing on the foreground image to obtain a processed foreground image of the object.

[0068] Step S103, updating the processed foreground image according to the background image of the object to obtain a target foreground image of the object; the visual features of the target foreground image match the visual features of the background image.

[0069] Step S104, performing image fusion processing on the target foreground image and the background image to obtain a display image of the object.

[0070] The display image may be an image used to display goods or products. For example, the item display image may be a product poster.

[0071] The initial image of the object may be an unprocessed original image of the object, for example, the initial image of the object may be a product image.

[0072] Among them, the foreground extraction process can be a process of identifying and extracting the main object or the object of interest from the image. For example, the foreground extraction process can be a saliency detection algorithm that uses a dual branch structure based on transformer (transformer, a neural network architecture based on a self-attention mechanism) and CNN (convolutional neural network) to extract complementary features.

[0073] The foreground image of the object may be an image of a main object or an object of interest extracted from an initial image. For example, the foreground image of the object may be a salient foreground in a picture automatically extracted by a saliency detection algorithm, such as a product foreground.

[0074] Among them, edge segmentation processing can be a process of refining the edge of an image. For example, edge segmentation processing can be to use a fixed kernel (kernel) expansion and corrosion operation to obtain an edge uncertainty area (trimap), and then use a preset algorithm structure to refine the edge segmentation details.

[0075] The processed foreground image of the object may be a finer foreground image obtained after edge segmentation processing. For example, the processed foreground image of the object may include a fine segmentation image mask in which edge details are better preserved.

[0076] The background image of the object may be an image used as a display background of the object. For example, the background image of the object may be an image selected from a preset material library, or a background image dynamically generated according to a text description through a diffusion model.

[0077] The visual features may be visual attributes of the image such as color, lighting, texture, etc. For example, the visual features may be the visual style of the background calculated by the image harmonization module.

[0078] Among them, the target foreground image of the object can be a foreground image that is visually coordinated with the background image after visual feature adjustment. For example, the target foreground image of the object can be the result of applying two offsets scale and bias of the background estimated by the AdaIN (adaptive instance normalization) module to the foreground feature.

[0079] The image fusion process may be a process of combining a foreground image and a background image into a complete image.

[0080] Optionally, the terminal performs foreground extraction processing on the initial image of the object, and uses a dual-branch structure based on transformer and CNN to extract complementary features to obtain the foreground image of the object. The terminal performs edge segmentation processing on the foreground image of the object, uses a fixed kernel expansion and corrosion operation to obtain the edge uncertainty area, and then uses a preset algorithm structure to refine the edge segmentation details to obtain the processed foreground image of the object. The terminal updates the processed foreground image of the object according to the background image of the object, uses the image harmonization module to calculate the visual style of the background, and estimates the two offsets of the background, scale and bias, through the AdaIN module to act on the foreground features to obtain the target foreground image of the object, so that the visual features of the target foreground image of the object match the visual features of the background image of the object. Finally, the terminal performs image fusion processing on the target foreground image of the object and the background image of the object through a diffusion model to obtain a display image of the object.

[0081] In the above-mentioned method for generating an object display image, foreground extraction is performed on the initial image of the object to obtain the foreground image of the object; edge segmentation is performed on the foreground image to obtain a processed foreground image of the object; the processed foreground image is updated according to the background image of the object to obtain a target foreground image of the object; the visual features of the target foreground image are matched with the visual features of the background image; the target foreground image and the background image are subjected to image fusion processing to obtain the display image of the object. This scheme is conducive to accurately separating the foreground of the object and naturally merging it with the background through foreground extraction, edge segmentation, visual feature matching and image fusion processing, thereby facilitating the rapid generation of high-quality object display images with coordinated visual effects and rich details, and improving the efficiency and accuracy of generating display images of the object.

[0082] In an exemplary embodiment, edge segmentation processing is performed on the foreground image to obtain a processed foreground image of the object, which specifically includes the following contents: edge expansion processing and edge contraction processing are performed on the foreground image to obtain an edge transition area of ​​the object; according to the edge transition area, edge segmentation processing is performed on the foreground image to obtain a segmented image of the object as the processed foreground image of the object.

[0083] The edge extension processing may be an operation of expanding the edge of the image outward, for example, the edge extension processing may be an expansion operation using a fixed kernel.

[0084] The edge shrinkage process may be an operation of shrinking the edge of the image inwards, for example, the edge shrinkage process may be an erosion operation using a fixed kernel.

[0085] The edge transition region of the object may be an uncertain region between the foreground and the background of the object. For example, the edge transition region of the object may be an uncertain region in a trimap image obtained by dilation and corrosion operations.

[0086] The segmented image of the object may be a foreground image obtained after fine edge segmentation. For example, the segmented image of the object may include a fine segmented image mask in which edge details are well preserved.

[0087] Optionally, the terminal performs edge expansion processing on the foreground image of the object, and uses a dilation operation of a fixed kernel to expand the foreground edge outward. The terminal performs edge contraction processing on the expanded foreground image, and uses an erosion operation of a fixed kernel to shrink the foreground edge inward. Through these two steps, the terminal obtains the edge transition area of ​​the object, that is, the uncertain area in the trimap image. Next, the terminal performs edge segmentation processing on the foreground image of the object based on the edge transition area of ​​the object, and uses a preset algorithm structure to refine the edge segmentation details to obtain a segmented image of the object, and uses the segmented image of the object as the processed foreground image of the object.

[0088] The technical solution provided in this embodiment obtains the edge transition area through edge expansion and contraction processing, and then performs refined edge segmentation, which is conducive to accurately identifying and retaining the subtle edge details of the object, thereby facilitating the generation of a more accurate and natural foreground image of the object.

[0089] In an exemplary embodiment, the processed foreground image is updated according to the background image of the object to obtain the target foreground image of the object, which specifically includes the following contents: extracting the visual features of the background image of the object; updating the visual features of the processed foreground image according to the visual features of the background image until the visual features of the updated foreground image match the visual features of the background image, and then using the updated foreground image as the target foreground image.

[0090] Among them, the matching of the visual features of the updated foreground image and the visual features of the background image can be that the foreground image and the background image are visually coordinated and consistent. For example, the matching of the visual features of the updated foreground image and the background image can be that the visual attributes such as color distribution, lighting conditions, texture features, etc. of the foreground image and the background image reach a harmonious and unified state.

[0091] Optionally, the terminal uses the Encoder (encoder, the part of the deep learning model responsible for encoding the input into feature representation) of the UNet (U-type network, a deep learning model structure for image segmentation) network structure to process the background image of the object and extract the visual features of the background image, including color distribution, lighting conditions, texture features, etc. Then, the terminal uses the AdaIN module to estimate the scale and bias parameters based on the extracted visual features of the background image, and applies these parameters to the processed foreground image to update the visual features of the processed foreground image. The terminal repeats this process until the visual features of the updated foreground image match the visual features of the background image, at which time the terminal uses the updated foreground image as the target foreground image.

[0092] The technical solution provided in this embodiment, by extracting the visual features of the background image and updating the foreground image accordingly, is conducive to achieving coordination between the foreground and background in terms of color, lighting, texture, etc., thereby facilitating the generation of a more visually harmonious and natural synthetic image and improving the realism of the image.

[0093] In an exemplary embodiment, before the processed foreground image is updated according to the background image of the object to obtain the target foreground image of the object, the following contents are also included: obtaining background text description information corresponding to the object; inputting the background text description information into a pre-trained text feature extraction model to perform text feature extraction processing to obtain text features of the background text description information; inputting the text features into a pre-trained background generation model to perform background generation processing to obtain a background image.

[0094] The background text description information may be text that describes the content and style of the background image to be generated in natural language. For example, the background text description information may be "a bowl is placed on mossy grass, surrounded by clovers and flowers, with a lush and dense forest in the background, and sunlight pouring down from the forest."

[0095] Among them, the text feature extraction model can be a neural network model that converts natural language text into a high-dimensional vector representation. For example, the text feature extraction model can be a large pre-trained language model.

[0096] Among them, text features can be high-dimensional vector representations of text content, capturing the semantic information of the text.

[0097] The background generation model may be an image generation model based on a diffusion model architecture.

[0098] The background generation process may be a process of taking text features as conditional input and generating an image that matches the text description through an iterative denoising process.

[0099] Optionally, the terminal receives background text description information input by the user, which describes the content and style of the background image to be generated. The terminal inputs the background text description information into a pre-trained text feature extraction model, and converts the background text description information into a high-dimensional vector representation, i.e., text features, through the text feature extraction model. The terminal inputs the obtained text features into a pre-trained background generation model, and the background generation model uses the text features as conditional information to generate a background image that matches the background text description information through an iterative denoising process.

[0100] The technical solution provided in this embodiment, by converting the background text description into text features and inputting them into the background generation model, is conducive to generating customized background images according to user needs, thereby helping to improve the personalization of the displayed image.

[0101] In an exemplary embodiment, before the processed foreground image is updated according to the background image of the object to obtain the target foreground image of the object, the following contents are also included: in response to a background selection instruction, a target background image material is selected from a preset background image material library; and the target background image material is used as the background image of the object.

[0102] The background selection instruction may be a command for selecting a background image triggered by a user through an interface operation.

[0103] The background image material library may be a collection of a series of background image materials collected and organized in advance. For example, the background image material library may be a database containing background images of different styles, themes and scenes.

[0104] The target background image material may be a specific background image selected from a background image material library that meets user requirements or object characteristics.

[0105] Optionally, the terminal receives a background selection instruction triggered by the user through a graphical interface. According to the background selection instruction, the terminal accesses a preset background image material library, which contains a large number of classified and organized background images. The terminal displays images in the background image material library for users to browse and select, and can provide recommended options based on product type or user preference. After the user selects a suitable background image material, the terminal extracts the background image material as a target background image material as the background image of the item.

[0106] The technical solution provided in this embodiment is conducive to quickly obtaining high-quality, consistent-style background images by selecting target background image materials from a preset background image material library, thereby facilitating improving the efficiency and quality of generating display images of objects.

[0107] In an exemplary embodiment, a foreground extraction process is performed on an initial image of an object to obtain a foreground image of the object, which specifically includes the following contents: performing image feature extraction process on the initial image through an image feature extraction model to obtain image features of the object; based on the image features, a foreground area recognition is performed on the initial image to obtain a foreground area of ​​the object; based on the foreground area, a foreground image is extracted from the initial image.

[0108] Among them, the image feature extraction model can be a deep learning model for extracting key visual information from an image. For example, the image feature extraction model can be a dual-branch structure model based on transformer and CNN.

[0109] Among them, the image feature can be a high-dimensional vector representation that describes the image content and structure. For example, the image feature can be a multi-channel feature map containing information such as edges, textures, and color distribution.

[0110] The foreground area may be a portion of the image that includes the main items. For example, the foreground area may be a pixel area occupied by the product itself in the product image, excluding the background or other secondary elements.

[0111] Optionally, the terminal obtains an initial image of the object and inputs the initial image into a pre-trained image feature extraction model. The image feature extraction model uses a dual-branch structure based on transformer and CNN to perform multi-scale feature extraction on the initial image. The terminal obtains image features output by the image feature extraction model, which contain key information such as the shape, texture and color of the object. The terminal uses these image features to identify the foreground area of ​​the initial image through a saliency detection algorithm. During the identification process, the terminal generates a binary foreground area mask to mark the pixel position of the object. Based on this foreground area mask, the terminal accurately extracts the foreground image of the object from the initial image.

[0112] The technical solution provided in this embodiment, by using an image feature extraction model and a foreground area recognition algorithm, is conducive to accurately extracting the foreground image of an object, thereby helping to improve the quality of subsequent image processing and image fusion, and ensuring that the generated display image has a more natural and harmonious visual effect.

[0113] In an exemplary embodiment, an image feature extraction model is used to perform image feature extraction processing on an initial image to obtain image features of an object, which specifically includes the following contents: an image feature extraction model is used to perform image feature extraction processing on the initial image to obtain a first image feature of the object; an image feature extraction model is used to perform image feature extraction processing on the initial image to obtain a second image feature of the object; and a feature fusion processing is performed on the first image feature and the second image feature to obtain the image feature of the object.

[0114] The image feature extraction model includes a first image feature extraction model and a second image feature extraction model having a different model structure from the first image feature extraction model.

[0115] Among them, the first image feature extraction model can be a deep learning model for extracting specific types of features from images. For example, the first image feature extraction model can be an encoder based on a Swin transformer (sliding window transformer) for capturing the global structure and long-distance dependencies of the image.

[0116] Among them, the second image feature extraction model can be another deep learning model with a different structure, which is used to extract image features complementary to the first model. For example, the second image feature extraction model can be a CNN encoder based on ResNet (residual network) for extracting local texture and edge features.

[0117] The first image feature may be a feature representation generated by a first image feature extraction model. For example, the first image feature may be a set of high-dimensional vectors that include global information and spatial structure of the image.

[0118] The second image feature may be a feature representation generated by a second image feature extraction model. For example, the second image feature may be a set of multi-scale feature maps including local texture and edge information of the image.

[0119] Among them, feature fusion processing can be a process of combining and integrating features from different sources. For example, feature fusion processing can be cross-fusion of the first image feature and the second image feature through a Cross-Model Grafting Module to generate a more comprehensive and rich image representation.

[0120] Optionally, the terminal simultaneously inputs the initial image into the first image feature extraction model and the second image feature extraction model. The terminal processes the initial image through the first image feature extraction model to obtain first image features containing global structure and long-distance dependencies. At the same time, the terminal processes the initial image through the second image feature extraction model to obtain second image features containing local texture and edge information. The terminal inputs the obtained first image features and second image features into the feature fusion module to perform feature fusion processing to obtain an image feature that integrates global and local information.

[0121] The technical solution provided in this embodiment is beneficial for simultaneously capturing multiple aspects of image features by combining two image feature extraction models with different structures and feature fusion processing, thereby facilitating improving the accuracy of image feature extraction.

[0122] The following is an application example to illustrate the method for generating an item display image provided by the present application. This application example uses the method applied to a terminal as an example.

[0123] The current product poster generation solution has two main problems:

[0124] On the one hand, current work mainly focuses on the design of product poster templates, or the updating and replacement of elements in product posters. However, these solutions often achieve the integration of products and other materials by directly pasting product images onto the poster background. This method is suitable for simple solid color backgrounds, but when there are complex image contents in the background (such as beaches, forests, etc.), direct pasting will cause the following problems:

[0125] 1. Inconsistent lighting: The lighting conditions between the foreground products and the background are often inconsistent, causing the composite image to look unnatural. Solving this problem requires adjusting the lighting of the foreground to match the lighting conditions of the background. This involves complex lighting modeling, which needs to take into account factors such as the direction and intensity of the light source, as well as the reflection and scattering of light.

[0126] 2. Shadow generation: The inserted foreground products lack proper shadows, making the composite image appear unrealistic. Generating accurate shadows requires considering complex factors such as the position of the light source and the geometry of the foreground and background objects. For example, if a product is placed on the beach, its shadow should be consistent with the texture of the beach and the direction of the light to appear natural.

[0127] 3. Color matching: There may be differences in the colors of the foreground product and the background, and color adjustment and fusion are required to ensure the harmony and unity of the colors of the composite image. This includes not only the adjustment of the hue, but also subtle adjustments in color saturation, brightness, etc. to eliminate the abruptness of the color.

[0128] 4. Boundary processing: Simply pasting the foreground product onto the background may leave obvious boundary traces, making the synthesis effect poor. Smoothing and boundary fusion are needed to eliminate these traces. This can be achieved through edge detection and blur processing to ensure a more natural transition between the product and the background.

[0129] 5. Background consistency: After the foreground product is inserted, the background may need to be adjusted appropriately to maintain image consistency. For example, if the foreground object occludes part of the background, the occluded background area needs to be reconstructed. This may involve background filling technology, which uses context information to reconstruct the occluded part to make the background look complete. These shortcomings seriously affect the aesthetics of the generated product posters, and the product and background image appear to be separated and abrupt.

[0130] On the other hand, the background images and other material images that match the product posters are mostly retrieved and matched from the image library. However, the number of image library materials is limited and cannot meet the growing diversified needs. Secondly, the form of existing materials is often too single and lacks innovation and uniqueness. In addition, the diversity of materials is poor and it is difficult to adapt to the needs of different categories, styles and target audiences.

[0131] Such a poster generation framework requires continuous maintenance and enrichment of the library materials in order to achieve customized design for each product. This means that a lot of manpower and time are needed to update and manage the library. Designers need to constantly create new backgrounds, icons, fonts, and other graphic elements to ensure the freshness and diversity of the materials. At the same time, existing materials need to be classified, labeled, and optimized for quick retrieval and matching. However, the labor cost required for this continuous maintenance work is very high.

[0132] In order to solve the above problems, this application example introduces the latest diffusion model technology and designs the following modules:

[0133] 1. Comprehensive saliency detection: Use saliency detection algorithms to identify the most important areas in the image, so that these areas can be focused on during the synthesis process to ensure the natural integration of foreground products and background.

[0134] 2. Fine edge segmentation: Use advanced image segmentation technology to finely process the edges of the product to ensure a smooth and natural transition between the product and the background. This includes using convolutional neural networks (CNN) for fine segmentation to accurately identify the outline of the product.

[0135] 3. Image Harmonization: Through image harmonization technology, the color and lighting of the foreground products and background are adjusted to make them look harmonious and unified. Using a deep learning model, the foreground products are adjusted accordingly based on the lighting conditions and color distribution of the background.

[0136] 4. Background generation based on diffusion model: Using diffusion model technology, images are generated based on the background text description provided by the user. The light and shadow consistency of the foreground product and the background is adjusted. This includes simulating shadow generation under natural lighting to ensure that the light and shadow relationship between the product and the background is authentic.

[0137] These technologies and modules can achieve a harmonious and natural integration of products and poster background images, greatly improving the visual effects and overall quality of the posters.

[0138] And because of the introduction of diffusion model technology, text background templates can be supported, that is, the background of the poster template can be described by text, thus achieving a more flexible and innovative design process.

[0139] Specifically, designers or marketers can define the desired poster background through natural language descriptions. For example, they can input "a vibrant summer beach scene with blue sky, white clouds and golden sand", or "a mysterious deep space background dotted with twinkling stars and colorful nebulae". The diffusion model will generate corresponding images based on these text descriptions.

[0140] By adjusting the text content, they can precisely control the visual elements of the poster. They can specify details such as color scheme, composition layout, style characteristics, etc., to ensure that the generated background is fully consistent with the image and product characteristics. This approach greatly improves the flexibility and creativity of the design.

[0141] In addition to text descriptions, you can further fine-tune the generated results by setting the hyperparameters of the diffusion model. These parameters can include:

[0142] 1. Sampling steps: controls the level of detail of image generation.

[0143] 2. Noise scale: affects the diversity and creativity of generated images.

[0144] 3. Guidance scale: determines how well the generated image matches the text description.

[0145] 4. Seed value: ensures the repeatability of the results and facilitates fine-tuning and iteration.

[0146] By adjusting these parameters, we can explore various visual variations while maintaining the core content of the text description, thereby achieving rich and diverse poster base map generation. This method can not only meet personalized needs, but also stimulate creativity and produce unexpected design effects.

[0147] This technology has completely changed the traditional poster design process. It omits the heavy workload of relying on library retrieval and matching, and no longer needs to spend a lot of time browsing and screening existing materials. Instead, creative ideas can be directly converted into visual images, greatly improving work efficiency.

[0148] More importantly, this method makes it easier and faster to customize the design for a specific product. It can quickly generate multiple design plans based on product characteristics, target audiences, and marketing strategies, and make real-time adjustments and optimizations. This not only saves time and resources, but also ensures that each product has a unique and attractive visual presentation.

[0149] In addition, the diffusion model technology has the ability to learn and adapt. Over time and with more use, the model can learn design preferences and styles, thereby providing more accurate and personalized suggestions in future designs. This continuous optimization feature makes the poster design process more and more intelligent and efficient.

[0150] Through these advanced technologies, this application example not only solves many problems in traditional methods, but also significantly improves the efficiency and aesthetics of poster generation, providing e-commerce platforms with a more professional and efficient poster generation solution.

[0151] The overall process of this application example is referenced Figure 2 , including the algorithm modules involved, and input information. The overall architecture is described as follows (including product images, saliency detection algorithm module, edge fine segmentation algorithm module, product foreground mask image, material library background image, image harmonization algorithm module, background generation module based on diffusion model, background text description information, product poster after fusion of base map, material image control information, poster text template and final product poster image):

[0152] 1. The product image uploaded by the user will first be automatically extracted through the saliency detection algorithm to extract the salient foreground in the image, that is, the product foreground. However, such segmentation accuracy is still insufficient for products with rich edge detail information, such as plush toys, so an edge fine segmentation algorithm module will be added later to ensure segmentation accuracy. After these two segmentation modules, a fine foreground mask of the product can be obtained.

[0153] 2. This application example innovatively provides two ways to generate poster background maps, taking into full account the needs and skill levels of different users. The first is a quick selection based on the material library, which allows users to directly click to select existing image materials from the preset material library as the poster background. It has the advantages of convenience, low threshold, strong consistency and instant preview. It is suitable for quickly making standardized posters, novice users or scenes where standard marketing materials need to be quickly generated. The second is dynamic generation based on text description, which allows users to provide text description information of the poster background, and then dynamically generates a unique background image through a diffusion model. It has the advantages of high personalization, unlimited possibilities, strong flexibility and innovation. It is suitable for creative advertising, highly customized product promotion or professional designers trying out new design concepts. Users can achieve ideal results through detailed text description, parameter adjustment and iterative optimization. The system can also intelligently recommend the most suitable method according to different needs, or provide mixed use options. These two complementary background generation methods greatly improve the applicability and flexibility of the system, meet the needs of users at different levels, open up a broader creative space for product poster design, and are expected to significantly improve visual expression and effect.

[0154] There are two ways to implement the above two template designs:

[0155] (1) The segmented product image and the user-selected background image from the library are sent to the image harmonization algorithm module to adaptively adjust the product’s color distribution, lighting and other information to achieve a natural fusion of the product foreground and background image.

[0156] (2) The segmented product image, the background text description information selected by the user, and the material image control information are sent to the background generation module based on the diffusion model to adaptively generate a customized product background.

[0157] 3. The product poster after the fusion base map obtained by the two methods needs to match the corresponding text template to generate the final product poster image.

[0158] Next, we will introduce the implementation details of each module:

[0159] 1. First, the foreground extraction algorithm module. This application example uses a dual-branch structure based on transformer and CNN to extract complementary features. The overall structure is referenced Figure 3 (which includes image, upper branch, lower branch, feature fusion, decoding and generating output).

[0160] Among them, a dual-branch structure is used: the upper branch uses Swin transformer as the encoder; the lower branch uses Resnet as the encoder; there is a Cross-Model Grafting Module in the center to fuse the features of the two branches; on the right is a series of Decoder blocks for decoding and generating outputs; the network has multiple auxiliary outputs and loss functions (aux sup, i.e. auxiliary supervision; AGLoss, i.e. attention-guided loss function) for supervised training.

[0161] This application example uses the model structure to perform training on a self-built dataset, thereby supporting automatic extraction of foregrounds of various semantic types, such as commodities.

[0162] 2. Next is the edge refinement module. Using only the above saliency detection to segment the target foreground will be rather blunt, especially the details of animal hair will be lost. Such loss of edge details will inevitably cause distortion of the synthesized image. Therefore, it is necessary to construct an edge refinement module to complete the hair details.

[0163] Overall process reference Figure 4(Including image, edge module, foreground mask, dilation / erosion to obtain edge uncertainty area, fine segmentation image mask). This application example uses the foreground mask obtained by saliency detection to perform dilation and erosion operations with a fixed kernel to obtain the edge uncertainty area (trimap). This trimap has clear foreground and background, as well as an uncertain area around the object. The refine module will refine the edge segmentation details based on the similarity of the foreground and background and other detail features.

[0164] 3. Image Harmonization Module:

[0165] refer to Figure 5 (including foreground image, background image, foreground fine mask, composite image, image harmonization module, color and texture harmonious image), Image Harmonization is an image processing technique that aims to make the synthesized or edited image elements blend naturally with the original background. Definition and goal: The goal of image harmonization is to adjust the inserted or edited image elements to make them visually consistent with the background scene, mainly including the coordination of color, lighting, texture, etc.

[0166] This application example explicitly calculates the visual style of the background and then uses AdaIN to apply it to the foreground.

[0167] refer to Figure 6 (including images, masks, mask features, target images, convolutional layers, convolutional layers with leaky rectified linear units and instance normalization layers, deconvolutional layers with rectified linear units and region-adaptive instance normalization layers, attention modules, deconvolutional layers with hyperbolic tangent activation functions). The overall framework uses the UNet network structure, uses the Encoder to extract Image features, and the Decoder uses the AdaIN module to estimate the two background offsets, scale and bias, to act on the foreground features.

[0168] 4. Background generation based on diffusion model:

[0169] Overall Pipeline reference Figure 7(including material images, feature comparison networks, pure product images, pure noise images, diffusion models, background content description text, target images, where the target image can be a display image / poster), the overall algorithm framework is similar to the diffusion inpainting solution with ControlNet control: This application example uses a diffusion model architecture based on fine-tuning of the image large model, with product foreground images and Gaussian random noise as input. During the diffusion process, it receives two types of guidance information: one is a text description of the generated background content, and the other is a material image dragged to the corresponding generation position. The output result is the diffusion model generation result of the background elements and material elements containing the text description. The specific introduction is as follows:

[0170] (1) Task definition. Image inpainting refers to the process of restoring or reconstructing certain areas of an image when they are missing or occluded. In this task, the foreground of the product is known, and the background needs to be generated based on the text enhancement. Using diffusion models for image inpainting is a powerful and flexible method that can generate high-quality, coherent, and coordinated inpainting results with the surrounding environment. The following are the basic steps and key concepts for image inpainting using diffusion models:

[0171] Prepare the input: original image: the image that needs to be repaired. In this application example, it is an image with a known product foreground and an unknown background; mask: a binary image that indicates which areas need to be repaired (usually white indicates the areas that need to be repaired, and black indicates the areas that are retained); conditional information: background image text description information, material image (grayscale image) information.

[0172] Initialization: Initialize the area that needs to be repaired to random noise or average color. Keep the part of the original image that does not need to be repaired.

[0173] Stepwise denoising process: The core of the diffusion model is an iterative process from noisy to clear image. At each step, the model predicts how to slightly reduce the noise in the image. For the inpainting task, we apply this denoising process only in the areas that need to be inpainted.

[0174] Conditional control: During the denoising process, additional conditional information can be introduced to guide the restoration. In this application example, it includes text prompts and material images.

[0175] Mask Attention: During the restoration process, the model needs to pay special attention to the information at the junction of the restored area and the original image. This helps to generate content that seamlessly blends in with the surrounding environment.

[0176] Iterative refinement: As the denoising step progresses, the repaired area will gradually become clearer and finer. You can run this process multiple times, slightly adjusting the parameters each time, to get the best results.

[0177] (2) How does background description text affect the diffusion generation process?

[0178] First, the text description provided by the user (such as "add a red rose in the blank") is input into a pre-trained text encoder. This encoder is usually a large language model. The text is converted into a high-dimensional vector representation, namely the text embedding. This embedding captures the semantic information of the text.

[0179] Second, the extracted text information is used through conditional injection: text embeddings are used as conditional information during the denoising process of the diffusion model. This is usually achieved through a cross-attention mechanism, allowing the model to focus on different parts of the text description when generating an image.

[0180] Finally, the infiltration of text will affect the entire prediction process and guide the model to generate content that matches the text description.

[0181] (3) How does the material background affect the diffusion process?

[0182] ControlNet is a technology used in conjunction with diffusion models to provide more precise control over the image generation process. ControlNet is an advanced technology built on existing diffusion models such as stable diffusion, which enhances the control capabilities of the model by adding a series of neural network layers running in parallel. It receives specific conditional inputs (such as edge maps, depth maps, or segmentation maps) and processes these inputs through a specially designed encoder network to extract key features. These processed conditional features are then fused with the intermediate feature maps of the diffusion model, usually using operations such as addition or concatenation. ControlNet introduces zero convolution layers to achieve adaptive control, allowing the model to ignore certain control signals when necessary, ensuring that the generation quality is not affected when the control signals are irrelevant. By injecting control signals at multiple stages of the diffusion process, ControlNet achieves fine control at multiple scales. Its training strategy is usually divided into two stages: first, the basic diffusion model is trained and its parameters are fixed, and then only the newly added control network part is trained. A specially designed loss function is used to balance the generation quality and the degree of compliance with the conditions. During inference, ControlNet generates images through a reverse diffusion process, considering the impact of the conditional input at each step and gradually refining the output results.

[0183] 4. The final product poster can be combined with some fonts or text templates to form the final display poster.

[0184] This application example brings the following significant advantages:

[0185] 1. Text-guided background generation:

[0186] Supports describing and guiding the generation of poster background images through text templates.

[0187] The visual elements, style and mood of the background can be precisely controlled using natural language.

[0188] It greatly enhances the diversity of poster generation and realizes true personalized customization.

[0189] 2. Highly integrated technology modules:

[0190] This application example achieves a harmonious and natural interaction between the product foreground and background content by rationally combining multiple advanced image processing and generation technologies:

[0191] a) Saliency Detection:

[0192] Accurately identify key visual elements in product images.

[0193] Make sure important information is highlighted in the poster.

[0194] b) Fine edge segmentation:

[0195] Accurately separate product foreground and background.

[0196] This lays the foundation for subsequent fusion processing and ensures natural edge transitions.

[0197] c) Image Harmonization:

[0198] Adjust the hue, saturation, and brightness of your product images to blend in with the background.

[0199] Create a unified visual style and enhance the overall aesthetic.

[0200] d) Background image generation based on diffusion model:

[0201] Generate high-quality, personalized background images based on text descriptions.

[0202] Make sure the background matches the theme and style of your product.

[0203] e) Light and shadow adjustment:

[0204] Analyze the light source and shadow distribution of the background image.

[0205] Adjust the lighting and shadow effects of product images accordingly to improve realism and integration.

[0206] This comprehensive approach not only overcomes the limitations of traditional pixel fusion, but also significantly improves the aesthetics of the generated posters. A natural and harmonious visual transition is achieved between the product foreground and background, creating an attractive and professional design.

[0207] In addition, this application example has the following advantages:

[0208] 1. Improved efficiency: It omits the tedious work of image library retrieval and matching, speeding up the design process.

[0209] 2. Cost reduction: Reduced reliance on large material libraries and reduced maintenance costs.

[0210] 3. Innovation Inspiration: Provides designers with new creative tools and encourages breakthrough thinking.

[0211] 4. Strong adaptability: The design style can be quickly adjusted according to market feedback and demand.

[0212] 5. Scalability: System performance can be continuously optimized and upgraded.

[0213] In conclusion, by introducing diffusion model technology and combining a variety of advanced image processing methods, this application example has brought revolutionary changes to product poster design. It not only solves the diversity and harmony problems faced by the industry, but also creates a more efficient and innovative design paradigm.

[0214] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0215] Based on the same inventive concept, the embodiment of the present application also provides an item display image generation device for implementing the item display image generation method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more item display image generation device embodiments provided below can refer to the limitations of the item display image generation method above, and will not be repeated here.

[0216] In an exemplary embodiment, Figure 8 As shown, a device for generating an item display image is provided, and the device for generating an item display image 800 may include:

[0217] A foreground extraction module 801 is used to perform foreground extraction processing on the initial image of the object to obtain a foreground image of the object;

[0218] The edge segmentation module 802 is used to perform edge segmentation processing on the foreground image to obtain a processed foreground image of the object;

[0219] The image updating module 803 is used to update the processed foreground image according to the background image of the object to obtain a target foreground image of the object; the visual features of the target foreground image match the visual features of the background image;

[0220] The image fusion module 804 is used to perform image fusion processing on the target foreground image and the background image to obtain a display image of the object.

[0221] In an exemplary embodiment, the edge segmentation module 802 is also used to perform edge expansion and edge contraction processing on the foreground image to obtain the edge transition area of ​​the object; based on the edge transition area, the foreground image is edge segmented to obtain a segmented image of the object as the processed foreground image of the object.

[0222] In an exemplary embodiment, the image update module 803 is also used to extract the visual features of the background image of the object; according to the visual features of the background image, the visual features of the processed foreground image are updated until the visual features of the updated foreground image match the visual features of the background image, and the updated foreground image is used as the target foreground image.

[0223] In an exemplary embodiment, the device 800 also includes: a background generation module, which is used to obtain background text description information corresponding to the object; input the background text description information into a pre-trained text feature extraction model for text feature extraction processing to obtain text features of the background text description information; input the text features into a pre-trained background generation model for background generation processing to obtain a background image.

[0224] In an exemplary embodiment, the device 800 further includes: a background selection module, which is used to select a target background image material from a preset background image material library in response to a background selection instruction; and use the target background image material as the background image of the object.

[0225] In an exemplary embodiment, the foreground extraction module 801 is also used to perform image feature extraction processing on the initial image through an image feature extraction model to obtain image features of the object; based on the image features, perform foreground area identification on the initial image to obtain the foreground area of ​​the object; based on the foreground area, extract the foreground image from the initial image.

[0226] In an exemplary embodiment, the image feature extraction model includes a first image feature extraction model and a second image feature extraction model having a different model structure from the first image feature extraction model; the foreground extraction module 801 is further used to perform image feature extraction processing on the initial image through the first image feature extraction model to obtain the first image feature of the object; perform image feature extraction processing on the initial image through the second image feature extraction model to obtain the second image feature of the object; and perform feature fusion processing on the first image feature and the second image feature to obtain the image feature of the object.

[0227] Each module in the above-mentioned device for generating an item display image can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0228] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig. 9As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for generating an item display image is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0229] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0230] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0231] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0232] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0233] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

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

[0235] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for generating an item display image, characterized in that: The method comprises: Performing foreground extraction processing on the initial image of the object to obtain a foreground image of the object; Performing edge segmentation processing on the foreground image to obtain a processed foreground image of the object; updating the processed foreground image according to the background image of the object to obtain a target foreground image of the object; the visual features of the target foreground image match the visual features of the background image; The target foreground image and the background image are subjected to image fusion processing to obtain a display image of the object.

2. The method according to claim 1, characterized in that The performing edge segmentation processing on the foreground image to obtain the processed foreground image of the object includes: Performing edge expansion processing and edge contraction processing on the foreground image to obtain an edge transition area of ​​the object; The foreground image is subjected to edge segmentation processing according to the edge transition region to obtain a segmented image of the object as a processed foreground image of the object.

3. The method according to claim 1, characterized in that The step of updating the processed foreground image according to the background image of the object to obtain a target foreground image of the object includes: extracting visual features of a background image of the object; According to the visual features of the background image, the visual features of the processed foreground image are updated until the visual features of the updated foreground image match the visual features of the background image, and the updated foreground image is used as the target foreground image.

4. The method according to claim 1, characterized in that: Before updating the processed foreground image according to the background image of the object to obtain the target foreground image of the object, the method further includes: Obtaining background text description information corresponding to the item; Inputting the background text description information into a pre-trained text feature extraction model to perform text feature extraction processing to obtain text features of the background text description information; The text features are input into a pre-trained background generation model to perform background generation processing to obtain the background image.

5. The method according to claim 1, characterized in that: Before updating the processed foreground image according to the background image of the object to obtain the target foreground image of the object, the method further includes: In response to the background selection instruction, a target background image material is selected from a preset background image material library; The target background image material is used as the background image of the object.

6. The method according to any one of claims 1 to 5, characterized in that: The step of performing foreground extraction processing on the initial image of the object to obtain the foreground image of the object includes: Performing image feature extraction processing on the initial image through an image feature extraction model to obtain image features of the object; According to the image features, foreground area recognition is performed on the initial image to obtain the foreground area of ​​the object; The foreground image is extracted from the initial image according to the foreground area.

7. The method according to claim 6, characterized in that The image feature extraction model includes a first image feature extraction model and a second image feature extraction model having a different model structure from the first image feature extraction model; The performing image feature extraction processing on the initial image by using an image feature extraction model to obtain the image features of the object includes: Performing image feature extraction processing on the initial image by using the first image feature extraction model to obtain a first image feature of the object; Performing image feature extraction processing on the initial image by using the second image feature extraction model to obtain a second image feature of the object; The first image feature and the second image feature are subjected to feature fusion processing to obtain the image feature of the object.

8. An object display image generating device, characterized in that: The device comprises: A foreground extraction module, used to perform foreground extraction processing on the initial image of the object to obtain a foreground image of the object; An edge segmentation module, used for performing edge segmentation processing on the foreground image to obtain a processed foreground image of the object; An image updating module, used to update the processed foreground image according to the background image of the object to obtain a target foreground image of the object; the visual features of the target foreground image match the visual features of the background image; The image fusion module is used to perform image fusion processing on the target foreground image and the background image to obtain a display image of the object.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Model chart generation method and device for clothes edge optimization, equipment and medium

    CN120070626A