{"id":23415812,"url":"https://github.com/gutenye/ocr","last_synced_at":"2025-04-05T04:08:24.377Z","repository":{"id":237393485,"uuid":"794459165","full_name":"gutenye/ocr","owner":"gutenye","description":"High accurate text detection (OCR) Javascript/Typescript library that runs on Node.js, Browser, React Native and C++. Based on PaddleOCR and ONNX runtime","archived":false,"fork":false,"pushed_at":"2025-02-19T09:07:49.000Z","size":3997,"stargazers_count":76,"open_issues_count":3,"forks_count":15,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T03:02:15.692Z","etag":null,"topics":["browser","cpp","javascript","node","ocr","onnxruntime","paddleocr","react-native","text-detection","typescript"],"latest_commit_sha":null,"homepage":"https://gutenye-ocr.netlify.app/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gutenye.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-01T08:03:27.000Z","updated_at":"2025-03-28T10:51:58.000Z","dependencies_parsed_at":"2024-06-22T18:58:26.465Z","dependency_job_id":"f8d3633e-7abb-435f-9894-258bb79191c2","html_url":"https://github.com/gutenye/ocr","commit_stats":{"total_commits":222,"total_committers":4,"mean_commits":55.5,"dds":0.05405405405405406,"last_synced_commit":"dc7236a6fb73720a46b3ffad0c82df8d57a3f67b"},"previous_names":["gutenye/ocr"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gutenye%2Focr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gutenye%2Focr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gutenye%2Focr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gutenye%2Focr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gutenye","download_url":"https://codeload.github.com/gutenye/ocr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284942,"owners_count":20913704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","cpp","javascript","node","ocr","onnxruntime","paddleocr","react-native","text-detection","typescript"],"created_at":"2024-12-22T21:28:14.625Z","updated_at":"2025-04-05T04:08:24.322Z","avatar_url":"https://github.com/gutenye.png","language":"C++","readme":"# Guten OCR\n\n\u003e [Demo](https://gutenye-ocr.netlify.app/) | [Roadmap](https://github.com/users/gutenye/projects/5/views/4)\n\n**an OCR Javascript library runs on Node.js, Browser, React Native and C++** \n\nBased on [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR) and [ONNX Runtime](https://github.com/microsoft/onnxruntime), supports PP-OCRv4 model\n\n## Getting Started\n\n### Node\n\n\u003e [Example](./packages/node/example/README.md)\n\n```ts\nbun add @gutenye/ocr-node\nimport Ocr from '@gutenye/ocr-node'\nconst ocr = await Ocr.create()\nconst result = await ocr.detect('a.jpg')\n```\n\n### Browser\n\n\u003e [Example](./packages/browser/example/README.md)\n\n```ts\nbun add @gutenye/ocr-browser\nimport Ocr from '@gutenye/ocr-browser'\nconst ocr = await Ocr.create({\n  models: {\n    detectionPath: '/assets/ch_PP-OCRv4_det_infer.onnx',\n    recognitionPath: '/assets/ch_PP-OCRv4_rec_infer.onnx',\n    dictionaryPath: '/assets/ppocr_keys_v1.txt'\n  }\n})\nconst result = await ocr.detect('/a.jpg')\n```\n\n### React Native\n\n\u003e [Example](./packages/react-native/example/README.md)\n\n```ts\nbun add @gutenye/ocr-react-native\nimport Ocr from '@guenye/ocr-react-native'\nconst ocr = await Ocr.create()\nconst result = await ocr.detect('a.jpg')\n```\n\n### C++\n\n\u003e [Example](./packages/react-native/cpp/example/README.md)\n\n```cpp\n#include \"native-ocr.h\"\nNativeOcr* ocr = new NativeOcr(..)\nauto result = ocr-\u003edetect(\"a.jpg\");\n```\n\n### API Reference\n\n```ts\nOcr.create({\n  models?: {\n    detectionPath: string\n    recognitionPath: string\n    dictionaryPath: string\n  },\n  isDebug?: boolean\n  debugOutputDir?: string // Node only\n  recognitionImageMaxSize?: number // RN only\n  detectionThreshold?: number // RN only\n  detectionBoxThreshold?: number // RN only\n  detectionUnclipRatiop?: number // RN only\n  detectionUseDilate?: boolean // RN only\n  detectionUsePolygonScore?: boolean // RN only\n  useDirectionClassify?: boolean // RN only\n  onnxOptions?: {}       // Node only. Pass to ONNX Runtime\n}): Promise\u003cOcr\u003e\n\nocr.detect(imagePath, { \n  onnxOptions?: {}     // Node only. Pass to ONNX Runtime\n}): Promise\u003c{texts: TextLine[], resizedImageWidth: number, resizedImageHeight: number}\u003e\n\nTextLine {\n  text: string\n  score: number\n  frame: { top, left, width, height }\n}\n\n```\n\n## Development\n\n- Requires Git LFS to clone the repo\n\n```sh\nbrew install git-lfs \ngit clone git@github.com:gutenye/ocr.git\n```\n\n- [Development](docs/Development.md)\n\n## Related Projects\n\n| Name                                                           | Platforms | Note                            |\n| -------------------------------------------------------------- | --------- | ------------------------------- |\n| [eSearch-OCR](https://github.com/xushengfeng/eSearch-OCR)      | Electron  |                                 |\n| [paddleocr-onnx](https://github.com/backrunner/paddleocr-onnx) | Node      | Recogination part is incomplete |\n| [ocrjs](https://github.com/SOVLOOKUP/ocrjs)                    | Node      | Recogination part is incomplete |\n| [Paddle-Lite-Demo](https://github.com/PaddlePaddle/Paddle-Lite-Demo) | Mobile, C++ | |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgutenye%2Focr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgutenye%2Focr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgutenye%2Focr/lists"}