Giter Site home page Giter Site logo

blazorocr's Introduction

๐Ÿ”ฅ Blazing Receipts

A Blazor WebAssembly application for reading receipts

.NET Core

A Blazor WebAssembly application that can read your receipts.

Blazing Receipts

Using the Receipt Understanding Cognitive Service this web application serves as working PoC (not reference) sample of how you can build your own responsive website that can process multiple documents (receipts).

Add a new receipt for recognition

Blazing Receipts - add receipt

Itemized receipts

Blazing Receipts - itemized receipt

View analyzed receipts

Blazing Receipts - view receipts

For an end-to-end demo see here

High level overview

  • Web App - Uploading receipt photos or images via a web browser
  • Web API - Takes file uploads, saves them to Blob Storage and adds the request to a Storage Queue. Serves up receipt information from previous recognition results.
  • Web Worker - Processes requests from the Storage Queue, uses SignalR to send status updates to the end user

Underlying Components

BlazingReceipts.Client

Blazor WebAssembly app - the UI

BlazingReceipts.Server

ASP.NET Web API - the Backend API

BlazingReceipts.Worker

ASP.NET Worker - Does the grunt work

Processes each request - sending to the the Receipt Understanding Cognitive Services, then polls until the service comes back with a result.

Acts a SignalR hub for sending out updates to the end users

BlazingReceipts.Shared

.NET Standard library that is used across all the components

BlazorInputFile

A slightly tweaked version of Steve Sanderson's BlazorInputFile that lets you get the selected file's local blob url

Forms Recognizer - Receipt Understanding Cognitive Service

Computer vision API that can extracts values from scanned receipts. This project now uses the preview API v2.

Requirements

You'll need the following:

  • Forms Recognizer subscription key - sign up for this preview service
  • Azure Storage Connection String - set this both within the BlazingReceipts.ReceiptWorker/appsettings.json and the BlazingReceipts.Server/appsettings.json
  • Forms Recognizer Endpoint - set this within the BlazingReceipts.ReceiptWorker/appsettings.json
  • Forms Recognizer Subscription Key - set this within the BlazingReceipts.ReceiptWorker/appsettings.json

To run locally:

Set Multiple Startup Projects for the solution and include:

  • BlazingReceipts.Server
  • BlazingReceipts.Worker

The default address for the SignalR Hub, within BlazingReceipts.ReceiptWorker/appsettings.json is http://localhost:5000/Hubs/OCRStatusHub

TODO:

Things to get round to include:

  • Add security, currently all receipts are available to all users (not great for production!)
  • Use EXIF data (if available) to ascertain if the scan has been taken portrait or landscape mode and display the preview image accordingly
  • Use batching to send multiple jobs to Cognitive Service API (currently each receipt is processed one at a time)

FAQ

  • Q: What's that awesome font?
  • A: "Diskoteque" by Jakob Fischer
  • Q: How do I get access to the underlying Cognitive Service?
  • A: Sign up here

blazorocr's People

Contributors

daltskin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.