,Working on that now.
It's quite hard because of the number of food and how similar they look like (there are many varieties of pasta in red sauce, unless you'd be just happy with the word "pasta").
Now if you need just to recognize simple food (like fruits, cake, etc), there are few models out there:
- A simple model is Food101, there is even a precompiled version for CoreML:
https://github.com/ph1ps/Food101-CoreML
- One of the best models is UECFood256 that you can find the dataset here:
http://foodcam.mobi/dataset256.html
This one recognizes especially Asian food very well, and can even differenciate between different types of noodles for example. The bummer is there is no pre-trained model that I can find (if anyone has one, feel free to share), so you'll have to train your own.
Some limitations:
- Most of the models can recognize one food at a time (so if you have 5 things on your plate, you'd need 5 photos, one of every item, or find a way to correctly find the food items and cut their bounding boxes, maybe by asking the user to select areas of the image)
- UECFood256 can solve the problem of validating multiple food at the same time, but you'll have a more complex model to work with.
- Most of the models can't find count (like "3 bananas" or ["detected" => {"banana", "banana", "banana"}]) nor the quantity (like "small banana", "large serving", etc)
- When confidence levels are close, it can be hard to know if it detected multiple food or it's the same food but unsure.