Giter Club home page Giter Club logo

drugnameocr's Introduction

Required Libraries:

Required Natives:

  • javacpp
  • javacpp leptonica
  • javacpp Tesseract
  • openCV 4

NOTE: Library Natives need to be in the root directory of where the runnable jar is located.

Optional Library for Test Cases:

  • java-string-similarity

Execution:

java -jar DrugNameOCR.jar <execution type> <args>

Execution Types:

There are three different execution paths, OCR (OCR), Spell Correction Addition (SA),Candidate Check (CC) and Create Model (CM).

OCR:

This execution type is for when you want to process an image and extract some drug names with OCR.

ARGS:

"<model dir>" "<HMM path>" "<SpellCOrrectionsMap path>" "<UMLS API key>" "<path to google cloud vision credentials json file>" <img 1 args> <img 2 args>...

Required Files:

  • tesseract data folder "tessdata"
  • DrugName.hmm
  • Your generated model files in a directory

Required Accounts:

  • UMLS - When signing up just say you're on working on a project and they will give you a free login. Took a couple days.
  • Google Cloud Account - They do give a certain amount of units free per month for the google cloud vision API. I think it is around 1000 images a month, after that your account will get charged. You also need to follow some of their documentation on how to enable the permissions for your google cloud account to run the cloud vision api and how to get the json credentials file.
IMG ARGS:
<handler specifier> -I="<img path>"

You can have multiple img args to run multiple img processings at once.

Handler Specifier:
-MG is the manual crop specifier to use the google ocr engine
-AT is the automatic crop specifier to use the tesseract ocr engine

Results:

Will be outputted to the same location as the image and the file will be called ".result"

SA:

This execution type is for when you have ascertained a correct spelling for an original OCR result and want to save it into the spell correction map/dictionary.

ARGS:

"<SpellCorrectionMap path>" <ocr result> <correct spelling>

NOTE: The ocr result and correct spelling arg should only be one word each, it cannot be a sentence.

CC:

This execution type is for when you want to get some confidence levels for candidate drug names when compared to the original ocr result.

ARGS:

<ocr result> <candidate 1> <candidate 2>...

You can have multiple candidate words to check against the original ocr result word.

CM:

This execution type is for when you want to create a template model from an example document image.

ARGS:

"<model directory>" "<image directory>'" "<image name>"...

drugnameocr's People

Contributors

jessy1237 avatar

Stargazers

 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.