Data processing method and device, equipment and storage medium
By generating jewelry placement methods using a deep neural network model, the problem of inflexible jewelry placement is solved, enabling intelligent and flexible jewelry matching and improving both aesthetics and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MEIPING MEIWU (SHANGHAI) TECH CO LTD
- Filing Date
- 2022-11-18
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, the way jewelry is placed can only be the same as a pre-designed template, which lacks flexibility and results in stiff, unattractive, and monotonous jewelry placement.
By acquiring the 3D model data of the object to be accessorized, generating a 2D projection image, and inputting it into a deep neural network model, an image with accessories is generated. The target accessories that match the category and size of the accessories are selected and their positions are transformed to achieve intelligent and flexible accessorization.
It enables intelligent and flexible placement of ornaments, avoids the use of identical templates, enhances aesthetics and diversity, reduces the workload of designers, and improves work efficiency.
Smart Images

Figure CN115937361B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, device, and storage medium. Background Technology
[0002] For designers, accessories are an important element in decorating cabinets. By selecting and placing accessories on cabinets, people can intuitively see the effect of the items being arranged in the cabinets.
[0003] Typically, template matching is used to determine the placement of ornaments in the cabinet. Multiple templates with different functional area divisions can be pre-designed. Each template specifies the category and location requirements of ornaments in the corresponding functional area. From multiple templates, the template that matches the functional area division of the cabinet can be selected. Based on the category and location requirements of ornaments in the corresponding functional area specified in the template, the placement of ornaments in the cabinet can be determined.
[0004] However, this method has the problem that it can only produce the same jewelry placement as the pre-designed template, making the jewelry placement inflexible. Summary of the Invention
[0005] This application provides a data processing method, apparatus, device, and storage medium to solve the problem in the prior art that only the same jewelry placement method as the pre-designed template can be obtained, resulting in inflexible jewelry placement.
[0006] In a first aspect, embodiments of this application provide a data processing method, including:
[0007] A two-dimensional projection image of the object to be decorated, obtained from the three-dimensional model data of the object to be decorated, is shown in the frontal view direction.
[0008] The two-dimensional projection image is input into a deep neural network model for processing to generate an image with ornaments corresponding to the two-dimensional projection image. The image with ornaments contains an ornament representation, which is used to represent the ornament category, ornament size, and ornament position.
[0009] Based on the image of the accessory, an accessory that matches the accessory category and size represented by the accessory representation is selected from multiple accessories and used as the target accessory corresponding to the accessory representation. The position of the accessory represented by the accessory representation is transformed to obtain the corresponding placement position. The accessory position is the position of the target accessory in the two-dimensional projection image, and the placement position is the position of the target accessory in the object to be accessorized.
[0010] Secondly, embodiments of this application provide a data processing apparatus, including:
[0011] The acquisition module is used to acquire a two-dimensional projection image of the object to be decorated in the frontal view direction, obtained based on the three-dimensional model data of the object to be decorated.
[0012] The generation module is used to input the two-dimensional projection image into a deep neural network model for processing, and generate an image with ornaments corresponding to the two-dimensional projection image. The image with ornaments contains an ornament representation, which is used to represent the ornament category, ornament size and ornament position.
[0013] The selection and conversion module is used to select, based on the image with the accessory, an accessory that matches the accessory category and size represented by the accessory representation as the target accessory corresponding to the accessory representation, and to convert the position of the accessory represented by the accessory representation to obtain the corresponding placement position. The accessory position is the position of the target accessory in the two-dimensional projection image, and the placement position is the position of the target accessory in the object to be accessorized.
[0014] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor; wherein the memory stores one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method as described in any one of the first aspects.
[0015] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the method as described in any one of the first aspects.
[0016] This application also provides a computer program, which, when executed by a computer, is used to implement the method as described in any of the first aspects.
[0017] In this embodiment, a two-dimensional projection image of the object to be accessorized, obtained from the three-dimensional model data of the object, can be acquired in the frontal view direction. This two-dimensional projection image is then input into a deep neural network model for processing, generating an image of the accessory corresponding to the two-dimensional projection image. The image contains an accessory representation, which indicates the accessory category, size, and position. Based on the image, an accessory matching the category and size represented by the accessory representation is selected from multiple accessories and designated as the target accessory corresponding to that representation. The position of the accessory represented by the representation is then transformed to obtain its placement. The accessory position is the target accessory's position in the two-dimensional projection. The position shown in the image represents the location of the target accessory within the object to be accessorized. This achieves the determination of accessory placement based on a deep neural network model. Due to the intelligent learning capabilities of deep neural networks, after training with samples, the deep neural network can intelligently learn the rules of accessory placement in the samples. The output image with accessories can have a similar placement effect to the samples, thus enabling intelligent and flexible accessory matching. This avoids the problem of only being able to obtain the same accessory placement as a pre-designed template, resulting in inflexible accessory placement. Consequently, it avoids the situation where the accessory placement is stiff, lacks aesthetic appeal, and has a monotonous style due to this problem. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram illustrating an application scenario of an embodiment of this application;
[0020] Figure 2 A schematic flowchart illustrating a data processing method provided in an embodiment of this application;
[0021] Figure 3 A schematic diagram of a two-dimensional projection image provided in an embodiment of this application;
[0022] Figure 4 This is a schematic diagram of the structure of a generative adversarial network provided in an embodiment of this application;
[0023] Figure 5A A schematic diagram of a cabinet with decorative elements provided in an embodiment of this application;
[0024] Figure 5B The embodiments provided in this application correspond to Figure 5AA schematic diagram of a two-dimensional projection image of a sample;
[0025] Figure 5C The embodiments provided in this application correspond to Figure 5A A schematic diagram of the sample image with jewelry;
[0026] Figure 6 A schematic diagram illustrating the model training and prediction process provided in the embodiments of this application;
[0027] Figure 7 The embodiments provided in this application correspond to Figure 5C A schematic diagram of the accessory mask;
[0028] Figure 8 A schematic diagram of an image of an accessory output by a deep neural network model provided in an embodiment of this application;
[0029] Figure 9 The embodiments provided in this application correspond to Figure 8 An illustration of an accessory after the rough edges have been removed;
[0030] Figure 10 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application;
[0031] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0033] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. “Multiple” generally includes at least two, but does not exclude the inclusion of at least one.
[0034] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0035] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to detection.” Similarly, depending on the context, the phrases “if determination” or “if detection (of the stated condition or event)” can be interpreted as “when determination” or “in response to determination” or “when detection (of the stated condition or event)” or “in response to detection (of the stated condition or event).”
[0036] 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 product or system comprising a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a product or system. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the product or system that includes said element.
[0037] Furthermore, the timing of the steps in the following method embodiments is merely an example and not a strict limitation.
[0038] To facilitate understanding of the technical solutions provided in the embodiments of this application by those skilled in the art, the technical environment for implementing the technical solutions will be described below.
[0039] Figure 1 This is a schematic diagram illustrating an application scenario of the data processing method provided in the embodiments of this application, such as... Figure 1 As shown, this application scenario may include an electronic device 11. Responding to the designer's operation, the electronic device 11 can generate three-dimensional model data of the object. The application scenario may also include a storage device 12, where the three-dimensional model data of the object generated by the electronic device 11 can be stored. Specifically, the object can be any type of object designed by the designer using the device, and its interior can hold ornaments. Ornaments can refer to items used to decorate the object. For example, the object includes a cabinet, and the ornaments can be, for example, clothing, shoes, etc. In this application, the object that needs to hold ornaments inside can be referred to as the object to be decorated. The following mainly uses a cabinet as an example for specific explanation.
[0040] Typically, template matching is used to determine the placement of ornaments in the cabinet. However, this method can only produce ornament placement that matches the pre-designed template, resulting in a lack of flexibility in ornament placement.
[0041] To address the technical problem of inflexible jewelry placement, where only pre-designed templates can be used to obtain jewelry placement methods, this embodiment of the application acquires a two-dimensional projection image of the object to be adorned, obtained from its 3D model data, in the frontal view direction. This two-dimensional projection image is then input into a deep neural network model for processing, generating a corresponding image of the jewelry. This image contains jewelry representations, indicating the jewelry category, size, and position. Based on the image, a jewelry item matching the category and size represented by the jewelry representation is selected from multiple items and designated as the target jewelry item. Finally, the position of the jewelry item represented by the jewelry representation is transformed to obtain the corresponding placement. The concept of "position" refers to the location of the target accessory in a 2D projection image, while "placement position" refers to the location of the target accessory within the object to be adorned. This approach utilizes a deep neural network model to determine the placement of accessories within the object. Because deep neural networks possess intelligent learning capabilities, after training with samples, they can intelligently learn the rules governing accessory placement in those samples. The output image with accessories can then achieve a similar placement effect to the samples, enabling intelligent and flexible accessory arrangement. This avoids the problem of only being able to obtain the same accessory placement as a pre-designed template, resulting in inflexible placement and preventing stiff, aesthetically unappealing, and monotonous accessory placement.
[0042] It should be noted that the method provided in this embodiment can be executed by electronic device 11, or it can be executed by other devices with processing capabilities other than electronic device 11.
[0043] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0044] Figure 2 This is a schematic flowchart of a data processing method provided in an embodiment of this application, as shown below. Figure 2 As shown, the method in this embodiment may include:
[0045] Step 21: Obtain a two-dimensional projection image of the object to be decorated in the frontal view direction, based on the three-dimensional model data of the object to be decorated;
[0046] Step 22: Input the two-dimensional projection image into the deep neural network model for processing to generate an image with ornaments corresponding to the two-dimensional projection image. The image with ornaments contains an ornament representation, which is used to represent the ornament category, ornament size and ornament position.
[0047] Step 23: Based on the image with the accessory, select the accessory that matches the accessory category and size represented by the accessory representation from multiple accessories, and use it as the target accessory corresponding to the accessory representation. Then, perform position transformation on the position of the accessory represented by the accessory representation to obtain the corresponding placement position. The accessory position is the position of the target accessory in the two-dimensional projection image, and the placement position is the position of the target accessory in the object to be accessorized.
[0048] In this embodiment, the object to be decorated can be any three-dimensional object that requires the selection and placement of ornaments. For example, the object to be decorated may include a cabinet. In practical applications, the object to be decorated may be an object without ornaments. For example, the object can be determined as the object to be decorated based on the designer's input, such as a one-click decoration operation for a specific object. Taking the cabinet to be decorated as an example, the cabinet to be decorated can be a cabinet without doors, or a cabinet with doors that are open, or a cabinet with doors that are closed but transparent.
[0049] A two-dimensional projection image of the object to be decorated in the frontal view can represent the positional relationship between the parts of the object as seen from the frontal view. The two-dimensional projection image of the object to be decorated in the frontal view is obtained based on the three-dimensional model data of the object to be decorated. Optionally, it can receive a two-dimensional projection image of the object to be decorated in the frontal view obtained based on the three-dimensional model data of the object to be decorated sent by other devices, or optionally, it can obtain a two-dimensional projection image of the object to be decorated in the frontal view based on the three-dimensional model data of the object to be decorated.
[0050] In one embodiment, step 21 may specifically include steps A1 to C1.
[0051] Step A1: Obtain the 3D model data of the object to be decorated. The 3D model data includes the 3D position and size information of multiple parts.
[0052] Taking the cabinet as an example, the multiple components can be multiple panels. The three-dimensional position and three-dimensional size of the components can be, for example, the position and size of the components in the world coordinate system.
[0053] Step B1: Based on the three-dimensional position and size information of the component, obtain the two-dimensional position and size information of the component projected onto the target plane, where the target plane is a plane perpendicular to the frontal view direction.
[0054] In this case, taking the three-dimensional position and size of a component as the position and size of the component in the world coordinate system as an example, the target plane can specifically be a plane formed by the other two coordinate axes in the world coordinate system, excluding the coordinate axis direction corresponding to the frontal view direction.
[0055] Step C1: Generate a two-dimensional projection image based on the two-dimensional position and size information of multiple components.
[0056] Since the two-dimensional position and size information of each component can be used to represent its two-dimensional position and size on the target plane, an image that can be used to represent the positional relationship between components on the target plane can be generated based on the two-dimensional position and size information of multiple components. Furthermore, since the target plane is a plane perpendicular to the frontal view direction, the image generated based on the two-dimensional position and size information of multiple components can represent the positional relationship between components in the object to be decorated as seen from the frontal view direction.
[0057] In one embodiment, a two-dimensional projection image can be generated by drawing. Based on this, step C1 may specifically include: generating a preset image; determining a coordinate transformation relationship for mapping the center of the object to be decorated to the center of the preset image based on the coordinates of the center of the object to be decorated projected onto the target plane; transforming the two-dimensional position and size information of the component based on the coordinate transformation relationship to obtain the transformed two-dimensional position and size information of the component; and drawing multiple components sequentially onto the preset image based on the transformed two-dimensional position and size information of multiple components.
[0058] For example, the preset image can be a blank image, where each pixel value can be 255. Taking the coordinates of the center of the object to be decorated projected onto the target plane as (-2, -2) as an example, if the coordinates of the center of the preset image are (0, 0), then the coordinate transformation relationship between the center of the object to be decorated and the center of the preset image can be determined as both the horizontal and vertical coordinates +2. Of course, in other embodiments, the coordinates of the center of the preset image can also be other coordinates, and this application does not limit this. Further, assuming the two-dimensional position information of a component is (x1, y1) and the two-dimensional size information is length L1 and width L2, the transformed two-dimensional position information of the component obtained according to the coordinate transformation relationship can be, for example, (x1+2, y1+2), and the transformed two-dimensional size information can be, for example, length L1 and width L2. Of course, in other embodiments, the two-dimensional size of the component can also be changed proportionally, and this application does not limit this.
[0059] For example, taking a preset image as a pure white image and the lines used to draw components in the preset image as black, a two-dimensional projection image can be, for example, as follows: Figure 3 As shown, Figure 3The black lines in the diagram can represent the cabinet frame.
[0060] In this embodiment, after obtaining the two-dimensional projection image, it can be input into a deep neural network model for processing to generate an image of the ornament corresponding to the two-dimensional projection image. The image of the ornament can be used to describe the arrangement of the ornaments based on the two-dimensional projection image. The image contains representations of the ornaments, which indicate the ornament category, size, and position. For example, the ornament representation can be a rectangular frame representing the ornament. In one embodiment, the color of the rectangle can indicate the ornament category, the size of the rectangle can indicate the ornament size, and the position of the rectangle in the image can indicate the ornament position. It should be understood that the number of ornament representations in the same image can be one or more.
[0061] Specifically, a deep neural network model refers to a model that is based on a deep neural network and can perform generative tasks. In one embodiment, the deep neural network model can be a model obtained by training a generative adversarial network (GAN).
[0062] Generative adversarial networks (GANs) include a generator and a discriminator. The generator produces a generated image from the input original image, while the discriminator distinguishes between a real image and a generated image, i.e., it judges the quality and effect of the generated image. Both the generator and discriminator in this application can be constructed using convolutional networks. The structure of the GAN can be as follows: Figure 4 As shown, the network structure of the generator and discriminator can be an autoencoder structure. An autoencoder is a neural network that uses a backpropagation algorithm to make the output value equal to the input value. It first compresses the input into a latent space representation, and then reconstructs the output through this representation. For the specific structure of the autoencoder, please refer to the specific description in the relevant technology, which will not be repeated here.
[0063] In practical applications, the deep neural network model can be trained by the device performing steps 21 to 23, or the deep neural network model can be trained by a device other than the device performing steps 21 to 23.
[0064] In one embodiment, the deep neural network model may be obtained as follows: a generative adversarial network (GAN) is constructed, in which training parameters are set; the GAN is trained using a sample set until a set stopping condition is met, wherein the sample set includes multiple sample pairs, each sample pair including a sample 2D projection image and a sample image with an accessory; and the generator in the GAN when the set stopping condition is met is used as the deep neural network model.
[0065] The sample set can be obtained based on existing 3D model data of objects with accessories. In one embodiment, the arrangement of accessories in these objects can be a customer's preferred arrangement, thus better enabling customization among different customers. Specifically, the sample 2D projection image and sample accessory image in a sample pair can be generated based on the 3D model data of the same object with accessories. In practical applications, a sample 2D projection image can be obtained based on the object's own 3D model data, and a sample accessory image can be obtained based on the accessory information data in the object's 3D model data. It should be noted that the implementation method of obtaining a sample 2D projection image based on the object's own 3D model data is similar to the aforementioned implementation method of obtaining a 2D projection image based on the 3D model data of the object to be accessorized, and will not be repeated here.
[0066] For example, a sample image of the jewelry can be obtained by drawing the jewelry onto a sample 2D projection image. In one embodiment, jewelry information data can be converted into 2D information data, and the jewelry can be drawn onto a sample 2D projection image based on the 2D information data to obtain a sample image of the jewelry. The jewelry information data may include the 3D position and size information of the jewelry. Based on the 3D position and size information of the jewelry, the 2D position and size information of the jewelry projected onto the target plane can be obtained. Based on coordinate transformation relationships, the 2D position and size information of the jewelry is transformed to obtain the transformed 2D position and size information of the jewelry. Based on the transformed 2D position and size information of the jewelry, it is drawn onto the sample 2D projection image. Assuming that the 2D position information of a certain jewelry is (x2, y2), and the 2D size information is length L3 and width L4, then the transformed 2D position information of the component obtained according to the coordinate transformation relationship can be, for example, (x2+2, y2+2), and the transformed 2D size information can be, for example, length L3 and width L4. For details regarding the target plane and coordinate transformation relationships, please refer to the foregoing descriptions, which will not be repeated here.
[0067] cabinets with decorations, such as Figure 5A As shown in the example, the generated sample 2D projection image can be as follows: Figure 5B As shown, the generated sample images with accessories can be displayed as follows: Figure 5C As shown, Figure 5B The black lines in the diagram represent the cabinet frame. Figure 5C The colored rectangles in the image represent jewelry items. Different colored rectangles represent different categories of jewelry items. The size of the rectangles represents the size of the jewelry items. The position of the rectangles in the image represents the position of the jewelry items in the cabinet from a frontal view.
[0068] Taking the cabinet as an example, such as Figure 6 As shown, during model training, a 2D planar transformation can be performed on the 3D model data of the cabinet with ornaments to obtain the original image of the cabinet without ornaments (i.e., the sample 2D projection image) and the rendered image of the cabinet with ornaments (i.e., the sample image with ornaments). The generative adversarial network is then trained using the original image of the cabinet without ornaments and the rendered image of the cabinet with ornaments. The original image of the cabinet without ornaments can be used as... Figure 4 The original image is input into a generative adversarial network, and the cabinet rendering with ornaments can be used as... Figure 4 Real images are input into a generative adversarial network (GAN). By training the GAN, a deep neural network model can be obtained. During the model inference process, a 2D planar transformation can be performed on the 3D model data of the cabinet without decorations to obtain a 2D projected image. This 2D projected image is then used as input to the deep neural network model to obtain the cabinet with decorations (i.e., an image with decorations).
[0069] In practical applications, the preset stopping conditions can include the conditions that the generator's loss and the discriminator's loss need to meet. The generator's loss can be determined based on the difference between the generated image corresponding to the sample 2D projection image and the sample image with ornaments. The discriminator's loss can be determined based on the discrimination result, such as the discrimination accuracy. The generator's loss can be used to optimize the generator parameters, and the discriminator's loss can be used to optimize the discriminator parameters. Based on this, in one embodiment, the step of using multiple sample pairs to perform generative adversarial training on the generative adversarial network until the preset stopping conditions are met can specifically include: inputting the sample 2D projection image into the generator in the generative adversarial network to obtain a generated image; inputting the generated image corresponding to the sample 2D projection image and the sample image with ornaments into the discriminator in the generative adversarial network respectively to obtain a discrimination result; and iteratively adjusting the training parameters until the generator's loss and the discriminator's loss meet the preset conditions.
[0070] Considering that only a small portion of the sample images with jewelry actually contain the jewelry, while most areas do not, and that deep neural networks are easily influenced by large areas during learning, the network tends to learn from these larger areas, leading to difficulties in convergence. Therefore, we can calculate the generator's loss by comparing the generated image and the sample images with jewelry in the jewelry region, allowing the loss to focus on the area containing the jewelry.
[0071] For example, the difference in the jewelry area between the generated image and the sample image with jewelry can be calculated using a jewelry mask, which simplifies the calculation. Taking a cabinet as an example, such as... Figure 6As shown, during model training, an accessory mask image can be generated based on sample images with accessories. This generated accessory mask image can be used for training the generative adversarial network, specifically for calculating the generator's loss during training. By adding the accessory mask image, the network can focus on the accessory region, without being affected by other large areas (e.g., ...). Figure 5B Due to the influence of large blank areas, we can focus more on the image generation of the jewelry area to achieve more accurate and better results.
[0072] Based on this, in one embodiment, the loss of the generator can be determined in the manner shown in steps A2 and B2 below.
[0073] Step A2: Generate an accessory mask image corresponding to the sample image with accessories. The area in the accessory mask image is divided into an accessory area and a non-accessory area. The pixel value of the pixel in the accessory area is a first value, and the pixel value of the pixel in the non-accessory area is a second value that is different from the first value.
[0074] For example, the jewelry mask image can be a grayscale image, and the jewelry area in the jewelry mask image corresponds to the jewelry in the sample jewelry image. The first value can be a non-zero value, and the second value can be 0. For example, the first value can be 255 and the second value can be 0.
[0075] Optionally, the corresponding region in the grayscale image where the jewelry is located in the sample jewelry image can be directly identified as the jewelry region in the grayscale image. Based on this, in one embodiment, step A2 may specifically include: generating a grayscale image of the same size as the sample jewelry image, where all pixel values in the grayscale image are second values; and using the region where the jewelry is located in the sample jewelry image as the jewelry region in the grayscale image, modifying the pixel values of the pixels in the jewelry region to first values to obtain a jewelry mask image.
[0076] Alternatively, the enlarged area of the region containing the ornament in the sample image can be used as the ornament region in the grayscale image. Based on this, in another embodiment, step A2 may specifically include: generating a grayscale image of the same size as the sample image, where all pixels have a second value; determining the region of the ornament in the sample image corresponding to the grayscale image; expanding the corresponding region to obtain the ornament region; and modifying the pixel values of the pixels in the ornament region to a first value to obtain an ornament mask image. For example, the corresponding region can be expanded outwards by multiple pixels to obtain the ornament region, such as by 4 pixels in each direction. By expanding the corresponding region (e.g., vertically, horizontally, and vertically), the problem of boundary merging between adjacent ornaments during the generation of ornament positions can be prevented, effectively improving the boundaries between ornaments and thus more effectively distinguishing the range and position of different ornaments. For example, a sample image containing ornaments... Figure 5C As shown, taking a first value of 255 and a second value of 0 as an example, the generated accessory mask image can be as follows: Figure 7 As shown.
[0077] Step B2: Based on the sample image with ornaments, the generated image, and the ornament mask image corresponding to the sample 2D projection image, calculate the difference between the generated image and the sample image with ornaments in the ornament region to obtain the generator loss.
[0078] For example, based on the sample image with jewelry, the generated image, and the jewelry mask image, the difference between the generated image and the sample image with jewelry in the jewelry region can be calculated, and the first loss of the generator can be obtained based on the difference in the jewelry region. Alternatively, the difference between the generated image and the sample image with jewelry in all regions can be calculated based on the sample image with jewelry and the generated image, and the second loss of the generator can be obtained based on the difference in all regions. The weighted sum of the first loss and the second loss can be used as the overall loss of the generator.
[0079] Optionally, when the first value is non-zero and the second value is zero, the difference between the generated image and the sample image with jewelry in the jewelry region can be calculated by normalizing the jewelry mask image. This simplifies the calculation. Therefore, in one embodiment, step B2 may specifically include: normalizing the pixel values of the pixels in the jewelry mask image corresponding to the sample two-dimensional projection image to obtain a normalized jewelry mask image; multiplying the pixel values of the corresponding pixels in the sample image with jewelry corresponding to the sample two-dimensional projection image with the pixel values in the normalized jewelry mask image to obtain a first pixel value matrix; multiplying the pixel values of the corresponding pixels in the generated image corresponding to the sample two-dimensional projection image with the pixel values in the normalized jewelry mask image to obtain a second pixel value matrix; and calculating the difference between the pixel values at corresponding positions in the first pixel value matrix and the second pixel value matrix to obtain the difference between the generated image and the sample image with jewelry in the jewelry region. For example, the average of the differences between the pixel values at corresponding positions in the first pixel value matrix and the second pixel value matrix can be used as the difference between the generated image and the sample image with jewelry in the jewelry region.
[0080] In one embodiment, the difference between the generated image and the sample image with ornaments in the overall region can be obtained by calculating the difference between the pixel values of corresponding pixels in the sample image with ornaments and the generated image. For example, the average of the differences between the pixel values of corresponding pixels in the sample image with ornaments and the generated image can be used as the difference between the generated image and the sample image with ornaments in the overall region.
[0081] In the two-dimensional projection image Figure 3 When shown in the image, the deep neural network model outputs an image with jewelry, which can be like... Figure 8 As shown, Figure 8 Different colored rectangles represent different categories of goods, the size of the rectangles represents the size of the jewelry, and the position of the rectangles in the image represents the position of the jewelry in the display case from a frontal view. It should be understood that... Figure 8 and Figure 5C In contrast, rectangles of the same color can represent accessories of the same category.
[0082] In this embodiment, after inputting the two-dimensional projection image into a deep neural network model for processing to generate an image of the ornament corresponding to the two-dimensional projection image, an ornament that matches the ornament category and size represented by the ornament representation can be selected from multiple ornaments based on the ornament image. This ornament is then used as the target ornament corresponding to the ornament representation. The position of the ornament represented by the ornament representation is then transformed to obtain the corresponding placement position. Here, the ornament position is a two-dimensional position, specifically the position of the target ornament in the two-dimensional projection image, and the placement position is a three-dimensional position, specifically the position of the target ornament in the object to be adorned.
[0083] It should be noted that for each accessory representation, the corresponding target accessory and its placement position within the object to be adorned can be determined. It should be understood that the target accessory and its position together represent the arrangement of accessories within the object from a frontal viewpoint, while the target accessory and its placement position together represent the arrangement of accessories within the object in a three-dimensional coordinate system.
[0084] In one embodiment, the target ornament corresponding to the ornament representation can be determined by having the same category and meeting the size difference requirements. Based on this, the step of selecting an ornament from multiple ornaments that matches the ornament category and size represented by the ornament representation as the target ornament corresponding to the ornament representation can specifically include: selecting an ornament from multiple ornaments whose category is the ornament category represented by the ornament representation and whose size difference from the size represented by the ornament representation is less than a difference threshold, as the target ornament corresponding to the ornament representation. It should be noted that the number of target ornaments corresponding to the ornament representation can be one or more. When the number of target ornaments corresponding to the ornament representation is multiple, it can correspond to multiple ornament placement methods.
[0085] Optionally, the target ornament and its placement can be determined directly based on the ornament image output by the deep neural network model. Based on this, in one embodiment, step 23 may specifically include: selecting an ornament from multiple ornaments that matches the ornament category and size represented by the ornament representation in the ornament image as the target ornament corresponding to the ornament representation, and converting the ornament position represented by the ornament representation to obtain the corresponding placement position.
[0086] Alternatively, one can first remove jagged edges from the image of the ornament based on the deep neural network model, and then determine the target ornament and its placement based on the processed image. Figure 8 As can be seen, the image of the accessory output by the deep neural network model is not very clear. This can be improved by... Figure 8 The image shown can be de-fuzzed to obtain the following result: Figure 9 The image shown, combined with Figure 8 and Figure 9 It can be seen that removing jagged edges from the jewelry images output by the deep neural network model can improve image clarity, reduce noise interference, and improve accuracy.
[0087] Based on this, in another embodiment, step 23 may specifically include: removing the rough edges from the image with ornaments to obtain a processed image with ornaments; selecting from multiple ornaments an ornament that matches the ornament category and size represented by the ornament representation in the processed image with ornaments as the target ornament corresponding to the ornament representation; converting the position of the ornament represented by the ornament representation to obtain the placement position of the target ornament in the object to be accessorized.
[0088] Optionally, after determining the target ornament and its placement position, an object wearing the ornament can be obtained based on the determined target ornament and its placement position. In one embodiment, the method provided in this embodiment may further include: acquiring the three-dimensional model data of the target ornament; and adding the three-dimensional model data of the target ornament to the three-dimensional model data of the object to be adorned based on the placement position. This allows the target ornament to be placed into the object to be adorned according to its placement position.
[0089] The data processing method provided in this embodiment obtains a two-dimensional projection image of the object to be accessorized in the frontal view direction based on the three-dimensional model data of the object. This two-dimensional projection image is then input into a deep neural network model for processing to generate an image with accessories. This image with accessories represents the arrangement of accessories within the object, based on the two-dimensional projection image. The image with accessories contains accessory representations, which indicate the accessory category and size. Based on the image with accessories, an accessory matching the category and size represented by the accessory representation is selected from multiple accessories and designated as the target accessory corresponding to that representation. The position of the accessory represented by the representation is then transformed to obtain the corresponding placement position. The accessory... The position refers to the location of the target ornament in the 2D projection image, while the placement position refers to the location of the target ornament within the object to be adorned. This achieves the determination of the placement method of ornaments within the object to be adorned based on a deep neural network model. Because deep neural networks have intelligent learning capabilities, after training the deep neural network with samples, it can intelligently learn the rules of ornament placement in the samples. The output image with ornaments can have a placement effect similar to the samples, thus enabling intelligent and flexible ornament matching. This avoids the problem of only obtaining the same ornament placement method as the pre-designed template, which results in inflexible ornament placement. This also avoids the situation where the ornament placement is stiff, lacks aesthetics, and has a monotonous style due to this problem.
[0090] Because template-matching methods often result in stiff, aesthetically unappealing, and monotonous placement of accessories, they frequently fail to meet designers' needs. Designers are required to make multiple modifications to the arrangement of accessories in the cabinet, leading to a heavy workload and low efficiency. This application, based on a deep neural network model, can intelligently determine the placement of accessories in the object to be matched, making it more diverse, more in line with designers' standards, and more natural. This eliminates the need for designers to make multiple modifications to the placement of accessories in the cabinet, thereby reducing their workload and improving efficiency.
[0091] Figure 10 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application; see attached drawing. Figure 10As shown, this embodiment provides a data processing apparatus that can execute the data processing method provided in the above embodiment. Specifically, the apparatus may include:
[0092] The acquisition module 101 is used to acquire a two-dimensional projection image of the object to be decorated in the frontal view direction, obtained based on the three-dimensional model data of the object to be decorated.
[0093] The generation module 102 is used to input the two-dimensional projection image into a deep neural network model for processing, and generate an image with ornaments corresponding to the two-dimensional projection image. The image with ornaments contains an ornament representation, which is used to represent the ornament category and ornament size.
[0094] The selection and conversion module 103 is used to select, based on the image with the accessory, an accessory that matches the accessory category and size represented by the accessory representation from a plurality of accessories as the target accessory corresponding to the accessory representation, and to convert the position of the accessory represented by the accessory representation to obtain the corresponding placement position. The accessory position is the position of the target accessory in the two-dimensional projection image, and the placement position is the position of the target accessory in the object to be accessorized.
[0095] Optionally, the selection and conversion module 103 is used to select from a plurality of ornaments an ornament that matches the ornament category and ornament size represented by the ornament representation as the target ornament corresponding to the ornament representation, including: selecting from a plurality of ornaments an ornament whose category is the ornament category represented by the ornament representation and whose size differs from the size represented by the ornament representation by less than a difference threshold, as the target ornament corresponding to the ornament representation.
[0096] Optionally, the selection and conversion module 103 is specifically used for: removing the rough edges from the image with ornaments to obtain a processed image with ornaments; selecting from multiple ornaments an ornament that matches the ornament category and size represented by the ornament representation in the processed image with ornaments as the target ornament corresponding to the ornament representation; and converting the position of the ornament represented by the ornament representation to obtain the corresponding placement position.
[0097] Optionally, the acquisition module 101 is specifically used for: acquiring the three-dimensional model data of the object to be adorned, the three-dimensional model data including the three-dimensional position and size information of multiple components; obtaining the two-dimensional position and size information of the components projected onto a target plane based on the three-dimensional position and size information of the components, the target plane being a plane perpendicular to the frontal viewing direction; and generating a two-dimensional projection image based on the two-dimensional position and size information of the multiple components.
[0098] Optionally, the acquisition module 101 is used to generate a two-dimensional projection image based on the two-dimensional position and size information of the plurality of components, including: generating a preset image; determining a coordinate transformation relationship for mapping the center of the object to be adorned to the center of the preset image based on the coordinates of the center of the object to be adorned projected onto the target plane; transforming the two-dimensional position and size information of the components based on the coordinate transformation relationship to obtain the transformed two-dimensional position and size information of the components; and drawing the plurality of components sequentially onto the preset image based on the transformed two-dimensional position and size information of the plurality of components.
[0099] Optionally, the deep neural network model is obtained as follows: a generative adversarial network is constructed, wherein training parameters are set in the generative adversarial network; the generative adversarial network is trained using a sample set until a set stopping condition is met, wherein the sample set includes multiple sample pairs, each sample pair including a sample two-dimensional projection image and a sample image with ornaments; the generator in the generative adversarial network that meets the set stopping condition is used as the deep neural network model.
[0100] Optionally, the loss of the generator is determined as follows: An accessory mask image corresponding to the sample image with accessories is generated, wherein the regions in the accessory mask image are divided into accessory regions and non-accessory regions, the pixel values of pixels in the accessory regions are a first value, and the pixel values of pixels in the non-accessory regions are a second value different from the first value; based on the sample image with accessories corresponding to the sample two-dimensional projection image, the generated image, and the accessory mask image, the difference between the generated image and the sample image with accessories in the accessory regions is calculated to obtain the loss of the generator.
[0101] Optionally, generating the accessory mask image corresponding to the sample accessory image includes: generating a grayscale image of the same size as the sample accessory image, wherein the pixel values of all pixels in the grayscale image are the second value; determining the corresponding region in the grayscale image where the accessory is located in the sample accessory image; expanding the corresponding region to obtain the accessory region; and modifying the pixel values of the pixels in the accessory region to the first value to obtain the accessory mask image.
[0102] Optionally, the first value is non-zero, and the second value is zero. Based on the sample image with ornaments corresponding to the sample two-dimensional projection image, the generated image, and the ornament mask image, the difference between the generated image and the sample image with ornaments in the ornament region is calculated, including: normalizing the pixel values of the pixels in the ornament mask image corresponding to the sample two-dimensional projection image to obtain a normalized ornament mask image; multiplying the pixel values of the corresponding pixels in the sample image with ornaments corresponding to the sample two-dimensional projection image with the pixel values of the corresponding pixels in the normalized ornament mask image to obtain a first pixel value matrix; multiplying the pixel values of the corresponding pixels in the generated image corresponding to the sample two-dimensional projection image with the pixel values of the corresponding pixels in the normalized ornament mask image to obtain a second pixel value matrix; and calculating the difference between the pixel values at corresponding positions in the first pixel value matrix and the second pixel value matrix to obtain the difference between the generated image and the sample image with ornaments in the ornament region.
[0103] Optionally, the object to be decorated includes a cabinet.
[0104] Optionally, the acquisition module 101 is further configured to acquire the three-dimensional model data of the target ornament; the selection and conversion module 103 is further configured to add the three-dimensional model data of the target ornament to the three-dimensional model data of the object to be adorned based on the placement position.
[0105] Figure 10 The device shown can perform Figure 2 The method provided in the illustrated embodiment, for parts not described in detail in this embodiment, can be referred to the [examples / descriptions]. Figure 2 The relevant descriptions of the illustrated embodiments are provided below. For the execution process and technical effects of this technical solution, please refer to [link / reference]. Figure 2 The descriptions in the illustrated embodiments will not be repeated here.
[0106] In one possible implementation, Figure 10 The structure of the device shown can be implemented as an electronic device. For example... Figure 11 As shown, the electronic device may include a processor 111 and a memory 112. The memory 112 stores data that supports the controller in performing the above-described functions. Figure 2 The program of the method provided in the illustrated embodiment, the processor 111 is configured to execute the program stored in the memory 112.
[0107] The program includes one or more computer instructions, wherein when executed by processor 111, the one or more computer instructions can perform the following steps:
[0108] A two-dimensional projection image of the object to be decorated, obtained from the three-dimensional model data of the object to be decorated, is shown in the frontal view direction.
[0109] The two-dimensional projection image is input into a deep neural network model for processing to generate an image with ornaments corresponding to the two-dimensional projection image. The image with ornaments contains an ornament representation, which is used to represent the ornament category and ornament size.
[0110] Based on the image of the accessory, an accessory that matches the accessory category and size represented by the accessory representation is selected from multiple accessories as the target accessory corresponding to the accessory representation. The position of the accessory represented by the accessory representation is transformed to obtain the corresponding placement position. The accessory position is the position of the target accessory in the two-dimensional projection image, and the placement position is the position of the target accessory in the object to be accessorized.
[0111] Optionally, the processor 111 is also used to perform the aforementioned Figure 2 All or part of the steps in the illustrated embodiments.
[0112] The structure of the electronic device may also include a communication interface 113 for communication between the electronic device and other devices or communication networks.
[0113] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed, performs the following... Figure 2 The method described in the illustrated embodiment.
[0114] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0115] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of a necessary general-purpose hardware platform, or by a combination of hardware and software. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a computer product. This application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0116] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable device, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0117] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0118] These computer program instructions may also be loaded onto a computer or other programmable device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0119] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0120] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0121] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, linked lists, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change 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), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A data processing method, characterized by, This is applicable to scenarios where the placement of accessories is determined for an object to be accessorized, wherein the object to be accessorized is a three-dimensional object for which accessories need to be selected and placed, including: A two-dimensional projection image of the object to be decorated, obtained from the three-dimensional model data of the object to be decorated, is shown in the frontal view direction. The two-dimensional projection image is input into a deep neural network model for processing to generate an image with accessories, which describes the placement of accessories for the object to be accessorized based on the two-dimensional projection image. The image with accessories contains an accessory representation, which is used to represent the accessory category, size and position. Based on the image of the accessory, an accessory matching the accessory category and size represented by the accessory representation is selected from multiple accessories as the target accessory corresponding to the accessory representation. The position of the accessory represented by the accessory representation is transformed to obtain the corresponding placement position. The accessory position is the position of the target accessory in the two-dimensional projection image, and the placement position is the position of the target accessory in the object to be accessorized, thereby obtaining the accessory placement method of the object to be accessorized.
2. The method of claim 1, wherein, The step of selecting an accessory from a plurality of accessories that matches the accessory category and size represented by the accessory representation as the target accessory corresponding to the accessory representation includes: Select from a plurality of accessories that are of the category represented by the accessory representation and whose size differs from the size represented by the accessory representation by less than a difference threshold, and use them as the target accessory corresponding to the accessory representation.
3. The method of claim 1, wherein, Based on the image of the ornament, the step of selecting an ornament from multiple ornaments that matches the ornament category and size represented by the ornament representation as the target ornament corresponding to the ornament representation, and performing a position transformation on the position of the ornament represented by the ornament representation to obtain the corresponding placement position, includes: Remove the rough edges from the image of the ornament to obtain the processed image of the ornament; Select the jewelry that matches the jewelry category and size represented by the jewelry representation in the processed jewelry image from multiple jewelry items as the target jewelry item corresponding to the jewelry representation, and transform the position of the jewelry item represented by the jewelry representation to obtain the corresponding placement position.
4. The method of claim 1, wherein, The step of obtaining a two-dimensional projection image of the object to be accessorized in the frontal view, based on the three-dimensional model data of the object, includes: Obtain the three-dimensional model data of the object to be decorated, wherein the three-dimensional model data includes the three-dimensional position and size information of multiple components; Based on the three-dimensional position and size information of the component, the two-dimensional position and size information of the component projected onto the target plane is obtained, wherein the target plane is a plane perpendicular to the frontal viewing direction; A two-dimensional projection image is generated based on the two-dimensional position and size information of the multiple components.
5. The method according to claim 4, characterized in that, The process of generating a two-dimensional projection image based on the two-dimensional position and size information of the multiple components includes: Generate a preset image; Based on the coordinates of the center of the object to be accessorized projected onto the target plane, a coordinate transformation relationship is determined to map the center of the object to be accessorized to the center of the preset image; Based on the coordinate transformation relationship, the two-dimensional position and size information of the component is transformed to obtain the transformed two-dimensional position and size information of the component; Based on the converted two-dimensional position and size information of the multiple components, the multiple components are sequentially drawn onto the preset image.
6. The method according to claim 1, characterized in that, The deep neural network model is obtained in the following way: Construct a generative adversarial network, wherein training parameters are set in the generative adversarial network; Generative adversarial training is performed on the generative adversarial network using samples from the sample set until a set stopping condition is met. The sample set includes multiple sample pairs, and each sample pair includes a sample two-dimensional projection image and a sample image with ornaments. The generator in the generative adversarial network that meets the set stopping conditions is used as the deep neural network model.
7. The method according to claim 6, characterized in that, The loss of the generator is determined in the following manner: Generate an accessory mask image corresponding to the sample image with accessories. The area in the accessory mask image is divided into an accessory area and a non-accessory area. The pixel value of the pixel in the accessory area is a first value, and the pixel value of the pixel in the non-accessory area is a second value that is different from the first value. Based on the sample image with ornaments, the generated image, and the ornament mask image corresponding to the sample 2D projection image, the difference between the generated image and the sample image with ornaments in the ornament region is calculated to obtain the loss of the generator.
8. The method according to claim 7, characterized in that, The step of generating an accessory mask image corresponding to the sample image with accessories includes: Generate a grayscale image of the same size as the sample image with jewelry, wherein the pixel values of all pixels in the grayscale image are the second value; Determine the corresponding region in the grayscale image where the jewelry is located in the sample image with jewelry; The corresponding area is expanded to obtain the jewelry area; Modify the pixel values of the pixels in the jewelry area to the first value to obtain the jewelry mask image.
9. The method according to claim 7, characterized in that, The first value is non-zero, and the second value is 0. Based on the sample image with ornaments corresponding to the sample two-dimensional projection image, the generated image, and the ornament mask image, the difference between the generated image and the sample image with ornaments in the ornament region is calculated, including: The pixel values of the pixels in the jewelry mask image corresponding to the sample two-dimensional projection image are normalized to obtain the normalized jewelry mask image. Multiply the sample image with ornaments corresponding to the sample two-dimensional projection image with the pixel value of the corresponding pixel in the normalized ornament mask image to obtain the first pixel value matrix. Multiply the generated image corresponding to the sample two-dimensional projection image with the pixel value of the corresponding pixel in the normalized jewelry mask image to obtain the second pixel value matrix; Calculate the difference between the pixel values at corresponding positions in the first pixel value matrix and the second pixel value matrix to obtain the difference between the generated image and the sample image with jewelry in the jewelry region.
10. The method according to claim 1, characterized in that, The object to be decorated includes the cabinet.
11. The method according to claim 1, characterized in that, The method further includes: Obtain the three-dimensional model data of the target ornament; Based on the placement position, the 3D model data of the target ornament is added to the 3D model data of the object to be adorned.
12. A data processing apparatus, characterized in that, This is applicable to scenarios where the placement of accessories is determined for an object to be accessorized, wherein the object to be accessorized is a three-dimensional object for which accessories need to be selected and placed, including: The acquisition module is used to acquire a two-dimensional projection image of the object to be decorated in the frontal view direction, obtained based on the three-dimensional model data of the object to be decorated. The generation module is used to input the two-dimensional projection image into a deep neural network model for processing, and generate an image with accessories to describe the placement of accessories for the object to be accessorized based on the two-dimensional projection image. The image with accessories contains an accessory representation, which is used to represent the accessory category, accessory size and accessory position. The selection and conversion module is used to select, based on the image with accessories, an accessory that matches the accessory category and size represented by the accessory representation from multiple accessories as the target accessory corresponding to the accessory representation, and to convert the video position represented by the accessory representation to obtain the corresponding placement position. The accessory position is the position of the target accessory in the two-dimensional projection image, and the placement position is the position of the target accessory in the object to be matched, thereby obtaining the accessory placement method of the object to be matched.
13. An electronic device, characterized in that, include: A memory and a processor; wherein the memory stores one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed, implements the method as described in any one of claims 1 to 11.