Garment matching recommendation method based on physical characteristics

By extracting body shape features based on 2D human image samples and training a CNN-XGBoost model, combined with cosine similarity recommendation, the problem of insufficient research on body shape features in existing clothing recommendation systems is solved, and high-precision and personalized clothing matching recommendations are achieved.

CN122064833APending Publication Date: 2026-05-19DALIAN POLYTECHNIC UNIVERSITY
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DALIAN POLYTECHNIC UNIVERSITY
Filing Date
2026-04-20
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing clothing recommendation systems lack sufficient research on body shape characteristics, resulting in severe cold start problems for new users, a lack of personalization and low accuracy in recommendations, and an inability to effectively utilize body shape characteristics for clothing matching.

Method used

By acquiring 2D human image samples, extracting the coordinates of key human points, constructing human feature vectors, training a CNN-XGBoost body shape recognition model, and combining it with a cosine similarity recommendation model, the final recommendation matching score between user body shape features and clothing features is obtained, thereby achieving accurate clothing matching recommendations.

Benefits of technology

It achieves high-precision and personalized clothing matching recommendations, avoiding high computational costs and lack of interpretability, and improving the quality and accuracy of recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122064833A_ABST
    Figure CN122064833A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a clothing matching recommendation method based on body characteristics, and the method comprises the steps: obtaining a human body key point coordinate based on a 2D human body image sample, obtaining a human body type based on a human body characteristic index, carrying out the marking of the 2D human body image sample, forming a training set, and carrying out the training of a CNN-XGBoost body type recognition model. Based on the trained CNN-XGBoost body type recognition model, a human body type category prediction result, namely a body type feature vector, of a user to be recommended is obtained, and then a cosine similarity recommendation model is adopted to obtain a final recommendation matching score of the body type feature vector of the user to be recommended and clothing features; therefore, clothes matching recommendation based on the user body type characteristics to be recommended is completed. According to the invention, more personalized and high-precision clothing matching recommendation can be provided, and the recommendation quality and precision are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of clothing recommendation technology, and in particular to a clothing matching recommendation method based on body shape characteristics. Background Technology

[0002] With the rapid development of e-commerce, online shopping has gradually become one of the mainstream consumption methods, especially clothing matching, which has attracted widespread attention among female consumers. However, among a large amount of clothing information, users spend a lot of time and energy searching for clothes that match their body type. Although traditional clothing recommendation systems improve recommendation efficiency by refining algorithms and predicting user preferences based on information such as browsing history to provide personalized clothing recommendations, these methods still face many challenges, such as limited research on user body type characteristics, severe cold start problems for new users, lack of interpretability in recommendations, and low recommendation accuracy.

[0003] With the continuous development of the e-commerce industry, more and more research is focusing on clothing matching recommendations. Based on different recommendation methods, clothing matching recommendations can be divided into three categories: content-based recommendations, collaborative filtering-based recommendations, and hybrid recommendations. Content-based recommendations recommend clothing to users based on user characteristics and clothing features. Collaborative filtering-based recommendations predict user preferences by calculating the similarity between users and items. Hybrid recommendations combine multiple methods, including content-based and collaborative filtering. Currently, recommendation algorithms suffer from problems such as limited content recommendations, cold start for new users, low recommendation accuracy, and lack of personalization. To address these issues and further improve the accuracy and quality of matching recommendations, many researchers are still dedicated to improving recommendation algorithms.

[0004] Numerous studies have been conducted on clothing coordination, demonstrating that body shape characteristics have a profound impact on clothing style selection and wearing effect. This is particularly important in concealing body flaws and highlighting strengths, where appropriate matching of body shape characteristics is crucial. However, body shape characteristics are complex and varied, making it difficult for users to accurately assess their own. Existing research largely focuses on feature extraction from clothing itself and user preference prediction, with many methods failing to adequately consider body shape characteristics, resulting in unsatisfactory recommendation performance. Summary of the Invention

[0005] This invention discloses a clothing matching recommendation method based on body shape characteristics to overcome the above-mentioned technical problems.

[0006] To achieve the above objectives, the technical solution of the present invention is as follows: A clothing matching recommendation method based on body shape characteristics includes the following steps: S1: Obtain a 2D human body image sample and perform preprocessing to obtain a normalized human body height, thereby obtaining a normalized human body contour binary image, and then obtaining the coordinates of the human body key points corresponding to the 2D human body image sample. S2: Based on the coordinates of key points of the human body, obtain hip height, shoulder width, chest width, waist width, and hip width to obtain human body feature indicators corresponding to the 2D human body image sample, and then construct human body feature vector corresponding to the 2D human body image sample. The human body characteristic indicators include: trunk-to-leg length index, abdominal protrusion index, chest width / hip width, hip width / waist width, and shoulder width / hip width. S3: Based on human body feature indicators, obtain the human body type category corresponding to the 2D human body image sample, and label the 2D human body image sample to construct a training set for training the CNN-XGBoost body type recognition model. S4: Based on the 2D human body image of the user to be recommended, obtain the human body feature vector of the user to be recommended, and then use the trained CNN-XGBoost body shape recognition model to obtain the predicted human body shape category of the user to be recommended; and then obtain the body shape feature vector of the user to be recommended. S5: Based on the clothing features and the body shape feature vector of the user to be recommended, a cosine similarity recommendation model is used to obtain the final recommendation matching score between the body shape feature vector of the user to be recommended and the clothing features, so as to complete the design of the clothing matching recommendation scheme based on the body shape features of the user to be recommended.

