This commit is contained in:
oneao committed 2025-07-24 17:22:24 +08:00
1 parent 34deecb157
commit ba4506baf7
16 files changed
+117 -5

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

@@ -0,0 +1,32 @@
# Windows安装
## 安装
下载网站:https://golang.google.cn/dl/
进入网站后,根据不同的安装方式进行安装即可
![image-20250724101253235](./assets/%E5%AE%89%E8%A3%85%E4%B8%8E%E9%85%8D%E7%BD%AE/image-20250724101253235.png)
这里选择 zip 的方式进行安装,下载好解压缩即可
## 配置环境变量
将 bin 目录添加到环境变量中
![image-20250724101648690](./assets/%E5%AE%89%E8%A3%85%E4%B8%8E%E9%85%8D%E7%BD%AE/image-20250724101648690.png)
## 验证
打开 cmd 进行验证
```bash
go version
```
输出一下信息即代表配置成功
```
go version go1.24.5 windows/amd64
```
@@ -191,3 +191,35 @@ sudo apt install libgl1-mesa-glx
## all input arrays must have the same shap
### 问题原因
- 图像尺寸不一致
### 解决方案
将 batch_size_per_card 设置为 1
```yaml
Eval:
loader:
batch_size_per_card: 1
```
## OSError: cannot open resource
### 问题原因
- 字体路径无效
### 解决方案
将paddleocr里面的字体放到系统字体路径下,例如:
```bash
cp /workspace/PaddleOCR-3.1.0/doc/fonts/simfang.ttf /usr/share/fonts/
```
@@ -0,0 +1,52 @@
# 相关网站
- github:https://github.com/PaddleCV-SIG/PaddleLabel
- 官网:
# 加载自定义模型
## 1. 修改 PPOCRLabel.py
```python
params = {
"use_doc_orientation_classify": False,
"use_doc_unwarping": False,
"use_textline_orientation": True,
"device": self.gpu,
"lang": self.lang,
"text_detection_model_name": "PP-OCRv5_mobile_det", # 修改为自己的模型名称
"text_recognition_model_name": "PP-OCRv5_mobile_rec", # 修改为自己的模型名称
"enable_mkldnn": False,
}
if det_model_dir is not None:
params["text_detection_model_dir"] = det_model_dir
if rec_model_dir is not None:
params["text_recognition_model_dir"] = rec_model_dir
if cls_model_dir is not None:
params["text_line_orientation_model_dir"] = cls_model_dir
self.ocr = PaddleOCR(**params)
self.text_recognizer = TextRecognition(
model_name="PP-OCRv5_mobile_rec", # 修改为自己的模型名称
model_dir=rec_model_dir,
device=self.gpu,
)
self.text_detector = TextDetection(
model_name="PP-OCRv5_mobile_det", # 修改为自己的模型名称
model_dir=det_model_dir,
device=self.gpu,
)
```
## 修改启动命令
```bash
python PPOCRLabel.py --lang ch --kie True --det_model_dir "模型路径" --rec_model_dir "模型路径"
# 示例
python PPOCRLabel.py --lang ch --kie True --det_model_dir ".\model\det_inference\" --rec_model_dir ".\model\rec_inference\"
```
@@ -1,4 +0,0 @@
# 相关网站
- github:https://github.com/PaddleCV-SIG/PaddleLabel
- 官网: