Image processing method and apparatus, and electronic device

By using an automated image style transfer method, the problem of high manpower and time costs for e-commerce merchants when changing product image styles is solved, achieving efficient image processing and improving object conversion rates.

WO2026242498A1PCT designated stage Publication Date: 2026-11-26TAOBAO CHINA SOFTWARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/073419
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-21
Filing Date
2026-01-19
Publication Date
2026-11-26

AI Technical Summary

Technical Problem

E-commerce merchants need to invest a lot of manpower and time when changing the style of product images, resulting in high time and manpower costs and low efficiency in changing image styles.

Method used

By acquiring the reference object image and the image of the object to be processed, the elements to be migrated are determined, and the element layout and background redraw are performed to achieve automatic image style migration.

Benefits of technology

It improves the quality and efficiency of image processing operations, reduces image generation costs for businesses, and increases object conversion rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026073419_26112026_PF_FP_ABST
    Figure CN2026073419_26112026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an image processing method and apparatus, and an electronic device. The image processing method comprises: acquiring a reference object image and an object image to be processed; on the basis of the reference object image, determining at least one element to be transferred adapted to the object image; on the basis of the reference object image and the object image, performing an element layout operation on the at least one element to be transferred, to obtain an element layout diagram corresponding to the object image; and on the basis of the reference object image, performing background redrawing on the element layout diagram to obtain a target object image corresponding to the object image. In the embodiments of the present application, an image style transfer operation can be automatically performed on the object image on the basis of the reference object image, such that not only the quality and efficiency of an image processing operation can be improved, but also the image generation cost of a merchant can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Image processing methods, apparatus and electronic equipment Technical Field

[0001] This application relates to the field of image technology, and in particular to an image processing method, apparatus and electronic device. Background Technology

[0002] For e-commerce merchants, a consistent product image style helps shape a brand image and increase consumer recognition. The style of product images needs to be changed regularly according to seasonal changes, promotions, and other factors, and the marketing information in the product images also needs to be updated according to actual marketing activities.

[0003] Currently, merchants need to invest considerable manpower and time to change the style of their product images. However, this not only increases the time and manpower costs of changing product image styles, but also reduces the efficiency of the process. Summary of the Invention

[0004] This application provides an image processing method, apparatus, and electronic device that can automatically perform image style transfer operations, which helps to improve the quality and efficiency of image processing operations.

[0005] This invention provides an image processing method, including:

[0006] Obtain the reference object image and the image of the object to be processed;

[0007] Based on the reference object graph, at least one element to be migrated that is adapted to the object image is determined;

[0008] Based on the reference object diagram and the object image, perform element layout operations on the at least one element to be migrated to obtain an element layout diagram corresponding to the object image.

[0009] Based on the reference object image, the element layout image is redrawn to obtain a target object image corresponding to the object image.

[0010] This invention provides an image processing apparatus, comprising:

[0011] The first acquisition module is used to acquire the reference object image and the object image to be processed.

[0012] The first determining module is used to determine at least one element to be migrated that is adapted to the object image based on the reference object image;

[0013] The first processing module is used to perform element layout operations on the at least one element to be migrated based on the reference object diagram and the object image to obtain an element layout diagram corresponding to the object image.

[0014] The first processing module is further configured to redraw the background of the element layout diagram based on the reference object diagram to obtain a target object image corresponding to the object image.

[0015] This invention provides an electronic device, including: a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method described in the first aspect above.

[0016] This invention provides a computer storage medium for storing a computer program that, when executed by a computer, implements the method described in the first aspect above.

[0017] This invention provides a computer program product, comprising: a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the method described in the first aspect above.

[0018] The image processing method, apparatus, and electronic device provided in this embodiment acquire a reference object image and an object image to be processed. Based on the reference object image, at least one element to be migrated that is compatible with the object image is determined. Then, based on the reference object image and the object image, an element layout operation is performed on the at least one element to be migrated to obtain an element layout image corresponding to the object image. Subsequently, the background of the element layout image can be redrawn based on the reference object image. This effectively realizes the automatic image style migration operation of the object image based on the reference object image. This not only improves the quality and efficiency of image processing operations but also reduces the image generation cost for merchants. Then, an object publishing operation can be performed based on the generated target object image, which is conducive to improving the object conversion rate and further ensuring the practicality of the method. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0020] Figure 1 is a schematic diagram of a scene of an image processing method provided by an exemplary embodiment of this application;

[0021] Figure 2 is a schematic flowchart of an image processing method provided in an exemplary embodiment of this application;

[0022] Figure 3 is a schematic flowchart of a method for determining at least one element to be migrated that is adapted to the object image, provided by an exemplary embodiment of this application.

[0023] Figure 4 is a schematic diagram of an exemplary embodiment of this application, which shows the process of performing element layout operation on the at least one element to be migrated based on the reference object diagram and the object image to obtain an element layout diagram corresponding to the object image.

[0024] Figure 5 is a schematic diagram of a process for redrawing the background of the element layout diagram based on the reference object diagram to obtain a target object image corresponding to the object image, according to an exemplary embodiment of this application.

[0025] Figure 6 is a schematic diagram illustrating the principle of an image style transfer method provided in an exemplary application embodiment of this application;

[0026] Figure 7 is a schematic diagram of the style diagram, product image, and target product image provided in an exemplary application embodiment of this application;

[0027] Figure 8 is a schematic diagram of the structure of an image processing apparatus provided in an exemplary embodiment of this application;

[0028] Figure 9 is a schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this application. Detailed Implementation

[0029] 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 in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0030] It should be noted that, in the cases involving user information in the embodiments of this application, 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 the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse. In addition, the various models involved in this application (including but not limited to language models or large models) comply with relevant laws and standards.

[0031] Additionally, it should be noted that when user interaction operations or triggering operations are involved in the embodiments of this application, these operations include, but are not limited to, various interaction methods such as touch operations, gesture operations, voice operations, head movement operations, and eye movement operations. Touch operations include, but are not limited to, click operations, double-click operations, long-press operations, swipe operations, pinch operations, or mouse hover operations. Swipe operations include, but are not limited to, straight-line swipes and curved-line swipes.

[0032] To facilitate understanding of the image processing methods, apparatus, and electronic devices provided in the embodiments of this application, the relevant technologies are briefly described below:

[0033] For e-commerce merchants, a consistent product image style helps shape a brand image and increase consumer recognition. The style of product images needs to be changed regularly according to seasonal changes, promotions, and other factors, and the marketing information in the images also needs to be updated according to actual marketing activities. For small and medium-sized businesses, unifying product image formats at a low cost can also effectively enhance brand competitiveness.

[0034] For product images, merchants need to invest considerable manpower and time to change their image style. Currently, there are two main ways to achieve this:

[0035] Method 1: Use a fixed template to perform image style migration. Specifically, determine a fixed template for performing image style migration, and then fill in the subject and various marketing information corresponding to the image to be migrated into the fixed template in a fill-in-the-blank manner to achieve the image style migration operation.

[0036] However, the above implementation method has the following drawbacks: the number and layout of fixed templates are greatly limited, the diversity and richness are insufficient, and it is impossible to adapt to specific product characteristics.

[0037] Implementation Method 2: Perform simple background replacement operations through the image generation model of the image source, that is, use artificial intelligence technology to help realize style change operations of product images, which can save costs for merchants.

[0038] However, the above implementation method has the following drawbacks: the image generation model can only perform simple background replacement operations, lacks the design and optimization of the overall image layout structure, and after the image is replaced by the background, the user still needs to perform additional image editing operations to turn it into a product image that can be displayed. This makes the time and labor costs corresponding to image processing operations still very high.

[0039] To address the aforementioned technical problems, this application provides an image processing method, apparatus, and electronic device. Referring to Figure 1, the executing entity of the image processing method can be an image processing apparatus 200, which can be implemented as a local server or a cloud server. When the image processing apparatus 200 is implemented as a cloud server, the image processing method can be executed in the cloud. Several computing nodes (cloud servers) can be deployed in the cloud, each possessing processing resources such as computing and storage. In the cloud, multiple computing nodes can be organized to provide a certain service; conversely, a single computing node can provide one or more services. The cloud can provide this service by providing an external service interface, which users can call to use the corresponding service. Service interfaces include software development kits (SDKs), application programming interfaces (APIs), and other forms.

