# Snap & Eat (formerly deep139)
Deep Learning Hackathon 48h - Cotidiano (**First place Project =D** )
We believe nutrition tracking should be as simple as taking a picture.
Snap & Eat is a web application that tracks the user's food intake by pictures. We use state-of-the-art deep learning techniques to recognize dishes, making instant nutrition estimates from the user's meals.
The app also suggests meals based on the user's income, and is capable of showing places nearby that serve those dishes.
The system is implemented in Pytorch using [fastai lib](https://github.com/fastai/fastai), relying on Jupyter Notebooks for prototyping purposes. For the web app, we use Flask and Node.js.
## Demo
![test](data/readme-imgs/app_homescreen.jpg)
![Alt Text](data/readme-imgs/snap_n_eat.gif)
## Our model
We use an [Aggregated Residual Convolutional Neural Network](https://arxiv.org/abs/1611.05431) - ResNeXt-101 with 101 layers, pretrained on [ImageNet](http://www.image-net.org/) dataset. We finetune the model on [Food-101 dataset](https://www.vision.ee.ethz.ch/datasets_extra/food-101/), with more than 100 thousand images of 101 types of dishes. We achieve a significant improvement on accuracy (71% in our work compared to 50.1% in [Bossard et al., 2014](http://www.vision.ee.ethz.ch/~lbossard/bossard_eccv14_food-101.pdf)).
![test](data/readme-imgs/food101dataset.png)
For recomending new dishes, we use minimum ditance in an n-dimensional space of nutritional information that describe each dish.
## Installation and usage
### AWS AMI (Amazon Machine Images)
We provide a ready-to-go AMI of a p2 instance on AWS with all libraries and dependencies installed.
| | | |
|-|-|-|
|__AMI ID__| ami-99442ee3 |
|__AMI Name__| snap-n-eat-ami |
||||
To launch an instance based on an AMI, see the [AWS Reference](https://aws.amazon.com/premiumsupport/knowledge-center/launch-instance-custom-ami/). Don't forget to git pull to get the the latest version of the code!
```sh
cd snapandeat
git pull origin master
```
To run all the services, the following four comands need to be run in the AWS instance, once in the ```snapandeat``` directory. We recommend using [tmux](https://github.com/tmux/tmux/wiki) to organize the terminals.
```sh
python src/services/food_predictor.py
```
```sh
python src/services/food_descriptor.py
```
```sh
python src/services/top_food.py
```
```sh
node src/webapp/server.js
```
To view and edit the Jupyter Notebooks, execute:
```sh
cd /home/ubuntu/snapandeat/src/notebooks
jupyter-notebook --no-browser --ip='*'
```
The default password for the notebooks is ```snapneat```. Don't forget to change it!
## About the idea
According to the [World Health Organization](http://www.who.int/en/), worldwide obesity has nearly tripled since 1975. In the United States, almost 75% of the population is overweight and more than half of the population is obese ([OECD](http://www.oecd.org/)). Today, many diseases that were preivously thought as hereditary are now shown to be seen conected to biological disfunction related to nutrition.
Although being healty and eating better is something the vast majority of the population want, doing so usually requires great effort and organization. The lack of an easy and simple way to track nutrition information about the food you eat can easily lead to low engagement. By providing a very easy and fun way to keep track of what the user eat, we can largely improve engagement, and directly atack on of the largest health problems in the world.
没有合适的资源?快使用搜索试试~ 我知道了~
Python-基于Pytorch深度学习的食物检测与推荐营养跟踪
共29个文件
js:6个
py:5个
ejs:4个
需积分: 49 27 下载量 95 浏览量
2019-08-10
01:58:51
上传
评论 9
收藏 18.23MB ZIP 举报
温馨提示
基于Pytorch深度学习的食物检测与推荐(营养跟踪)
资源推荐
资源详情
资源评论
收起资源包目录
Python-基于Pytorch深度学习的食物检测与推荐营养跟踪.zip (29个子文件)
snap-n-eat-master
src
services
food_predictor.py 3KB
utils.py 219B
__init__.py 219B
food_descriptor.py 641B
top_food.py 3KB
notebooks
k_neighbors.ipynb 4KB
ResNeXt.ipynb 7KB
webapp
public
js
suggestions_load.js 1KB
bar_plot_load.js 793B
update.js 2KB
bar_plot.js 3KB
ejs.js 13KB
ejs
bar_plot.ejs 0B
suggestions_list.ejs 995B
views
partials
bar_chart.ejs 719B
pages
index.ejs 17KB
server.js 2KB
package-lock.json 88KB
package.json 415B
LICENSE 1KB
presentation.pdf 2MB
README.md 3KB
data
nutrition_table.ipynb 50KB
nutrition_values.csv 6KB
readme-imgs
food101dataset.png 637KB
food_prediction.jpg 57KB
snap_n_eat.gif 15.78MB
app_homescreen.jpg 36KB
.gitignore 1KB
共 29 条
- 1
资源评论
weixin_39841882
- 粉丝: 443
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功