×
Community Blog Building Qwen-EcoLens: An AI-Powered Sustainable Nutrition Tracker on Alibaba Cloud

Building Qwen-EcoLens: An AI-Powered Sustainable Nutrition Tracker on Alibaba Cloud

In an era where both personal health and environmental sustainability are critical concerns, tracking the nutritional and ecological impact of daily meals remains a challenge.

The Problem: The Hidden Cost of Your Plate

We all strive to eat healthier and live more sustainably, but tracking calories can be tedious, and calculating the environmental impact of local dishes—like Nasi Lemak or a Ramly Burger—is nearly impossible for the average consumer. Most fitness apps focus solely on calorie counts, ignoring the carbon footprint of the supply chain. What if you could simply snap a photo of your meal and instantly see its impact on both your body and the planet?


Enter Qwen-EcoLens, an AI-driven Telegram bot built entirely on the Alibaba Cloud ecosystem. This innovative tool combines advanced multimodal AI models with generative storytelling to turn food photos into actionable insights about health and sustainability.


1*xfm4Q6VxAQlNsSSRXyQoKw.jpeg1*LGFNElpZfs8xMhSRL326lQ.jpeg


The Solution: See, Score, and Share

Qwen-EcoLens isn’t just a nutrition tracker—it’s a multimodal experience that transforms meal logging into an educational and engaging moment.

Key Features:

1. Precision Vision: Powered by Qwen-VL-Max-Latest, the bot identifies complex, multi-ingredient dishes with remarkable accuracy. It even detects small details like individual grains or garnishes, ensuring precise portion estimation.
2. Dual-Scoring System:
  - Health Score: Tracks calories and macronutrients.
  - Planet Score: Estimates carbon emissions (kg CO2e) and provides an ESG rating for the dish.
3. Generative Storytelling: Using Wan2.6, the bot creates a cinematic 5-second video of your meal, making sustainability fun and shareable.
4. Localized Intelligence: Fully supports English, Malay, and Chinese, understanding regional food nuances and cultural preferences.


Under the Hood: The Alibaba Cloud Architecture

To deliver high-resolution image reasoning and heavy video rendering without lag, I designed a specialized architecture leveraging Alibaba Cloud’s cutting-edge tools.

1. The Brain: Qwen-VL-Max-Latest

At the core of Qwen-EcoLens is Qwen-VL-Max-Latest, a state-of-the-art vision-language model:
- High-Resolution Parsing: Detects intricate details in food images, such as individual grains or small garnishes, which are often missed by standard models.
- Structured Reasoning: Outputs data in JSON schemas, enabling seamless integration with my carbon-intensity database and eliminating regex errors.
- Contextual Awareness: Goes beyond labeling food to reason about its context (e.g., distinguishing between home-cooked meals and processed fast food), which directly impacts ESG scoring.


2. The Creative Director: Wan2.6 Text-to-Video

To make the experience engaging, I integrated Wan2.6, a powerful text-to-video model:

Challenge: Video generation is computationally expensive and takes 3–5 minutes—far too long for a synchronous Telegram request.

Solution: I implemented an Isolated Subprocess Architecture. The main bot remains responsive while a background worker polls the Alibaba Cloud API, sending real-time progress updates to the user (e.g., “Progress: 45%”).


3. Efficient Storage: Alibaba Cloud OSS

To optimize performance, I adopted a Lazy Upload strategy:

- Images are processed in memory as Base64 for initial analysis.
- Only when a user saves a meal to their history is the high-resolution image pushed to Alibaba Cloud Object Storage Service (OSS) for long-term analytics.



Why This Matters: Scaling ESG via AI

As a researcher focused on Trustworthy ESG Recommendation Systems, I believe one of the biggest barriers to sustainability is human engagement. Traditional ESG scores are often buried in lengthy reports, leaving consumers disconnected from their daily choices.
Qwen-EcoLens bridges this gap by bringing ESG data to the dinner table. By leveraging Qwen-VL-Max-Latest, we’ve created a tool that makes complex environmental data accessible and actionable for everyday users.


What’s Next?

I’m excited to continue enhancing Qwen-EcoLens with the following features:
- Gamification: Add leaderboards for the “Lowest Carbon Week.”
- IoT Integration: Connect the bot to smart kitchen scales for gram-perfect accuracy.
- Wan2.6 Fine-Tuning: Train the video model specifically on “Food Porn” aesthetics to create even more captivating visuals.


Try It Yourself!

Qwen-EcoLens is currently in beta. You can explore the architecture and contribute to the project on GitHub: Repo Link.


Acknowledgments & Tools

This project would not have been possible without Alibaba Cloud’s cutting-edge AI ecosystem:
Qwen-VL-Max-Latest: For high-fidelity multimodal reasoning that powers our ESG scoring.
Wan2.6: For generative storytelling videos that make data engaging.

0 1 0
Share on

Matthew Chin CY

2 posts | 0 followers

You may also like

Comments

Matthew Chin CY

2 posts | 0 followers

Related Products