Clothing image processing method, computer equipment and storage medium

By extracting and matching the clothing key points and character posture information in the clothing display image, the target clothing display image is generated, which solves the problem of high cost and low efficiency of virtual trial-on technology, and realizes automated clothing display image generation, saving labor costs.

CN119445133AInactive Publication Date: 2025-02-14HANGZHOU FUYUN NETWORK TECHNOLOGY CO LTD +1

Patent Information

Application Number
CN202510032159.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-02-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing virtual trial-on technology is costly, the clothing display image generation efficiency is low, and it is difficult to automatically filter out the clothing display postures that match the clothing to be displayed from a large number of person posture data.

Method used

By obtaining the sample clothing display image, extracting the clothing key points and character posture information, and establishing a corresponding relationship; then obtaining the target clothing image, determining its image key points, matching the clothing key points to obtain the target posture information, and generating the target clothing display image.

Benefits of technology

It has achieved the reduction of virtual trial-on technology costs, improved the efficiency of clothing display image generation, and can automatically screen out clothing display postures that meet the clothes to be displayed from massive figure posture data, saving labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119445133A_ABST
    Figure CN119445133A_ABST
Patent Text Reader

Abstract

The invention relates to a clothing image processing method, computer equipment and a storage medium. Comprising the steps of obtaining a sample clothing display image, performing key point extraction on the sample clothing display image, and determining clothing key points of the sample clothing display image; extracting figure posture information corresponding to the sample clothing display image, and determining a corresponding relationship between the clothing key points and the figure posture information; obtaining a target clothes image, and determining image key points of the target clothes image; determining a target key point from the clothing key points according to the image key points, and determining figure posture information corresponding to the target key point as target posture information; and generating a target clothing display image according to the target posture information and the target clothing image. According to the scheme, the clothes display posture conforming to the to-be-displayed clothes can be automatically screened out from massive figure posture data, the labor cost is saved, and the generation efficiency of the target clothes display image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of database technology, and in particular to a clothing image processing method, a computer device and a storage medium. Background Art

[0002] With the rapid development of artificial intelligence and computer graphics technology, the application of virtual try-on technology in the clothing industry is becoming more and more extensive. However, most of the virtual try-on technologies currently on the market rely on real models or complete human models to provide character posture references, that is, real models or complete human models provide character posture images that match the clothing according to the clothing style, and combine the character posture images with the clothing images to obtain clothing display images. However, the existing virtual try-on technology has a high cost and a low efficiency in generating clothing display images. Therefore, how to reduce the cost of virtual try-on technology and improve the efficiency of generating clothing display images is a problem that needs to be solved. Summary of the invention

[0003] Based on this, it is necessary to provide a clothing image processing method, computer equipment and storage medium that can reduce the cost of virtual try-on technology and improve the generation efficiency of clothing display images in response to the above technical problems.

[0004] In a first aspect, the present application provides a clothing image processing method, the method comprising: Acquire a sample clothing display image, extract key points from the sample clothing display image, and determine clothing key points in the sample clothing display image; Extracting the character posture information corresponding to the sample clothing display image, and determining the corresponding relationship between the clothing key points and the character posture information; Acquire a target clothing image, and determine image key points of the target clothing image; Determining target key points that match image key points of the target clothing image from clothing key points of the sample clothing display image, and determining character posture information corresponding to the target key points as target posture information; A target clothing display image is generated according to the target posture information and the target clothing image.

[0005] In one embodiment, obtaining a sample clothing display image, extracting key points of the sample clothing display image, and determining clothing key points of the sample clothing display image include: Acquire a sample clothing display image, and classify the sample clothing display image through a clothing classification model to determine image category information of the sample clothing display image; the sample clothing display image contains sample clothing information and character model information; Through the key point detection model, key points of the sample clothing display image are extracted based on the image category information to determine the key points of the clothing.

[0006] In one embodiment, the clothing image processing method further includes: Determine a sample training image, and determine a sample clothing category and a sample image key point corresponding to the sample training image; A deep learning model is trained according to the sample training images, the sample clothing categories and the key points of the sample images to determine a key point detection model.

[0007] In one embodiment, the clothing image processing method further includes: Acquire a classification model training image, and determine a sample clothing category corresponding to the classification model training image; wherein the sample clothing categories include: men's children's short tops, men's children's short trousers, men's adult short tops, men's adult short trousers, men's children's long tops, men's children's long trousers, men's adult long tops, men's adult long trousers, women's children's short tops, women's children's short trousers, women's adult short tops, women's adult short trousers, women's children's long tops, women's children's long trousers, women's adult long tops, women's adult long trousers and dresses; Model training is performed on a neural network model based on the classification model training image and the sample clothing category to determine a clothing classification model.

