In this project we developed ML modules for the machine learning pipeline in the Equifit app. We trained all models using Google Colab.
Refer to this code for the implementation of this pipeline.
This pipeline takes image, gender, weight, height, and age as input and output 15 measurements (ankle, arm-length, bicep, calf, chest, forearm, neck, hip, leg-length, shoulder-breadth, shoulder-to-crotch, thigh, waist, wrist, body fat).
The first module is DeepLabV3. We use a pre-trained DeepLabV3 model to process the raw image into a silhouette image.
The second module (Measurement model) utilizes pre-trained MobileNetV3Large for feature extraction. It takes the silhouette image from the previous module and GHW (gender, height, weight) input and predicts 14 body measurements (ankle, arm-length, bicep, calf, chest, forearm, height, hip, leg-length, shoulder-breadth, shoulder-to-crotch, thigh, waist, wrist). We trained this model for 39 epochs using the BodyM dataset.
The third module is Neck&BodyFat predictor. This module comprises a Neck_Prediction model and a function to predict body fat. The Neck_Prediction model takes 8 measurements from the previous module (chest, waist, hip, thigh, ankle, bicep, forearm, wrist), age input, weight input, and height input to predict neck circumference. We trained the model using the Body Fat Prediction dataset. This predicted neck is then used to predict body fat percentage (BFP) in predict_bodyfat function with height input, gender input, waist and hip as additional input.
The output from the model are 13 measurements from the Measurement model, and neck measurement and BFP from the Neck&BodyFat predictor.