OCR utilities using PaddleOCR
npm install @regolithco/ocrOCR utilities using PaddleOCR, designed for RegolithCo applications. This library provides OCR capabilities for parsing specific game assets like Mining Orders and Rocks, with support for Browser environments.
``bash`
yarn add @regolithco/ocr
This library exports specific parsers for game entities.
`typescript
import { parseShipMiningOrder } from '@regolithco/ocr'
// In Node.js environment
const result = await parseShipMiningOrder('path/to/image.png')
console.log(result)
`
`typescript
import { parseShipRock } from '@regolithco/ocr'
const result = await parseShipRock('path/to/image.png')
console.log(result)
`
Clone the repository and install dependencies:
`bash`
yarn install
- yarn build: Compile TypeScript to dist/.yarn test
- : Run unit tests using Jest.yarn debug
- : Run the PaddleOCR debug script on test images.yarn debug:choose
- : Run the debug script with an interactive file chooser.
1. add it to the appropriate folder.
2. Run yarn debug:choose to see if it works.yarn debug` to see the raw output and adjust the parser.
3. If it doesn't, you can run
ISC