xushengfeng / esearch-ocr Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Symbol search path is: *** Invalid ***
Executable search path is:
Windows 8 Version 9600 MP (2 procs) Free x64
Product: WinNt, suite: SingleUserTS
Built by: 6.3.9600.17031 (winblue_gdr.140221-1952)
Machine Name:
Debug session time: Mon Jul 11 10:05:04.000 2022 (UTC + 8:00)
System Uptime: not available
Process Uptime: 0 days 0:00:01.000
............................................
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(1c80.1fd8): Unknown exception - code c0000142 (first/second chance not available)
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -
ntdll!RtlRaiseStatus+0x20:
00007ffb04c0cdd0 488b85b8000000 mov rax,qword ptr [rbp+0B8h] ss:00000001
a1ccf3d8=00007ffb04c0cdd0
感谢作者在 PaddleOCR 的 js 部署方面做的工作,我尝试使用 esearch-OCR
在浏览器环境部署,但是遇到了一些问题,不知道应该如何解决。
主要操作:
import * as ocr from "esearch-ocr";
async function start() {
const res = await axios.get("/ocr_keys_v1.txt");
console.log(res);
await ocr.init({
detPath: "ocr_det.onnx",
recPath: "ocr_rec.onnx",
dic: res.data,
node: false,
});
let img = document.getElementById("ocr-image");
let canvas = document.createElement("canvas");
canvas.width = img.width;
canvas.height = img.height;
canvas.getContext("2d").drawImage(img, 0, 0);
const result = await ocr.ocr(
canvas.getContext("2d").getImageData(0, 0, img.width, img.height)
);
setResult(result.reduce((total, cur) => total + `${cur.text}\n`));
}
本地 pnpm dev
没有问题,一旦build之后就会报错 Uncaught ReferenceError: require is not defined
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.