SyedAsimAliSE / ocr-reader-api

ocr-reader-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

ocr-reader-api

App Requirements

  • MongoDB
  • NodeJS Latest LTS

Installation

# 1 - Install [tesseract project] (https://github.com/tesseract-ocr/tessdoc/blob/master/Installation.md)

# FOR LINUX Debian/Ubuntu
sudo apt install tesseract-ocr

# 2 - Install Project Dependencies
npm install

Running the app

# With nodemon watch
npm run --prefix start:dev:nodemon

# Production mode
npm run start:prod

Using the app

# With nodemon watch
curl --header "Content-Type: application/json" \
    --request POST \
    --data '{"imageUrl": "https://i.stack.imgur.com/t3qWG.png"}' \
    http://localhost:9011/read

./images/ocr.png ./images/result.png

App Package Structure

./images/dir.png

App Configurations

  • Check environments package
# Rename [.env.sample] file to [.env]

# Set Mongo DB URI
MONGO_DB_URI=mongodb://username:password@localhost:27018

Important Links

Todo

  • Queue implementation.
  • Accept multiple Urls.
  • API to read the Collection from DB.
  • Docker Setup

About

ocr-reader-api


Languages

Language:TypeScript 79.3%Language:JavaScript 19.4%Language:Shell 1.3%