-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e5ee8c5
Showing
76 changed files
with
8,047 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
**/__pycache__ | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
dist | ||
py-service/start.bat | ||
py-service/paddle_model | ||
thrift-src/thrift_ocr_py | ||
thrift-src/thrift_ocr_ts | ||
thrift-src/gen.bat | ||
thrift-src/thrift.exe | ||
out | ||
ocr_server.spec | ||
ai-ocr-darwin-x64.7z | ||
|
||
build/ocr_server | ||
dpkg | ||
my-ocr.deb | ||
aiocr-env | ||
dist-electron | ||
.vscode | ||
release |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 LiuMingye | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# MY-OCR - 基于PaddleOCR的OCR桌面客户端 | ||
|
||
## 1. 简介 | ||
|
||
* MY-OCR是基于PaddleOCR的OCR桌面客户端程序,支持Windows、Linux、MacOS等操作系统。 | ||
* 技术架构 | ||
* 前端界面:Electron + Reactjs + ArcoDesign | ||
* OCR引擎:PaddleOCR + Pyinstaller 打包成独立服务 | ||
* 前端和OCR引擎通信:thrift (跨语言RPC通信框架) | ||
|
||
## 2. 项目目录结构及文件说明 | ||
|
||
```bash | ||
my-ocr | ||
├─public - 前端静态资源目录 | ||
├─src - 前端源码目录 | ||
├─thrift-src - thrift接口定义源码目录 | ||
├─py-service - OCR引擎服务目录 | ||
├─7zr.exe - 命令行版7zip,为了方便打包压缩 | ||
├─logo.icns - mac端图标 | ||
├─logo.ico - windows端图标 | ||
├─logo.png - 图标png格式 | ||
├─main.js - electron主进程入口 | ||
├─package-pyservice-mac.sh - mac端打包OCR引擎服务脚本 | ||
├─package-pyservice-win.bat - windows端打包OCR引擎服务脚本 | ||
├─preload.js - electron渲染进程预加载脚本,定义主题 | ||
``` | ||
|
||
### 3. 软件界面 | ||
|
||
![软件界面](/assets/1665395619954.jpg#pic_center) | ||
|
||
### 4. 功能简介 | ||
|
||
支持批量添加图片、拖动图片到软件界面、粘贴剪贴板的图片进行识别 | ||
|
||
### 5. 编译和打包说明(mac和windows) | ||
|
||
[MY-OCR编译和打包过程(mac版)](/package-mac.md) | ||
|
||
[MY-OCR编译和打包过程(mwindows版)](/package-win.md) | ||
|
||
### 感谢项目 | ||
[ai-ocr: https://github.com/bingal/ai-ocr](https://github.com/bingal/ai-ocr) | ||
|
||
[Umi-OCR: https://github.com/hiroi-sora/Umi-OCR](https://github.com/hiroi-sora/Umi-OCR) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/** | ||
* @see https://www.electron.build/configuration/configuration | ||
*/ | ||
{ | ||
appId: "com.liumingye.my-ocr", | ||
productName: "MY-OCR", | ||
asar: true, | ||
directories: { | ||
output: "release/${version}", | ||
}, | ||
files: ["dist-electron", "dist"], | ||
linux: { | ||
artifactName: "${productName}_${version}_${arch}.${ext}", | ||
target: ["deb"], | ||
icon: "build/logo.ico", | ||
desktop: { | ||
Icon: "build/logo.ico", | ||
}, | ||
}, | ||
mac: { | ||
target: [ | ||
{ | ||
target: "default", | ||
arch: ["x64"], | ||
}, | ||
], | ||
artifactName: "${productName}_${version}_${arch}.${ext}", | ||
target: ["dmg", "zip"], | ||
}, | ||
win: { | ||
target: [ | ||
{ | ||
target: "nsis", | ||
arch: ["x64"], | ||
}, | ||
], | ||
artifactName: "${productName}_${version}_${arch}.${ext}", | ||
icon: "build/logo.ico", | ||
extraFiles: { | ||
from: "./release/ocr_server/", | ||
to: "ocr_server", | ||
}, | ||
}, | ||
nsis: { | ||
oneClick: false, | ||
guid: "0852840C-7E5B-F395-7A62-DFD7BFDBB6DD", | ||
perMachine: true, | ||
allowElevation: true, | ||
allowToChangeInstallationDirectory: true, | ||
installerIcon: "build/logo.ico", | ||
uninstallerIcon: "build/logo.ico", | ||
installerHeaderIcon: "build/logo.ico", | ||
createDesktopShortcut: true, | ||
createStartMenuShortcut: true, | ||
}, | ||
publish: { | ||
provider: "generic", | ||
url: "http://127.0.0.1:5500/", | ||
channel: "latest", | ||
updaterCacheDirName: "my-ocr-updater", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/// <reference types="vite-electron-plugin/electron-env" /> | ||
|
||
declare namespace NodeJS { | ||
interface ProcessEnv { | ||
VSCODE_DEBUG?: "true"; | ||
/** | ||
* The built directory structure | ||
* | ||
* ```tree | ||
* ├─┬ dist-electron | ||
* │ ├─┬ main | ||
* │ │ └── index.js > Electron-Main | ||
* │ └─┬ preload | ||
* │ └── index.mjs > Preload-Scripts | ||
* ├─┬ dist | ||
* │ └── index.html > Electron-Renderer | ||
* ``` | ||
*/ | ||
APP_ROOT: string; | ||
/** /dist/ or /public/ */ | ||
VITE_PUBLIC: string; | ||
} | ||
} |
Oops, something went wrong.