[0007] Furthermore, the formula for calculating the trunk-to-leg length index is as follows:

[0008] In the formula: Normalized human height; The normalized human hip height; The vertical coordinate of the front foot point; The vertical coordinate of the frontal head vertex; The ordinate of the point where the hip width is located; Trunk-to-leg length index.

[0009] Furthermore, the method for obtaining the abdominal protrusion index is as follows: S21: In the normalized binary image of the human body profile corresponding to the side view image, the closed area formed by the horizontal axis of the lower chest position point, the vertical axis of the back concave point, and the curve of the human body profile between the right hip thickness point and the lower chest position point; obtain the total number of pixels in the closed area; and at the same time obtain the pixel height in the normalized binary image of the human body profile corresponding to the side view image. S22: Obtain the ratio of the total number of pixels within the closed region to the height of the pixels in the side view image of the human body, i.e., the abdominal bulge index.

[0010] Furthermore, the CNN-XGBoost body shape recognition model includes: an input layer, a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a flattening layer, a fully connected layer, a first XGBoost module, a second XGBoost module, a third XGBoost module, and an output layer; The input layer is used to receive human feature vectors. The first convolutional layer, the first pooling layer, the second convolutional layer, the second pooling layer, the flattening layer, and the fully connected layer are connected end to end in sequence, and the input end of the first convolutional layer is connected to the input layer. The output end of the fully connected layer is connected to the first XGBoost module, the second XGBoost module, and the third XGBoost module, respectively. The first XGBoost module, the second XGBoost module, and the third XGBoost module are used to obtain classification results based on trunk leg length index, classification results based on abdominal bulge index, and frontal morphology classification results, respectively, and output them through the output layer.

[0011] Furthermore, the loss function of the CNN-XGBoost body shape recognition model is expressed as follows:

[0012] In the formula: The value of the loss function; An index for human body image samples; The total number of human image samples; For the first Class scoring function; This represents the total number of categories classified based on feature indicators. To be Predicted as The score function value at that time; for The true category; It is a regular term; For the first Individual body image samples.

[0013] Furthermore, the formula used to obtain the final recommendation matching score between the user's body shape feature vector and clothing features is as follows:

[0014] In the formula: For the first The final recommended match score for each garment; These are parameters used to balance the weights of control rules and expert knowledge. ; The score is based on cosine similarity. The score is based on the rules, which are derived from expert knowledge. An index for clothing; in,

[0015] In the formula: For the first The total number of expert experience-based matching rules for each garment; For the first An index of clothing based on expert experience matching rules; For users to be recommended and the first The first piece of clothing A matching variable based on expert experience matching rules, when When =1, the match is successful. When =0, the match fails; For the first The first garment based on expert experience The weight of the item matching rule, ;

[0016]

[0017]

[0018] In the formula: The body shape feature vector of the user to be recommended; Fit body shape feature vectors to clothing; Euclidean distance; A vector of matching rules between clothing and the leg length type of the user to be recommended; A matching rule vector for clothing and the body shape features of the user to be recommended; A matching rule vector for clothing and the abdominal type of the user to be recommended; Weights for body shape characteristics; Weights for the user's leg length feature; Weights for the user's abdominal features; Let X and Y represent the body types of the users to be recommended, denoted as X, Y, A, and H, respectively, and be 0-1 variables. When =1, it means that the user to be recommended has an X-type body shape; The variables are 01 variables representing the leg length characteristics of the users to be recommended, which are long legs, medium legs, and short legs. The variables are 01 variables representing the abdominal characteristics of the users to be recommended, namely flat abdomen, moderate abdomen, and protruding abdomen.

[0019] Beneficial Effects: This invention provides a clothing matching recommendation method based on body shape features. Based on 2D human body image samples, it obtains the coordinates of key points on the human body, and then, based on human body feature indicators, obtains the human body shape category. After labeling the 2D human body image samples to form a training set, a CNN-XGBoost body shape recognition model is trained. Based on the trained CNN-XGBoost body shape recognition model, the predicted body shape category of the user to be recommended is obtained, i.e., the body shape feature vector. Then, a cosine similarity recommendation model is used to obtain the final recommendation matching score between the user's body shape feature vector and clothing features, thus completing the clothing matching recommendation based on the user's body shape features. This invention avoids the high computational cost of large-scale training. By accurately extracting body shape features, it can provide more personalized and accurate clothing matching recommendations, solving the problems of neglecting body shape features, excessive computational resource consumption, and lack of interpretability in existing methods, thereby improving the recommendation quality and accuracy. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart of the clothing matching recommendation method based on body shape characteristics according to the present invention; Figure 2 is a 2D human body image in an embodiment of the present invention; Figure 3 This is a schematic diagram of the location of key points on the human body in an embodiment of the present invention; Figure 4 This is a schematic diagram of the abdominal bulge index in an embodiment of the present invention; Figure 5 This is a comparative diagram of the human abdominal morphology in an embodiment of the present invention; Figure 6 This is a schematic diagram of the overall human body shape classification in an embodiment of the present invention; Figure 7 This is a schematic diagram of the CNN-XGBoost model structure in an embodiment of the present invention; Figure 8 This is a schematic diagram of the clothing recommendation process in an embodiment of the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] This embodiment introduces a clothing matching recommendation method based on body shape characteristics, including the following steps: Figure 1 As shown: S1: Obtain 2D human body image samples and perform preprocessing to obtain normalized human body height, thereby obtaining a normalized human body contour binary image, and then obtaining the coordinates of human body key points; wherein, the 2D human body image samples include human body front image and human body side image. Specifically, a VitusSmart 3D human body scanner was used for 3D human body scanning. This non-contact measurement method simultaneously scanned four directions: front left, front right, back left, and back right, ensuring 360° 3D human body data acquisition. In this embodiment, 517 young women aged 18-25 were randomly selected as research subjects. Women in this age group have mature and diverse body types. The indoor environment was 25℃±3℃, humidity 60%±10%, and windless, meeting the standards for nude measurement experiments. Clothing requirements: Participants wore uniform light-colored tight-fitting underwear and briefs, were barefoot, and had their hair tied up behind their ears in two buns, lower than their ears, and covered with the hat. Posture requirements: Posture I: Feet shoulder-width apart, aligned with the marked positions on the measurement platform, arms 20°~45° away from the body and kept away from the legs, torso upright, head straight, eyes looking straight ahead. Posture II: Stand with heels together, feet aligned with the markings on the measuring platform, arms hanging naturally at your sides, torso upright, head straight, eyes looking straight ahead. After scanning, output the frontal and side images of the human body, as shown below. Figure 2 .

