| 12345678910111213141516171819202122232425262728 |
- from paddleocr import PaddleOCRVL
- # ═══════ 测试配置:改这里就行 ═══════
- TEST_IMAGE = r"C:\Users\Administrator\PycharmProjects\project\tbsg\screenshots\IZKBKVGITC7X6LQO\step3\step3_b0_crop_debug.png" # 改成你的截图路径
- # ═══════════════════════════════════
- pipeline = PaddleOCRVL() # 首次运行自动下载 PaddleOCR-VL-1.6 模型
- output = pipeline.predict(TEST_IMAGE)
- for res in output:
- res.print() # 打印识别结果
- res.save_to_markdown("output") # 保存为 markdown
- # from paddleocr import PaddleOCR
- #
- # # ═══════ 测试配置 ═══════
- # TEST_IMAGE = r"C:\Users\Administrator\PycharmProjects\project\tbsg\screenshots\DEZXWKUC7DJBLVPJ\step3\step3_b0.png"
- # # ═══════════════════════
- #
- # ocr = PaddleOCR(
- # use_doc_orientation_classify=False,
- # use_doc_unwarping=False,
- # use_textline_orientation=False,
- # enable_mkldnn=False, # ← 加这一行,绕过 oneDNN 的 bug
- # )
- # result = ocr.predict(TEST_IMAGE)
- # for res in result:
- # res.print()
- # res.save_to_json("output_ppocr")
|