[0008] In one embodiment, determining target key points that match image key points of the target clothing image from clothing key points of the sample clothing display image includes: Determining the cosine similarity between the clothing key points of the sample clothing display image and the clothing key points; A target key point matching the image key point of the target clothing image is determined from the clothing key points of the sample clothing display image according to the cosine similarity.

[0009] In one embodiment, generating a target clothing display image according to the target posture information and the target clothing image includes: Determining an affine transformation matrix between the target key point and the image key point; Coordinate matching is performed on the target posture information and the target clothing image according to the affine transformation matrix, and a target clothing display image is generated according to the coordinate matching result.

[0010] In one embodiment, coordinate matching is performed on the target posture information and the target clothing image according to the affine transformation matrix, and a target clothing display image is generated according to the coordinate matching result, including: Converting the target posture information into homogeneous coordinates; Determine a transposed matrix of the affine transformation matrix, and perform coordinate matching on the target posture information and the target clothing image according to the transposed matrix and the homogeneous coordinates to determine the target coordinates of the target posture information in the target clothing image; A target clothing display image is generated based on the target coordinates and the target posture information.

[0011] In one of the embodiments, after generating the target clothing display image according to the target posture information and the target clothing image, the method further includes: Acquire character posture coordinate adjustment information, and adjust the target clothing display image according to the character posture coordinate adjustment information.

[0012] In a second aspect, the present application further provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program: Acquire a sample clothing display image, extract key points from the sample clothing display image, and determine clothing key points in the sample clothing display image; Extracting the character posture information corresponding to the sample clothing display image, and determining the corresponding relationship between the clothing key points and the character posture information; Acquire a target clothing image, and determine image key points of the target clothing image; Determining target key points that match image key points of the target clothing image from clothing key points of the sample clothing display image, and determining character posture information corresponding to the target key points as target posture information; A target clothing display image is generated according to the target posture information and the target clothing image.

[0013] In a third aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the following steps are implemented: Acquire a sample clothing display image, extract key points from the sample clothing display image, and determine clothing key points in the sample clothing display image; Extracting the character posture information corresponding to the sample clothing display image, and determining the corresponding relationship between the clothing key points and the character posture information; Acquire a target clothing image, and determine image key points of the target clothing image; Determining target key points that match image key points of the target clothing image from clothing key points of the sample clothing display image, and determining character posture information corresponding to the target key points as target posture information; A target clothing display image is generated according to the target posture information and the target clothing image.

[0014] The above-mentioned clothing image processing method, computer device and storage medium obtain a sample clothing display image, extract key points of the sample clothing display image, determine the clothing key points of the sample clothing display image; extract the human posture information corresponding to the sample clothing display image, and determine the corresponding relationship between the clothing key points and the human posture information; obtain the target clothing image, and determine the image key points of the target clothing image; determine the target key points from the clothing key points according to the image key points, and determine the human posture information corresponding to the target key points as the target posture information; generate the target clothing display image according to the target posture information and the target clothing image. The problem that when the clothing to be displayed is virtually tried on, a human model or a complete human model provides a human posture image that conforms to the clothing according to the clothing style, and the human posture image and the clothing image are combined to obtain the clothing display image, resulting in low efficiency in obtaining the clothing display image and high cost in generating the clothing display image, is solved. The above scheme determines the clothing key points of the sample clothing displayed in the sample clothing display image, and the correspondence between the character posture information of the model processed by the clothing image in the sample clothing display image, and determines the image key points corresponding to the target clothing image of the clothing to be displayed. According to the image key points and the correspondence between the clothing key points and the character posture information, the clothing display posture matching the target clothing image, i.e., the target posture information, is determined from the character posture information. The target clothing display image of the clothing to be displayed is generated according to the target posture information and the target clothing image. The clothing display posture that matches the clothing to be displayed can be automatically screened out from a large amount of character posture data, thereby saving labor costs and improving the generation efficiency of the target clothing display image. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A diagram showing an application environment of a clothing image processing method in one embodiment; Figure 2 is a flow chart of a clothing image processing method in one embodiment; Figure 3 is a flow chart of a clothing image processing method in another embodiment; Figure 4 is a flow chart of a clothing image processing method in another embodiment; Figure 5 is a structural block diagram of a clothing image processing device in one embodiment; Figure 6FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

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

[0017] The clothing image processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 obtains the sample clothing display image, extracts the key points of the sample clothing display image, and determines the clothing key points of the sample clothing display image; extracts the character posture information corresponding to the sample clothing display image, and determines the corresponding relationship between the clothing key points and the character posture information; obtains the target clothing image, and determines the image key points of the target clothing image; determines the target key points that match the image key points of the target clothing image from the clothing key points of the sample clothing display image, and determines the character posture information corresponding to the target key points as the target posture information; generates the target clothing display image according to the target posture information and the target clothing image. The target clothing display image is sent to the terminal 102 through the communication network. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0018] In one embodiment, Figure 2 As shown, a clothing image processing method is provided. This embodiment takes the method applied to a terminal as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps: S210: Acquire a sample clothing display image, extract key points of the sample clothing display image, and determine clothing key points of the sample clothing display image.