[0024] Specifically, after extracting the 2D human image from the 3D human scan, the 2D human image undergoes preprocessing such as denoising and normalization. The main processing steps are as follows: S11: Obtain the binarized maximum outline image of the human body based on the 2D human body image; Specifically, the 2D human image is denoised by using Gaussian filtering to smooth the image and suppress noise, converting the RGB image to grayscale, using a threshold to distinguish the human body from the background area to obtain a binarized image, and then extracting the maximum contour of the human body shape area to obtain the binarized human body maximum contour image. S12: Obtain the normalized human height based on the binarized maximum human contour image; obtain the normalized human image. Specifically, the binarized maximum human body contour image is normalized using height as the normalization standard. Based on the height data obtained from the 3D human body scanner, the normalized height of the human body is obtained using the following formula:

[0025] In the formula: This indicates that the minimum value is extracted from the human height sample; This indicates that the maximum value is extracted from the human height sample; In this embodiment, the distance in pixels is the distance from the top of the head to the bottom of the feet. =700, all data units are pixels. The height of the human body is the maximum outline image of the human body after binarization. Normalized human height; S13: Obtain the normalized human body contour binary image based on the normalized human body image; Specifically, the normalized human body image is subjected to maximum contour extraction again. Finally, the normalized maximum human body contour image is placed on a 500×700 pixel black background and the image position is adjusted to the center of the black background, thus obtaining the normalized human body contour binary image.

[0026] S14: Obtain the coordinates of key points of the human body based on the normalized binary image of the human body contour; Specifically, since the decorative function of clothing mainly affects the torso areas such as the shoulders, chest, abdomen, waist, and hips, this embodiment extracts key point information for these key areas of the human body. This includes extracting the coordinates of key points such as shoulder width, chest width, waist width, hip width, back concavity, lower chest circumference, chest thickness, waist thickness, and hip thickness. Based on the national standard GB / T16160—2008 "Anthropometric Measurement Parts and Methods for Clothing" and the proportional relationship between various body parts and height, the extracted key point locations are as follows: Figure 3 As shown.

[0027] First, the coordinates of key points on the side of the human body are extracted. P1 is the top of the head on the side, which is the position of the first white pixel from top to bottom. P2 is the bottom of the feet on the side, which is the position of the last white pixel from top to bottom, with the same horizontal coordinate as P1. The left chest thickness point P3 and the right chest thickness point P4 are respectively the points from P1 downwards. 0.4H The two points with the largest difference in horizontal coordinates on the side profile within the range; the left waist thickness point P5 and the right waist thickness point P6 are downwards from positions P3 and P4. 0.2HThe two points with the smallest difference in horizontal coordinates on the side profile within the range; the left hip thickness point P7 and the right hip thickness point P8 are located downwards from point P1. 0.5H The two points with the largest difference in horizontal coordinates on the side profile within the range; the lower bust position point P9 is located downwards from P4. 0.1H The point with the smallest x-coordinate within the range; the concave point P10 is the point with the smallest x-coordinate within the range of the ordinates of P5 and P7.

[0028] Then, the coordinates of the key points on the front of the human body are calculated and extracted based on the coordinates of the key points on the side of the human body. The acquisition methods for Q1 and Q2 are the same as those for P1 and P2. Q1 is the position of the first white pixel from top to bottom, and Q2 is the position of the last white pixel from top to bottom with the same horizontal coordinate as Q1. Q1 is the top of the head on the front, and Q2 is the bottom of the feet on the front. Q3 and Q4 are the left and right chest width positions. Q5 and Q6 are the left and right waist width positions. Q7 and Q8 are the left and right hip width positions. Q9 and Q10 are both shoulder width positions. Within a range of 0.2H downward from Q1, the two points with the largest difference in horizontal coordinate on the horizontal line of the front outline of the human body are Q9 and Q10.

[0029] S2: Based on the coordinates of key points on the human body, obtain human body feature dimensions such as hip height, shoulder width, chest width, waist width, and hip width, as shown in Table 1, to obtain human body feature indicators; The human body characteristic indicators include: trunk-to-leg length index, abdominal protrusion index, chest width / hip width (RCW), hip width / waist width (RHW), and shoulder width / hip width (RSH). Table 1 Human Body Dimensions

