45
30 Comments

How I built a $220k app in 4 weeks

My name is Dragos Dobrean and I’m the co-founder of appssemble — a mobile development studio, besides that, I’m also doing my PhD on Mobile Applications Software Architectures, you could say that I live and breath mobile. I built an app that counted the number of calories in your meal by only snapping a photo of your food (aical) and got a signed offer 100.000$ for 45% of it in 4 weeks.

So how did I do it?

Everything starts in Cleveland, I was attending an academic conference (IEEE International Conference on Software Maintenance and Evolution) where something caught my attention, there was a talk by Alex Cummaudo where he presented his research on AI/ML API’s and did a comparison of those (Google Vision, Amazon Rekognition, IBM Watson, etc.).

After a week or so, I was thinking one evening that I could leverage those services, to build something cool. All of those services offer image tagging and labeling functionalities via an API (basically, you feed them the picture, they give you back all the information regarding that picture). I saw that those services were good at recognizing food from images, so with this idea in mind, I started thinking about building a calories counting app, that would work by simply snapping a picture of your food.

Building such a product from scratch is a tremendous amount of work, you would need large data sets of food images to train your model, validate it, and pack it in a form that could be used from a mobile device, fortunately, I did not have to worry about this kind of thing, as the model was ready and it had word-class accuracy, I mean few companies are better at AI/ML than IBM, Google or Amazon.

Now I had the labeling part working, but how do I go from “french fries” to 319 kcal. There was one missing bit, converting a food name to the correct number of the calories, only if there was an API for that, well, fortunately, there is, after a couple of hours of search the web I found Edamam a company which does exactly that, providing an API for nutritional purposes.

This was the first week, I hadn’t got anything built yet, but I had a pretty good idea of how everything is going to work. The second week came by and I started coding the app, firstly I decided on how I wanted it to look, I wanted something minimal but eye candy so this is what I came up with.

The second and third week was spent on coding the app, connecting the APIs, and creating the user interface. By week 4, I’ve prepared some marketing materials, and I released the app on ProductHunt. The app had major success, it had over 2.000 downloads in the first week.

By this time, I’ve received an offer from an investment firm that was interested in acquiring 45% of aical, and after exchanging a couple of emails, they have already signed their end of the deal.

However, I didn’t get rich as I haven’t taken the money. The reason for that being that it didn’t seem fair to do that, as the app could not be further improved, the app would work fairly well on some of the cases but the major issue had been estimating the size of a meal and choosing the best labels.
I’ve tried to overcome this issue by allowing the users to choose one of the most convenient labels and enter their quantity, unfortunately, this didn’t have too much success.

To improve the accuracy, I’ve also implemented a Siri shortcut that counted the calories using voice commands, while this had some popularity with the users, I think the timing was not good for this, as the users are not that acquainted with using voice commands yet.

What happend next?

Not much, the app continued to grow, it has over 12.000 downloads, active users, and even paying ones. The app is really big in Saudi Arabia, but I haven’t found the reason for this, maybe someone in the comments can shed some light on this…

Now a few learnings from all this process:

  1. You can build something really interesting by relying on others work, you don’t have to be Google or Amazon, but you can leverage their services
  2. A product doesn’t have to be perfect for users to use it
  3. The accuracy of aical was really good, there are startups with a lot of investment (like FoodVisor) that don’t achieve this kind of accuracy on their own

That being said, you want to find out more about what I’m about to, follow the blog, or reach out to me.

