專案結構重組
- 共用 OCR 核心 (
text_det/text_rec) 抽到src/core,demo與api_server共用同一份邏輯 weights/、images/移到專案根目錄,兩個執行檔共用
新增:api_server (HTTP API)
無 GUI 的常駐服務,適合讓其他服務用 API 呼叫 OCR:
GET /health- 健康檢查POST /ocr_detect- 傳整張圖,回傳偵測到的文字框陣列POST /ocr_recognize- 傳已裁切的單行文字圖,回傳辨識出的文字
建置方式
vs2022/- Visual Studio 2022 解決方案(demo、api_server 兩個專案共同.exe目標資料夾)cmake/- CMakeLists.txt,供 VSCode / CMake Tools 建置
執行檔
- api_server.exe 和 demo.exe 共用資料夾底下的 dll 依賴項目以及 weights 模型權重