Inspiration

Imagine the thrill of discovering a stunning piece of clothing online, the anticipation as you wait for the package to arrive, and the excitement of wearing it for the first time. Now, imagine the crushing disappointment when that garment doesn’t fit and is likely to be thrown away or not used.

The online fashion industry is worth $770 Billion. That is more money than the GDP of many countries...

This project is designed with the purpose to help you avoid the frustration of recieving an ill-fitting garment by revolutionizing the way we choose sizes for our clothes. We aim to automate the process, ensuring a perfect fit every time, transforming the online shopping experience, as well as reduce the quantity of clothing material, wasted.

What it does

With a given picture and person`s height, it can meassure the length of the following body parts: head, shoulders, hands, torse, chest and legs.

How we built it

Used Python powered by OpenCV, OpenPose, Pytorch, YOLO. Main idea is to use OpenPose to detect the human body points and combine some of them into vectors representing different body parts. Aftwerwards calculate the magnitude of vectors and using a proportion of the given input of the body`s height to the amount of pixels representing the height.

For the chest measurement we used the following approach: Turn the background of the picture into black and the body to white. Iterate over the pixels horizontally to check the difference between white pixels and detect the the beginning of the chest. Do this from the left and right parts, hence we completely eliminate hands from the picture. Calculate the horizontal length of the output image representing the lenght of the chest in pixels. Use the proportion described above to turn the lenght in pixels into cantimeters.

Challenges we ran into

The project is very complicated in terms of logic of caluclations.

Firstly, in order to be independant from the user input of the height, we had to calibrate the user`s camera first, which is a very complicated process by its nature and will significantly reduce the user experience.

Secondly, the chest measurement method is dependant on the person`s hands position, because it relies on the calculation of diffference between white pixels horizontally in order to detect the end of the arm and beginning of the chest. It can be attempted to improve the accuracy using vertical pixel comparison, however the approach will be different.

Thirdly, the installation of all libraries was not an easy task and took a significant amount of type to set up the local development environment on the Ubuntu Machine with the support of Nvidia GPU in order to accelerate the calculations proccess.

Accomplishments that we're proud of

  1. Successfully deployed the development environment on a local machine.
  2. Thoroughly tested multiple approaches to provide the correct body parts analysis.
  3. Developed an algorithm to detect important for the detection points of the human body and used a method of vector magnitude calculation to provide a correct measurement data.
  4. Developed own algorithm to detect and measure the chest.
  5. Leveraged different Python libraries for visual computing in order to complete our task.

What we learned

  1. Computer Vision is complicated sphere and each problem can be approached in different angles, what may result in the accuracy of the calculations and the speed of data processing. It is quite very time consuming to develop the own complex algorithm from skretch.

What's next for Body measurement

  1. It is planned to continue development of this project and create an API so that it can be easily integrated with people online shops.
  2. Improve the user experience by developing the own web site for this project.
  3. Create a Docker package in order to make the installation of the library as easy as possible.
  4. Make a tutorial and demo.
  5. Implement a new functionality for calucalation of other body parts.

Built With

Share this project:

Updates