In Korean society, food waste is mostly emitted at home. However, after COVID-19, time spent at home rapidly increased due to telecommuting and non-face-to-face activities, which had a significant impact on food waste along with the generalization of food delivery and take-out culture. In addition, animal feed recycled with food waste, which currently accounts for the largest stake in the Korean food waste recycling structure, has been cited as the cause of African swine fever, limiting the market. As a result, there are growing calls to reduce food waste itself. In particular, among the four methods of discharging household food waste in Korea, the method of using a Food Waste Bag is discharged more than other methods, and this method is usually used in single-person households. The proportion of single-person households in South Korea rose to 33.4 percent in 2021 from 15.5 percent in 2000, in contrast to a drop in the proportion of four-person households to 14.7 percent from 31.1 percent during the same period. Considering this trend, the problem of food waste arising from single-person households is expected to become more important in the future.
We have inspired this project by the Zero Waste, Zero Hunger campaign, and Plan Drawdown. It shocked us that around the world, food waste is handled by around 8 percent of total anthropogenic greenhouse gas emissions every year and that most of the food waste comes from the household. The issue of food waste in Korea is relatively less emphasized than other climate crises. Since the settlement of the pay-as-you-go emission system more than a decade ago, the issue has received little attention. Our team also lives in a single-person household, but no one actually knows how much food waste they throw away every month. Therefore, I wanted to guide individuals' practical actions, not only to emphasize fear and crisis in the climate crisis. It aims to encourage individuals to reduce food waste by reminding them of the climate behaviors and effects that individuals can practice in their daily lives.
Show the guide on the difference between Sell-by-date and use by date while running the app.
- AWS
- Develop
- OCR
[The problem was deploying OCR model as a rest API with flask]
The model is perfectly optimized to recognize food name on receipt written in Korean, but the volume was so big. To deploy the model as SaaS, we have to solve some problems. First, the model depends on a lot of libraries, so concerned with version conflict between those. Second, if only one library doesn’t work well, all the model’s code cannot be run. Third, most critically, we cannot be convinced that the model can be run regardless of the computer environment. All problem was related to huge size of model and sticky connection of dependencies.
[The solution was simple and the best, docker]
We adjust the libraries’ version carefully to build a docker image with the OCR model and flask server. After modifying the libraries’ version, we build docker image successfully and the image works well in the docker container. We succeeded to run the model with docker on Ubuntu, Mac, and Window regardless of OS version. By using docker, we solved all conflicts generated by big sized and dependencies.
[The last problem with deploying was that it only runs based on GPU]
Although we use docker and solved environmental problems completely, it remains that the model needs GPU. So if the user wants to test the model without GPU, it doesn’t work. To solve this problem, we build the model based on CPU. It is little bit slow but works very well only using CPU. So we addressed the challenge thoroughly.
1. Install Flutter
- You can install flutter with official document of Flutter.
- Follow step by step.
- Link - Install Flutter
2. You can launch this Demo Application on any devices(emulator), but we recommand use: IPHONE 12 Pro / over (v.) iOS 15
3. Type below scripts in the command prompt(or Bash)
cd {root directory of this proejct}
flutter doctor
flutter pub get
flutter run
HOW TO INSTALL DOCKER?
- Ubuntu
sudo apt update
sudo apt install docker.io
- Mac, Window
Use Docker Desktop. YOU CAN INSTALL HERE
2. Installation: HOW TO RUN?
- Pull Docker Image
sudo docker pull sunnyineverywhere/fridge-api-springboot
- Launch Docker Image In Conatainer
sudo docker run -d -p 8080:8080 sunnyineverywhere/fridge-api-springboot
HOW TO INSTALL DOCKER?
- Ubuntu
sudo apt update
sudo apt install docker.io
- Mac, Window
Use Docker Desktop. YOU CAN INSTALL HERE
2-1. Installation - GPU
- Pull Docker Image
sudo docker pull sunnyineverywhere/fridge-ocr-flask
- Usage
You can test the OCR demonstration on your recipt image by running the
Flask
api.
sudo docker run -d -p 5000:5000 sunnyineverywhere/fridge-ocr-flask
2-2. Installation - CPU
- Pull Docker Image
sudo docker pull sunnyineverywhere/fridge-ocr-flask-cpu
- Usage
You can test the OCR demonstration on your recipt image by running the
Flask
api.
sudo docker run -d -p 5000:5000 sunnyineverywhere/fridge-ocr-flask-cpu
- The demo is available in
localhost:5000/model
if you wish to test the result viaPostman
.- The demo is available in
localhost:5000/demo
if you wish to test the result by uploading the image via web.
Hyojung Yoon | 이선의 | 이지혜 |
client, server, product degisn | client, server, Dev&ML Ops | OCR |
- Scene Text Detection with Polygon Offsetting and Border Augmentation
2020.1.8 발행 학술지: MDPI 논문 저자: Thananop Kobchaisawat, Thanarat H. Chalidabhongse, Shin’ichi Satoh
- Detecting Text in Natural Image with Connectionist Text Proposal Network
2016.9.16 발행 학술지: CVPR 논문 저자: Zhi Tian, Weilin Huang, Tong He, Pan He, Yu Qiao
- what is wrong with scene text recognition model comparisons? datasets and model analysis
2019.12.18 발행 학술지: CVPR 논문 저자: Jeonghun Baek, Geewook Kim, Junyeop Lee, Sungrae Park, Dongyoon Han, Sangdoo Yun, Seong Joon Oh, Hwalsuk Lee
- Character decomposition to resolve class imbalance problem in Hangul OCR
2022.9.28 발행 학술지: CVPR 논문 저자: Geonuk Kim, Jaemin Son, Kanghyu Lee, Jaesik Min
- What Is Wrong With Scene Text Recognition Model Comparisons? Dataset and Model Analysis
2019.4.3 발행 학술지: ICCV 논문 저자: Jeonghun Baek, Geewook Kim, Junyeop Lee, Sungrae Park, Dongyoon Han, Sangdoo Yun, Seong Joon Oh, Hwalsuk Lee