[0019] The sample clothing display images are images of clothing image processing models wearing clothing for clothing image processing. Different sample clothing display images include clothing images of various styles and clothing image processing model images of different postures. Clothing key points are points that can characterize key parts of clothing. For example, the clothing key points of a top may include the elbow points, shoulder points, cuff points, and neckline points of the clothing.

[0020] Specifically, a sample clothing display image is obtained, and key points of the sample clothing display image are extracted by a key point detection model to determine clothing key points of the sample clothing display image. The key point detection model may be a pre-trained convolutional neural network model.

[0021] S220: extracting the character posture information corresponding to the sample clothing display image, and determining the corresponding relationship between the clothing key points and the character posture information.

[0022] The character posture information refers to the specific posture information of the clothing image processing model in the sample clothing display image. The character posture information may include the body lines and body shape of the clothing image processing model.

[0023] Specifically, the character posture information of the sample clothing display image is extracted through the character posture detection model to determine the character posture information, and the correspondence between the clothing key points and the character posture information is determined, so that the sample clothing display image, the clothing key points corresponding to the sample clothing display image, and the character posture information corresponding to the sample clothing display image are taken as a set of sample data according to the correspondence between the clothing key points and the character posture information.

[0024] Among them, the character posture detection model can be a pre-trained neural network model.

[0025] Exemplarily, a sample clothing display image is obtained, and the model posture information corresponding to the sample clothing display image is obtained. The model posture information corresponding to the sample clothing display image can be obtained by manual annotation. The sample clothing display image and the model posture information corresponding to the sample clothing display image are used as model training data of the character posture detection model, and the model training data of the character posture detection model can be divided into first model training data and first model test data. The first model training data is used to perform model training on the neural network model, and the first model test data is used to perform model testing on the trained neural network model. The model loss function of the trained neural network model is determined according to the test results. If the model loss function of the trained neural network model meets the preset first loss function condition, the trained neural network model is used as the character posture detection model; if the model loss function of the trained neural network model does not meet the preset first loss function condition, the trained neural network model is continuously iterated until the model loss function of the neural network model meets the preset first loss function condition, and the character posture detection model is determined.

[0026] S230: Acquire a target clothing image, and determine image key points of the target clothing image.

[0027] The target clothing image is the clothing image that needs to be virtually tried on and displayed, and the target clothing image does not include the image of the model for clothing image processing. The image key points of the target clothing image refer to the key points of the clothing that needs to be displayed in the target clothing image.

[0028] Specifically, a target clothing image is acquired, clothing key points of the target clothing image are extracted using a pre-trained key point detection model, and image key points of the target clothing image are determined.

[0029] S240: Determine target key points that match image key points of the target clothing image from clothing key points of the sample clothing display image, and determine character posture information corresponding to the target key points as target posture information.

[0030] Specifically, by performing similarity matching on the coordinate information of the image key points and the coordinate information of the clothing key points of the sample clothing display image, it is possible to determine that the clothing key points of the sample clothing display image that have the highest similarity to the image key points are the target key points that match the image key points of the target clothing image, and based on the correspondence between the clothing key points of the sample clothing display image and the character posture information, determine that the character posture information corresponding to the target key points is the target posture information.

[0031] Optionally, the coordinate information of the image key points of the target clothing image and the coordinate information of the clothing key points of the sample clothing display image can be similarly matched, and based on the similarity matching results, N clothing key points with the highest similarity to the image key points are determined as candidate key points, and the candidate key points are sent to the user end so that the user can select the candidate key points based on the user end, and the candidate key points selected by the user are used as target key points, and the character posture information corresponding to the target key points is determined as the target posture information.

[0032] S250: Generate a target clothing display image according to the target posture information and the target clothing image.

[0033] Specifically, the target posture information is mapped to the target clothing image, the clothing image to be processed is determined, and a human image conforming to the target posture information is generated in the image to be processed according to the target posture information in the clothing image to be processed through a human image generation model, thereby obtaining a target clothing display image. The human image generation model can be a pre-trained deep learning model.