[0030] This embodiment extracts the main human body features affecting clothing matching from binary images of the front and side views, namely, human body proportion features, overall frontal morphological features, and side abdominal morphological features. Clustering indices are selected from these three aspects to classify the human body into different types and determine the numerical value range for each body type. Based on the trunk-to-leg length index, the human body is divided into long-legged, medium-legged, and short-legged types; based on the overall frontal morphological features, namely chest width / hip width (RCW), hip width / waist width (RHW), and shoulder width / hip width (RSH), the human body type is divided into X-type, Y-type, A-type, and H-type; based on the abdominal protrusion index, namely the side abdominal morphology, the human body is divided into protruding abdomen type, medium abdomen type, and flat abdomen type.

[0031] Specifically, given the waistline's effect on body shape and its close relationship with the proportions of the upper and lower body, accurately extracting leg-to-body proportions is crucial for clothing recommendations. This embodiment defines the trunk-to-leg length index as the ratio of the vertical distance from the anterior superior iliac spine to the sole of the foot to the height, replacing the sitting height measurement component of the original index. This index is more suitable for proportional measurements based on key points in 2D images, exhibiting good operability and stability. In actual experiments, this index significantly distinguishes between different leg types and accurately reflects individual differences in leg-to-body proportions, thus possessing high application value and interpretability.

[0032] Preferably, the method for calculating the trunk-to-leg length index after modifying the Marshon trunk-to-leg length index is as follows:

[0033] In the formula: Normalized human height; The normalized human hip height; The vertical coordinate of the front foot point; The vertical coordinate of the frontal head vertex; The ordinate of the point where the hip width is located; Trunk-to-leg length index.

[0034] Preferably, such as Figure 4 The method for obtaining the abdominal protrusion index is as follows: S21: In the normalized binary image of the human body profile corresponding to the side view image, the closed region formed by the horizontal axis of the lower chest position point P9, the vertical axis of the back concave point P10, and the curve of the human body profile between the right hip thickness point P8 and the lower chest position point P9; obtain the total number of pixels in the closed region; at the same time, obtain the pixel height in the normalized binary image of the human body profile corresponding to the side view image, that is, the total number of human height pixels. S22: Obtain the ratio of the total number of pixels within the enclosed region to the height of the human body in the side profile image, i.e., the abdominal bulge index. A larger ratio indicates a higher proportion of the abdomen relative to the total height, meaning the abdomen is more protruding; a smaller ratio indicates a relatively flat abdomen. In this embodiment, the formula used to calculate the abdominal bulge index is as follows:

[0035] In the formula: The horizontal pixel index is the point on the horizontal axis between the right hip thickness point P8 and the lower bust circumference point P9. The total number of horizontal pixels between the horizontal axis where the right hip thickness point P8 is located and the horizontal axis where the lower chest circumference point P9 is located; The vertical pixel index is the point between the horizontal axis where the right hip thickness point P8 is located and the horizontal axis where the lower bust circumference point P9 is located. The total number of vertical pixels between the horizontal axis where the right hip thickness point P8 is located and the horizontal axis where the lower bust circumference point P9 is located; The pixel height is the normalized binary image of the human body contour corresponding to the side view image. For the labeling function, when the pixels between the horizontal axis containing the right hip thickness point P8 and the horizontal axis containing the lower bust circumference point P9 are white pixels, It is 1 if it is true, otherwise it is 0; This indicates the abdominal protrusion index.

[0036] Specifically, most people want to appear slimmer when choosing clothing, and the key area influencing whether someone looks fat or thin is the abdomen. Therefore, the abdomen is the primary area of ​​study in the side profile of the human body. The human abdomen has a complex curve, and a single abdominal thickness value is insufficient to represent the degree of abdominal protrusion. There are also cases where there are localized protrusions, but the overall degree of protrusion is not significant, such as... Figure 5 As shown. Therefore, this embodiment uses the ratio of the human abdominal area to the height to characterize the degree of abdominal protrusion as a whole. After comparison and verification with the characteristics of the actual human body, this indicator can represent the degree of abdominal protrusion in the side view.

[0037] Specifically, chest width / hip width (RCW), hip width / waist width (RHW), and shoulder width / hip width (RSH) are the ratios of chest width to hip width, hip width to waist width, and shoulder width to hip width, respectively.

[0038] S3: Based on human body feature indicators, obtain the human body type category corresponding to the 2D human body image sample, and label the 2D human body image sample to construct a training set for training the CNN-XGBoost body type recognition model. This embodiment classifies human body types based on the trunk-to-leg length index (TTOL) and human proportions, resulting in three categories: long-legged, medium-legged, and short-legged. Specifically, the TTOL is used as the clustering index, and the optimal number of clusters is selected based on the human proportion elbow diagram and human proportion contour coefficient diagram. Therefore, the TTOL is used as the clustering index to divide human body types into three categories. These three categories are named according to the final cluster centers and their numerical values. The first category, with the smallest TTOL and the smallest ratio of upper to lower body length, is named the long-legged type, with a TTOL range of 0.46 ≤ TTOL. ≤0.475; The second type has the largest trunk-to-leg length index and the largest ratio of upper body length to lower body length, and is named the short-legged type, with a trunk-to-leg length index range of 0.505 ≤ ≤0.54; The third category has a trunk-to-leg length index in the middle, named the moderate leg type, with a trunk-to-leg length index range of 0.475 ≤ ≤0.505. The cluster centers for each body type are shown in Table 2.

[0039] Table 2. Cluster centers based on trunk-to-leg length index.

