diff --git a/README.md b/README.md index b3bc578bd7..bc74d1f350 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ English | [简体中文](./readme/README_cn.md) | [繁體中文](./readme/README - Released PaddleOCR-VL: - **Model Introduction**: - - **PaddleOCR-VL** is a SOTA and resource-efficient model tailored for document parsing. Its core component is PaddleOCR-VL-0.9B, a compact yet powerful vision-language model (VLM) that integrates a NaViT-style dynamic resolution visual encoder with the ERNIE-4.5-0.3B language model to enable accurate element recognition. **This innovative model efficiently supports 109 languages and excels in recognizing complex elements (e.g., text, tables, formulas, and charts), while maintaining minimal resource consumption**. Through comprehensive evaluations on widely used public benchmarks and in-house benchmarks, PaddleOCR-VL achieves SOTA performance in both page-level document parsing and element-level recognition. It significantly outperforms existing solutions, exhibits strong competitiveness against top-tier VLMs, and delivers fast inference speeds. These strengths make it highly suitable for practical deployment in real-world scenarios. The model has been released on [HuggingFace](https://huggingface.co/PaddlePaddle/PaddleOCR-VL). Everyone is welcome to download and use it! More introduction infomation can be found in [PaddleOCR-VL](https://www.paddleocr.ai/latest/version3.x/algorithm/PaddleOCR-VL/PaddleOCR-VL.html). + - **PaddleOCR-VL** is a SOTA and resource-efficient model tailored for document parsing. Its core component is PaddleOCR-VL-0.9B, a compact yet powerful vision-language model (VLM) that integrates a NaViT-style dynamic resolution visual encoder with the ERNIE-4.5-0.3B language model to enable accurate element recognition. **This innovative model efficiently supports 109 languages and excels in recognizing complex elements (e.g., text, tables, formulas, and charts), while maintaining minimal resource consumption**. Through comprehensive evaluations on widely used public benchmarks and in-house benchmarks, PaddleOCR-VL achieves SOTA performance in both page-level document parsing and element-level recognition. It significantly outperforms existing solutions, exhibits strong competitiveness against top-tier VLMs, and delivers fast inference speeds. These strengths make it highly suitable for practical deployment in real-world scenarios. The model has been released on [HuggingFace](https://huggingface.co/PaddlePaddle/PaddleOCR-VL). Everyone is welcome to download and use it! More introduction information can be found in [PaddleOCR-VL](https://www.paddleocr.ai/latest/version3.x/algorithm/PaddleOCR-VL/PaddleOCR-VL.html). - **Core Features**: - **Compact yet Powerful VLM Architecture**: We present a novel vision-language model that is specifically designed for resource-efficient inference, achieving outstanding performance in element recognition. By integrating a NaViT-style dynamic high-resolution visual encoder with the lightweight ERNIE-4.5-0.3B language model, we significantly enhance the model’s recognition capabilities and decoding efficiency. This integration maintains high accuracy while reducing computational demands, making it well-suited for efficient and practical document processing applications. diff --git a/tools/infer_rec.py b/tools/infer_rec.py index bab978032d..be00880eb4 100755 --- a/tools/infer_rec.py +++ b/tools/infer_rec.py @@ -120,7 +120,7 @@ def main(): elif config["Architecture"]["algorithm"] == "SAR": op[op_name]["keep_keys"] = ["image", "valid_ratio"] elif config["Architecture"]["algorithm"] == "RobustScanner": - op[op_name]["keep_keys"] = ["image", "valid_ratio", "word_positons"] + op[op_name]["keep_keys"] = ["image", "valid_ratio", "word_positions"] else: op[op_name]["keep_keys"] = ["image"] transforms.append(op) @@ -171,10 +171,10 @@ def main(): img_metas = [paddle.to_tensor(valid_ratio)] if config["Architecture"]["algorithm"] == "RobustScanner": valid_ratio = np.expand_dims(batch[1], axis=0) - word_positons = np.expand_dims(batch[2], axis=0) + word_positions = np.expand_dims(batch[2], axis=0) img_metas = [ paddle.to_tensor(valid_ratio), - paddle.to_tensor(word_positons), + paddle.to_tensor(word_positions), ] if config["Architecture"]["algorithm"] == "CAN": image_mask = paddle.ones(