Somalens App
Issue 01March 2026

Somalens App

Engineered a 5-stage hybrid ML pipeline for automated somatotype classification; extracts anthropometric data from 2D images and utilizes predictive modeling to estimate internal metrics, achieving 76.7% accuracy and integrating nutritionist-validated diet generation.

Written ByJohn Casper Santos
Back to journal

Somalens was developed for my college thesis to address the limitations of traditional body assessment methods like BMI, which cannot differentiate between muscle mass and relative adiposity. The goal was to automate the scientifically rigorous Heath-Carter somatotyping method using accessible 2D camera images, and use the results to provide personalized, nutritionist-validated dietary and fitness recommendations.

At the core of Somalens is a five-stage hybrid machine learning pipeline. First, a CNN extracts proxy measurements from user silhouettes using DeepLabV3. Then, Support Vector Regression (SVR) and Random Forest models predict clinical-grade physical measurements (skinfolds, girths, and breadths). These predictions are calibrated to Filipino anthropometry using Bayesian Ridge regression, processed through deterministic Heath-Carter equations, and finally classified into seven somatotype categories.

Somalens Five-Stage ML Pipeline
Somalens: From 2D image processing to deterministic Heath-Carter somatotyping.

Through the use of multivariate bias correction, the pipeline's classification accuracy improved significantly from a 36.7% baseline to 76.7%, achieving a Cohen’s Kappa of 0.670 (substantial agreement with expert manual assessments). Furthermore, the rule-based diet suggestion engine received a perfect Scale-Level Content Validity Index (S-CVI) of 1.00 from certified Nutritionist-Dietitians.

Since the system handles computationally intensive tasks—from TensorFlow/PyTorch image segmentation to scikit-learn regression—performance and scalability were primary concerns. I implemented a containerized architecture orchestrated with Docker Compose, utilizing a FastAPI backend for Python-based ML processing and a TypeScript layer with Redis to manage background jobs and real-time inference for concurrent users.

Somalens Measurement Interface
Detailed anthropometric measurement visualization.
Somalens Diet Suggestions
Nutritionist-validated personalized diet and fitness plans.

Building Somalens bridged the gap between academic research and full-stack software engineering. It demonstrated that automated, camera-based somatotype classification is highly viable for scalable health profiling, while giving me hands-on experience in deploying complex ML models into a robust, concurrent web ecosystem.

Health-E: AI-Driven Emergency Health Records
Up Next

Health-E: AI-Driven Emergency Health Records

Kyazs.Dev Logo

KYAZS.DEV

Shipped.
  • GitHub
  • LinkedIn
  • Portfolio
  • Email

© 2026 JOHN CASPER SANTOS. ALL RIGHTS RESERVED.