/TicketOCR

Primary LanguagePython


Logo

Shopium Scan API

The Following is a general presentaion of our project
Explore the docs »

View Demo · Report Bug · Request Feature




Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contact

About The Project

  • Shopium Scan API is an artificial intelligence module made for Shopium to scan users sales receipts for data extraction and classification.

  • The data classification of this project is based on pre-defined Regex patterns to identify different kinds of data in a raw extracted text.

(back to top)

Built With

This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.

(back to top)

Getting Started

Before we proceed , this project was designed to run those different tasks :

  1. Receipt's Image URL Reading
  2. Image Processing
  3. Data Extraction
  4. Data Classification
  5. Return a well-structured JSON object



Installation

Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.

  1. Clone the repo

    git clone https://github.com/firas122/scan
  2. Install pip packages

    pip install -r requirements.txt
  3. Run the API using (the application will be running on localhost ip address using 5000 as port)

    python /project_directory_path/scan/api.py

(back to top)



Usage

  • Terminal output will include an url by default 127.0.0.1 (localhost) running on port 5000 using the path /do

  • Send a POST request to that url with one variable url that represents the receipt image on using the platform you wish to use (postman for example) :





Logo


  • And the resulting JSON Object should look like this one :

  {
    "date": "24/02/2021",
    "name": "Monoprix",
    "products": [
        {
            "pname": "TAMPON EPONGE A RE ",
            "pquantity": 1,
            "ptotal": 1230.0,
            "pupri": 1230.0
        },
        {
            "pname": "YAGURT AU FRUITS F ",
            "pquantity": 2,
            "ptotal": 1440.0,
            "pupri": 720.0
        },
        {
            "pname": "YROURT AU FRUIT CE ",
            "pquantity": 1,
            "ptotal": 720.0,
            "pupri": 720.0
        },
        {
            "pname": "BANANE IMPORTEE. ",
            "pquantity": 1,
            "ptotal": 2090.0,
            "pupri": 2090.0
        }
    ],
    "time": "14:02",
    "total": 5480.0
}

Roadmap

  • Image Processing
  • Data Extraction
  • Data classification
  • Multi-Ticket Forms support
  • Design a Machine learning approach

(back to top)

Contact

Shopium - @Shopium - shopium.local@gmail.com

Project Link: https://github.com/firas122/Scan

(back to top)