[0040] The image processing device 200 is communicatively connected to the client 100, which is used by the user to trigger image processing operations. The client 100 can be any computing device with a certain information interaction capability; specifically, it can be a mobile phone, a personal computer (PC), a tablet computer, a configuration application, etc. Furthermore, the basic structure of the client 100 may include at least one processor. The number of processors depends on the client's configuration and type. The client 100 may also include memory, which can be volatile, such as Random Access Memory (RAM), or non-volatile, such as Read-Only Memory (ROM), flash memory, etc., or both types. The memory typically stores the operating system (OS), one or more applications, and may also store program data. In addition to the processing unit and memory, the client 100 also includes some basic configurations, such as a network interface card (NIC) chip, an I / O bus, a display component, and some peripheral devices. Optionally, some peripheral devices may include, for example, a keyboard, a mouse, a stylus, a printer, etc. Other peripheral devices are well known in the art and will not be described in detail here.

[0041] Image processing device 200 refers to a device capable of performing image processing operations in a network virtual environment, typically referring to a device that utilizes a network for information planning and image processing operations. The image processing device 200 can be implemented as an image processing model for performing image processing operations. Physically, the image processing device 200 can be any device capable of providing computing services and performing corresponding image processing operations, such as a processor, server, etc. The image processing device 200 mainly consists of a processor, hard disk, memory, system bus, etc., and its architecture is similar to that of a general-purpose computer.

[0042] In this embodiment described above, the image processing device 200 and the client 100 are connected via a network, which can be a wireless or wired network connection. If the image processing device 200 and the client 100 are connected via a communication connection, the network standard of the mobile network can be any one of 2G (Global System for Mobile Communications GSM), 2.5G (General Packet Radio Service GPRS), 3G (Wideband Code Division Multiple Access (WCDMA), Time Division Synchronous Code Division Multiple Access (TD-SCDMA), 4G (Long Term Evolution LTE), 4G+ (Enhanced Long Term Evolution LTE+), Global Microwave Access Interoperability (WiMax), 5G, 6G, etc.

[0043] In this embodiment, the client 100 is used by a user to trigger a reference object image and an object image to be processed for image processing operations. The reference object image can be a style image used as a style reference, and the object image to be processed is used as the original object image to be transferred. In some instances, the reference object image and the object image to be processed can be obtained through human-computer interaction. Specifically, an image processing interface can be displayed on the client 100, where the user can input image selection or image transfer operations, and then obtain the reference object image and the object image to be processed that can trigger the image processing operations. To perform style transfer operations on the object image to be processed based on the reference object image, the reference object image and the object image to be processed can be sent to the image processing device 200 for processing.

[0044] Image processing apparatus 200 is used to acquire a reference object image and an object image to be processed; then, based on the reference object image, it can determine at least one element to be migrated that is compatible with the object image, wherein the at least one element to be migrated can include at least one of the following: object body, object image border, object image blemishes, object image promotional text, object image background, object identifier (i.e., logo), etc. In order to analyze and process the object image to be processed based on the image style of the reference object image, an element layout operation can be performed on at least one element to be migrated based on the reference object image and the object image to obtain an element layout image corresponding to the object image. This element layout image can include at least one of the following: at least one element to be migrated, layout position information of each element to be migrated, display information of each element to be migrated, and relative position information between any two elements to be migrated. After obtaining the element layout diagram, the background of the element layout diagram can be redrawn based on the reference object diagram to obtain the target object image corresponding to the object image. The background of the target object image is different from the background of the reference object diagram, and the background of the target object image is similar to the background of the reference object diagram. In this way, the automatic style transfer operation of the object image based on the reference object diagram is stably and effectively realized.

[0045] In this embodiment, the image style transfer operation of the object image can be automatically performed based on the reference object image. This not only improves the quality and efficiency of image processing operations, but also reduces the image generation cost for merchants. The generated target object image can then be published, which helps to improve the conversion rate of the object corresponding to the target object image and further ensures the practicality of the method.

[0046] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0047] Figure 2 is a schematic flowchart of an image processing method provided in an exemplary embodiment of this application. Referring to Figure 2, this embodiment provides an image processing method, the execution subject of which is an image processing device. This image processing device can be implemented as software or a combination of software and hardware. When the image processing device is implemented as hardware, it can specifically be various electronic devices capable of performing image processing operations, including but not limited to personal computers, servers, etc. When the image processing device is implemented as software, it can be installed in the aforementioned electronic devices. Specifically, the image processing method provided in this embodiment may include:

[0048] Step S201: Obtain the reference object image and the object image to be processed.

[0049] Step S202: Based on the reference object graph, determine at least one element to be migrated that is compatible with the object image.

[0050] Step S203: Perform element layout operation on at least one element to be migrated based on the reference object graph and the object image to obtain an element layout graph corresponding to the object image.

[0051] Step S204: Redraw the background of the element layout diagram based on the reference object diagram to obtain the target object image corresponding to the object image.

[0052] The specific implementation methods and principles of each of the above steps are explained in detail below:

[0053] Step S201: Obtain the reference object image and the object image to be processed.

[0054] When a user has image processing needs, the image processing device can acquire a reference object image and an object image to be processed. The reference object image can be a style image providing a reference style, enabling style transfer operations on the object image based on the provided reference style. The object image to be processed can be the original image for which style transfer operations are required. The reference object image can include the main body of a reference object, and the object image to be processed can include the main body of an object. The reference object and the object can be any of the following: a product object, a person object, an animal object, a digital collectible object, etc. The main body of the reference object can be an object similar to the main body of the object, or it can be an object dissimilar to the main body of the object, or it can be the same as the main body of the object.

[0055] Furthermore, this embodiment does not limit the specific method for obtaining the reference object image and the object image to be processed. In some instances, the reference object image and the object image to be processed can be obtained through image transmission operations. In this case, obtaining the reference object image and the object image to be processed may include: obtaining the image transmission interface corresponding to the image processing device; determining the client that is connected to the image transmission interface; and performing image transmission operations based on the client and the image transmission interface, thereby obtaining the reference object image and the object image to be processed. This, to a certain extent, ensures the accuracy and reliability of obtaining the reference object image and the object image to be processed.

[0056] In other instances, the reference object image and the object image to be processed can be obtained through human-computer interaction. In this case, obtaining the reference object image may include: obtaining the store information corresponding to the user's identity identifier, determining multiple store images based on the store information; obtaining the user's selection operation for any store image; determining the object image to be processed based on the selection operation; then, multiple recommended object images corresponding to the object image can be obtained; and then, the user's selection operation for any recommended object image can be obtained, thereby reliably obtaining the reference object image. This also ensures the accuracy and reliability of obtaining the reference object image and the object image to be processed.

[0057] Specifically, during image processing, the number of object images to be processed can be one or more, and the number of reference object images obtained can also be one or more. For example, when performing style transfer on a single object image, one reference object image and the object image to be processed can be obtained. When performing style transfer on a batch of object images, multiple reference object images and multiple object images to be processed can be obtained. Each object image to be processed can correspond to one reference object image. In this case, the reference object image and the object image to be processed can be presented as image pairs, such as: (reference object image 1, object image 1), (reference object image 2, object image 2), (reference object image 3, object image 3)..., so that style transfer can be performed on the image to be processed based on the reference object image corresponding to the image to be processed. Alternatively, when performing style transfer on a batch of object images, one reference object image and a set of object images can be obtained. The set of object images can include multiple object images to be processed, so that a single reference object image can be used to perform a comprehensive style transfer operation on multiple object images in the set of object images.

[0058] Step S202: Based on the reference object graph, determine at least one element to be migrated that is compatible with the object image.

[0059] In order to achieve style transfer based on a reference object image, after obtaining the reference object image and the object image, the reference object image can be analyzed and processed to determine at least one element to be transferred that is compatible with the object image. The at least one element to be transferred may include at least one of the following: object body, object image border, object image blemishes, object image promotional text, object image background, object logo, etc. The object body may include the outline information of the object body, and the object logo may include the brand information of the object body, the trademark information of the object body, etc.

[0060] Furthermore, this embodiment does not limit the specific implementation method for determining at least one element to be transferred. In some instances, at least one element to be transferred can be determined by an element recognition model. The element recognition model is trained to determine image elements that are adapted to the object image based on a reference object map. In this case, determining at least one element to be transferred that is adapted to the object image based on the reference object map may include: obtaining a pre-trained element recognition model; inputting the reference object map and the object image into the element recognition model for processing to obtain at least one element to be transferred that is adapted to the object image output by the element recognition model. The at least one element to be transferred is an image element adapted to the object image, and the at least one element to be transferred may include at least some image elements in the reference object map.

