A method for estimating the chest and waist size of a dressed human body based on deep learning
Through deep learning technology, the ResNet50 model of migration learning and the MMD algorithm are used to construct a human chest and waist looseness model. Combined with the garment size model, it solves the problem of low accuracy of human chest and waist size measurement in the existing technology, and realizes the measurement of human chest and waist size while wearing clothes. Fast and accurate measurement, with test accuracy as high as 86.69%.
Patent Information
- Application Number
- CN202110259727.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-10
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2041-03-10
AI Technical Summary
Existing non-contact body measurement technology has low accuracy when estimating human chest and waist dimensions, and cannot achieve remote and rapid measurement.
The deep learning method is used, combined with the ResNet50 model of transfer learning and the MMD algorithm, to construct a human chest and waist looseness model, and combined with the human garment size model to calculate the human chest and waist size in the dressed state.
It realizes the rapid and accurate measurement of human chest and waist size while wearing clothes, solving the problem of difficulty in measurement and inability to measure anytime and anywhere. The test accuracy rate reaches 86.69%.
Smart Images

Figure CN115082541B
Abstract
Description
Technical Field
[0001] The invention relates to a method for estimating the chest and waist dimensions of a human body in a dressed state based on deep learning, and belongs to the technical field of anthropometry. Background Art
[0002] Nowadays, in non-contact anthropometry technology, the accuracy and convenience of two-dimensional non-contact anthropometry are the current research focus and hotspot. Two-dimensional non-contact anthropometry technology is to take several groups of photos, extract the contour, identify the feature points and fit the circumference of the human body in the photos, and finally calculate the three-dimensional human body size based on the two-dimensional size.
[0003] At present, non-contact human body measurement technology mainly relies on customers to provide photos, and then perform a series of processing on the photos, and finally measure the size of the corresponding parts. The current problem is that this method is simple and convenient, but the accuracy is low. Yu Zongqin et al. (Research on the Image Size Measurement Technology of Human Two-Dimensional Photos, Yu Zongqin, Wang Qinhua, Industrial Technology and Vocational Education) pre-processed the three collected front, side and back pictures by converting to grayscale, inverting the image, and extracting the contour map to obtain a pixel image suitable for the computer. Finally, combined with the human body shape characteristics and clothing production process requirements, the feature points were determined on the edge of the contour map to obtain the image size of the characteristic parts of the human body. The accuracy of the circumference direction of this method is low, because the circumference of the human body is an irregular ellipse, so the error is relatively large when using a general algorithm to calculate, and the article does not mention whether the remote measurement requirements are met. Liu Xiaoxue (Calculation of Human Chest Width in Natural Clothing State, Liu Xiaoxue, Tianjin Textile Science and Technology) proposed to obtain the outer contour lines of the front and side of the human body through edge detection, and then identify some relevant feature points of the human body. By fitting the feature points into a curve, the side chest circumference points on the curve are determined to determine the size of the chest width. This method has promoted the development of obtaining the human chest circumference through photos to a certain extent. However, due to differences in human body shape, there will be large differences in feature point fitting, which will ultimately have a great impact on the acquisition of the chest width size. Summary of the invention
[0004] In view of the above problems existing in the prior art, the purpose of the present invention is to provide a method for estimating the chest and waist dimensions of a human body in a dressed state based on deep learning.
[0005] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is as follows:
[0006] A method for estimating the chest and waist dimensions of a human body in a dressed state based on deep learning comprises the following steps:
[0007] S1, obtaining a front view of the human body of the estimated object in a dressed state;
[0008] S2, using a human clothing size model to process the human front view obtained in step S1, and calculate the clothing size of the human chest and waist in the dressed state;
[0009] S3, first construct a human chest and waist looseness model, and then use the human chest and waist looseness model to process the human front view of step S1 to calculate the chest and waist looseness of the human body in the dressed state; the human chest and waist looseness model is first migrated by using the transfer learning method to migrate the ResNet50 model, and then add the MMD algorithm between the 49th and 50th layers of the migrated ResNet50 model to construct it;
[0010] S4. Subtract the size of the garment obtained in step S2 from the looseness of the thorax and waist obtained in step S3, so as to construct a thorax and waist size model of the human body in the dressed state. The thorax and waist size of the human body in the dressed state can be obtained by using the model.
[0011] In one implementation scheme, step S3 specifically includes the following steps:
[0012] S31. Data collection: collecting a plurality of frontal images of the chest and waist dimensions of a human body in a clothed state whose chest and waist dimensions in a clean state are known, and performing enhancement processing on the collected images;
[0013] S32, data classification: the images collected in step S31 are classified into several categories according to the looseness of the chest and waist of the human body in the dressed state, and are marked with labels respectively, and then the classified images are divided into a training sample data set and a test sample data set;
[0014] S33, constructing a human thoracolumbar looseness model: firstly, the ResNet50 model is migrated by using the transfer learning method, and then the MMD algorithm is added between the 49th and 50th layers of the migrated ResNet50 model to construct a human thoracolumbar looseness model;
[0015] S34, training a human thoracolumbar looseness model: inputting pictures of different categories in the training sample data set in step S32 into the human thoracolumbar looseness model in sequence for feature recognition, so as to obtain an optimal human thoracolumbar looseness model;
[0016] S35, testing the human thoracolumbar looseness model: inputting the pictures of different categories in the test sample data set in step S32 into the trained human thoracolumbar looseness model in sequence for testing, so as to test the accuracy of the human thoracolumbar looseness model;
[0017] S36, calculating the looseness of the chest and waist of the human body in the dressed state: inputting the front view of the human body in step S1 into the human body chest and waist looseness model after the test for processing, and calculating the looseness of the chest and waist of the human body in the dressed state.
[0018] Compared with the prior art, the present invention has the following significant beneficial effects:
[0019] The method of the present invention combines the ResNet50 classification algorithm of transfer learning in deep learning with the MMD algorithm to construct a human chest and waist looseness model, and combines the human chest and waist looseness model with the human clothing size model to construct a human chest and waist size model in a dressed state. The human chest and waist size can be quickly obtained by using the human chest and waist size model in the dressed state, which well solves the problem of difficulty in measuring the chest and waist size when dressing and the inability to measure it anytime and anywhere. Compared with the existing technology, significant progress and unexpected effects have been achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A flowchart of a method for estimating the chest and waist dimensions of a human body in a dressed state based on deep learning provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0021] The technical solution of the present invention is further described in detail and completely below in conjunction with specific embodiments.
[0022] Example
[0023] See also Figure 1 As shown, the present invention provides a method for estimating the chest and waist size of a human body in a dressed state based on deep learning, comprising the following steps:
[0024] S1. Obtaining a front view of the human body of the estimated object in a dressed state: In this embodiment, the front view of the human body of the estimated object in a dressed state can be directly obtained by taking a photo with a mobile phone;
[0025] S2, using a human body clothing size model to process the human body front view obtained in step S1, and calculate the clothing size of the human body's chest and waist in the dressed state. The human body clothing size model used can be a general human body three-dimensional size model, as long as it can calculate the human body clothing size according to the picture;
[0026] S3, first construct a human chest and waist looseness model, and then use the human chest and waist looseness model to process the human body front view of step S1 to calculate the chest and waist looseness of the human body in the dressed state; the human chest and waist looseness model of the present invention only needs one human body front view to calculate the chest and waist looseness of the human body in the dressed state, compared with the traditional need for "three pictures of the front, side and back to grayscale conversion, image inversion and contour extraction and other preprocessing", the processing is fast and convenient; the human chest and waist looseness model is first migrated by using the transfer learning method to migrate the ResNet50 model, and then add the MMD algorithm between the 49th and 50th layers of the migrated ResNet50 model to construct it, as follows:
[0027] S31, data collection: collect multiple frontal images of the chest-waist size of a human body in a dressed state whose chest-waist size in a clean state is known (that is, only collect multiple frontal images of the chest-waist size of a human body in a dressed state, and in the collected frontal images, the chest-waist size of the human body in a clean state is known, so that the collected frontal images have both the chest-waist size of the human body in a dressed state (that is, the size of the garment) and the chest-waist size of the human body in a clean state (that is, the clean body size)), and enhance the collected images (the data volume can be increased); in this embodiment, the collected images are the frontal images of the chest-waist size of a male model in a clean state whose chest-waist size is known when he is wearing a shirt, and the collection method can be through on-site shooting, online search, and collection by clothing companies, and the number of collected images is set to about 20,000;
[0028] S32, data classification: according to the looseness of the chest and waist of the human body in the state of clothing (looseness is: relaxation amount, looseness), the pictures collected in step S31 are divided into several categories, and marked with labels respectively, and then the classified pictures are divided into a training sample data set and a test sample data set:
[0029] S321, chest looseness label classification:
[0030] The formula for calculating the looseness of the chest of a human body in a dressed state is: looseness of the chest of a human body in a dressed state = physiological comfort + looseness of inner clothing + looseness of modeling; the image collected in this embodiment is a front view of the chest and waist garment size of a male model wearing a shirt, which corresponds to: looseness of the chest of a human body in a male shirt = physiological comfort + looseness of inner clothing + looseness of modeling;
[0031] Physiological comfort refers to the basic comfort of the human body when wearing clothes, including the basic looseness required for breathing, suitable arm movements, skin elasticity and suitable trunk movements; for men's clothing, the basic physiological comfort is based on the maximum elongation of the chest movement of 12-15%, then the physiological comfort = (12-15%) * net chest circumference, which is about 10-12cm. In this embodiment, the middle value of 11cm is taken;
[0032] The looseness of the inner garment is the looseness required for the outer garment, which needs to be determined according to the tightness of the outer garment. For the shirt worn inside the garment in this embodiment, the looseness of the inner garment is 0;
[0033] The setting of the looseness of the shape is as follows: from the perspective of shape, shirts are mainly divided into fitted, loose, loose and extra loose. Usually, the looseness of a fitted shirt is 0-4cm, the looseness of a loose shirt is 4-8cm, the looseness of a loose shirt is 8-12cm, and the looseness of an extra loose shirt is more than 12cm;
[0034] It is determined that the looseness of a fitted men's shirt is between 11 and 15 cm, the looseness of a loose men's shirt is between 15 and 19 cm, the looseness of a loose men's shirt is between 19 and 23 cm, the looseness of an extra loose men's shirt is more than 23 cm, and the looseness of a slightly tight men's shirt is less than 11 cm.
[0035] In order to accurately obtain the looseness of the human chest when wearing a men's shirt, this embodiment classifies the collected chest size pictures based on the looseness of the chest with 2 cm as a level, and is divided into 12 categories. In order to avoid the influence of labels on the accuracy of the model, the classification folders are represented by letters A to L in sequence, specifically: Category A is no looseness, Category B is 0 to 2 cm looseness, Category C is 2 to 4 cm looseness, Category D is 4 to 6 cm looseness, Category E is 6 to 8 cm looseness, Category F is 8 to 10 cm looseness, Category G is 10 to 12 cm looseness, Category H is 12 to 14 cm looseness, Category I is 14 to 16 cm looseness, Category J is 16 to 18 cm looseness, Category K is 18 to 20 cm looseness, and Category L is more than 20 cm looseness;
[0036] S322, waist loose label classification:
[0037] Normally, the waist of human pants is not at the waist of the human body, but above and below the abdomen, so it is inaccurate to classify and analyze the waist looseness based on pants. Therefore, the present invention classifies the waist looseness based on the upper shirt;
[0038] In this embodiment, the range of the looseness of the human waist when wearing a men's shirt is obtained based on market research. According to market research, the minimum looseness of the waist when wearing a shirt is usually about 6 cm, and the maximum is usually above 41 cm. Since it is difficult to collect waist data, if the classification interval is too small, some classification data will be insufficient, which will have a certain impact on the model. Through analysis, this embodiment classifies the collected waist size pictures with 5 cm as a level, and a total of 7 categories are divided. In order to avoid the influence of labels on the accuracy of the model, the classification folders are represented by letters a to h in sequence, specifically: Class a is 6 to 11 cm looseness, Class b is 11 to 16 cm looseness, Class c is 16 to 21 cm looseness, Class d is 21 to 26 cm looseness, Class e is 26 to 31 cm looseness, Class f is 31 to 36 cm looseness, Class g is 36 to 41 cm looseness, and Class h is more than 41 cm looseness;
[0039] S323, data set classification: dividing the above classified images into a training sample data set and a test sample data set;
[0040] S33, constructing a human thoracolumbar looseness model: firstly, the ResNet50 model is migrated by using the transfer learning method, and then the MMD algorithm is added between the 49th and 50th layers of the migrated ResNet50 model to construct a human thoracolumbar looseness model;
[0041] Transfer learning is a method in machine learning. The definition of transfer learning is: given a source domain D s ={(x1 (s) ,y1 (s) ),...,(x n (s) ,y n (s) )} and source domain learning task T s , and the target domain D t ={x1 (t) ,…,x nt (t)} and the target domain learning task T t , the purpose of transfer learning is to s and source domain task T s The knowledge in improves the performance of the prediction function f(x) in the target domain Dt and the target domain task Ts;
[0042] According to the form of transferred knowledge and the definition of transfer learning, transfer learning can be divided into five categories: sample transfer, feature transfer, parameter / model transfer, relationship transfer and deep transfer learning; in this embodiment, model transfer is first performed, and the ResNet50 model is used as a pre-trained model to migrate the ResNet50 model (the ResNet50 model is a classic classification model. The ResNet50 model structure has 50 layers, which consists of conv1, conv2_x, conv3_x, conv4_x, conv5_x, averagepool and a fully connected layer FC, wherein conv2_x has 3 Bottlenecks, conv3_x has 4 Bottlenecks, conv4_x has 6 Bottlenecks, and conv5_x has 3 Bottlenecks), and then feature transfer is performed, and the MMD algorithm is added between the 49th and 50th layers of the migrated ResNet50 model (which can reduce the feature difference between the source domain and the target domain and increase the accuracy of the model), thereby constructing a human thoracolumbar looseness model;
[0043] During the migration of the ResNet50 model, the ResNet50 model needs to be fine-tuned, specifically including: freezing all the first 49 layers of the ResNet50 model, that is, freezing all the layers of the ResNet50 model except the FC fully connected layer, which is only used to extract the features of the image, and the parameters of the last fully connected layer will participate in the training, and modifying the classification parameters of the fully connected layer to the number of categories of the loose volume classification in the present invention, 12 (the number of categories of the chest loose volume classification) and 7 (the number of categories of the waist loose volume classification);
[0044] After adding the MMD algorithm to construct the human thoracolumbar looseness model, the model parameters need to be adjusted and set to optimize the model. In this embodiment, the set parameters include learning rate, number of iterations and batch size; among them, the learning rate determines whether the objective function can converge to the local minimum and when it converges to the minimum. The appropriate learning rate can make the objective function converge to the local minimum within a suitable time. In this embodiment, the learning rate is set to 0.01; the number of iterations refers to the number of times the neural network performs model training through the collected data set. In this embodiment, the number of iterations is set to 150; the batch size refers to the number of feature vectors of the input parameters in each iteration. The batch determines the direction of descent. In this embodiment, the batch size is set to 32;
[0045] S34, training a human thoracolumbar looseness model: inputting pictures of different categories in the training sample data set in step S32 into the human thoracolumbar looseness model in sequence for feature recognition, so as to obtain an optimal human thoracolumbar looseness model;
[0046] S35, testing the human thoracolumbar looseness model: inputting the pictures of different categories in the test sample data set in step S32 into the trained human thoracolumbar looseness model in turn for testing, so as to test the accuracy of the human thoracolumbar looseness model; in this embodiment, the test results show that the accuracy of the human thoracolumbar looseness model is as high as 86.69%;
[0047] The human thoracolumbar looseness model in this embodiment uses the transfer learning method to migrate the ResNet50 model during the construction process, and constructs the human thoracolumbar looseness model on this basis. Compared with other models such as the VGG16 model and the InceptionV3 model, the ResNet50 model not only runs very fast, but also has a high model accuracy, so that the human thoracolumbar looseness model finally constructed has a short test time, high classification efficiency, and a test accuracy of up to 86.69%. Under the same conditions, the test accuracy of the VGG16 model is only 82.1%, and the test accuracy of the InceptionV3 model is only 81.5%;
[0048] S36, calculating the looseness of the chest and waist of the human body in the dressed state: inputting the human body front view of step S2 into the human body chest and waist looseness model after the test for processing, and calculating the looseness of the chest and waist of the human body in the dressed state;
[0049] S4. Subtract the size of the garment obtained in step S2 from the looseness of the thorax and waist obtained in step S3, so as to construct a thorax and waist size model of the human body in the dressed state, and use the model to obtain the thorax and waist size of the human body in the dressed state; in this way, the thorax and waist size of the human body can be remotely and quickly estimated anytime and anywhere without leaving home, which well solves the problem of difficulty in measuring the thorax and waist size when dressing and the problem of being unable to measure anytime and anywhere, and the test result has a high accuracy rate, up to 86.69%.
[0050] Finally, it should be pointed out that the above are only some preferred embodiments of the present invention and should not be construed as limiting the scope of protection of the present invention. Some non-essential improvements and adjustments made by those skilled in the art based on the above contents of the present invention all fall within the scope of protection of the present invention.
Claims
1. A method for estimating the chest and waist size of a human body in a dressed state based on deep learning, characterized in that: The method comprises the following steps: S1, obtaining a front view of the human body of the estimated object in a dressed state; S2, using a human clothing size model to process the human front view obtained in step S1, and calculate the clothing size of the human chest and waist in the dressed state; S3, first construct a human chest and waist looseness model, and then use the human chest and waist looseness model to process the human front view of step S1 to calculate the chest and waist looseness of the human body in the dressed state; the human chest and waist looseness model is first migrated by using the transfer learning method to migrate the ResNet50 model, and then the MMD algorithm is added between the 49th and 50th layers of the migrated ResNet50 model. It specifically includes the following steps: S31. Data collection: collecting a plurality of frontal images of the chest and waist dimensions of a human body in a clothed state whose chest and waist dimensions in a clean state are known, and performing enhancement processing on the collected images; S32, data classification: the images collected in step S31 are classified into several categories according to the looseness of the chest and waist of the human body in the dressed state, and are marked with labels respectively, and then the classified images are divided into a training sample data set and a test sample data set; S33, constructing a human thoracolumbar looseness model: firstly, the ResNet50 model is migrated by using the transfer learning method, and then the MMD algorithm is added between the 49th and 50th layers of the migrated ResNet50 model to construct a human thoracolumbar looseness model; S34, training a human thoracolumbar looseness model: inputting pictures of different categories in the training sample data set in step S32 into the human thoracolumbar looseness model in sequence for feature recognition, so as to obtain an optimal human thoracolumbar looseness model; S35, testing the human thoracolumbar looseness model: inputting the pictures of different categories in the test sample data set in step S32 into the trained human thoracolumbar looseness model in sequence for testing, so as to test the accuracy of the human thoracolumbar looseness model; S36, calculating the looseness of the chest and waist of the human body in the dressed state: inputting the human body front view of step S1 into the human body chest and waist looseness model after the test for processing, and calculating the looseness of the chest and waist of the human body in the dressed state; S4. Subtract the size of the garment obtained in step S2 from the looseness of the thorax and waist obtained in step S3, so as to construct a thorax and waist size model of the human body in the dressed state. The thorax and waist size of the human body in the dressed state can be obtained by using the thorax and waist size model of the human body in the dressed state.