[0040] This embodiment uses the abdominal bulge index as the clustering index, and selects the optimal number of clusters based on the abdominal bulge index elbow diagram and abdominal bulge index contour diagram. Finally, using the abdominal bulge index as the clustering index, the human body type is divided into three clusters, as shown in Table 3. According to the final cluster center results, the larger the abdominal bulge value, the greater the degree of abdominal bulge. Based on the numerical order, the first category is named "protruding abdomen type," the second category "flat abdomen type," and the third category "moderate abdomen type." A comparison of the characteristics of the protruding abdomen type, moderate abdomen type, and flat abdomen type is provided. Figure 5 As shown in the image, the degree of abdominal protrusion in the human abdomen verifies that this index can be used to describe the degree of abdominal protrusion. Specifically, the protrusion index for a protruding abdomen ranges from 16.75 to < ≤27.27, the moderate abdominal protrusion index range is 14.5< ≤16.75, the range of the flat-abdomen protrusion index is 7≤ ≤14.5.

[0041] Table 3 shows the cluster centers based on the abdominal bulge index.

[0042] In this embodiment, chest width / hip width (RCW), hip width / waist width (RHW), and shoulder width / hip width (RSH) are used as clustering indicators. The cluster center results are analyzed: The first type has larger RCW and RHW, a beautiful chest-waist-hip curve, an RSH close to 1, and similar shoulder and hip widths; this body type is named X-type. The second type has the largest RSH, the smallest RCW and RHW, relatively larger shoulder width among the four types, and a relatively gentle chest-waist-hip curve; its overall shoulder features are prominent, and this body type is named Y-type. The third type has smaller RCW and RHW, an RSH close to 1, shoulder width close to hip width, and a straight chest-waist-hip curve without significant curve changes; this body type is named H-type. The fourth type has the smallest RSH, larger RCW, and largest RHW; its hip features are prominent, its shoulders and hips present an A-shape overall, and its chest-waist-hip curve is relatively beautiful; this body type is named A-type. A comparison of the four body type characteristics is provided below. Figure 6 As shown.

[0043] The characteristics of each body type are described as follows: X-type: prominent curves in the chest, waist, and hips; a relatively narrow waist; and shoulders and hips of similar width. Y-type: relatively wide shoulders; and a gentler curve in the chest, waist, and hips. A-type: prominent hip features; relatively wide hips; a more pronounced chest, waist, and hip curve; and an overall shape that is narrower at the top and wider at the bottom. H-type: indistinct curves in the chest, waist, and hips; and an overall cylindrical shape. The cluster centers for each characteristic index of each body type based on frontal morphology are shown in Table 4.

[0044] Table 4. Cluster Centers for Positive Morphology

[0045] In this embodiment, in the CNN-XGBoost body shape recognition model, the input feature variables for each sample include a human body feature vector, a feature vector of the frontal image of the human body, and a feature vector of the convex side view of the human body; specifically, let the torso-leg length index, chest width / hip width, hip width / waist width, shoulder width / hip width, and abdominal protrusion index be respectively... Let n be the number of human feature indicators, then n=5. Therefore, the input human feature vector is represented as: ; For the first The human feature vectors of each individual human image sample; then the feature vectors of all human image samples constitute a structured feature matrix. , This represents the total number of human image samples.

[0046] The CNN-XGBoost body shape recognition model includes three independent output variables: leg length classification, abdomen classification, and frontal shape classification, represented as follows: Among them, the classification results based on trunk-leg length index These correspond to long-legged, medium-legged, and short-legged body types, respectively; classification results based on abdominal protrusion index. These correspond to three types of abdominal shapes: protruding abdomen, moderate abdomen, and flat abdomen. The classification results are based on chest width / hip width (RCW), hip width / waist width (RHW), and shoulder width / hip width (RSH), representing the frontal morphological classification. These correspond to the X, Y, A, and H types, respectively.

[0047] Specifically, since the XGBoost algorithm is mostly used for multi-class classification tasks, but the input data is usually numerical and lacks the ability to extract image features, this embodiment constructs a shallow multimodal fusion model structure based on CNN feature extraction and XGBoost classification, namely the CNN-XGBoost model, the structure of which is as follows: Figure 7 As shown.

[0048] Preferably, the CNN-XGBoost body shape recognition model includes: an input layer for receiving human feature vectors; a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a flattening layer, and a fully connected layer connected sequentially end to end, with the input end of the first convolutional layer connected to the input layer; the output end of the fully connected layer is connected to a first XGBoost module, a second XGBoost module, and a third XGBoost module, respectively, wherein the first XGBoost module, the second XGBoost module, and the third XGBoost module are respectively used to obtain classification results based on trunk-leg length index, classification results based on abdominal protrusion index, and frontal shape classification results, and output them through the output layer.

[0049] Preferably, the loss function of the CNN-XGBoost body shape recognition model is expressed as follows:

[0050] In the formula: The value of the loss function; An index for human body image samples; The total number of human image samples; For the first Class scoring function (learned from the tree structure model); The total number of categories based on feature indices is 3, 3, and 4, respectively, for the categories based on trunk-leg length index, abdominal protrusion index, and frontal morphology. To be Predicted as The score function value at that time, i.e., the model's predicted score on the true category; for The true category; This is a regularization term used to control model complexity and prevent overfitting. For the first Individual body image samples.

[0051] S4: Based on the 2D human body image of the user to be recommended, obtain the human body feature vector of the user to be recommended, and then use the trained CNN-XGBoost body shape recognition model to obtain the predicted human body shape category of the user to be recommended; and then obtain the body shape feature vector of the user to be recommended. S5: Based on clothing features and body shape categories, obtain body shape category-clothing feature matching pairs to construct clothing matching recommendation rules based on expert experience; then, use a cosine similarity recommendation model to obtain the final recommendation matching score between the body shape feature vector of the user to be recommended and the clothing features, and complete the clothing matching recommendation based on the body shape features of the user to be recommended.

