paddleocr推理案例 #16496
            
              paddleocr推理案例
            
            #16496
          
          
        -
| 我运行示例文件 from paddleocr import PaddleOCR
# 初始化 PaddleOCR 实例
ocr = PaddleOCR(
    use_doc_orientation_classify=False,
    use_doc_unwarping=False,
    use_textline_orientation=False)
# 对示例图像执行 OCR 推理 
result = ocr.predict(
    input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png")
    
# 可视化结果并保存 json 结果
for res in result:
    res.print()
    res.save_to_img("output")
    res.save_to_json("output")得到 我现在想得到文本在原始图像中的坐标,应该怎样补充上述的示例代码? | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            liuhongen1234567
          
      
      
        Sep 15, 2025 
      
    
    Replies: 1 comment
-
| 您好,可以查看 PP-OCRv5文档的print参数说明部分,直接调用res["rec_polys"] 就可以获取出来,同时坐标等信息也保存在json文件中,直接从json读取也可以。 | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        scutfrank
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
您好,可以查看 PP-OCRv5文档的print参数说明部分,直接调用res["rec_polys"] 就可以获取出来,同时坐标等信息也保存在json文件中,直接从json读取也可以。