[0061] Specifically, the implementation principle of inputting the reference object image and the object image into the element recognition model for processing can be as follows: The element recognition model can first perform element recognition operation on the reference object image to obtain at least one reference image element corresponding to the reference object image. Then, the element recognition model is used to perform a fit degree calculation operation on at least one reference image element and the object image. Based on the calculated fit degree, at least one element to be transferred that is adapted to the object image is determined from at least one reference image element. This ensures the accuracy and reliability of determining at least one element to be transferred to a certain extent.

[0062] Step S203: Perform element layout operation on at least one element to be migrated based on the reference object graph and the object image to obtain an element layout graph corresponding to the object image.

[0063] Since at least one element to be transferred is an image element adapted to the object image, it means that at least one element to be transferred can be directly applied to generate a target object image corresponding to the object image. Because the style transfer operation on the object image to be processed based on the reference object image includes not only the transfer operation of image elements but also the transfer operation of element layout information, in order to accurately process the object image based on the reference object image, after obtaining at least one element to be transferred, an element layout operation can be performed on the at least one element to be transferred based on the reference object image and the object image. This results in an element layout image corresponding to the object image, which may include at least one of the following: at least one element to be transferred, layout position information of each element to be transferred, display information of each element to be transferred (including display color, display size, display font, etc.), and relative position information between any two elements to be transferred.

[0064] Specifically, this embodiment does not limit the specific method for obtaining the element layout map. In some instances, the element layout map can be implemented based on a layout transfer model. In this case, performing element layout operations on at least one element to be transferred based on a reference object map and an object image to obtain an element layout map corresponding to the object image may include: obtaining a pre-trained layout transfer model, wherein the layout transfer model is trained to perform element layout recognition and transfer operations based on a reference object map and an object image. The layout transfer model can be implemented as a neural network model based on an attention mechanism (transformer neural network model) and a convolutional neural network (CNN). The input data of the model may include: layout element size, initial position, and target image. The output data of the model may be an aesthetically pleasing element layout scheme. Then, the reference object map, the object image, and at least one element to be transferred can be input into the layout transfer model to perform element layout operations, obtaining the element layout map output by the layout transfer model corresponding to the object image. This, to a certain extent, ensures the accuracy and reliability of obtaining the element layout map.

[0065] The implementation principle of using the layout transfer model to perform layout element operations on the reference object image, the object image, and at least one element to be transferred is as follows: The layout transfer model is used to perform image style recognition operations on the reference object image and the object image to determine the target element layout; then the layout transfer model can perform layout operations on at least one element to be transferred based on the target element layout to obtain an element layout image corresponding to the object image.

[0066] Step S204: Redraw the background of the element layout diagram based on the reference object diagram to obtain the target object image corresponding to the object image.

[0067] Since the image style transfer operation can include not only element layout operations for at least one element to be transferred, but also background redrawing operations, after obtaining the element layout map, the background redrawing operation can be performed on the element layout map based on the reference object map, thereby obtaining the target object image corresponding to the object image. The background of the target object image is different from the background of the reference object map, and the background of the target object image is similar to the background of the reference object map.

[0068] In some instances, background redrawing of the element layout image can be achieved using a pre-trained background redrawing model. In this case, redrawing the background of the element layout image based on the reference object image to obtain the target object image corresponding to the object image can include: obtaining a pre-trained background redrawing model, where the background redrawing model is used to regenerate the background; after obtaining the element layout image and the reference object image, the reference object image and the element layout image can be input into the background redrawing model for background redrawing, thereby obtaining the target object image corresponding to the object image output by the background redrawing model. This ensures the accuracy and reliability of obtaining the target object image to a certain extent.

[0069] The image processing method provided in this embodiment obtains a reference object image and an object image to be processed. Based on the reference object image, it determines at least one element to be migrated that is compatible with the object image. Then, based on the reference object image and the object image, it performs an element layout operation on the at least one element to be migrated to obtain an element layout image corresponding to the object image. Subsequently, the background of the element layout image can be redrawn based on the reference object image. This effectively realizes the automatic image style migration operation of the object image based on the reference object image. This not only improves the quality and efficiency of image processing operations, but also reduces the image generation cost for merchants. Then, it can be published based on the generated target object image, which is conducive to improving the conversion rate of the object corresponding to the target object image, further ensuring the practicality of the method.

[0070] Figure 3 is a flowchart illustrating the process of determining at least one element to be migrated that is adapted to an object image, provided in an exemplary embodiment of this application. Based on the above embodiment, referring to Figure 3, for at least one element to be migrated that is adapted to an object image, it can not only be obtained by analyzing and processing the reference object image and the object image using an element recognition model, but also determined based on at least one reference image element corresponding to the reference object image and the information representation attributes corresponding to each reference image element. In this case, determining at least one element to be migrated that is adapted to the object image based on the reference object image may include:

[0071] Step S301: Obtain at least one reference graph element corresponding to the reference object graph, and the information representation attributes corresponding to each reference graph element.

[0072] In order to perform image style transfer based on a reference object image, after obtaining the reference object image, the reference object image can be analyzed and processed to obtain at least one reference image element corresponding to the reference object image and information representation attributes corresponding to each reference image element. The information representation attributes may include at least one of the following: model, color, specifications, marketing information, object description information, etc., used to represent the main body of the object.

[0073] For example, when the reference image element is implemented as a bordered psoriasis, the text information corresponding to the bordered psoriasis is used to identify the color information of the main object; when the reference image element is implemented as a plain text psoriasis, the text information corresponding to the plain text psoriasis is used to identify the specification information of the main object; when the reference image element is implemented as an object identification pattern, the text information corresponding to the object identification pattern is used to identify the model of the main object, and so on.

[0074] In some instances, at least one reference graph element and the corresponding information representation attributes of each reference graph element can be obtained through a pre-trained image recognition model. In this case, obtaining at least one reference graph element corresponding to the reference object graph and the corresponding information representation attributes of each reference graph element may include: obtaining a pre-trained image recognition model for implementing element recognition operations; inputting the reference object graph into the image recognition model for processing, and obtaining the at least one reference graph element corresponding to the reference object graph and the corresponding information representation attributes of each reference graph element output by the image recognition model. This, to a certain extent, ensures the accuracy and reliability of obtaining at least one reference graph element and the corresponding information representation attributes of each reference graph element.

[0075] In other instances, at least one reference graph element and the corresponding information representation attributes of each reference graph element can be obtained not only through a pre-trained image recognition model, but also through multiple different perception models. In this case, obtaining at least one reference graph element corresponding to the reference object graph and the corresponding information representation attributes of each reference graph element may include: obtaining multiple perception models for element recognition of the reference object graph, wherein the perception models are models used to perform element recognition, detection, and segmentation operations, and different perception models are used to perform recognition operations on different reference graph elements; and performing perception processing on the reference object graph using multiple perception models to obtain at least one reference graph element corresponding to the reference object graph and the corresponding information representation attributes of each reference graph element.

[0076] Specifically, multiple perceptual models are pre-trained for recognizing image elements. Different perceptual models are used to recognize different reference image elements. For example, when the reference image elements include the object body, object image border, object image blemishes, object image promotional text, object image background, object logo, etc., the object image border and object image blemishes correspond to perceptual model 1, the object body corresponds to perceptual model 2, the object image promotional text corresponds to perceptual model 3, and the object logo can correspond to perceptual model 4.

[0077] After obtaining the reference object image, the aforementioned perception model 1 can be used to perform element recognition operations on the reference object image, thereby obtaining the object image border, object image blemishes, and the information representation attributes corresponding to the object image border and object image blemishes. Similarly, perception model 2 can be used to perform element recognition operations on the reference object image, thereby obtaining the object body, the outline of the object body, and the object category corresponding to the reference object image. Perception model 3 can be used to perform element recognition operations on the reference object image, thereby obtaining the object image promotional copy, and the information representation attributes corresponding to the object image promotional copy. Perception model 4 can be used to perform element recognition operations on the reference object image, thereby obtaining the object identifier (i.e., object logo), and the information representation attributes corresponding to the object identifier.

[0078] It is important to note that for the background of the object image corresponding to the reference object image, it is not necessary to use a perceptual model to analyze and process the reference object image to determine it. After obtaining the object body, object image border, object image blemishes, object image promotional text, and object logo, the above-mentioned reference image elements in the reference object image can be deleted to obtain the background of the object image corresponding to the reference object image. This effectively achieves the accuracy and reliability of obtaining the background of the object image.

[0079] Step S302: Based on at least one reference graph element and the information representation attributes corresponding to each reference graph element, determine at least one element to be transferred that is compatible with the object image.