[0052] Specifically, clothing feature extraction is a core component of clothing matching recommendation systems based on body shape characteristics. Accurate clothing features not only improve the accuracy of the recommendation system but also effectively meet users' personalized dressing needs. Considering the relatively simple one-piece structure of dresses, and the fact that dresses offer diverse styles and designs, they are an ideal research subject for exploring clothing matching recommendation methods. Therefore, in this embodiment, dresses are used as the recommendation object. In this embodiment, the system extracts clothing features including style features, color features, and decorative detail features. Furthermore, combining clothing matching theory with expert knowledge and experience, clothing matching recommendation rules are formulated, establishing a mapping relationship between clothing features and body shape features, providing a basis and support for the subsequent design of clothing recommendation models.

[0053] This embodiment selected the polyvore outfits dataset from commonly used datasets. Its clothing images are simple and clear, and the clothing is relatively in line with current fashion trends. This dataset contains a total of 260,987 clothing items, including tops, bottoms, dresses, shoes, hats, bags, and more. Due to the one-piece nature of dresses and their relatively simple structure and silhouette, as many different styles of dresses as possible were selected from the polyvore_outfits dataset, and finally 155 dress images were retained as the dataset for this experiment. To extract the style features of these 155 dresses, a manual annotation method was used. The features of each dress were manually observed and analyzed, and recorded item by item according to the clothing design elements. This not only ensures the accuracy of the extracted clothing features but also ensures that the extracted clothing features meet actual wearing needs.

[0054] The style features extracted in this embodiment include the dress's skirt type, skirt length, sleeve type, and collar type. Based on the overall silhouette of each dress, they are categorized into A-line skirts, pencil skirts, and straight skirts; based on the skirt length, they are categorized into short skirts, midi skirts, and maxi skirts; sleeve types are categorized into sleeveless, fitted sleeves, and puff sleeves; and collar types are categorized into small round necks, V-necks, large round necks, and turn-down collars.

[0055] Specifically, color is a crucial component of clothing, influencing not only the visual effect of an outfit but also the annotation and matching of color characteristics, which are based on clothing design and color theory. This embodiment extracts the primary color tone of the clothing and annotates it according to the RGB color chart. First, visual observation is conducted, directly observing the colors of the clothing. Typically, colors are most prominent in the main areas of clothing, such as the upper and lower parts of a skirt, sleeves, etc. The most prominent and obvious color of the clothing is identified. Then, color blocks and design elements are analyzed. If the clothing has a patchwork design, the part with the highest color proportion or the dominant color in the design is extracted first. Finally, the color range is determined, and the primary color tone is annotated and recorded according to the RGB color chart.

[0056] Specifically, based on the location and type of decorative elements in the selected dress image, the decorative details of the dress are divided into the following categories, as shown in Table 5.

[0057] Table 5 Decorative Parts and Types

[0058] During the annotation process, each dress image was examined one by one, and the type and location of each decorative area were manually annotated. All manual annotation results were recorded in an Excel spreadsheet, as shown in Table 6.

[0059] Table 6. Decorative Details Annotation

[0060] Furthermore, features of style, color, and decorative details were extracted from 155 dresses selected from the polyvore outfits dataset. The classification criteria for each feature underwent multiple rounds of review to ensure that annotators followed consistent rules during annotation. The annotation results for the clothing features are shown in Table 7.

[0061] Table 7. Clothing Feature Extraction

[0062] Specifically, different body types are suited to different clothing styles. Finding suitable clothing styles based on different body types requires defining matching rules to establish a correspondence between human body characteristics and clothing characteristics, thereby enabling clothing recommendations based on body type. The matching rules in this embodiment include: Recommendation rules based on human body proportions: For those with short legs, high-waisted skirts can visually lengthen the upper body; for those with long legs, the overall figure is more aesthetically pleasing and more styles are available; and for those with average body types, high-waisted or mid-waisted designs can appropriately lengthen the leg lines. Recommendation rules based on the human torso-to-leg length ratio are shown in Table 8.

[0063] Table 8 Recommendation Rules for Human Body Proportion Characteristics

[0064] Based on overall body shape characteristics, the following recommendations apply: X-shaped bodies are well-proportioned with a slender waist. Emphasizing curves is key. Pencil skirts and A-line skirts can flatter the figure, while V-necks, U-necks, and stand-up collars can elongate the neck and highlight the upper body. Sleeveless or fitted sleeves can accentuate the arms. Y-shaped bodies have wider shoulders and need to balance the upper body and reduce the perceived shoulder size through skirts with flared hems. A-line skirts can balance the proportions of the upper and lower body, preventing the upper body from appearing too long. U-necks, small round necks, and V-necks can soften the shoulder width, and loose sleeves further soften the shoulder line. Avoid sleeveless styles. A-shaped bodies have narrower shoulders and wider hips and need to minimize the upper body's presence. Avoid overly voluminous skirts. Straight skirts or pencil skirts can reduce the perceived volume of the lower body, while large round necks or off-the-shoulder necks can amplify shoulder width. H-shaped bodies lack a defined waistline and should create curves and layers through tailoring and embellishments. A-line skirts and straight skirts can add soft lines, while V-necks... Collars and stand-up collars can elongate the upper body line, while fitted sleeves or sleeves with embellishments can add a sense of three-dimensionality. Recommended clothing rules based on the overall frontal shape are shown in Table 9.

[0065] Table 9 Recommendation Rules for Overall Frontal Morphological Features