posted to Icon for group Building in Public
Building in Public
on October 5, 2020
  1. 5

    I know a lot about calorie counting, and unfortunately, this will never be at all accurate.

    1. 1

      but how do I go from “french fries” to 319 kcal

      Based on this it looks like it just detects dish name based on photo and then gets the approximate kcal from an API/database. It seems like it doesn't even account for weight of the dish? Not even talking about actual ingredients used.

      1. 1

        The app estimates the size of the dish, based on its ingredients and type, usually meals have a well defined weight range, otherwise, the app also allows setting the quantity of the food manually. You should download it and give it a try :)

    2. 1

      This comment was deleted 3 years ago.

      1. 4

        as @satvikpendem said, the app is not meant to be 100% accurate, but to give you an approximate ballpark regarding your calories intake (just like apple watch with the sport, is nowhere near as accurate as a sport device used by athletes, but it provides a good estimate for people to use it and be more aware of the fact they need to exercise more.

      2. 4

        Generally I would agree with you, but as someone who is counting calories recently, it only needs to be roughly around the ballpark of the caloric amount, not necessarily exact, at least for me and most people who are thinking of losing weight or gaining muscle.

        This roughness combined with ease of use is why I think it would succeed in the B2C space. It's because people just don't care enough, they want to track calories painlessly and only a small percentage of people actually want to input every single meal every single day by hand. If it gets more people counting calories for their goals then I think it wins.

        1. 3

          Even if you were to read the nutritional facts for everything you eat and weigh out your food, you will be off by 100-300 calories per day.

          This app will not be able to take into consideration many important variables, such as how the food is cooked, it could be off by thousands of calories per day if you cook your food in oil for example. That much error is too much for weight loss.

          A better "product", is just to eat the same thing every day and weight it, if you're not losing weight, eat less, it's not hard, it just takes discipline, which few people have.

          Lazy people will use this and trick themselves into thinking they're doing a great job, when in fact they're adding 300 calories of dressing to every meal and remaining overweight.

        2. 1

          But this can't work, it's impossible to tell the calories just by looking at a photo. Even if you had a world-class chef next to you, he couldn't tell you the calories just by looking at your food from one meter away.

          Also for ease of use, if you just use 2-3 ingredients, it's usually easier/faster to just read the label.

          1. 1

            Why not? I can see that someone is eating one chicken breast and some vegetables, it's not that hard to figure out the number of calories (on average) from that. I'm sure the API has a better view of it. People who count calories learn to estimate caloric amounts over time actually, which I learned after reading things like r/gainit, r/loseit, the MyFitnessPal community, etc.

      3. 1

        piece of chicken breast. How does the app know the mass, the water content etc

        I agree with you that the app sounds like a scam/gimmick. In dishes most ingredients are also hidden from view (others obstructing them) and it's probably impossible to tell from a photo if the ketchup used in a burger was sugar-free or not.

        That being said, I know that with AI/ML you can approximate pretty accurately mass and water content from a photo, and I know there was an optical device to even detect nutritional composition just by looking at the way the light is reflected. I still doubt the app can give reliable values if you are calorie counting.

        1. 1

          "Scam" seems like a very harsh descriptor to level at an IH's work. It implies he is doing something illicit just because you don't agree with the premise or approach.

          Just sayin'

          1. 1

            I agree, "scam" is a hrash word, but I usually use it to describe a product that promises to do something (usually a single thing), but it doesn't actually do it.

            Eg. app promises to (somewhat accurately) estimate calories from a photo so you can calculate your daily intake. You take a photo, the number is way off and can't be even used to at least know at if one meal has relatively more calories than another.
            I am not saying that it is a scam, I just said that it sounds like a scam based on my knowledge of the current state of AI and the accuracy of such models.

            I understand that he is another fellow IH, but I think the best feedback you can get as an IH is honest feedback. If I say the app sounds like a scam, probably other people would think the same so he should probably address this concern in the description of the product, or prove that it is indeed accurate. I think we, as indie-hackers should be honest with each other and give honest and useful feedback, not just saying "great job" without actually meaning it. I am happy for him that he got an investment for the app, but at the same time I am thinking if this product actually brings value to the world or it will be just another high-valued product that ends up being useless or making more harm than good.

            1. 1

              Thanks for this explanation! I see your point more deeply now, and agree - better to have that feedback here than at scale in the real marketplace. 😊

  2. 4

    Congrats! Reminds me of a Silicon Valley. “Hot dog... Not a hot dog.”

  3. 3

    Cool! Great hack. It is hilarious to read all the comments here which completely miss the point by complaining about accuracy.

  4. 2

    If you only that know there is such technology that exists then I think you are a head of the game.Like he learnt about the AI at conference.Spanning tree protocol,Shortest path first,dijsktra algorithm are integral part of Cisco switches which makes the internet work and makes the switches works so intelligently and made Cisco billions.Cisco didn’t build these tech they only applied it.Like google founder used linear algebra,graph theory they were able to build google.

  5. 1

    I don't want to be the hacker news dropbox commenter, but. It is trivial to think of examples where this cannot work, even if the ML were perfect. For example, take a picture of an opaque soup -- is there some kind of pasta at the bottom? The best an algorithm could do is take the average of the inputs it had seen in training.

    The bigger issue is that computer vision is (very) far from perfect, and a huge number of items in the "long tail" of things you see in the real world are likely to not have been seen in training. Current state of the art computer vision systems are interpolative, and really struggle with out of domain data.

    Rather than saying you can report the calories for any meal, however, perhaps you could manually enter the calories of meals you have made, then take a picture. Then, you could take a picture of a new meal and match it to those you had previously made.

    If I were tasked with building this, the first thing I would think about is gathering a dataset of known picture/calorie pairs, and using that to judge how well the system you have proposed works. Then I would consider whether I was comfortable making a claim that the system worked, based on the result of this exploration.

    It is tempting to think of ML as magic, but we are (sadly) far from this being the case.

    1. 1

      We are (gladly) far from this being the case.

  6. 1

    Congrats on the deal!

    I can't help but think that the app is a scam, as I highly doubt there is a way (with the currently known technology and algorithms) to estimate calories from a photo, as this would mean being able to tell the chemical composition of a highly-noisy mix of substances.

    If I take a photo of 500 ML of ketchup in a bowl, does it know how many kcal it has? How would it know if it is sugar-free or not? How does it even know regardless of the bowl shape that it is 500 ML and not 200ML?

    1. 2

      you are missing the point, if I take the Apple Watch for instance and put it on a dog, or just moving my hand, it will detect that I'm exercising. The point of the app is to give you a ballpark approximate of your calories intake simple, by just snapping a photo of your food.

      1. 1

        I am using a Fitbit to track my exercise activity, the big difference is that it is consistent, I can easily relate my effort to the the numbers it gives and requires zero manual user input.

        I am not saying that for some it can't estimate well, but that in overall, during a day, the inaccuracies are so great that it can't accurately say if I ate more or less calories tha yesterday.

        I would gladly try the app if it has an Android version.

  7. 1

    I think to beat competition we have to use a sophisticated tool which is AI.Then you will have advantage over ur competition.

  8. 1

    Saudi Arabia has got huge obesity issue.I was watching a documentary about it on YouTube and u said why the app is popular is Saudi.I was like there is a link

    1. 1

      thanks for bringing it up, haven't heard about this, there might be a link then...

  9. 1

    Congrats on the success—great takeaways here! It's always good to be reminded not to reinvent the wheel. No matter how much it makes sense, it's easy to forget.

  10. 1

    First of all, congrats. But I wonder, how did you gather food photos? As far as I know, there is no extensive food database on the Internet.

    1. 5

      He didn't. Google and others have trained models so you don't have to train new model

      1. 1

        I misunderstood the related paragraph. Thanks. I thought that AutoML Vision was used.

        I think those APIs are better at solving general problems like finding humans, face recognition, etc. Particular areas like this still require exclusive databases and ML methods.

  11. 1

    Really cool story. Happy for you. I am curious what you are up to next. <3

    1. 1

      I've enhanced the app with voice commands, and I've released voicecal -- which is an accurate calorie counting app, which uses your voice as an input for the food, it works in over 60 languages, and you can try it here

Trending on Indie Hackers
I built an AI that turns an idea into a live business in under 10 minutes. Here’s what 1,000 launches taught me User Avatar 80 comments Building Noodle, a keyboard-first REST client for the terminal User Avatar 31 comments "Looks Good to Me" Is Quietly Killing Your Feedback Loop User Avatar 30 comments Launched 580 landing pages in 1 week. Solo. No team. User Avatar 20 comments I built a competitor monitor for indie founders User Avatar 15 comments I didn't want to build another AI chatbot User Avatar 14 comments