[0080] After obtaining at least one reference graph element and the information representation attributes corresponding to each reference graph element, the at least one reference graph element and the information representation attributes corresponding to each reference graph element can be analyzed and processed, thereby determining at least one element to be transferred that is compatible with the object image.

[0081] In some instances, at least one element to be transferred can be determined based on the fit between at least one reference graph element and the object image. In this case, determining at least one element to be transferred that is adapted to the object image, based on at least one reference graph element and the information representation attributes corresponding to each reference graph element, may include: determining the fit between each reference graph element and the object image based on the information representation attributes corresponding to each reference graph element; if the fit is greater than or equal to a preset threshold, then the reference graph element corresponding to the fit is determined as an element to be transferred that is adapted to the object image; if the fit is less than the preset threshold, then the reference graph element corresponding to the fit is determined as an element to be transferred that is not adapted to the object image. This, to a certain extent, ensures the accuracy and reliability of determining at least one element to be transferred.

[0082] In some other instances, at least one element to be migrated can be determined not only by the fit between the reference graph element and the object image, but also by the element type of each reference graph element. In this case, determining at least one element to be migrated that is adapted to the object image based on at least one reference graph element and the information representation attributes corresponding to each reference graph element may include: determining the element type of any reference graph element based on the information representation attributes corresponding to each reference graph element. The element type includes any one of the following: a shared type used to identify that the reference graph element is applicable to the object image, or a non-shared type used to identify that the reference graph element is not applicable to the object image; and determining at least one element to be migrated that is adapted to the object image based on at least one reference graph element and the element type of each reference graph element.

[0083] The reference graph elements can include two types of elements: shared elements that can be shared across different object images, and non-shared elements that cannot be shared across different object images. Since shared reference graph elements can serve as transferable elements adapted to the object image, while non-shared reference graph elements cannot, to accurately determine at least one transferable element adapted to the object image, after obtaining the information representation attributes corresponding to each reference graph element, the element type of any reference graph element can be determined based on these information representation attributes. In some instances, the element type of the reference graph element can be determined by analyzing and processing the information representation attributes corresponding to each reference graph element using a pre-configured mapping table. This mapping table includes multiple standard representation attributes and corresponding standard element types.

[0084] After determining the element type of each reference graph element, at least one element to be transferred that is compatible with the object image can be identified from at least one reference graph element based on its element type. In some instances, determining at least one element to be transferred that is compatible with the object image based on at least one reference graph element and its element type may include: if the element type of the reference graph element is a shared type, then the reference graph element is determined to be a transferable element compatible with the object image; or, if the element type of the reference graph element is a non-shared type, then the reference graph element is determined not to be a transferable element compatible with the object image. This achieves accurate determination of the transferable element compatible with the object image.

[0085] In other instances, the elements to be migrated that are adapted to the object image can be determined not only based on at least one reference image element and the element type of each reference image element, but also in combination with the original image elements in the object image. In this case, determining at least one element to be migrated that is adapted to the object image based on at least one reference image element and the element type of each reference image element may include: obtaining the original image elements included in the object image; if the element type of the reference image element is a shared type, then the reference image element and the original image element are determined to be elements to be migrated that are adapted to the object image; or, if the element type of the reference image element is a non-shared type, then the original image element is determined not to be an element to be migrated that is adapted to the object image. This achieves the accurate determination of the elements to be migrated that are adapted to the object image.

[0086] Furthermore, to ensure the practicality of the style transfer operation for the object image, after determining that the reference image elements are not compatible with the object image and are to be transferred, the elements to be transferred can include not only image elements based on the reference object image and / or the object image, but also modified elements after modifying the non-shared type reference image. In this case, the method in this embodiment can also include: generating selling point information corresponding to the object image; modifying the non-shared type reference image elements based on the selling point information to obtain modified elements; and determining at least one element to be transferred based on the modified elements and the shared type reference image elements.

[0087] In cases where non-shared reference image elements are determined to be elements to be migrated that are not compatible with the object image, in order to ensure the richness of elements in the object image to a certain extent, the aforementioned non-shared reference image elements can be changed to elements to be migrated that are compatible with the object image. In this case, selling point information corresponding to the object image can be generated first. In some instances, selling point information can be generated based on human-computer interaction operations. In this case, generating selling point information corresponding to the object image may include: displaying an information configuration interface corresponding to the object image; obtaining the execution operation input by the user in the information configuration interface; and generating selling point information corresponding to the object image based on the execution operation.

[0088] In other instances, selling point information can be generated not only based on human-computer interaction but also based on object identification corresponding to the object image. In this case, generating selling point information corresponding to the object image may include: obtaining the object identification (i.e., object ID) corresponding to the object image. This object ID can be information input by the user, or there can be an association between the object ID and the object image, through which the object ID corresponding to the object image can be determined; determining the object information corresponding to the object image based on the object identification. The object information may include at least one of the following: object name information, object price information, object promotional information, object brand information, object description information (object color information, etc.), object model information, user review information, etc.; and then the selling point information corresponding to the object image can be generated based on the object information. This, to a certain extent, ensures flexible determination of selling point information.

[0089] After obtaining the selling point information, the non-shared reference image elements can be modified based on this information. This involves changing the content of the non-shared reference image elements to include the selling point information. This allows us to obtain modified elements that are compatible with the object image. Since both the modified elements and the shared reference image elements are compatible with the object image, we can determine at least one element to be migrated based on these elements. Specifically, we can uniformly determine both the modified elements and the shared reference image elements as at least one element to be migrated, thus effectively ensuring the richness of the elements in at least one element to be migrated.

[0090] In this embodiment, at least one reference map element corresponding to the reference object map and information representation attributes corresponding to each reference map element are obtained. Then, at least one element to be transferred that is adapted to the object image is determined based on the at least one reference map element and the information representation attributes corresponding to each reference map element. This not only ensures the flexibility and reliability of determining at least one element to be transferred, but also ensures the richness of the elements to be transferred to a certain extent, which is conducive to improving the quality and effect of image processing operations based on the elements to be transferred.

[0091] Figure 4 is a flowchart illustrating an exemplary embodiment of this application, showing how to perform element layout operations on at least one element to be migrated based on a reference object graph and an object image to obtain an element layout graph corresponding to the object image. Based on any of the above embodiments, referring to Figure 4, the element layout operation can be implemented not only based on a layout migration model but also based on element layout information determined by the reference object graph and the object image. In this case, performing element layout operations on at least one element to be migrated based on the reference object graph and the object image to obtain an element layout graph corresponding to the object image may include:

[0092] Step S401: Based on the reference object graph and the object image, determine the element layout information corresponding to at least one element to be migrated.

[0093] For reference object images and object images, the reference object images and object images often have different image layout styles. In order to perform image style transfer operation on object images based on reference object images, after obtaining the reference object images and object images, the reference object images and object images can be analyzed and processed to determine the element layout information corresponding to at least one element to be transferred. The element layout information may include at least one of the following: element positioning information (including: relative positioning information, positioning information), element display information (including: element display color, element display size, element display style), etc.

[0094] Specifically, the element layout information corresponding to at least one element to be migrated can be determined by the reference layout information corresponding to the reference object diagram and the original layout information corresponding to the object image. In this case, determining the element layout information corresponding to at least one element to be migrated based on the reference object diagram and the object image may include: obtaining the reference layout information corresponding to the reference object diagram and the original layout information corresponding to the object image; and determining the element layout information corresponding to at least one element to be migrated based on the reference layout information and the original layout information.

[0095] After obtaining the reference object diagram and the object image, layout information can be extracted from both. This yields reference layout information corresponding to the reference object diagram and original layout information corresponding to the object image. Based on this reference and original layout information, element layout information corresponding to at least one element to be migrated can be determined.

[0096] In some instances, the element layout information corresponding to at least one element to be migrated can be determined based on the information richness of the reference layout information and the original layout information. In this case, determining the element layout information corresponding to at least one element to be migrated based on the reference layout information and the original layout information may include: obtaining a first information richness corresponding to the reference layout information and a second information richness corresponding to the original layout information; if the first information richness is greater than or equal to the second information richness, determining the reference layout information as the element layout information corresponding to at least one element to be migrated; if the first information richness is less than the second information richness, determining the original layout information as the element layout information corresponding to at least one element to be migrated. This, to a certain extent, ensures the accuracy and reliability of obtaining the element layout information corresponding to at least one element to be migrated.