[0034] In the above-mentioned clothing image processing method, a sample clothing display image is obtained, and key points of the sample clothing display image are extracted to determine the clothing key points of the sample clothing display image; the human posture information corresponding to the sample clothing display image is extracted, and the corresponding relationship between the clothing key points and the human posture information is determined; the target clothing image is obtained, and the image key points of the target clothing image are determined; according to the image key points, the target key points are determined from the clothing key points, and the human posture information corresponding to the target key points is determined as the target posture information; the target clothing display image is generated according to the target posture information and the target clothing image. The problem that when the clothing to be displayed is virtually tried on, a human model or a complete human model provides a human posture image that conforms to the clothing according to the clothing style, and the human posture image and the clothing image are combined to obtain the clothing display image, resulting in low efficiency in obtaining the clothing display image and high cost in generating the clothing display image, is solved. The above scheme determines the clothing key points of the sample clothing displayed in the sample clothing display image, and the correspondence between the character posture information of the model processed by the clothing image in the sample clothing display image, and determines the image key points corresponding to the target clothing image of the clothing to be displayed. According to the image key points and the correspondence between the clothing key points and the character posture information, the clothing display posture matching the target clothing image, i.e., the target posture information, is determined from the character posture information. The target clothing display image of the clothing to be displayed is generated according to the target posture information and the target clothing image. The clothing display posture that matches the clothing to be displayed can be automatically screened out from a large amount of character posture data, thereby saving labor costs and improving the generation efficiency of the target clothing display image.

[0035] In one embodiment, Figure 3As shown, a sample clothing display image is obtained, and key points of the sample clothing display image are extracted to determine clothing key points of the sample clothing display image, including: S310: Acquire a sample clothing display image, and classify the sample clothing display image using a clothing classification model to determine image category information of the sample clothing display image.

[0036] The sample clothing display image includes sample clothing information and character model information.

[0037] The clothing classification model may be a pre-trained residual network model or a pre-trained convolutional neural network model. The image category information of the sample clothing display image refers to the clothing category to which the clothing in the sample clothing display image belongs. For example, the image category information may include men's children's short tops, men's children's short trousers, men's adult short tops, men's adult short trousers, men's children's long tops, men's children's long trousers, men's adult long tops, men's adult long trousers, women's children's short tops, women's children's short trousers, women's adult short tops, women's adult short trousers, women's children's long tops, women's children's long trousers, women's adult long tops, women's adult long trousers and dresses, etc.

[0038] S320: extract key points of the sample clothing display image based on the image category information through the key point detection model to determine the key points of the clothing.

[0039] It should be noted that the key points corresponding to different categories of clothing are at different positions. Therefore, extracting key points of sample clothing display images based on image category information can improve the accuracy of the extracted clothing key points.

[0040] In one embodiment, the clothing image processing method further includes: Determine a sample training image, and determine a sample clothing category and a sample image key point corresponding to the sample training image; train a deep learning model according to the sample training image, the sample clothing category and the sample image key point, and determine a key point detection model.

[0041] The sample training images contain image information of sample clothing.

[0042] Specifically, a sample training image is determined, and the sample clothing category and sample image key points corresponding to the sample training image are annotated. The sample training image, the sample clothing category and the sample image key points are used as model training data of the key point detection model, and the model training data of the key point detection model is divided into second model training data and second model test data. The second model training data is used to perform model training on the deep learning model, wherein the sample image key points in the second model training data are used as supervision data. The second model test data is used to perform model testing on the trained deep learning model, and the model loss function of the trained deep learning model is determined according to the test results. If the model loss function of the trained deep learning model meets the preset second loss function condition, the trained deep learning model is used as the key point detection model; if the model loss function of the trained deep learning model does not meet the preset second loss function condition, the trained deep learning model is continued to be iteratively trained until the model loss function of the deep learning model meets the preset second loss function condition, and the key point detection model is determined.

[0043] The above scheme trains the deep learning model according to the sample training images, sample clothing categories and sample image key points, and determines the key point detection model, so that the key point detection model can perform key point detection on the sample clothing display images based on the image category of the sample clothing display images, thereby improving the accuracy of key point detection.

[0044] In one embodiment, the clothing image processing method further includes: A classification model training image is obtained, and a sample clothing category corresponding to the classification model training image is determined; a neural network model is trained based on the classification model training image and the sample clothing category to determine a clothing classification model.

[0045] Among them, the sample clothing categories include: boys' children's short tops, boys' children's short pants, boys' adult short tops, boys' adult short pants, boys' children's long tops, boys' children's long pants, boys' adult long tops, boys' adult long pants, girls' children's short tops, girls' children's short pants, girls' adult short tops, girls' adult short pants, girls' children's long tops, girls' children's long pants, girls' adult long tops, girls' adult long pants and dresses.

[0046] The above scheme provides a method for training a clothing classification model. By using the clothing classification model to classify sample clothing display images, the efficiency and accuracy of image classification can be improved.

