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.

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.


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.