[0097] In other instances, the element layout information corresponding to at least one element to be migrated can be determined not only based on the information richness of the reference layout information and the original layout information, but also based on the layout coverage of the reference layout information and the original layout information. In this case, determining the element layout information corresponding to at least one element to be migrated based on the reference layout information and the original layout information can include: if the reference layout corresponding to the reference layout information can cover the original layout corresponding to the original layout information, the reference layout information is determined as the element layout information corresponding to at least one element to be migrated; or, if the original layout corresponding to the original layout information can cover the reference layout corresponding to the reference layout information, the original layout information is determined as the element layout information corresponding to at least one element to be migrated. This also ensures the accuracy and reliability of obtaining the element layout information corresponding to at least one element to be migrated.

[0098] Step S402: Perform element layout operation on at least one element to be migrated based on element layout information to obtain an element layout diagram corresponding to the object image.

[0099] After obtaining the element layout information corresponding to at least one element to be migrated, element layout operations can be performed on the at least one element to be migrated based on the element layout information, thereby obtaining an element layout diagram corresponding to the object image. In some instances, performing element layout operations on at least one element to be migrated based on the element layout information to obtain an element layout diagram corresponding to the object image may include: performing layout operations on at least one element to be migrated according to the obtained element layout information, thereby obtaining an element layout diagram corresponding to the object image. This effectively ensures the accuracy and reliability of obtaining the element layout diagram.

[0100] In other instances, element layout operations can be implemented not only based on element layout information but also in combination with preset layout rules. In this case, performing element layout operations on at least one element to be migrated based on element layout information to obtain an element layout diagram corresponding to the object image may include: performing element layout operations on at least one element to be migrated based on element layout information to obtain an initial layout diagram; if the initial layout diagram does not meet the preset layout rules, fine-tuning the initial layout diagram to obtain an element layout diagram corresponding to the object image, where the element layout diagram meets the layout rules; and if the initial layout diagram meets the preset layout rules, determining the initial layout diagram as the element layout diagram corresponding to the object image.

[0101] Specifically, to ensure the quality and effectiveness of element layout operations to a certain extent, preset layout rules are configured to obtain the element layout diagram. These layout rules can be used to limit the aesthetics of the element layout diagram. In some instances, the preset layout rules may include at least one of the following: alignment rules, spacing rules, proportion and scale rules, color consistency rules, etc. The alignment rules mentioned above may include at least one of the following: 1) Edge alignment, used to indicate that the edges of all elements should be aligned with grid lines or other reference lines to maintain consistency and neatness; 2) Center alignment, used to highlight certain content by center alignment; 3) Baseline alignment, used to indicate that text lines are aligned based on an invisible baseline to enhance readability. The spacing rules mentioned above may include at least one of the following: 1) Inner margin rules, used to define the distance between element content and its boundary to ensure sufficient internal space; 2) Outer margin rules, used to indicate the spacing between elements to avoid being too compact or too scattered; 3) Uniform distribution rules, used to ensure consistent spacing between different parts to create a sense of balance.

[0102] After obtaining the element layout information, an element layout operation can be performed on at least one element to be migrated based on the element layout information to obtain an initial layout map. Since the layout effect of the initial layout map may or may not meet the preset layout rules, in order to ensure the layout quality and effect of the element layout map to a certain extent, after obtaining the initial layout map, it can be first identified whether the initial layout map conforms to the preset layout rules. If the initial layout map does not meet the preset layout rules, it means that the layout effect of the initial layout map does not meet the preset layout rules. In order to ensure the quality and effect of the element layout operation, a layout fine-tuning operation can be performed on the initial layout map. Specifically, the layout fine-tuning operation can be implemented through a pre-trained layout fine-tuning model to obtain an element layout map corresponding to the object image. The element layout map meets the layout rules; if the initial layout map meets the preset layout rules, it means that the layout effect of the initial layout map does not meet the preset layout rules. Therefore, the initial layout map can be determined as the element layout map corresponding to the object image. This effectively ensures the accuracy and reliability of obtaining the element layout map.

[0103] In this embodiment, element layout information corresponding to at least one element to be migrated is determined based on the reference object map and the object image. Then, element layout operation is performed on at least one element to be migrated based on the element layout information, so that the element layout map corresponding to the object image can be stably obtained. Then, when the background redrawing operation is performed based on the element layout map, it is beneficial to improve the generation quality and effect of the target object image.

[0104] Figure 5 is a schematic diagram illustrating the process of redrawing the background of an element layout diagram based on a reference object diagram to obtain a target object image corresponding to the object image, according to an exemplary embodiment of this application. Based on any of the above embodiments, referring to Figure 5, the background redrawing operation of the element layout diagram can be implemented not only through a pre-trained background redrawing model, but also based on the background information determined by the reference object diagram. In this case, redrawing the background of the element layout diagram based on the reference object diagram to obtain a target object image corresponding to the object image may include:

[0105] Step S501: Based on the reference object diagram, determine the background information corresponding to the element layout diagram.

[0106] After obtaining the reference object image, it can be analyzed and processed to determine the background information corresponding to the element layout image. In some instances, determining the background information corresponding to the element layout image based on the reference object image can include: determining the background of the reference image corresponding to the reference object image; and determining the background information corresponding to the element layout image based on the background of the reference image. Specifically, the background of the reference image can be directly determined as the background information corresponding to the element layout image, which to a certain extent ensures the accuracy and reliability of determining the background information corresponding to the element layout image.

[0107] In other instances, the background of the reference image corresponding to the reference object image may have a large occlusion area. Specifically, if the background redrawing operation is performed directly based on the reference image background, the quality and effect of the image processing operation may not be guaranteed. Therefore, to avoid the above situation and ensure the accuracy and reliability of determining the background information corresponding to the element layout image, different methods can be used to determine the background information corresponding to the element layout image based on the degree of occlusion of the background area corresponding to the reference object image. In this case, determining the background information corresponding to the element layout image based on the reference object image may include: obtaining the background area corresponding to the reference object image; if the proportion of the background area relative to the reference object image is less than or equal to a preset threshold, determining the background information corresponding to the layout element image based on a preset template library, wherein the preset template library includes multiple preset image templates; or, if the proportion of the background area relative to the reference object image is greater than a preset threshold, determining the background information corresponding to the layout element image based on the background area.

[0108] After obtaining the reference object image, it can be analyzed to obtain the corresponding background region. This background region can be the remaining area after removing the regions corresponding to image elements from the reference object image. Specifically, this background region can be obtained by extracting the reference object image using a background extraction model. After obtaining the background region corresponding to the reference object image, the proportion of the background region relative to the reference object image can be determined and compared with a preset threshold. If the comparison result shows that the proportion of the background region relative to the reference object image is greater than the preset threshold, it indicates that the effective area of ​​the background region is large. Then, the background information corresponding to the layout element image can be determined based on the background region. In some instances, the information corresponding to the background region can be directly determined as the background information corresponding to the layout element image.

[0109] Correspondingly, if the analysis and comparison results show that the proportion of the background area relative to the reference object image is less than or equal to a preset threshold, it indicates that the effective area of ​​the background region is small and lacks sufficient background information. In this case, to ensure the quality and effect of background information generation, the background information corresponding to the layout element image can be determined based on a preset template library. In some examples, determining the background information corresponding to the layout element image based on the preset template library may include: determining a target preset image template that matches the object image based on the preset template library; determining the template background information of the target preset image template; and determining the background information corresponding to the layout element image based on the template background information.

[0110] Specifically, a preset template library is pre-set for image processing operations. This library can include multiple preset image templates for determining background information corresponding to layout element images. Since different preset image templates have different degrees of fit with the object image, to accurately determine the background information corresponding to the layout element image, after obtaining the preset template library, a target preset image template that fits the object image can be determined based on the library. This target preset image template can be the one with the highest fit among the multiple preset image templates. Then, the template background information of the target preset image template can be determined, and the background information corresponding to the layout element image can be determined based on this template background information. In some instances, the template background information can be determined as the background information corresponding to the layout element image, thus effectively ensuring the accuracy and reliability of the background information determination.

[0111] In some other instances, the background information corresponding to the layout element image can be determined not only based on a predetermined target image template that is adapted to the object image, but also based on a pre-trained background matching model. In this case, determining the background information corresponding to the layout element image based on a predetermined template library can include: obtaining a pre-trained background matching model, wherein the background matching model is used to determine the background information corresponding to the layout element image among multiple predetermined image templates; inputting the predetermined template library and the layout element image into the background matching model for processing, and obtaining the background information corresponding to the layout element image output by the background matching model. This also ensures the accuracy and reliability of determining the background information.

