[PP-OCRv6][性能] CPU 推理延迟高、CPU 利用率低 - 需要具有较低延迟的小型模型精度
We are running PaddleOCR as an OCR API on AWS EKS. - PaddleOCR: 3.7.0 - PaddlePaddle: 3.2.0 - PaddleX: 3.7.x - Python: 3.10 - Device: CPU - AWS Region: eu-north-1 - EC2 instance: c6i.xlarge - Instance resources: 4 vCPU / 8 GiB RAM - Pod CPU request/limit: 3500m - Pod memory: 5-6 GiB - Architecture: linux/amd64 Runtime configuration: PADDLEOCR_CPU_THREADS=3 PADDLEOCR_ENABLE_MKLDNN=true OMP_NUM_THREADS=3 MKL_NUM_THREADS=3 OPENBLAS_NUM_THREADS=1 NUMEXPR_NUM_THREADS=1 PADDLEOCR_DET_LIMIT=1024 We tested Tiny models to improve latency: text_detection_model_name="PP-OCRv6_tiny_det" text_recognition_model_name="PP-OCRv6_tiny_rec" Latency improved significantly. However, Tiny causes accuracy problems with small/narrow text in invoice tables. For example, our invoice contains a narrow column: DG with values: 1 1 1 1 ... Some of these values are not captured when using Tiny. We therefore tested: text_detection_model_name="PP-OCRv6_small_det" text_recognition_model_name="PP-OCRv6_tiny_rec" and increased: text_det_limit_side_len=1280 However, the small-text accuracy issue still occurs. Using: text_detection_model_name="PP-OCRv6_small_det" text_recognition_model_name="PP-OCRv6_small_rec" provides better accuracy, but inference latency becomes significantly higher. Therefore we currently have this problem.
内容来源: PaddlePaddle/PaddleOCR