[0066] Recommended rules based on abdominal shape characteristics: People generally want to make their abdomen appear slimmer and to flatter its lines. Those with a flat stomach can wear any style of dress. Those with a moderately shaped stomach can choose A-line or straight skirts to subtly flatter their abdomen, avoiding complex embellishments at the waist and opting for light or neutral colors. Those with a protruding stomach should choose A-line skirts to minimize the visual effect of the protruding abdomen, avoid embellishments that make the abdomen appear larger, and choose dark colors to create a slimming effect. Clothing recommendations based on abdominal shape characteristics are shown in Table 10.

[0067] Table 10 Recommended Rules for Abdominal Morphological Characteristics

[0068] Based on the above rules and expert experience, the body shape characteristics suitable for each dress were evaluated by experts, and a body shape feature-clothing feature dataset was constructed as shown in Table 11.

[0069] Table 11 Body Shape Features - Clothing Features Dataset

[0070] To construct a more scientific and reasonable matching relationship between body shape features and clothing features, a scoring method is adopted to quantitatively evaluate the importance of each matching item. By setting scoring items and inviting experts and users in the field to score, a weighted average is calculated to form the final matching weight, providing weight support for subsequent recommendation models.

[0071] This embodiment employs five experts with backgrounds in clothing design, ergonomics, and fashion styling, along with two users, to participate in the scoring as styling experts. The scoring uses a Likert scale of 0-10, where 0 represents "completely irrelevant" and 10 represents "extremely important." The scoring items consist of nine matching pairs between "body shape features" and "clothing features." Experts or users independently score the importance of each matching pair based on their professional experience. The final score is based on the average of the five expert scores and the two user scores, with a total of nine rules established. These include four corresponding rules for the overall frontal shape (skirt type, collar type, sleeve type, and embellishment placement), three corresponding rules for the abdominal shape (skirt type, waistline position, and color), and two corresponding rules for the torso-to-leg length ratio. Each rule has a matching weight. The calculation formula is as follows: =

[0072] In the formula: For the first built based on expert experience The weight of each clothing matching recommendation rule; For the first The expert commented on the first [number] of the matching rules. Importance score of item matching pairs; 'An index for experts;' The total number of experts; This is the index for the matching rule.

[0073] Preferably, the formula used to obtain the final recommendation matching score between the body shape feature vector of the user to be recommended and the clothing feature is as follows:

[0074] In the formula: For the first The final recommended match score for each garment; These are parameters used to balance the weights of control rules and expert knowledge. ; The score is based on cosine similarity. The score is based on the rules, which are derived from expert knowledge. An index for clothing; in,

[0075] In the formula: For the first The total number of expert experience-based matching rules for each garment; For the first An index of clothing based on expert experience matching rules; For users to be recommended and the first The first piece of clothing A matching variable based on expert experience matching rules, when When =1, the match is successful. When =0, the match fails; For the first The first garment based on expert experience The weight of the item matching rule, ; In this embodiment, =0.7 indicates that the matching results rely more on the cosine similarity score.

[0076]

[0077]

[0078]

[0079] In the formula: The body shape feature vector of the user to be recommended; Fit body shape feature vectors to clothing; Euclidean distance; A vector of matching rules between clothing and the leg length type of the user to be recommended; A matching rule vector for clothing and the body shape features of the user to be recommended; A matching rule vector for clothing and the abdominal type of the user to be recommended; Weights for body shape characteristics; Weights for the user's leg length feature; Weights for the user's abdominal features; Let X and Y represent the body types of the users to be recommended, denoted as type X, type Y, type A, and type H, respectively, and let H represent the 0-1 variables. When =1, it means that the user to be recommended has an X-type body shape; The variables are 01 variables representing the leg length characteristics of the users to be recommended, which are long legs, medium legs, and short legs. The variables are 01 variables representing the abdominal characteristics of the users to be recommended, namely flat abdomen, moderate abdomen, and protruding abdomen.

[0080] This embodiment uses one experimental user as a case study to test the model. First, a frontal / side profile image is uploaded. Based on the uploaded image, a binary image is automatically processed, and key point coordinates are automatically extracted to obtain feature data. The user's frontal / side profile binary image and feature data are then input into a CNN-XGBoost body shape recognition model to achieve automatic body shape recognition. The body shape feature vector is then input into a clothing recommendation model to ultimately obtain clothing styles that match the user's body shape characteristics. The specific process is as follows: Figure 8 As shown in the example, this embodiment recommends the clothing with the highest matching score to the user from the recommended clothing options.

[0081] This embodiment is based on computer vision technology and extracts the main morphological features of the human body from two-dimensional images that affect clothing matching. These features include three aspects: human body proportion features, overall frontal morphological features, and abdominal protrusion features. This enables body shape classification and recognition based on two-dimensional images. This method avoids the complex process of converting two-dimensional images into three-dimensional human body dimensions for feature extraction. It also avoids requiring users to manually measure human body circumference data as input, thus reducing cumulative errors.

[0082] This embodiment constructs a body shape recognition model based on the CNN-XGBoost algorithm and a matching recommendation model based on the cosine similarity algorithm, providing a new approach to personalized clothing matching recommendations. Combining expert knowledge and literature research, a correspondence rule between body shape features and clothing style features is constructed. Body shape recognition is achieved by extracting frontal and side profile image features using CNN and combining it with the XGBoost algorithm. The cosine similarity recommendation algorithm is used to calculate the matching degree between clothing and the user's body shape. This method reduces reliance on large amounts of user data, avoids the cold start problem, and enhances the interpretability of recommendations. Users can obtain more suitable clothing choices based on their actual body characteristics, thereby improving the accuracy of purchasing decisions and avoiding unpleasant shopping experiences caused by excessive fitting time or inappropriate selection.