[0112] Step S502: Redraw the background of the element layout diagram based on the background information to obtain the target object image corresponding to the object image.

[0113] After obtaining the background information corresponding to the layout element image, a background redrawing operation can be performed on the element layout image based on the background information. In some instances, the background redrawing operation can be implemented through a pre-trained background redrawing model. In this case, performing background redrawing on the element layout image based on the background information to obtain the target object image corresponding to the object image can include: obtaining a pre-trained background redrawing model; inputting the background information and the element layout image into the background redrawing model to perform the background redrawing operation, thereby obtaining the target object image output by the background redrawing model that corresponds to the object image. This effectively ensures the accuracy and reliability of determining the target object image.

[0114] In this embodiment, background information corresponding to the element layout diagram is determined based on the reference object diagram. Then, the background of the element layout diagram is redrawn based on the background information to obtain the target object image corresponding to the object image. The image effect of the obtained target object image meets the image generation requirements. Then, the target object image can be published, which further improves the practicality of the method.

[0115] In practical applications, referring to Figure 6, to facilitate merchants in batching and unifying or changing the style of product images, this application embodiment provides an image style transfer method. This transfer method analyzes the style image (corresponding to the reference product image in the above embodiment) and the layout of various elements in the product image by combining multiple perceptual models. It uses an attribute recognition model to identify the category of each piece of information to achieve a full understanding of the image information. Then, using an image generation model and a layout fine-tuning model, the style image's pattern is reasonably and aesthetically transferred to the product image, thereby generating the target product image. The effects of the style image, product image, and target product image are shown in Figure 7. This effectively realizes automatic image style transfer operations through a complete style transfer chain, not only reducing merchant costs but also improving operational efficiency. Specifically, the method may include the following steps:

[0116] Step 1: Obtain the style image and the product image to be migrated.

[0117] The style map provides a reference style image, and the product image to be migrated can be a white background image or a product image with a small amount of information. The number of style maps and product images to be migrated can both be one, or the number of style maps and product images to be migrated can both be multiple, with one product image corresponding to one style map. This enables the image style migration operation to be performed on the corresponding product image based on a style map.

[0118] In addition, after obtaining the style map, in order to accurately perform the image style transfer operation, it can be identified whether the style map corresponds to background information. If the style map corresponds to background information, the subsequent style transfer operation is allowed; if the style map does not correspond to background information, a prompt message corresponding to the style map can be generated. This prompt message is used to identify the current style map and can be used as a reference map for performing the image style transfer operation. Displaying the prompt message reminds the user that the current style map cannot be used for image style transfer operation, which can ensure the stability and reliability of image processing operations.

[0119] Step 2: Perform image perception operations on the style image and product image to obtain the reference image elements corresponding to the style image, the first layout information corresponding to the reference image elements, and the image elements corresponding to the product image and the second layout information corresponding to the image elements.

[0120] Image-aware operations on style images and product images can be divided into two stages:

[0121] Phase 1: Perceive text information in style images and product images to obtain reference text content in style images and text content in product images. Specifically, this can be achieved using Optical Character Recognition (OCR) algorithms to perceive text information in style images and product images. If the product image does not contain text information, then no text information perception operation is required.

[0122] Phase 2: Perceptual operations of image elements.

[0123] The image elements can include at least one of the following: image logo, bordered text, plain text, product outline, product image border (located at the edge of the image), watermark, etc. The image elements can be obtained by performing perception operations on the style image and product image through a series of self-developed perception models. Specifically, different perception models are used to perceive and extract different image elements and layout information. For example, the product image border and product image text (including bordered text and plain text) can correspond to one perception model, the image logo can correspond to one perception model, the product outline can correspond to one perception model, and the watermark information can correspond to one perception model. In this way, the style image and product image are perceptually processed through the above perception models. The perception processing operation can include: image information perception operation, image element mask perception operation, and image element position perception operation. In this way, the reference image elements corresponding to the style image, the first layout information corresponding to the reference image elements, and the image elements corresponding to the product image and the second layout information corresponding to the image elements can be stably obtained.

[0124] It should be noted that the layout information obtained from the first layout information or the second layout information may include the position boxes corresponding to each of the above image elements, edge mask information, and the text content contained in the image elements. This facilitates subsequent style transfer operations based on the identified reference image elements, the first layout information corresponding to the reference image elements, the image elements, and the second layout information corresponding to the image elements.

[0125] Step 3: Perform attribute recognition and element modification operations on the reference image elements corresponding to the style image, the first layout information corresponding to the reference image elements, and the image elements corresponding to the product image and the second layout information corresponding to the image elements, to obtain at least one element to be migrated that is compatible with the product image.

[0126] Among them, attribute recognition and element modification operations can perform attribute recognition on the extracted element information, thereby obtaining the information representation attributes corresponding to each element information (including reference image elements and image elements). The information representation attributes can include at least one of the following categories: model, color, specifications, marketing information, product description information, etc.

[0127] As an automated process for image style transfer, the aforementioned element information can be filtered based on whether the element information matches the product image. This allows us to determine the compatibility between the reference image elements and the product image. If the reference image elements match the product image, they can be identified as elements to be transferred. If the reference image elements do not match the product image, a selling point generation model can be used to generate suitable selling point information for the product image. This model obtains the product identity identifier corresponding to the product image, then retrieves the product information based on the identifier, and inputs this information into the selling point generation model. The model then outputs the selling point information. Subsequently, a text generation model modifies the incompatible reference image elements based on this selling point information. Specifically, the newly generated selling point information can be transformed into new, uniformly styled image elements such as psoriasis patterns and borders, thus obtaining elements to be transferred that match the product image.

[0128] It's important to note that reference image elements can have different element types. For example, a reference image element can be a shareable element that can be shared between product images, or it can be a non-shareable element that cannot be shared between product images. Specifically, the element type of a reference image element can be determined based on its corresponding information representation attributes. For instance, if the reference image element is implemented as product promotion information, it can be determined as a shareable element; if it is implemented as color information or subject description information corresponding to the product's main feature in the style image, it can be determined as a non-shared element. When a reference image element is implemented as a shared element, it can be determined as an element to be migrated that is compatible with the product image; when a reference image element is implemented as a non-shared element, it can be determined as an element to be migrated that is not compatible with the product image.

[0129] In addition, image elements that are compatible with product images, meaning that the product images themselves contain relevant information, will be retained first. In this way, through the above attribute recognition and element modification operations, at least one element to be migrated that accurately matches the product image can be reliably obtained.

[0130] Step 4: Perform element layout operations on at least one element to be migrated that is compatible with the product image to obtain an element layout diagram corresponding to the product image.

[0131] Specifically, after obtaining at least one element to be migrated that is compatible with the product image, element layout operations can be performed on the at least one element to be migrated based on the reference layout information of the style map and the original layout information of the product image to obtain an element layout map corresponding to the product image.

[0132] Specifically, performing element layout operations on at least one element to be migrated based on the reference layout information of the style map and the original layout information of the product image may include: obtaining a first element richness based on the reference layout information of the style map, and obtaining a second element richness based on the original layout information of the product image; if the first element richness is greater than or equal to the second element richness, then the reference layout information of the style map is determined as the element layout information corresponding to at least one element to be migrated; and then element layout operations can be performed on at least one element to be migrated based on the element layout information to obtain an element layout map corresponding to the product image.

[0133] If the richness of the first element is less than the richness of the second element, the original layout information of the product image is determined as the element layout information corresponding to at least one element to be migrated. Then, the element layout operation can be performed on at least one element to be migrated based on the element layout information to obtain the element layout map corresponding to the product image. In this way, the element layout operation is stably realized.

[0134] After obtaining the element layout diagram, the layout fine-tuning model can be used to fine-tune the element layout diagram. Specifically, the layout fine-tuning model can optimize and adjust the layout information of the elements to be migrated to obtain the adjusted element layout diagram, which can increase the aesthetics of the layout structure.

[0135] Step 5: Perform background migration operation on the element layout map based on the style map to obtain the target product image corresponding to the product image. The background of the target product image is different from the background of the style map, and the background of the target product image is similar to the background of the style map.

[0136] After obtaining the element layout image, the background in the style image can be transferred to the product image. Specifically, the background information in the style image needs to be extracted first. This extraction is crucial because the main subject and border details in the style image can obscure a large portion of the background. Therefore, the background information needs to be restored by erasing and extending the model to obtain the extracted background information. However, if the obscured area by the main subject and border details in the style image is too large, the background information obtained after restoration may lack significant details. In this case, to ensure the quality and effectiveness of the background redrawing operation, a preset template library can be used to determine the background information corresponding to the element layout image.

