GithubHelp home page GithubHelp logo

navneetkrc / ocr-viewer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from whwnsdlr1/ocr-viewer

0.0 1.0 0.0 3.77 MB

Web application for easy and convenient viewing of OCR results.

License: MIT License

JavaScript 31.98% Python 5.20% HTML 2.16% Vue 60.66%

ocr-viewer's Introduction

ocr-viewer

Alt Text
Web application for easy and convenient viewing of OCR results.
You can easily open the image (drag and drop) and draw a text area on the image in real time (in the browser) so you can select and view only the text area you want.

install

git clone https://github.com/whwnsdlr1/ocr-viewer
cd ocr-viewer
yarn install
yarn run serve

and access to http://localhost:port

Demo (own OCR)

  1. Implement your own recognizeImpl function in ocr-viewer> src> js> recognize.js. See the comment of the function.
  2. Input the image in the web app(http://localhost:port)

Demo (PaddleOCR)

  1. Install python packages and Run websocket server
cd backend_example
pip install -r requirements_paddle_ocr.txt
python websocket_paddle_ocr.py
  1. Input the image in the web app(http://localhost:port)

Demo (EasyOCR)

  1. Install pytorch
  2. Install python packages and Run websocket server
cd backend_example
pip install -r requirements_easy_ocr.txt
python websocket_easy_ocr.py
  1. Input the image in the web app(http://localhost:port)

Control

  • Image Input
    • Drag and drop
    • Using File dialog (top input element)
  • Image Frame
    • left mouse & touch drag - panning
    • mouse wheel & pinch to zoom - zoom in / out
    • right mouse drag - adjust brightness and contrast
  • Result Frame
    • You can search for the text you want. Only the searched text is displayed above the image.
    • Hover over the text badge to see the probability.
    • When you click a text badge, the clicked text is highlighted and displayed above the image.

options

  • Modify the code below to change the box color.
// ocr-viewer > src > components > Frame.vue
<script>
export default {
    ...
    data: function () {
        return {
            ...
            style: {
                boxColor: '#FFFF00',
                highlightBoxColor: '#FF0000'
            }
            ...
        }
    }
    ...
}
</script>
  • Modify the code below to change the box line width.
// ocr-viewer > src > plugins > cornerstoneToolsPlugin.js
export default {
  install: function (Vue) {
    ...
    cornerstoneTools.toolStyle.setToolWidth(2);
    ...
  }
}

Browser support - (tested)

  • Google Chrome 89+
  • Mozilla FireFox 85+

ocr-viewer's People

Contributors

whwnsdlr1 avatar

Watchers

 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.