mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2026-09-24 23:33:08 +08:00
add benchmark
This commit is contained in:
+18
-11
@@ -357,11 +357,13 @@ python3.7 deploy/slim/quantization/quant.py -c configs/det/ch_PP-OCRv3/ch_PP-OCR
|
||||
|
||||
|方案|hmeans| 模型大小 |预测速度(lite)|
|
||||
|---|---|------|---|
|
||||
|PP-OCRv3中英文超轻量检测预训练模型 fine-tune|99%| 2.5M ||
|
||||
|PP-OCRv3中英文超轻量检测预训练模型 fine-tune+量化|98.91%| 1M ||
|
||||
|PP-OCRv3中英文超轻量检测预训练模型 fine-tune|99%| 2.5M | 223ms/image |
|
||||
|PP-OCRv3中英文超轻量检测预训练模型 fine-tune+量化|98.91%| 1M | 189ms/image |
|
||||
|
||||
可以看到量化后能显著降低模型体积并且精度几乎无损。
|
||||
|
||||
预测速度是在android骁龙855上预测275张图像的平均耗时。
|
||||
|
||||
#### 4.1.4 模型导出
|
||||
|
||||
使用如下命令可以将训练好的模型进行导出
|
||||
@@ -571,11 +573,13 @@ python3.7 deploy/slim/quantization/quant.py -c configs/rec/PP-OCRv3/ch_PP-OCRv3_
|
||||
|
||||
|方案| acc | 模型大小 |预测速度(lite)|
|
||||
|---|--------|-------|---|
|
||||
|PP-OCRv3中英文超轻量识别预训练模型 fine-tune| 94.54% | 10.3M |
|
||||
|PP-OCRv3中英文超轻量识别预训练模型 fine-tune + 量化| 93.4% | 4.8M |
|
||||
|PP-OCRv3中英文超轻量识别预训练模型 fine-tune| 94.54% | 10.3M | 4.2ms/image |
|
||||
|PP-OCRv3中英文超轻量识别预训练模型 fine-tune + 量化| 93.4% | 4.8M | 1.8ms/image; |
|
||||
|
||||
可以看到量化后能显著降低模型体积,但是由于识别数据过少,量化带来了1%的精度下降。
|
||||
|
||||
预测速度是在android骁龙855上预测5006张识别文字图像的平均耗时。
|
||||
|
||||
#### 4.2.5 模型导出
|
||||
|
||||
使用如下命令可以将训练好的模型进行导出。
|
||||
@@ -618,19 +622,22 @@ python tools/infer/predict_system.py \
|
||||
|
||||
|方案|hmeans| 模型大小 |预测速度(lite)|
|
||||
|---|---|------|---|
|
||||
|PP-OCRv3中英文超轻量检测预训练模型直接预测|76.12%|2.5M|
|
||||
|PP-OCRv3中英文超轻量检测预训练模型 fine-tune|99%| 2.5M ||
|
||||
|PP-OCRv3中英文超轻量检测预训练模型 fine-tune+量化|98.91%| 1M ||
|
||||
|PP-OCRv3中英文超轻量检测预训练模型直接预测|76.12%|2.5M| 223ms/image |
|
||||
|PP-OCRv3中英文超轻量检测预训练模型 fine-tune|99%| 2.5M | 223ms/image |
|
||||
|PP-OCRv3中英文超轻量检测预训练模型 fine-tune+量化|98.91%| 1M | 189ms/image |
|
||||
|
||||
预测速度是在android骁龙855上预测275张图像的平均耗时。
|
||||
|
||||
- 识别
|
||||
|
||||
|方案| acc | 模型大小 |预测速度(lite)|
|
||||
|---|--------|-------|---|
|
||||
|PP-OCRv3中英文超轻量识别预训练模型直接预测| 0% |10.3M||
|
||||
|PP-OCRv3中英文超轻量识别预训练模型直接预测+后处理去掉多识别的`·`| 90.97% |10.3M||
|
||||
|PP-OCRv3中英文超轻量识别预训练模型 fine-tune| 94.54% | 10.3M ||
|
||||
|PP-OCRv3中英文超轻量识别预训练模型 fine-tune + 量化| 94.4% | 4.8M ||
|
||||
|PP-OCRv3中英文超轻量识别预训练模型直接预测| 0% |10.3M| 4.2ms/image |
|
||||
|PP-OCRv3中英文超轻量识别预训练模型直接预测+后处理去掉多识别的`·`| 90.97% |10.3M| 4.2ms/image |
|
||||
|PP-OCRv3中英文超轻量识别预训练模型 fine-tune| 94.54% | 10.3M | 4.2ms/image |
|
||||
|PP-OCRv3中英文超轻量识别预训练模型 fine-tune + 量化| 94.4% | 4.8M | 1.8ms/image |
|
||||
|
||||
预测速度是在android骁龙855上预测5006张识别文字图像的平均耗时。
|
||||
|
||||
- 结论
|
||||
|
||||
|
||||
Reference in New Issue
Block a user