[0137] Then, the generated background information can be used as reference information, and the background of the element layout diagram can be redrawn using the image generation model. This will generate a target product image corresponding to the product image. The generated target product image can be an image obtained after style transfer operation that can be used for advertising. The target product image has the advantages of beautiful background, complete promotional information, and reasonable layout, thus effectively ensuring the quality and effect of acquiring the target product image.

[0138] The technical solution provided in this application embodiment utilizes image perception, attribute extraction, selling point generation, layout fine-tuning, and image generation capabilities to build a fully automated link for product image style transfer. This fully automates merchants' batch unification or replacement of product image styles, significantly reducing user operational difficulty and costs. Specifically, in the image generation process, a perception model and attribute extraction model are first used to understand product attributes, automatically extracting and filtering various types of information and automatically determining attribute categories. Then, a text modification model and selling point generation model are innovatively used to replace and modify corresponding image elements according to different attribute categories, ensuring consistency between the generated target product image and the product itself. A layout fine-tuning model ensures the overall layout aesthetics, establishing an attribute understanding capability for the product and reasonably preserving information from the style image. The target image information is reasonably generated and supplemented; the image generation model can extract relevant background information from product images that are severely obscured by blemishes and borders, avoiding problems such as perspective misalignment and floating. It can also adapt to scenarios with complex product image structures and intertwined backgrounds and selling points, thus accurately extracting and redrawing style image backgrounds to produce high-quality, distinctive, and aesthetically pleasing target product images. Furthermore, since the image background of the target product image can be generated based on style images or preset template images, homogenization is avoided, ensuring the diversity and richness of target product image generation. After obtaining the target product image, product publishing and maintenance operations can be performed based on it. This not only greatly reduces the image generation and maintenance costs for merchants but also reduces their time and manpower costs, improves the conversion rate of product images, and further enhances the practicality of the technical solution.

[0139] Figure 8 is a schematic diagram of an image processing apparatus provided in an exemplary embodiment of this application; referring to Figure 8, this embodiment provides an image processing apparatus for performing the image processing method shown in Figure 2 above, and the apparatus may include:

[0140] The first acquisition module 11 is used to acquire a reference object image and an object image to be processed.

[0141] The first determining module 12 is used to determine at least one element to be migrated that is adapted to the object image based on the reference object graph.

[0142] The first processing module 13 is used to perform element layout operation on at least one element to be migrated based on the reference object diagram and the object image to obtain an element layout diagram corresponding to the object image.

[0143] The first processing module 13 is also used to redraw the background of the element layout diagram based on the reference object diagram to obtain the target object image corresponding to the object image.

[0144] The image processing device in this embodiment can also perform the descriptions of the embodiments shown in Figures 1-7 above. For details, please refer to the detailed descriptions in the above embodiments. They will not be elaborated here.

[0145] Furthermore, in some of the processes described in the above embodiments and accompanying drawings, multiple operations appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 11, 12, etc., are merely used to distinguish different operations and do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first" and "second" in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.

[0146] Figure 9 is a schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this application; as shown in Figure 9, this embodiment provides an electronic device for performing the image processing method shown in Figure 2 above, wherein the electronic device may include: a memory 24 and a processor 25.

[0147] Memory 24 is used to store computer programs and can be configured to store various other data to support operation on the electronic device. Examples of this data include instructions for any application or method used to operate on the electronic device, data structures, contact data, phone book data, messages, pictures, videos, etc.

[0148] The processor 25, coupled to the memory 24, is used to execute a computer program in the memory 24 for: acquiring a reference object map and an object image to be processed; determining at least one element to be migrated that is adapted to the object image based on the reference object map; performing an element layout operation on the at least one element to be migrated based on the reference object map and the object image to obtain an element layout map corresponding to the object image; and redrawing the background of the element layout map based on the reference object map to obtain a target object image corresponding to the object image.

[0149] In some instances, when processor 24 determines at least one element to be migrated that is adapted to an object image based on a reference object graph, processor 24 is configured to perform: acquiring at least one reference graph element corresponding to the reference object graph, and information representation attributes corresponding to each reference graph element; and determining at least one element to be migrated that is adapted to an object image based on at least one reference graph element and information representation attributes corresponding to each reference graph element.

[0150] In some instances, when processor 24 acquires at least one reference graph element corresponding to the reference object graph and information representation attributes corresponding to each reference graph element, processor 24 is configured to perform: acquiring multiple perceptual models for element recognition of the reference object graph, with different perceptual models used for recognition operations on different reference graph elements; performing perceptual processing on the reference object graph using the multiple perceptual models to acquire at least one reference graph element corresponding to the reference object graph and information representation attributes corresponding to each reference graph element.

[0151] In some instances, when processor 24 determines at least one element to be migrated that is adapted to the object image based on at least one reference graph element and information representation attributes corresponding to each reference graph element, processor 24 is configured to perform: determining the element type of any reference graph element based on the information representation attributes corresponding to each reference graph element, wherein the element type includes any one of the following: a shared type used to identify that the reference graph element is applicable to the object image, or a non-shared type used to identify that the reference graph element is not applicable to the object image; and determining at least one element to be migrated that is adapted to the object image based on at least one reference graph element and the element type of each reference graph element.

[0152] In some instances, when processor 24 determines at least one element to be migrated that is adapted to the object image based on at least one reference graph element and the element type of each reference graph element, processor 24 is configured to: determine the reference graph element as an element to be migrated that is adapted to the object image if the element type of the reference graph element is a shared type; or determine the reference graph element as not an element to be migrated that is adapted to the object image if the element type of the reference graph element is a non-shared type.

[0153] In some instances, after determining that a reference image element is not a suitable element for migration to the object image, the processor 24 in this embodiment is configured to perform: generating selling point information corresponding to the object image; modifying the non-shared type reference image element based on the selling point information to obtain the modified element; and determining at least one element to be migrated based on the modified element and the shared type reference image element.

[0154] In some instances, when processor 24 generates selling point information corresponding to an object image, processor 24 performs the following actions: obtaining an object identifier corresponding to the object image; determining object information corresponding to the object image based on the object identifier; and generating selling point information corresponding to the object image based on the object information.

[0155] In some instances, when processor 24 performs element layout operations on at least one element to be migrated based on a reference object graph and an object image to obtain an element layout graph corresponding to the object image, processor 24 is used to perform: determining element layout information corresponding to at least one element to be migrated based on the reference object graph and the object image; performing element layout operations on at least one element to be migrated based on the element layout information to obtain an element layout graph corresponding to the object image.

[0156] In some instances, when processor 24 determines element layout information corresponding to at least one element to be migrated based on a reference object graph and an object image, processor 24 is configured to perform: acquiring reference layout information corresponding to the reference object graph and original layout information corresponding to the object image; and determining element layout information corresponding to at least one element to be migrated based on the reference layout information and the original layout information.

[0157] In some instances, when processor 24 determines element layout information corresponding to at least one element to be migrated based on reference layout information and original layout information, processor 24 is configured to: determine the reference layout information as element layout information corresponding to at least one element to be migrated if the reference layout corresponding to the reference layout information can cover the original layout corresponding to the original layout information; or determine the original layout information as element layout information corresponding to at least one element to be migrated if the original layout corresponding to the original layout information can cover the reference layout corresponding to the reference layout information.

[0158] In some instances, when processor 24 performs element layout operations on at least one element to be migrated based on element layout information to obtain an element layout diagram corresponding to the object image, processor 24 is configured to perform: perform element layout operations on at least one element to be migrated based on element layout information to obtain an initial layout diagram; if the initial layout diagram does not meet preset layout rules, perform layout fine-tuning on the initial layout diagram to obtain an element layout diagram corresponding to the object image, wherein the element layout diagram meets the layout rules; if the initial layout diagram meets preset layout rules, determine the initial layout diagram as the element layout diagram corresponding to the object image.

[0159] In some instances, when processor 24 performs background redrawing on element layout diagram based on reference object diagram to obtain target object image corresponding to object image, processor 24 is used to perform: determining background information corresponding to element layout diagram based on reference object diagram; and performing background redrawing on element layout diagram based on background information to obtain target object image corresponding to object image.