[0047] In one embodiment, determining target key points that match image key points of a target clothing image from clothing key points of a sample clothing display image according to image key points includes: Determine the cosine similarity between clothing key points of the sample clothing display image and clothing key points; and determine target key points that match image key points of the target clothing image from the clothing key points of the sample clothing display image according to the cosine similarity.

[0048] Specifically, based on the coordinates of the image key points and the coordinates of the clothing key points, the matching relationship between the image key points and the clothing key points is determined, based on the matching relationship between the image key points and the clothing key points, the cosine similarity between the image key points and the clothing key points is determined, and the clothing key point with the highest cosine similarity is determined as the target key point that matches the image key point of the target clothing image.

[0049] The above scheme determines the target key points from the clothing key points based on the cosine similarity between the image key points and the clothing key points, which can improve the reliability of the target key points.

[0050] In one embodiment, Figure 4 As shown, a target clothing display image is generated according to the target posture information and the target clothing image, including: S410: Determine an affine transformation matrix between the target key points and the image key points.

[0051] Among them, the affine transformation matrix is ​​a commonly used concept in computer graphics, which is used to describe geometric transformations in two-dimensional or three-dimensional space.

[0052] Specifically, the key point coordinates of the target key points and the key point coordinates of the image key points are obtained, a linear equation system in matrix form is constructed according to the key point coordinates of the target key points and the key point coordinates of the image key points, and the linear equation system is solved using the least squares method to obtain an affine transformation matrix.

[0053] The formula of the linear equation system is shown in formula (1): A×X=B (1) Among them, A is the coordinate matrix corresponding to the key point coordinates of the image key point, B is the coordinate matrix corresponding to the key point coordinates of the target key point, and X is the affine transformation matrix.

[0054] S420, coordinate matching is performed on the target posture information and the target clothing image according to the affine transformation matrix, and the target clothing display image is generated according to the coordinate matching result.

[0055] The above scheme performs coordinate matching on the target posture information and the target clothing image according to the affine transformation matrix between the target key points and the image key points to generate a target clothing display image, which can improve the matching degree between the character posture and the clothing to be displayed in the target clothing display image, thereby improving the image quality of the target clothing display image.

[0056] In one embodiment, coordinate matching is performed on the target posture information and the target clothing image according to the affine transformation matrix, and the target clothing display image is generated according to the coordinate matching result, including: The target posture information is converted into homogeneous coordinates; the transposed matrix of the affine transformation matrix is ​​determined, and the target posture information and the target clothing image are matched according to the transposed matrix and the homogeneous coordinates to determine the target coordinates of the target posture information in the target clothing image; and the target clothing display image is generated based on the target coordinates and the target posture information.

[0057] Homogeneous coordinates represent an n-dimensional vector as an n+1-dimensional vector. It is a coordinate system used in projective geometry, where n is a positive integer. Converting the target posture information into homogeneous coordinates means adding a column of all 1 elements to the two-dimensional point set corresponding to the target posture information.

[0058] Specifically, the posture coordinate points corresponding to the target posture information are converted into homogeneous coordinates, and the transposed matrix of the affine transformation matrix is ​​calculated. The target matrix is ​​determined according to the product of the transposed matrix and the homogeneous coordinates, and the coordinate points in the target matrix are used as the target coordinates, and the target clothing display image is generated based on the target coordinates and the target posture information.

[0059] The above scheme improves the coordinate matching accuracy between the target posture information and the target clothing image.

[0060] In one embodiment, after generating the target clothing display image according to the target posture information and the target clothing image, the method further includes: The character posture coordinate adjustment information is obtained, and the target clothing display image is adjusted according to the character posture coordinate adjustment information.

[0061] The character posture coordinate adjustment information is information input by the user to adjust the character posture coordinates in the target clothing display image. The character posture coordinate adjustment information may include the character posture coordinates to be adjusted and the target posture coordinates after the manually inputted posture coordinates to be adjusted are adjusted.

[0062] Specifically, after a target clothing display image is generated according to the target posture information and the target clothing image, the target clothing display image is sent to a user terminal. After the user obtains the target clothing display image, the character posture coordinate adjustment information in the target clothing display image can be input based on the user terminal, and the posture coordinates to be adjusted and the target posture coordinates are determined according to the character posture coordinate adjustment information. The target clothing display image is adjusted based on the posture coordinates to be adjusted and the target posture coordinates to obtain a clothing display image that better meets the user's expectations.

[0063] The above solution can adjust the target clothing display image according to actual needs, and further improve the image quality of the target clothing display image.

