Project description

The task was to create a solution to precisely calculate anthropometric measurements from a photo person and input basic parameters. The acceptable standard error of the measurements is 5%.

The solution included using Computer Vision and Machine Learning. A person inputs their weight, height, and gender as the basic parameters and takes two full-size photos from the front and the side.

Client info

Warrior Consultants LLC specializes in creating Corporate Fitness and Wellness Programs for large organizations with over 40 years of experience in the Fitness Industry. They use cutting-edge science and innovation to improve the health and lives of clients’ employees.

The algorithm works as follows:

  • A body frame is detected by using CV;
  • Inside the frame, a body contour is calculated using a gradient filter;
  • Using Google’s Mediapipe, the body contour is mapped to a pose model;
  • Cross-width of the contour is calculated at the predefined landmarks, which are mapped to the contour using the pose;
  • ML regression is used for converting linear measurements into circumferences;
  • ML outlier detection and regression are used to validate the calculated measurements and their improvement.

The algorithm calculates ten measurements of different parts of the person’s body: Neck, Elbow, Wrist, Chest, Waist, Hip, Thigh, Knee, Calf, and Ankle. The measurements are given as circumferences. No helper markers are used in the photos.

alt=""
alt=""

Calculation of body dimensions from the photos

Technologies used

Backend: Python 3.7, PyTorch, Mediapipe, Docker, Flask, PostgreSQL.
Frontend: Angular.

Related projects