[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention 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; and these 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 the present invention.

Claims

1. A clothing matching recommendation method based on body shape characteristics, characterized in that, Includes the following steps: S1: Obtain a 2D human body image sample and perform preprocessing to obtain a normalized human body height, thereby obtaining a normalized human body contour binary image, and then obtaining the coordinates of the human body key points corresponding to the 2D human body image sample. S2: Based on the coordinates of key points of the human body, obtain hip height, shoulder width, chest width, waist width, and hip width to obtain human body feature indicators corresponding to the 2D human body image sample, and then construct human body feature vector corresponding to the 2D human body image sample. The human body characteristic indicators include: trunk-to-leg length index, abdominal protrusion index, chest width / hip width, hip width / waist width, and shoulder width / hip width. S3: Based on human body feature indicators, obtain the human body type category corresponding to the 2D human body image sample, and label the 2D human body image sample to construct a training set for training the CNN-XGBoost body type recognition model. S4: Based on the 2D human body image of the user to be recommended, obtain the human body feature vector of the user to be recommended, and then use the trained CNN-XGBoost body shape recognition model to obtain the predicted human body shape category of the user to be recommended; and then obtain the body shape feature vector of the user to be recommended. S5: Based on the clothing features and the body shape feature vector of the user to be recommended, a cosine similarity recommendation model is used to obtain the final recommendation matching score between the body shape feature vector of the user to be recommended and the clothing features, so as to complete the design of the clothing matching recommendation scheme based on the body shape features of the user to be recommended.

2. The clothing matching recommendation method based on body shape characteristics according to claim 1, characterized in that, The formula for calculating the trunk-to-leg length index is as follows: In the formula: Normalized human height; Normalized human hip height; The vertical coordinate of the front foot point; The vertical coordinate of the frontal head vertex; The ordinate of the point where the hip width is located; Trunk-to-leg length index.

3. The clothing matching recommendation method based on body shape characteristics according to claim 1, characterized in that, The method for obtaining the abdominal protrusion index is as follows: S21: In the normalized binary image of the human body profile corresponding to the side view image, the closed area formed by the horizontal axis of the lower chest position point, the vertical axis of the back concave point, and the curve of the human body profile between the right hip thickness point and the lower chest position point; obtain the total number of pixels in the closed area; and at the same time obtain the pixel height in the normalized binary image of the human body profile corresponding to the side view image. S22: Obtain the ratio of the total number of pixels within the closed region to the height of the pixels in the side view image of the human body, i.e., the abdominal bulge index.

4. The clothing matching recommendation method based on body shape characteristics according to claim 1, characterized in that, The CNN-XGBoost body shape recognition model includes: an input layer, a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a flattening layer, a fully connected layer, a first XGBoost module, a second XGBoost module, a third XGBoost module, and an output layer; The input layer is used to receive the input of human feature vectors; The first convolutional layer, the first pooling layer, the second convolutional layer, the second pooling layer, the flattening layer, and the fully connected layer are connected end to end in sequence, and the input end of the first convolutional layer is connected to the input layer; The output of the fully connected layer is connected to the first XGBoost module, the second XGBoost module, and the third XGBoost module, respectively. The first XGBoost module, the second XGBoost module, and the third XGBoost module are used to obtain the classification results based on the trunk-leg length index, the classification results based on the abdominal bulge index, and the frontal morphology classification results, respectively, and output them through the output layer.

5. The clothing matching recommendation method based on body shape characteristics according to claim 4, characterized in that, The loss function of the CNN-XGBoost body shape recognition model is expressed as follows: In the formula: The value of the loss function; An index for human body image samples; The total number of human image samples; For the first Class scoring function; This represents the total number of categories classified based on feature indicators. To be Predicted as The score function value at that time; for The true category; It is a regular term; For the first Individual body image samples.

6. The clothing matching recommendation method based on body shape characteristics according to claim 4, characterized in that, The formula used to obtain the final recommendation matching score between the body shape feature vector of the user to be recommended and the clothing feature is as follows: In the formula: For the first The final recommended match score for each garment; These are parameters used to balance the weights of control rules and expert knowledge. ; The score is based on cosine similarity. The score is based on the rules, which are determined by expert knowledge. An index for clothing; in, In the formula: For the first The total number of expert experience-based matching rules for each garment; For the first An index of clothing based on expert experience matching rules; For users to be recommended and the first The first piece of clothing A matching variable based on expert experience matching rules, when When =1, the match is successful. When =0, the match fails; For the first The first garment based on expert experience The weight of the item matching rule, ; In the formula: The body shape feature vector of the user to be recommended; Fit body shape feature vectors to clothing; Euclidean distance; A vector of matching rules between clothing and the leg length type of the user to be recommended; A matching rule vector for clothing and the body shape features of the user to be recommended; A matching rule vector for clothing and the abdominal type of the user to be recommended; Weights for body shape characteristics; Weights for the user's leg length feature; Weights for the user's abdominal features; Let X and Y represent the body types of the users to be recommended, denoted as X, Y, A, and H, respectively, and be 0-1 variables. When =1, it means that the user to be recommended has an X-type body shape; These are 01 variables representing the leg length characteristics of the users to be recommended, specifically long legs, medium legs, and short legs. The variables are 01 variables representing the abdominal characteristics of the users to be recommended, namely flat abdomen, moderate abdomen, and protruding abdomen.