[0064] Exemplarily, based on the above embodiment, the clothing image processing method includes: Determine a sample training image, and annotate the sample clothing category and sample image key points corresponding to the sample training image. Use the sample training image, sample clothing category and sample image key points as model training data of the key point detection model, and divide the model training data of the key point detection model into second model training data and second model test data. Use the second model training data to perform model training on the deep learning model, wherein the sample image key points in the second model training data are used as supervision data. Use the second model test data to perform model testing on the trained deep learning model, and determine the model loss function of the trained deep learning model according to the test result. If the model loss function of the trained deep learning model meets the preset second loss function condition, the trained deep learning model is used as the key point detection model; if the model loss function of the trained deep learning model does not meet the preset second loss function condition, continue to iteratively train the trained deep learning model until the model loss function of the deep learning model meets the preset second loss function condition, and determine the key point detection model. Obtain a classification model training image, and determine the sample clothing category corresponding to the classification model training image; perform model training on the neural network model based on the classification model training image and the sample clothing category, and determine the clothing classification model.

[0065] A sample clothing display image is obtained, and the sample clothing display image is classified by a clothing classification model to determine the image category information of the sample clothing display image. A key point detection model is used to extract key points of the sample clothing display image based on the image category information to determine the clothing key points.

[0066] A sample clothing display image is obtained, and model posture information corresponding to the sample clothing display image is obtained. The model posture information corresponding to the sample clothing display image can be obtained by manual annotation. The sample clothing display image and the model posture information corresponding to the sample clothing display image are used as model training data of the human posture detection model. The model training data of the human posture detection model can be divided into first model training data and first model test data. The first model training data is used to perform model training on the neural network model, and the first model test data is used to perform model testing on the trained neural network model. The model loss function of the trained neural network model is determined according to the test results. If the model loss function of the trained neural network model meets the preset first loss function condition, the trained neural network model is used as the human posture detection model; if the model loss function of the trained neural network model does not meet the preset first loss function condition, the trained neural network model is continued to be iteratively trained until the model loss function of the neural network model meets the preset first loss function condition, and the human posture detection model is determined. The character posture information of the sample clothing display image is extracted through the character posture detection model to determine the character posture information and the correspondence between the clothing key points and the character posture information, so that the sample clothing display image, the clothing key points corresponding to the sample clothing display image and the character posture information corresponding to the sample clothing display image are taken as a set of sample data according to the correspondence between the clothing key points and the character posture information.

[0067] Obtain a target clothing image, extract clothing key points from the target clothing image using a pre-trained key point detection model, and determine the image key points of the target clothing image. Determine the cosine similarity between the image key points and the clothing key points; determine the target key points from the clothing key points based on the cosine similarity. Based on the correspondence between the clothing key points and the person's posture information, determine the person's posture information corresponding to the target key points as the target posture information.

[0068] The key point coordinates of the target key points and the key point coordinates of the image key points are obtained, and a linear equation system in matrix form is constructed based on the key point coordinates of the target key points and the key point coordinates of the image key points. The linear equation system is solved by the least square method to obtain an affine transformation matrix. The posture coordinate points corresponding to the target posture information are converted into homogeneous coordinates, and the transposed matrix of the affine transformation matrix is ​​calculated. The target matrix is ​​determined according to the product of the transposed matrix and the homogeneous coordinates, and the coordinate points in the target matrix are used as the target coordinates. The target clothing display image is generated based on the target coordinates and the target posture information.

[0069] After generating a target clothing display image according to the target posture information and the target clothing image, the target clothing display image is sent to the user end. After the user obtains the target clothing display image, the character posture coordinate adjustment information in the target clothing display image can be input based on the user end, and the posture coordinates to be adjusted and the target posture coordinates are determined according to the character posture coordinate adjustment information. The target clothing display image is adjusted based on the posture coordinates to be adjusted and the target posture coordinates to obtain a clothing display image that better meets the user's expectations.

[0070] In the above-mentioned clothing image processing method, a sample clothing display image is obtained, and key points of the sample clothing display image are extracted to determine the clothing key points of the sample clothing display image; the human posture information corresponding to the sample clothing display image is extracted, and the corresponding relationship between the clothing key points and the human posture information is determined; the target clothing image is obtained, and the image key points of the target clothing image are determined; according to the image key points, the target key points are determined from the clothing key points, and the human posture information corresponding to the target key points is determined as the target posture information; the target clothing display image is generated according to the target posture information and the target clothing image. The problem that when the clothing to be displayed is virtually tried on, a human model or a complete human model provides a human posture image that conforms to the clothing according to the clothing style, and the human posture image and the clothing image are combined to obtain the clothing display image, resulting in low efficiency in obtaining the clothing display image and high cost in generating the clothing display image, is solved. The above scheme determines the clothing key points of the sample clothing displayed in the sample clothing display image, and the correspondence between the character posture information of the model processed by the clothing image in the sample clothing display image, and determines the image key points corresponding to the target clothing image of the clothing to be displayed. According to the image key points and the correspondence between the clothing key points and the character posture information, the clothing display posture matching the target clothing image, i.e., the target posture information, is determined from the character posture information. The target clothing display image of the clothing to be displayed is generated according to the target posture information and the target clothing image. The clothing display posture that matches the clothing to be displayed can be automatically screened out from a large amount of character posture data, thereby saving labor costs and improving the generation efficiency of the target clothing display image.

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