[0160] In some instances, when processor 24 determines background information corresponding to an element layout diagram based on a reference object diagram, processor 24 performs the following actions: acquiring a background region corresponding to the reference object diagram; determining background information corresponding to the layout element diagram based on a preset template library when the proportion of the background region relative to the reference object diagram is less than or equal to a preset threshold, wherein the preset template library includes multiple preset image templates; or determining background information corresponding to the layout element diagram based on the background region when the proportion of the background region relative to the reference object diagram is greater than a preset threshold.

[0161] In some instances, when processor 24 determines the background information corresponding to the layout element diagram based on a preset template library, processor 24 performs the following: determining a target preset image template adapted to the object image based on the preset template library; determining the template background information of the target preset image template; and determining the background information corresponding to the layout element diagram based on the template background information.

[0162] Furthermore, as shown in Figure 9, the electronic device also includes other components such as a communication component 26, a display 27, a power supply component 28, and an audio component 29. Figure 9 only schematically shows some components and does not imply that the electronic device only includes the components shown in Figure 9. Additionally, the components within the lines in Figure 9 are optional, not mandatory, and their specific inclusion depends on the product form of the working node. The working node in this embodiment can be a terminal device such as a desktop computer, laptop computer, smartphone, or IoT device, or a server-side device such as a conventional server, cloud server, or server array. If the working node in this embodiment is implemented as a terminal device such as a desktop computer, laptop computer, or smartphone, it may include the components within the lines in Figure 9; if the working node in this embodiment is implemented as a server-side device such as a conventional server, cloud server, or server array, it may not include the components within the lines in Figure 9.

[0163] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0164] The aforementioned communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel.

[0165] The aforementioned display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen can be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.

[0166] The aforementioned power supply components provide power to various components within the device in which they reside. These power supply components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which they reside.

[0167] The aforementioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.

[0168] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the steps in the above-described method embodiments. The computer-readable storage medium includes volatile or non-volatile components, or a combination thereof, and can be removable or non-removable. Examples of computer-readable storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random-access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), flash memory or other memory technologies, CD-ROM, Digital Video Disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium.

[0169] Accordingly, this application also provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the processor is able to implement the steps in the above method embodiments. It should be understood that each step or combination of steps in the above method flow can be implemented by the computer program or instructions. In addition, these computer programs or instructions can be applied to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device, so that the processor of the general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device can be implemented as a means to implement the corresponding functions in the above method embodiments.

[0170] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0171] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. An image processing method, characterized in that, include: Obtain the reference object image and the image of the object to be processed; Based on the reference object graph, at least one element to be migrated that is adapted to the object image is determined; Based on the reference object diagram and the object image, perform element layout operations on the at least one element to be migrated to obtain an element layout diagram corresponding to the object image. Based on the reference object image, the element layout image is redrawn to obtain a target object image corresponding to the object image.

2. The method according to claim 1, characterized in that, Based on the reference object graph, at least one element to be migrated that is adapted to the object image is determined, including: Obtain at least one reference graph element corresponding to the reference object graph, and information representation attributes corresponding to each reference graph element; Based on the at least one reference graph element and the information representation attributes corresponding to each reference graph element, at least one element to be migrated that is adapted to the object image is determined.

3. The method according to claim 2, characterized in that, Obtaining at least one reference graph element corresponding to the reference object graph, and information representation attributes corresponding to each reference graph element, including: Multiple perceptual models are obtained for element recognition of the reference object graph, and different perceptual models are used to recognize different elements of the reference graph. The reference object graph is processed using the multiple perception models to obtain at least one reference graph element corresponding to the reference object graph, and information representation attributes corresponding to each reference graph element.

4. The method according to claim 2, characterized in that, Based on the at least one reference graph element and the information representation attributes corresponding to each reference graph element, at least one element to be transferred that is adapted to the object image is determined, including: Based on the information representation attributes corresponding to each reference image element, the element type of any reference image element is determined. The element type includes any one of the following: a shared type used to identify that the reference image element is applicable to the object image, or a non-shared type used to identify that the reference image element is not applicable to the object image. Based on the at least one reference graph element and the element type of each reference graph element, at least one element to be migrated that is compatible with the object image is determined.

5. The method according to claim 4, characterized in that, Based on the at least one reference image element and the element type of each reference image element, determine at least one element to be transferred that is compatible with the object image, including: If the element type of the reference image element is the shared type, then the reference image element is determined to be a transferable element adapted to the object image; or, If the element type of the reference image element is the non-shared type, then the reference image element is determined to be an element to be migrated that is not compatible with the object image.

6. The method according to claim 5, characterized in that, After determining that the reference image element is not a transferable element that is compatible with the object image, the method further includes: Generate selling point information corresponding to the object image; Based on the selling point information, the reference image elements of the non-shared type are modified to obtain the modified elements; Based on the modified elements and the reference graph elements of the shared type, the at least one element to be migrated is determined.

7. The method according to claim 6, characterized in that, Generating selling point information corresponding to the object image includes: Obtain the object identity identifier corresponding to the object image; Based on the object identity identifier, determine the object information corresponding to the object image; Based on the object information, selling point information corresponding to the object image is generated.

8. The method according to any one of claims 1-7, characterized in that, Based on the reference object diagram and the object image, an element layout operation is performed on the at least one element to be migrated to obtain an element layout diagram corresponding to the object image, including: Based on the reference object diagram and the object image, determine the element layout information corresponding to the at least one element to be migrated; Based on the element layout information, perform element layout operations on the at least one element to be migrated to obtain an element layout diagram corresponding to the object image.

9. The method according to claim 8, characterized in that, Based on the reference object diagram and the object image, determine the element layout information corresponding to the at least one element to be migrated, including: Obtain reference layout information corresponding to the reference object image and original layout information corresponding to the object image; Based on the reference layout information and the original layout information, determine the element layout information corresponding to the at least one element to be migrated.

10. The method according to claim 9, characterized in that, Based on the reference layout information and the original layout information, determine the element layout information corresponding to the at least one element to be migrated, including: If the reference layout information corresponds to a reference layout that can cover the original layout information, the reference layout information is determined as the element layout information corresponding to the at least one element to be migrated; or, If the original layout information corresponds to the original layout information and can cover the reference layout information, the original layout information is determined as the element layout information corresponding to the at least one element to be migrated.

11. The method according to claim 8, characterized in that, Based on the element layout information, an element layout operation is performed on the at least one element to be migrated to obtain an element layout map corresponding to the object image, including: Based on the element layout information, perform element layout operations on the at least one element to be migrated to obtain an initial layout diagram; If the initial layout does not meet the preset layout rules, the initial layout is fine-tuned to obtain an element layout that corresponds to the object image, and the element layout meets the layout rules. If the initial layout diagram satisfies the preset layout rules, the initial layout diagram is determined as the element layout diagram corresponding to the object image.

12. The method according to any one of claims 1-7, characterized in that, Based on the reference object image, the element layout image is redrawn to obtain a target object image corresponding to the object image, including: Based on the reference object diagram, determine the background information corresponding to the element layout diagram; Based on the background information, the element layout diagram is redrawn to obtain a target object image corresponding to the object image.

13. The method according to claim 12, characterized in that, Based on the reference object diagram, determine the background information corresponding to the element layout diagram, including: Obtain the background region corresponding to the reference object image; If the proportion of the background area relative to the reference object image is less than or equal to a preset threshold, background information corresponding to the layout element image is determined based on a preset template library, wherein the preset template library includes multiple preset image templates; or, If the proportion of the background area relative to the reference object image is greater than a preset threshold, background information corresponding to the layout element image is determined based on the background area.

14. The method according to claim 13, characterized in that, Based on a preset template library, background information corresponding to the layout element diagram is determined, including: Based on the preset template library, a target preset image template that matches the object image is determined; Determine the template background information of the target preset image template; Based on the template background information, determine the background information corresponding to the layout element diagram.

15. An image processing apparatus, characterized in that, include: The first acquisition module is used to acquire the reference object image and the object image to be processed. The first determining module is used to determine at least one element to be migrated that is adapted to the object image based on the reference object image; The first processing module is used to perform element layout operations on the at least one element to be migrated based on the reference object diagram and the object image to obtain an element layout diagram corresponding to the object image. The first processing module is further configured to redraw the background of the element layout diagram based on the reference object diagram to obtain a target object image corresponding to the object image.

16. An electronic device, characterized in that, include: A memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method of any one of claims 1-14.

17. A computer storage medium, characterized in that, Used to store a computer program that, when executed by a computer, implements the method of any one of claims 1-14.

18. A computer program product, characterized in that, include: A computer program, when executed by a processor of an electronic device, causes the processor to perform the steps of the method of any one of claims 1-14.