Abstract
Singapore has been striving to improve the provision of healthcare services to her people. In this course, the government has taken note of the deficiency in regulating and supervising people's nutrient intake, which is identified as a contributing factor to the development of chronic diseases. Consequently, this issue has garnered significant attention. In this paper, we share our experience in addressing this issue and attaining medical-grade nutrient intake information to benefit Singaporeans in different aspects. To this end, we develop the FoodSG platform to incubate diverse healthcare-oriented applications as a service in Singapore, taking into account their shared requirements. We further identify the profound meaning of localized food datasets and systematically clean and curate a localized Singaporean food dataset FoodSG-233. To overcome the hurdle in recognition performance brought by Singaporean multifarious food dishes, we propose to integrate supervised contrastive learning into our food recognition model FoodSG-SCL for the intrinsic capability to mine hard positive/negative samples and therefore boost the accuracy. Through a comprehensive evaluation, we present performance results of the proposed model and insights on food-related healthcare applications.
Introduction: The Missing Link in Chronic Disease Management
Singapore faces a significant public health challenge characterized by the "3H" conditions: hyperglycemia (diabetes), hypertension (high blood pressure), and hyperlipidemia (high cholesterol). While clinical data such as laboratory tests and medications are well-integrated into electronic medical records, "medical-grade" nutrient intake data remains a missing link in holistic patient care.
Manually logging every meal is a tedious and error-prone process for patients. While AI-driven food recognition offers a potential solution, existing models struggle with two major hurdles: a localization gap, where Western-centric datasets fail to identify regional dishes like Laksa or Lontong, and significant visual ambiguity.
As illustrated above, real-world food images suffer from intra-class variation (the same dish looking different depending on preparation) and inter-class resemblance (different dishes, such as sushi and grilled salmon, looking nearly identical to a standard classifier).
Methodology
To address these challenges, the researchers developed a two-pronged solution: a robust data pipeline and a novel recognition model.
The FoodSG-SCL Model
The core innovation is the integration of Supervised Contrastive Learning (SCL). Unlike standard models that simply map an image to a label, SCL uses a two-stage training process:
- Contrastive Stage: The model learns to "pull" images of the same food category together in a high-dimensional space while "pushing" images of different categories away. This is specifically designed to mine "hard positives" (varied appearances of the same dish) and "hard negatives" (different dishes that look similar).
- Classification Stage: A standard linear classifier is trained on top of these robust representations to produce the final food category prediction.
The FoodSG Platform Architecture
FoodSG is built as a cloud-based Platform as a Service (PaaS) using a modern stack including Node.js, Redis, PostgreSQL, and Kafka. It supports various front-end applications via Ionic and AngularJS, allowing it to serve different healthcare sectors—from dental clinics to athletic training centers—simultaneously.
The FoodSG-233 Dataset
The researchers introduced FoodSG-233, a localized dataset specifically curated for the Singaporean context. It comprises 209,861 images across 233 categories. The curation involved a rigorous pipeline including consistent formatting, deduplication using hashing, and a "foodness" classifier (a DenseNet169 model) to filter out non-food images.
Notably, the dataset covers 13 main food groups with a heavy emphasis on "Mixed ethnic dishes" (over 55% of categories), reflecting Singapore's unique culinary heritage. Compared to existing benchmarks, FoodSG-233 offers a higher image-per-category ratio (901), ensuring the model has sufficient examples to learn subtle variations.
Key Results and Clinical Impact
Using EfficientNetV2 as the backbone, the SCL-enhanced model achieved a Top-1 accuracy of 78.87% and a Top-5 accuracy of 93.13%. The researchers noted that the SCL mechanism specifically boosted Top-1 accuracy. For medical-grade tracking, a highly confident Top-1 result is more valuable than a "lucky" guess within the top five, as it reduces the burden on the user to manually correct the AI.
Beyond technical metrics, the platform demonstrated real-world efficacy. In a 6-month study (the LIVEN program) at Ng Teng Fong General Hospital, prediabetic patients using the FoodSG-powered application experienced a weight loss of 4% to 5% of their initial body weight, demonstrating the power of automated, localized nutrient tracking in reversing chronic disease trends.
Conclusion and Future Work
While the PaaS handles heavy lifting in the cloud, future work will focus on improving on-device processing to address privacy concerns and offline usage. Additionally, the team plans to explore more passive ways to capture dietary data to reduce reliance on active user photography. The FoodSG-233 dataset has been released to the research community to further stimulate innovation in localized food recognition.
Summary updated