[0072] Based on the same inventive concept, the embodiment of the present application also provides a clothing image processing device for implementing the clothing image processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more clothing image processing device embodiments provided below can refer to the limitations of the clothing image processing method above, and will not be repeated here.

[0073] In one embodiment, Figure 5 As shown, a clothing image processing device is provided, comprising: a clothing key point determination module 501, a character posture information extraction module 502, an image key point determination module 503, a target posture information determination module 504 and a clothing display image generation module 505, wherein: The clothing key point determination module 501 is used to obtain a sample clothing display image, extract key points from the sample clothing display image, and determine clothing key points in the sample clothing display image; A character posture information extraction module 502 is used to extract character posture information corresponding to the sample clothing display image and determine the corresponding relationship between clothing key points and character posture information; An image key point determination module 503 is used to obtain a target clothing image and determine image key points of the target clothing image; The target posture information determination module 504 is used to determine the target key points that match the image key points of the target clothing image from the clothing key points of the sample clothing display image, and determine the character posture information corresponding to the target key points as the target posture information; The clothing display image generation module 505 is used to generate a target clothing display image according to the target posture information and the target clothing image.

[0074] Exemplarily, the clothing key point determination module 501 includes: A sample clothing display image is obtained, and the sample clothing display image is classified by a clothing classification model to determine image category information of the sample clothing display image; the sample clothing display image includes clothing images and human model images; the sample clothing display image includes sample clothing information and human model information.

[0075] Through the key point detection model, key points of sample clothing display images are extracted based on image category information to determine the key points of clothing.

[0076] Exemplarily, the clothing key point determination module 501 further includes: Determine a sample training image, and determine a sample clothing category and a sample image key point corresponding to the sample training image; The deep learning model is trained according to the sample training images, sample clothing categories and sample image key points to determine the key point detection model.

[0077] Exemplarily, the clothing key point determination module 501 further includes: Obtain a classification model training image, and determine a sample clothing category corresponding to the classification model training image; wherein the sample clothing categories include: men's children's short tops, men's children's short trousers, men's adult short tops, men's adult short trousers, men's children's long tops, men's children's long trousers, men's adult long tops, men's adult long trousers, women's children's short tops, women's children's short trousers, women's adult short tops, women's adult short trousers, women's children's long tops, women's children's long trousers, women's adult long tops, women's adult long trousers and dresses; The neural network model is trained based on the classification model training images and sample clothing categories to determine the clothing classification model.

[0078] Exemplarily, the target posture information determination module 504 is specifically used for: Determine the cosine similarity between clothing key points and clothing key points of the sample clothing display image; Target key points that match image key points of the target clothing image are determined from clothing key points of the sample clothing display image according to cosine similarity.

[0079] Exemplarily, the clothing display image generation module 505 is specifically used for: Determine the affine transformation matrix between the target keypoints and the image keypoints; The target posture information and the target clothing image are coordinate matched according to the affine transformation matrix, and the target clothing display image is generated according to the coordinate matching result.

[0080] Exemplarily, the clothing display image generation module 505 is also specifically used for: Convert the target posture information into homogeneous coordinates; Determine the transposed matrix of the affine transformation matrix, and perform coordinate matching on the target posture information and the target clothing image according to the transposed matrix and the homogeneous coordinates to determine the target coordinates of the target posture information in the target clothing image; Generate a target clothing display image based on the target coordinates and target posture information.

[0081] Exemplarily, the above-mentioned clothing image processing device further includes: The clothing display image adjustment module is used to obtain the character posture coordinate adjustment information and adjust the target clothing display image according to the character posture coordinate adjustment information.

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

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

[0084] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented: Step 1: obtaining a sample clothing display image, and extracting key points of the sample clothing display image to determine clothing key points of the sample clothing display image; Step 2: extracting the character posture information corresponding to the sample clothing display image, and determining the corresponding relationship between the clothing key points and the character posture information; Step 3: acquiring a target clothing image and determining image key points of the target clothing image; Step 4: determining a target key point from the clothing key points according to the image key points, and determining the person posture information corresponding to the target key point as the target posture information; Step 5: Generate a target clothing display image based on the target posture information and the target clothing image.

