Skip to content

PaddleOCR-Inference-v1.0.1

Latest

Choose a tag to compare

@DingHsun DingHsun released this 25 Jul 19:23
· 2 commits to main since this release

✨ 新功能

  • 內建 Vue 3 + Vite 網頁前端,直接整合進 api_server——開瀏覽器選圖片就能跑 OCR,不用另外裝任何東西。透過 httplib 的 set_mount_point() 跟 API 共用同一個 exe/port。
  • 互動式區域選取:在圖片上拖一個框,Detect 會把候選文字框用紅色疊在圖上,點其中一個就自動 Recognize 該區塊。
  • 新增 README-EN.md 完整英文版,兩份 README 都加上語言切換 badge。
  • 兩份 README 頂端加上 Demo 影片連結。

🐛 修正

  • 修正 TextDetector::detect() 裡的 heap buffer overflow(0xC0000005 access violation)——memcpy 的大小是從模型輸出 tensor 的實際 shape 算出來的,但目的緩衝區卻是用另一個(偶爾對不上)的尺寸配置的。
  • 修正 CMake 在 VS2022(MSVC 19.3x+)上找不到 OpenCV 的問題——官方預編 OpenCV 套件的執行環境自動偵測邏輯比 VS2022 舊。
  • 修正 CMake 輸出目錄變成雙層巢狀(build/Debug/Debug/)。
  • 修正 Release 建置會靜默漏複製 OpenCV DLL 的問題(Post-Build Event 少傳一個參數)。
  • 修正前端在 Recognize 真的沒辨識到文字時完全沒顯示任何東西的問題,現在會跳出警告訊息。

🔧 建置 / 工具鏈

  • 移除舊的 GUI demo 專案——「選圖片試跑 OCR」這個情境現在完全由網頁前端 + api_server 取代。
  • VS2022 每次建置完會自動啟動 api_server.exe(Pre-Build 先關掉舊的、Post-Build 啟動新的)。
  • CMake 建置現在會嵌入跟 VS2022 建置一樣的 Windows 版本資訊(公司/產品名稱、檔案版本),之前是完全沒有。
  • 新增 VSCode 偵錯支援(launch.json、cppvsdbg),F5 直接附加偵錯器,不會再跳「選擇偵錯器」的選單。
  • third_party/ 在 VSCode 裡設成唯讀,避免 vendored 進來的 httplib.h 被不小心重新排版。

📚 文件

  • README 重新調整順序:「前端」章節移到「建置方式」之前,並明確加上建置順序的提醒(前端要先 build 好)。
  • api_server 使用範例補齊(curl/PowerShell/Python,涵蓋 /ocr_detect 跟 /ocr_recognize)。

✨ New

  • Web frontend (Vue 3 + Vite) embedded directly into api_server — open a browser, pick an image, and run OCR without any separate tooling. Served from the same exe/port via httplib's set_mount_point().
  • Interactive region selection: drag a box on the image, Detect shows candidate text boxes in red on top of it, click one to Recognize just that region automatically.
  • README-EN.md — full English translation, with a language-switch badge on both READMEs.
  • Demo video linked at the top of both READMEs.

🐛 Fixes

  • Fixed a heap-buffer-overflow crash (0xC0000005 access violation) in TextDetector::detect() — memcpy size was computed from the model's output tensor shape but the destination buffer was sized from a different (and occasionally mismatched) dimension.
  • Fixed CMake failing to find OpenCV on VS2022 (MSVC 19.3x+) — the prebuilt OpenCV package's runtime-detection logic predates VS2022.
  • Fixed the CMake output directory being double-nested (build/Debug/Debug/).
  • Fixed Release builds silently skipping the OpenCV DLL copy (Post-Build Event was missing an argument).
  • Fixed the frontend showing nothing when Recognize legitimately found no text in the selected region (now shows a warning instead of looking broken).

🔧 Build / Tooling

  • Removed the old GUI demo project — the web frontend now covers that "pick an image and try OCR" use case, backed entirely by api_server.
  • api_server.exe now auto-launches after every Visual Studio build (Pre-Build kills the old instance, Post-Build starts the new one).
  • CMake builds now embed the same Windows version resource (company/product name, file version) as the VS2022 build, instead of having none.
  • Added VSCode debugging support (launch.json, cppvsdbg) so F5 attaches a real debugger without the "select debugger" prompt.
  • third_party/ marked read-only in VSCode to stop vendored code (httplib.h) from getting reformatted by accident.

📚 Docs

  • README restructured: the Frontend section now comes before Building, with explicit notes on build order (frontend has to be built first).
  • api_server usage examples expanded (curl/PowerShell/Python, for both /ocr_detect and /ocr_recognize).