After Losing 15 Kilograms, I Found Inspiration and Developed an AI-Enhanced iOS App
a real story
Just like salmon returning upstream in autumn or migratory birds heading south for winter, every summer, I embark on a weight loss journey.
It's not about shedding a specific amount of weight, but rather a habit I've developed to be slimmer during the warmer months. This could be so I can indulge more when it's colder, or perhaps it's a lingering concern about my figure - I'm not entirely sure.
Starting in June, I began consciously tracking my daily calorie intake and creating a caloric deficit.
By the end of June, I had lost about 8 kilograms, and another 7 kilograms by now, totaling approximately 15 kilograms - even my mother noticed the significant change (ignoring the tan lines on my arms).
This weight loss journey was smoother than previous attempts, sparking my curiosity about the state of my abs, something I hope to discover by the end of this summer.
Throughout this process, I realized that creating a caloric deficit is the key - it's simple and fundamental.
In the past two months, I've been calculating my daily caloric deficit. Initially, I used various calorie-tracking apps found online, which involved a standard process:
- I enter a food item, like a bun.
- After searching, I'm presented with a list of results.
- I select the 'bun' option.
- A default weight of 100 grams pops up.
- I estimate the bun I ate was smaller, perhaps 50 grams, and adjust manually.
- Confirm the entry.
This process would be repeated for each item in a meal, like a bun, a small plate of tomato and egg stir-fry, a cup of fresh orange juice, half a corn cob, and a small plate of soy sauce beef.
During one particularly tedious entry session, coupled with a subpar AI class ad I saw, an idea struck me - could I use ChatGPT to develop a better tool?
After searching online and in app stores, I found nothing similar.
I immediately sat down and experimented with ChatGPT on a web browser. I told it about my meal, 'a bun, a small plate of tomato and egg stir-fry, a cup of fresh orange juice, half a corn cob, a small plate of soy sauce beef,' and asked for a calorie estimate.
I found ChatGPT, with its logical and common sense capabilities, could deconstruct my verbal description into individual food items and estimate their calories.
However, ChatGPT's training doesn't specifically include nutritional data, so its calorie and nutrient estimates were often incorrect or, at times, unavailable.
While it's better for it to admit ignorance than to provide inaccurate information, the variety of food types made it clear that ChatGPT alone couldn't fulfill my needs.
I then looked for new methods and found several food databases, including the USDA's. After some basic data cleaning, I created a database covering 100,000 types of food and ingredients. I reduced ChatGPT's role to just identifying food items and estimating their weights, while the calorie and nutrient calculations were handled by the food database, not ChatGPT's 'knowledge.'
This new approach significantly improved recognition and accuracy. Inspired, I began developing a new app, dedicating about two hours each evening to the task. It took over a month, but I finally finished this new app.
I named it FoodCa, which could be interpreted as Food+Calorie or a whimsical pronunciation of vodka, depending on your preference.
This app fulfilled all my requirements for a minimalist calorie-tracking tool. For example, you can simply list what you ate in a day, and it automatically identifies, breaks down, and estimates the weight, calories, and nutrients:
A very simple yet aesthetically pleasing data chart allows you to roughly monitor:
Additionally, to add a fun element to tracking, I included an 'AI Nutritionist' feature. If you have entries, you can summon it at 9 PM for friendly dietary suggestions based on your daily intake:
Embarrassingly, despite having self-taught SwiftUI to write iOS apps two years ago, I realized I had forgotten almost everything. The first few days were extremely slow, almost like 'recovering memories.' I revisited many SwiftUI basics, and only after about a week did the project start to smooth out.
Since I worked on the app only during my free time in the evenings, it took a while to complete. Just a few days ago, I finished FoodCa, submitted it for AppStore review, and it got approved. Thus, a new product was born.
I've been using a test version through TestFlight for half a month, making daily calorie tracking easier and more enjoyable (perhaps because it's my own creation). While this is a personal project with a basic business model (selling memberships for 3 dollars because I also need to pay for ChatGPT), it's unlikely to be highly profitable. There's no high ceiling or barriers to entry for such a product, and I suspect similar ones are already in development.
Still, I'm proud of it. In a way, this is an example of applying AI to a practical task. We've seen too many chatboxes and text fields, and when we think of ChatGPT or other large language models, we often just consider chat, dialogue, and text generation. As a result, the AI field, following in the footsteps of the metaverse, has become a haven for charlatans and swindlers.
We should either engage in more pure and fun endeavors or apply AI to more practical, tangible realms. Only then, as AI inevitably surges forward, can it lift us instead of overwhelming us. I'm not overly optimistic about this, but I've given it thought and effort.
If you're interested in my small project or curious about the experience of using AI for food calorie tracking and you have an iPhone, feel free to download and try it out. You can find FoodCa in the AppStore or follow the link below to download it.
FoodCa:https://apple.co/47egICL