[0085] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: Step 1: obtaining a sample clothing display image, and extracting key points of the sample clothing display image to determine clothing key points of the sample clothing display image; Step 2: extracting the character posture information corresponding to the sample clothing display image, and determining the corresponding relationship between the clothing key points and the character posture information; Step 3: acquiring a target clothing image and determining image key points of the target clothing image; Step 4: determining a target key point from the clothing key points according to the image key points, and determining the person posture information corresponding to the target key point as the target posture information; Step 5: Generate a target clothing display image based on the target posture information and the target clothing image.

[0086] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps: Step 1: obtaining a sample clothing display image, and extracting key points of the sample clothing display image to determine clothing key points of the sample clothing display image; Step 2: extracting the character posture information corresponding to the sample clothing display image, and determining the corresponding relationship between the clothing key points and the character posture information; Step 3: acquiring a target clothing image and determining image key points of the target clothing image; Step 4: determining a target key point from the clothing key points according to the image key points, and determining the person posture information corresponding to the target key point as the target posture information; Step 5: Generate a target clothing display image based on the target posture information and the target clothing image.

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

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

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

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

Claims

1. A clothing image processing method, characterized in that: include: Acquire a sample clothing display image, extract key points from the sample clothing display image, and determine clothing key points in the sample clothing display image; Extracting the character posture information corresponding to the sample clothing display image, and determining the corresponding relationship between the clothing key points and the character posture information; Acquire a target clothing image, and determine image key points of the target clothing image; Determining target key points that match image key points of the target clothing image from clothing key points of the sample clothing display image, and determining character posture information corresponding to the target key points as target posture information; A target clothing display image is generated according to the target posture information and the target clothing image.

2. The method according to claim 1, characterized in that Acquiring a sample clothing display image, extracting key points of the sample clothing display image, and determining clothing key points of the sample clothing display image, including: Acquire a sample clothing display image, and classify the sample clothing display image through a clothing classification model to determine image category information of the sample clothing display image; the sample clothing display image contains sample clothing information and character model information; Through the key point detection model, key points of the sample clothing display image are extracted based on the image category information to determine the key points of the clothing.

3. The method according to claim 2, characterized in that Also includes: Determine a sample training image, and determine a sample clothing category and a sample image key point corresponding to the sample training image; A deep learning model is trained according to the sample training images, the sample clothing categories and the key points of the sample images to determine a key point detection model.

4. The method according to claim 2, characterized in that: Also includes: Acquire a classification model training image, and determine a sample clothing category corresponding to the classification model training image; wherein the sample clothing categories include: men's children's short tops, men's children's short trousers, men's adult short tops, men's adult short trousers, men's children's long tops, men's children's long trousers, men's adult long tops, men's adult long trousers, women's children's short tops, women's children's short trousers, women's adult short tops, women's adult short trousers, women's children's long tops, women's children's long trousers, women's adult long tops, women's adult long trousers and dresses; Model training is performed on a neural network model based on the classification model training image and the sample clothing category to determine a clothing classification model.

5. The method according to claim 1, characterized in that Determining target key points that match image key points of the target clothing image from clothing key points of the sample clothing display image includes: Determining the cosine similarity between the clothing key points of the sample clothing display image and the clothing key points; A target key point matching the image key point of the target clothing image is determined from the clothing key points of the sample clothing display image according to the cosine similarity.

6. The method according to claim 1, characterized in that Generating a target clothing display image according to the target posture information and the target clothing image includes: Determining an affine transformation matrix between the target key point and the image key point; Coordinate matching is performed on the target posture information and the target clothing image according to the affine transformation matrix, and a target clothing display image is generated according to the coordinate matching result.

7. The method according to claim 6, characterized in that The target posture information and the target clothing image are coordinate matched according to the affine transformation matrix, and the target clothing display image is generated according to the coordinate matching result, including: Converting the target posture information into homogeneous coordinates; Determine a transposed matrix of the affine transformation matrix, and perform coordinate matching on the target posture information and the target clothing image according to the transposed matrix and the homogeneous coordinates to determine the target coordinates of the target posture information in the target clothing image; A target clothing display image is generated based on the target coordinates and the target posture information.

8. The method according to claim 1, characterized in that After generating the target clothing display image according to the target posture information and the target clothing image, the method further includes: Acquire character posture coordinate adjustment information, and adjust the target clothing display image according to the character posture coordinate adjustment information.

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

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

Citation Information

Patent Citations

  • Method and device for obtaining posture classification model

    CN110858277A

  • Virtual garment fitting image generation method, device, computer equipment and storage medium

    CN110992470A

  • Virtual try-on method and device based on artificial intelligence, server and storage medium

    CN111784845A

  • Virtual fitting method, device and system and electronic equipment

    CN112070575A

  • Image generation method and device, computer equipment and computer readable storage medium

    CN112991494A

Cited By

  • Garment image generation method and device, equipment and storage medium

    CN121861168A

  • Clothing image generation method, apparatus, device, and storage medium

    CN121861168B