Skip to content

The nutrition table extractor from Thai food packages. Mini project in Computer Vision class.

Notifications You must be signed in to change notification settings

phongsathorn1/Thai-Nutrition-Table-Extraction

Repository files navigation

Thai Nutrition Table Extraction

Thai-Nutrition-Table-Extraction on GitHub

This project is created to extract data form Nutrition Table by using computer vision technique to help user collect data about nutrition for using with Health care application, Fitness app, etc.

NOTICE Thank to text-detection-ctpn and Tesseract, we using their source code for detect and recognize text in nutrition table.


Requirement

  • Computer running Linux or MacOS
  • Python 3.7.1 or later
  • Pip 20.1 or later

Setup

  1. Install Python libraries.
pip install -r requirements.txt
  1. Check directory text_detection/checkpoints_mlt. If directory not exists, download the file from google drive or baidu yun. Then extract file and put checkpoints_mlt/ in text-detection/.

  2. Setup nms and bbox. Because of the libraries are written in Cython, hence you have to build the library by using follow command.

cd text_detection/utils/bbox
chmod +x make.sh
./make.sh
  1. Install Tesseract by following this document.

  2. Install Tesseract pretrained to supporting Thai language by going to this page and download tha.traineddata. Then set the TESSDATA_PREFIX environment variable and put file in ESSDATA_PREFIX/tessdata/tha.traineddata.

Dataset

  • The Thai Nutrition Table images are in images/ directory.

Demo

  • Run main.py to see result.
python main.py

About

The nutrition table extractor from Thai food packages. Mini project in Computer Vision class.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published