@qvac/ocr-ggml 0.28.0 → 0.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -112,7 +112,7 @@ means the check could not reach a reliable capacity verdict.
112
112
  ```js
113
113
  const { assessFit } = require('@qvac/ocr-ggml')
114
114
 
115
- const fit = assessFit({
115
+ const fit = await assessFit({
116
116
  pathDetector: '/abs/path/craft_mlt_25k.gguf',
117
117
  pathRecognizer: '/abs/path/latin_g2.gguf',
118
118
  backendDevice: 'cpu',
@@ -121,6 +121,9 @@ const fit = assessFit({
121
121
  console.log(fit.status, fit.reason, fit.report)
122
122
  ```
123
123
 
124
+ `assessFit` returns a Promise. Concurrent calls run one at a time. An invalid
125
+ request rejects.
126
+
124
127
  Use the same `pipelineType`, `backendDevice`, `gpuDevice`, and `main-gpu`
125
128
  settings intended for the eventual `OcrGgml` load. DocTR configurations that
126
129
  place stages on different devices return `error` with `unsupported-config`
package/fit.d.ts CHANGED
@@ -19,5 +19,7 @@ export interface OcrFitResult {
19
19
  * Assess loading the detector and recognizer weights from GGUF metadata.
20
20
  * This does not load weights or account for image-dependent inference memory.
21
21
  * `error` means no reliable capacity verdict was available.
22
+ *
23
+ * Concurrent calls run one at a time. An invalid request rejects.
22
24
  */
23
- export declare function assessFit(request: OcrFitRequest): OcrFitResult;
25
+ export declare function assessFit(request: OcrFitRequest): Promise<OcrFitResult>;
package/fit.js CHANGED
@@ -7,8 +7,10 @@ const path = require('bare-path')
7
7
  * Assess loading the detector and recognizer weights from GGUF metadata.
8
8
  * This does not load weights or account for image-dependent inference memory.
9
9
  * `error` means no reliable capacity verdict was available.
10
+ *
11
+ * Concurrent calls run one at a time. An invalid request rejects.
10
12
  */
11
- function assessFit(request) {
13
+ async function assessFit(request) {
12
14
  for (const key of ['pathDetector', 'pathRecognizer']) {
13
15
  if (typeof request[key] !== 'string' || !path.isAbsolute(request[key])) {
14
16
  throw new TypeError(`${key} must be an absolute path`)
@@ -23,5 +25,5 @@ function assessFit(request) {
23
25
  // Resolve lazily so importing this package never loads the native binding.
24
26
  // eslint-disable-next-line @typescript-eslint/no-require-imports -- native prebuild is resolved lazily.
25
27
  const binding = require('./binding')
26
- return binding.assessFit(request)
28
+ return await binding.assessFit(request)
27
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qvac/ocr-ggml",
3
- "version": "0.28.0",
3
+ "version": "0.29.1",
4
4
  "description": "GGML-backed OCR addon for qvac (EasyOCR and DocTR pipelines on GGUF weights)",
5
5
  "addon": true,
6
6
  "engines": {
@@ -27,7 +27,7 @@
27
27
  "test:mobile:groups": "node --test scripts/__tests__/mobile-test-groups.test.js",
28
28
  "test:package": "node --test test/package/package-contract.test.js",
29
29
  "test:integration:generate": "brittle -r test/integration/all.js test/integration/*.test.js && npm run test:mobile:generate",
30
- "test:integration": "npm run test:integration:generate && bash test/integration/run-tests.sh",
30
+ "test:integration": "npm run test:integration:generate && bare test/integration/fit.test.js && bash test/integration/run-tests.sh",
31
31
  "test:mobile:generate": "bare ./scripts/generate-mobile-integration-tests.js",
32
32
  "test:mobile:validate": "node scripts/validate-mobile-tests.js",
33
33
  "test": "npm run lint && npm run test:types && npm run test:unit && npm run test:integration",
@@ -77,8 +77,8 @@
77
77
  "bugs": "https://github.com/tetherto/qvac/issues",
78
78
  "homepage": "https://qvac.tether.io",
79
79
  "devDependencies": {
80
- "@qvac/fabric-android-arm64": "0.21.1",
81
- "@qvac/fabric-ios": "0.21.1",
80
+ "@qvac/fabric-android-arm64": "0.22.0",
81
+ "@qvac/fabric-ios": "0.22.0",
82
82
  "@qvac/registry-client": "^0.4.0",
83
83
  "@types/node": "^24.2.1",
84
84
  "bare-stream": "^2.7.0",
@@ -99,8 +99,8 @@
99
99
  },
100
100
  "dependencies": {
101
101
  "@qvac/error": "^0.1.0",
102
- "@qvac/fabric": "^0.21.1",
103
- "@qvac/infer-base": "^0.6.2",
102
+ "@qvac/fabric": "^0.22.0",
103
+ "@qvac/infer-base": "^0.8.0",
104
104
  "@qvac/logging": "^0.1.0",
105
105
  "bare-fetch": "^3.0.1",
106
106
  "bare-fs": "^4.5.1",
@@ -111,15 +111,15 @@
111
111
  "brittle": "^3.4.0"
112
112
  },
113
113
  "optionalDependencies": {
114
- "@qvac/fabric-linux-x64": "^0.21.1",
115
- "@qvac/fabric-linux-arm64": "^0.21.1",
116
- "@qvac/fabric-darwin-arm64": "^0.21.1",
117
- "@qvac/fabric-darwin-x64": "^0.21.1",
118
- "@qvac/fabric-win32-x64": "^0.21.1"
114
+ "@qvac/fabric-linux-x64": "^0.22.0",
115
+ "@qvac/fabric-linux-arm64": "^0.22.0",
116
+ "@qvac/fabric-darwin-arm64": "^0.22.0",
117
+ "@qvac/fabric-darwin-x64": "^0.22.0",
118
+ "@qvac/fabric-win32-x64": "^0.22.0"
119
119
  },
120
120
  "peerDependencies": {
121
- "@qvac/fabric-android-arm64": "^0.21.1",
122
- "@qvac/fabric-ios": "^0.21.1"
121
+ "@qvac/fabric-android-arm64": "^0.22.0",
122
+ "@qvac/fabric-ios": "^0.22.0"
123
123
  },
124
124
  "peerDependenciesMeta": {
125
125
  "@qvac/fabric-android-arm64": {
@@ -7,7 +7,7 @@
7
7
  ],
8
8
  "current_versions": [
9
9
  {
10
- "version": "0.28"
10
+ "version": "0.29.1"
11
11
  }
12
12
  ],
13
13
  "exported_symbols": [
@@ -3180,10 +3180,10 @@
3180
3180
  "_png_get_cHRM_fixed",
3181
3181
  "_jsimd_h2v1_fancy_upsample",
3182
3182
  "__ZN2cv3minEdRKNS_3MatE",
3183
- "__ZN2cvmiERKNS_3MatERKNS_7Scalar_IdEE",
3183
+ "__ZN2cv4readERKNS_8FileNodeERNSt3__16vectorINS_6DMatchENS3_9allocatorIS5_EEEE",
3184
3184
  "_TIFFYCbCrToRGBInit",
3185
3185
  "__Z7cvTruncRKN2cv9softfloatE",
3186
- "__ZN2cv4readERKNS_8FileNodeERNSt3__16vectorINS_6DMatchENS3_9allocatorIS5_EEEE",
3186
+ "__ZN2cvmiERKNS_3MatERKNS_7Scalar_IdEE",
3187
3187
  "_TIFFErrorExtR",
3188
3188
  "__ZN2cv3hal6mul16sEPKsmS2_mPsmiiPv",
3189
3189
  "__ZN2cv10softdoubleC1Ey",
@@ -3207,13 +3207,16 @@
3207
3207
  ],
3208
3208
  "weak": [
3209
3209
  "__ZZZN28qvac_lib_inference_addon_cpp16OutputCallBackJs26initializeProcessingThreadENSt3__110shared_ptrINS_11OutputQueueEEEENKUlvE_clEvENUlP11uv_handle_sE_8__invokeES7_",
3210
+ "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask10onCompleteIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEvP10uv_async_s",
3210
3211
  "__ZZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask5startINSt3__19monostateEEEP10js_value_sP8js_env_sNS1_12CallbackDataIT_E4WorkENSB_7MarshalEENUlP11uv_handle_sE_8__invokeESF_",
3212
+ "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onEnvTeardownIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEvP22js_deferred_teardown_sPv",
3211
3213
  "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onCloseHandleINSt3__19monostateEEEvP11uv_handle_s",
3212
3214
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface8activateEP8js_env_sP18js_callback_info_s",
3213
3215
  "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onEnvTeardownINSt3__19monostateEEEvP22js_deferred_teardown_sPv",
3214
3216
  "__ZZN28qvac_lib_inference_addon_cpp6logger8JsLogger22closeAsyncHandleLockedEvENUlP11uv_handle_sE_8__invokeES3_",
3215
3217
  "__ZN23qvac_lib_infer_ocr_ggml14createInstanceEP8js_env_sP18js_callback_info_s",
3216
3218
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger13asyncCallbackEP10uv_async_s",
3219
+ "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onCloseHandleIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEvP11uv_handle_s",
3217
3220
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface9setLoggerEP8js_env_sP18js_callback_info_s",
3218
3221
  "__ZN23qvac_lib_infer_ocr_ggml9assessFitEP8js_env_sP18js_callback_info_s",
3219
3222
  "__ZN28qvac_lib_inference_addon_cpp16OutputCallBackJs16jsOutputCallbackEP10uv_async_s",
@@ -3225,6 +3228,7 @@
3225
3228
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger13onEnvTeardownEPv",
3226
3229
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface11loadWeightsEP8js_env_sP18js_callback_info_s",
3227
3230
  "__ZN28qvac_lib_inference_addon_cpp16OutputCallBackJs13onEnvTeardownEPv",
3231
+ "__ZZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask5startIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEP10js_value_sP8js_env_sNS1_12CallbackDataIT_E4WorkENSC_7MarshalEENUlP11uv_handle_sE_8__invokeESG_",
3228
3232
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface13releaseLoggerEP8js_env_sP18js_callback_info_s",
3229
3233
  "__ZN23qvac_lib_infer_ocr_ggml14getBackendInfoEP8js_env_sP18js_callback_info_s"
3230
3234
  ]
@@ -7,7 +7,7 @@
7
7
  ],
8
8
  "current_versions": [
9
9
  {
10
- "version": "0.28"
10
+ "version": "0.29.1"
11
11
  }
12
12
  ],
13
13
  "exported_symbols": [
@@ -104,9 +104,11 @@
104
104
  "__ZTIZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask3runIZNS_7AddonJs9cancelJobENSt3__18optionalIyEEEUlvE0_EEP10js_value_sP8js_env_sOT_EUlSB_RKNS4_9monostateEE_",
105
105
  "__ZTSN28qvac_lib_inference_addon_cpp5model6IModelE",
106
106
  "__ZTIN28qvac_lib_inference_addon_cpp9out_handl21JsLogMsgOutputHandlerE",
107
+ "__ZTINSt3__110__function6__funcIPFP10js_value_sP8js_env_sRKN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEENS_9allocatorISC_EESB_EE",
107
108
  "__ZTSZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask3runIZNS_7AddonJs9cancelJobENSt3__18optionalIyEEEUlvE0_EEP10js_value_sP8js_env_sOT_EUlSB_RKNS4_9monostateEE_",
108
109
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger6state_E",
109
110
  "__ZTSN28qvac_lib_inference_addon_cpp5model12IModelCancelE",
111
+ "__ZTSFP10js_value_sP8js_env_sRKN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEE",
110
112
  "__ZTINSt3__110__function6__baseIFP10js_value_sRKN28qvac_lib_inference_addon_cpp6Output5ErrorEEEE",
111
113
  "__ZTSNSt3__110__function6__funcIZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask3runIZNS2_7AddonJs9cancelJobENS_8optionalIyEEEUlvE1_EEP10js_value_sP8js_env_sOT_EUlvE_NS_9allocatorISG_EEFNS_9monostateEvEEE",
112
114
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger13logger_async_E",
@@ -143,12 +145,14 @@
143
145
  "__ZTSN28qvac_lib_inference_addon_cpp9out_handl27JsRuntimeStatsOutputHandlerE",
144
146
  "__ZTINSt3__117bad_function_callE",
145
147
  "__ZTSN28qvac_lib_inference_addon_cpp23OutputCallBackInterfaceE",
148
+ "__ZTSZN23qvac_lib_infer_ocr_ggml9assessFitEP8js_env_sP18js_callback_info_sEUlvE_",
146
149
  "__ZTSN28qvac_lib_inference_addon_cpp9out_handl24JsOutputHandlerInterfaceE",
147
150
  "__ZTINSt3__120__shared_ptr_pointerIPN2cv15ImageCollection4ImplENS_10shared_ptrIS3_E27__shared_ptr_default_deleteIS3_S3_EENS_9allocatorIS3_EEEE",
148
151
  "__ZTSZN28qvac_lib_inference_addon_cpp9out_handl21JsLogMsgOutputHandlerC1EvEUlRKNS_6Output6LogMsgEE_",
149
152
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger12queue_mutex_E",
150
153
  "__ZTSN28qvac_lib_inference_addon_cpp6Output5ErrorE",
151
154
  "__ZTSN28qvac_lib_inference_addon_cpp9out_handl19JsBaseOutputHandlerINS_6Output5ErrorEEE",
155
+ "__ZTSPFP10js_value_sP8js_env_sRKN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEE",
152
156
  "__ZTSNSt3__120__shared_ptr_emplaceIN28qvac_lib_inference_addon_cpp11OutputQueueENS_9allocatorIS2_EEEE",
153
157
  "__ZTIN28qvac_lib_inference_addon_cpp23OutputCallBackInterfaceE",
154
158
  "__ZTIN28qvac_lib_inference_addon_cpp5model15IModelAsyncLoadE",
@@ -165,10 +169,13 @@
165
169
  "__ZTSNSt3__110__function6__funcIZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask3runIZNS2_7AddonJs9cancelJobENS_8optionalIyEEEUlvE_EEP10js_value_sP8js_env_sOT_EUlSD_RKNS_9monostateEE_NS_9allocatorISJ_EEFSB_SD_SI_EEE",
166
170
  "__ZTINSt3__16vectorINS_4pairINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_7variantIJdxEEEEENS5_ISA_EEEE",
167
171
  "__ZTSN28qvac_lib_inference_addon_cpp9out_handl21JsLogMsgOutputHandlerE",
172
+ "__ZTIFP10js_value_sP8js_env_sRKN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEE",
173
+ "__ZTSNSt3__110__function6__funcIPFP10js_value_sP8js_env_sRKN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEENS_9allocatorISC_EESB_EE",
168
174
  "__ZTINSt3__120__shared_ptr_emplaceIN28qvac_lib_inference_addon_cpp8AddonCppENS_9allocatorIS2_EEEE",
169
175
  "__ZNSt3__19__any_imp17__unique_typeinfoINS_6vectorIN7easyocr4ggml8pipeline12InferredTextENS_9allocatorIS6_EEEEE4__idE",
170
176
  "__ZTSNSt3__110__function6__baseIFP10js_value_sRKN28qvac_lib_inference_addon_cpp6Output6LogMsgEEEE",
171
177
  "__ZTINSt3__110__function6__funcIZN28qvac_lib_inference_addon_cpp9out_handl27JsRuntimeStatsOutputHandlerC1EvEUlRKNS_6vectorINS_4pairINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_7variantIJdxEEEEENSA_ISF_EEEEE_NSA_ISK_EEFP10js_value_sSJ_EEE",
178
+ "__ZTSNSt3__110__function6__baseIFP10js_value_sP8js_env_sRKN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEE",
172
179
  "__ZTSN28qvac_lib_inference_addon_cpp6Output6LogMsgE",
173
180
  "__ZTSNSt3__110__function6__funcIZN28qvac_lib_inference_addon_cpp9out_handl21JsLogMsgOutputHandlerC1EvEUlRKNS2_6Output6LogMsgEE_NS_9allocatorIS9_EEFP10js_value_sS8_EEE",
174
181
  "__ZTSN28qvac_lib_inference_addon_cpp16OutputCallBackJsE",
@@ -179,7 +186,9 @@
179
186
  "__ZTINSt3__110__function6__baseIFP10js_value_sP8js_env_sRKNS_9monostateEEEE",
180
187
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger16async_initiated_E",
181
188
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface13instancesMtx_E",
189
+ "__ZTINSt3__110__function6__funcIZN23qvac_lib_infer_ocr_ggml9assessFitEP8js_env_sP18js_callback_info_sEUlvE_NS_9allocatorIS7_EEFNS2_7ocr_fit12OcrFitResultEvEEE",
182
190
  "__ZTIN23qvac_lib_infer_ocr_ggml8OcrInputE",
191
+ "__ZTSNSt3__110__function6__baseIFN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEvEEE",
183
192
  "__ZTIZN28qvac_lib_inference_addon_cpp9out_handl21JsLogMsgOutputHandlerC1EvEUlRKNS_6Output6LogMsgEE_",
184
193
  "__ZTSNSt3__110__function6__baseIFP10js_value_sRKN28qvac_lib_inference_addon_cpp6Output5ErrorEEEE",
185
194
  "__ZTINSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE",
@@ -194,10 +203,12 @@
194
203
  "__ZTIN28qvac_lib_inference_addon_cpp9out_handl17BaseOutputHandlerIP10js_value_sNSt3__16vectorINS4_4pairINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_7variantIJdxEEEEENSA_ISF_EEEEEE",
195
204
  "__ZTINSt3__120__shared_ptr_emplaceINS_5mutexENS_9allocatorIS1_EEEE",
196
205
  "__ZTSN8js_blobs15FinalizedStreamIcEE",
206
+ "__ZTIZN23qvac_lib_infer_ocr_ggml9assessFitEP8js_env_sP18js_callback_info_sEUlvE_",
197
207
  "__ZTINSt3__120__shared_ptr_emplaceIN28qvac_lib_inference_addon_cpp16OutputCallBackJs5StateENS_9allocatorIS3_EEEE",
198
208
  "__ZTSN28qvac_lib_inference_addon_cpp18SingleJobSchedulerE",
199
209
  "__ZTINSt3__120__shared_ptr_emplaceIN2cv11FileStorage4ImplENS_9allocatorIS3_EEEE",
200
210
  "__ZTSNSt3__120__shared_ptr_emplaceINS_6vectorIhNS_9allocatorIhEEEENS2_IS4_EEEE",
211
+ "__ZTINSt3__110__function6__baseIFP10js_value_sP8js_env_sRKN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEE",
201
212
  "__ZTIN28qvac_lib_inference_addon_cpp9out_handl17BaseOutputHandlerIP10js_value_sNS_6Output6LogMsgEEE",
202
213
  "__ZTSNSt3__120__shared_ptr_emplaceIN28qvac_lib_inference_addon_cpp16OutputCallBackJs5StateENS_9allocatorIS3_EEEE",
203
214
  "__ZTIN2cv3hal5DFT2DE",
@@ -207,6 +218,7 @@
207
218
  "__ZTSN28qvac_lib_inference_addon_cpp2js22ThreadQueuedRefDeleterE",
208
219
  "__ZTINSt3__110__function6__funcIZN28qvac_lib_inference_addon_cpp9out_handl20JsErrorOutputHandlerC1EvEUlRKNS2_6Output5ErrorEE_NS_9allocatorIS9_EEFP10js_value_sS8_EEE",
209
220
  "__ZTSPFvPvE",
221
+ "__ZTSNSt3__110__function6__funcIZN23qvac_lib_infer_ocr_ggml9assessFitEP8js_env_sP18js_callback_info_sEUlvE_NS_9allocatorIS7_EEFNS2_7ocr_fit12OcrFitResultEvEEE",
210
222
  "__ZTIN2cv3hal5DFT1DE",
211
223
  "__ZTSN28qvac_lib_inference_addon_cpp9out_handl17BaseOutputHandlerIP10js_value_sNS_6Output6LogMsgEEE",
212
224
  "__ZTINSt3__120__shared_ptr_emplaceIN28qvac_lib_inference_addon_cpp9out_handl27JsRuntimeStatsOutputHandlerENS_9allocatorIS3_EEEE",
@@ -236,6 +248,7 @@
236
248
  "__ZTSNSt3__110__function6__baseIFvRKN2cv5RangeEEEE",
237
249
  "__ZTINSt3__110__function6__baseIFNS_9monostateEvEEE",
238
250
  "__ZTINSt3__110__function6__funcIZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask3runIZNS2_7AddonJs9cancelJobENS_8optionalIyEEEUlvE_EEP10js_value_sP8js_env_sOT_EUlvE_NS_9allocatorISG_EEFNS_9monostateEvEEE",
251
+ "__ZTIPFP10js_value_sP8js_env_sRKN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEE",
239
252
  "__ZTIN28qvac_lib_inference_addon_cpp9out_handl24JsOutputHandlerInterfaceE",
240
253
  "__ZTIN28qvac_lib_inference_addon_cpp5model6IModelE",
241
254
  "__ZTSNSt3__16vectorINS_4pairINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_7variantIJdxEEEEENS5_ISA_EEEE",
@@ -246,6 +259,7 @@
246
259
  "__ZTSN2cv3hal5DCT2DE",
247
260
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger10log_queue_E",
248
261
  "__ZTSNSt3__120__shared_ptr_emplaceIN28qvac_lib_inference_addon_cpp9out_handl20JsErrorOutputHandlerENS_9allocatorIS3_EEEE",
262
+ "__ZTINSt3__110__function6__baseIFN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEvEEE",
249
263
  "__ZTIN28qvac_lib_inference_addon_cpp6Output6LogMsgE",
250
264
  "__ZTIN28qvac_lib_inference_addon_cpp9out_handl19JsBaseOutputHandlerINSt3__16vectorINS2_4pairINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_7variantIJdxEEEEENS8_ISD_EEEEEE",
251
265
  "__ZTSN2cv3hal5DFT1DE"
@@ -518,9 +532,9 @@
518
532
  "_WebPAnimEncoderGetError",
519
533
  "_WebPConfigLosslessPreset",
520
534
  "__ZN2cv9rectangleERKNS_17_InputOutputArrayENS_6Point_IiEES4_RKNS_7Scalar_IdEEiii",
521
- "_jinit_d_diff_controller",
522
535
  "_jpeg_std_error",
523
536
  "_lzma_mf_bt2_skip",
537
+ "_jinit_d_diff_controller",
524
538
  "_lzma_simple_props_encode",
525
539
  "__ZNK2cv4UMat3dotERKNS_11_InputArrayE",
526
540
  "__ZNK2cv12MatAllocator5unmapEPNS_8UMatDataE",
@@ -3266,10 +3280,10 @@
3266
3280
  "_png_get_cHRM_fixed",
3267
3281
  "_jsimd_h2v1_fancy_upsample",
3268
3282
  "__ZN2cv3minEdRKNS_3MatE",
3269
- "__ZN2cvmiERKNS_3MatERKNS_7Scalar_IdEE",
3283
+ "__ZN2cv4readERKNS_8FileNodeERNSt3__16vectorINS_6DMatchENS3_9allocatorIS5_EEEE",
3270
3284
  "_TIFFYCbCrToRGBInit",
3271
3285
  "__Z7cvTruncRKN2cv9softfloatE",
3272
- "__ZN2cv4readERKNS_8FileNodeERNSt3__16vectorINS_6DMatchENS3_9allocatorIS5_EEEE",
3286
+ "__ZN2cvmiERKNS_3MatERKNS_7Scalar_IdEE",
3273
3287
  "_TIFFErrorExtR",
3274
3288
  "__ZN2cv3hal6mul16sEPKsmS2_mPsmiiPv",
3275
3289
  "__ZN2cv10softdoubleC1Ey",
@@ -3293,13 +3307,16 @@
3293
3307
  ],
3294
3308
  "weak": [
3295
3309
  "__ZZZN28qvac_lib_inference_addon_cpp16OutputCallBackJs26initializeProcessingThreadENSt3__110shared_ptrINS_11OutputQueueEEEENKUlvE_clEvENUlP11uv_handle_sE_8__invokeES7_",
3310
+ "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask10onCompleteIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEvP10uv_async_s",
3296
3311
  "__ZZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask5startINSt3__19monostateEEEP10js_value_sP8js_env_sNS1_12CallbackDataIT_E4WorkENSB_7MarshalEENUlP11uv_handle_sE_8__invokeESF_",
3312
+ "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onEnvTeardownIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEvP22js_deferred_teardown_sPv",
3297
3313
  "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onCloseHandleINSt3__19monostateEEEvP11uv_handle_s",
3298
3314
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface8activateEP8js_env_sP18js_callback_info_s",
3299
3315
  "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onEnvTeardownINSt3__19monostateEEEvP22js_deferred_teardown_sPv",
3300
3316
  "__ZZN28qvac_lib_inference_addon_cpp6logger8JsLogger22closeAsyncHandleLockedEvENUlP11uv_handle_sE_8__invokeES3_",
3301
3317
  "__ZN23qvac_lib_infer_ocr_ggml14createInstanceEP8js_env_sP18js_callback_info_s",
3302
3318
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger13asyncCallbackEP10uv_async_s",
3319
+ "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onCloseHandleIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEvP11uv_handle_s",
3303
3320
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface9setLoggerEP8js_env_sP18js_callback_info_s",
3304
3321
  "__ZN23qvac_lib_infer_ocr_ggml9assessFitEP8js_env_sP18js_callback_info_s",
3305
3322
  "__ZN28qvac_lib_inference_addon_cpp16OutputCallBackJs16jsOutputCallbackEP10uv_async_s",
@@ -3311,6 +3328,7 @@
3311
3328
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger13onEnvTeardownEPv",
3312
3329
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface11loadWeightsEP8js_env_sP18js_callback_info_s",
3313
3330
  "__ZN28qvac_lib_inference_addon_cpp16OutputCallBackJs13onEnvTeardownEPv",
3331
+ "__ZZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask5startIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEP10js_value_sP8js_env_sNS1_12CallbackDataIT_E4WorkENSC_7MarshalEENUlP11uv_handle_sE_8__invokeESG_",
3314
3332
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface13releaseLoggerEP8js_env_sP18js_callback_info_s",
3315
3333
  "__ZN23qvac_lib_infer_ocr_ggml14getBackendInfoEP8js_env_sP18js_callback_info_s"
3316
3334
  ]
@@ -7,7 +7,7 @@
7
7
  ],
8
8
  "current_versions": [
9
9
  {
10
- "version": "0.28"
10
+ "version": "0.29.1"
11
11
  }
12
12
  ],
13
13
  "exported_symbols": [
@@ -3169,10 +3169,10 @@
3169
3169
  "_png_get_cHRM_fixed",
3170
3170
  "_jsimd_h2v1_fancy_upsample",
3171
3171
  "__ZN2cv3minEdRKNS_3MatE",
3172
- "__ZN2cvmiERKNS_3MatERKNS_7Scalar_IdEE",
3172
+ "__ZN2cv4readERKNS_8FileNodeERNSt3__16vectorINS_6DMatchENS3_9allocatorIS5_EEEE",
3173
3173
  "_TIFFYCbCrToRGBInit",
3174
3174
  "__Z7cvTruncRKN2cv9softfloatE",
3175
- "__ZN2cv4readERKNS_8FileNodeERNSt3__16vectorINS_6DMatchENS3_9allocatorIS5_EEEE",
3175
+ "__ZN2cvmiERKNS_3MatERKNS_7Scalar_IdEE",
3176
3176
  "_TIFFErrorExtR",
3177
3177
  "__ZN2cv3hal6mul16sEPKsmS2_mPsmiiPv",
3178
3178
  "__ZN2cv10softdoubleC1Ey",
@@ -3196,13 +3196,16 @@
3196
3196
  ],
3197
3197
  "weak": [
3198
3198
  "__ZZZN28qvac_lib_inference_addon_cpp16OutputCallBackJs26initializeProcessingThreadENSt3__110shared_ptrINS_11OutputQueueEEEENKUlvE_clEvENUlP11uv_handle_sE_8__invokeES7_",
3199
+ "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask10onCompleteIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEvP10uv_async_s",
3199
3200
  "__ZZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask5startINSt3__19monostateEEEP10js_value_sP8js_env_sNS1_12CallbackDataIT_E4WorkENSB_7MarshalEENUlP11uv_handle_sE_8__invokeESF_",
3201
+ "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onEnvTeardownIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEvP22js_deferred_teardown_sPv",
3200
3202
  "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onCloseHandleINSt3__19monostateEEEvP11uv_handle_s",
3201
3203
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface8activateEP8js_env_sP18js_callback_info_s",
3202
3204
  "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onEnvTeardownINSt3__19monostateEEEvP22js_deferred_teardown_sPv",
3203
3205
  "__ZZN28qvac_lib_inference_addon_cpp6logger8JsLogger22closeAsyncHandleLockedEvENUlP11uv_handle_sE_8__invokeES3_",
3204
3206
  "__ZN23qvac_lib_infer_ocr_ggml14createInstanceEP8js_env_sP18js_callback_info_s",
3205
3207
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger13asyncCallbackEP10uv_async_s",
3208
+ "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onCloseHandleIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEvP11uv_handle_s",
3206
3209
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface9setLoggerEP8js_env_sP18js_callback_info_s",
3207
3210
  "__ZN23qvac_lib_infer_ocr_ggml9assessFitEP8js_env_sP18js_callback_info_s",
3208
3211
  "__ZN28qvac_lib_inference_addon_cpp16OutputCallBackJs16jsOutputCallbackEP10uv_async_s",
@@ -3214,6 +3217,7 @@
3214
3217
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger13onEnvTeardownEPv",
3215
3218
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface11loadWeightsEP8js_env_sP18js_callback_info_s",
3216
3219
  "__ZN28qvac_lib_inference_addon_cpp16OutputCallBackJs13onEnvTeardownEPv",
3220
+ "__ZZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask5startIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEP10js_value_sP8js_env_sNS1_12CallbackDataIT_E4WorkENSC_7MarshalEENUlP11uv_handle_sE_8__invokeESG_",
3217
3221
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface13releaseLoggerEP8js_env_sP18js_callback_info_s",
3218
3222
  "__ZN23qvac_lib_infer_ocr_ggml14getBackendInfoEP8js_env_sP18js_callback_info_s"
3219
3223
  ]
@@ -7,7 +7,7 @@
7
7
  ],
8
8
  "current_versions": [
9
9
  {
10
- "version": "0.28"
10
+ "version": "0.29.1"
11
11
  }
12
12
  ],
13
13
  "exported_symbols": [
@@ -3169,10 +3169,10 @@
3169
3169
  "_png_get_cHRM_fixed",
3170
3170
  "_jsimd_h2v1_fancy_upsample",
3171
3171
  "__ZN2cv3minEdRKNS_3MatE",
3172
- "__ZN2cvmiERKNS_3MatERKNS_7Scalar_IdEE",
3172
+ "__ZN2cv4readERKNS_8FileNodeERNSt3__16vectorINS_6DMatchENS3_9allocatorIS5_EEEE",
3173
3173
  "_TIFFYCbCrToRGBInit",
3174
3174
  "__Z7cvTruncRKN2cv9softfloatE",
3175
- "__ZN2cv4readERKNS_8FileNodeERNSt3__16vectorINS_6DMatchENS3_9allocatorIS5_EEEE",
3175
+ "__ZN2cvmiERKNS_3MatERKNS_7Scalar_IdEE",
3176
3176
  "_TIFFErrorExtR",
3177
3177
  "__ZN2cv3hal6mul16sEPKsmS2_mPsmiiPv",
3178
3178
  "__ZN2cv10softdoubleC1Ey",
@@ -3196,13 +3196,16 @@
3196
3196
  ],
3197
3197
  "weak": [
3198
3198
  "__ZZZN28qvac_lib_inference_addon_cpp16OutputCallBackJs26initializeProcessingThreadENSt3__110shared_ptrINS_11OutputQueueEEEENKUlvE_clEvENUlP11uv_handle_sE_8__invokeES7_",
3199
+ "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask10onCompleteIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEvP10uv_async_s",
3199
3200
  "__ZZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask5startINSt3__19monostateEEEP10js_value_sP8js_env_sNS1_12CallbackDataIT_E4WorkENSB_7MarshalEENUlP11uv_handle_sE_8__invokeESF_",
3201
+ "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onEnvTeardownIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEvP22js_deferred_teardown_sPv",
3200
3202
  "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onCloseHandleINSt3__19monostateEEEvP11uv_handle_s",
3201
3203
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface8activateEP8js_env_sP18js_callback_info_s",
3202
3204
  "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onEnvTeardownINSt3__19monostateEEEvP22js_deferred_teardown_sPv",
3203
3205
  "__ZZN28qvac_lib_inference_addon_cpp6logger8JsLogger22closeAsyncHandleLockedEvENUlP11uv_handle_sE_8__invokeES3_",
3204
3206
  "__ZN23qvac_lib_infer_ocr_ggml14createInstanceEP8js_env_sP18js_callback_info_s",
3205
3207
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger13asyncCallbackEP10uv_async_s",
3208
+ "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onCloseHandleIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEvP11uv_handle_s",
3206
3209
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface9setLoggerEP8js_env_sP18js_callback_info_s",
3207
3210
  "__ZN23qvac_lib_infer_ocr_ggml9assessFitEP8js_env_sP18js_callback_info_s",
3208
3211
  "__ZN28qvac_lib_inference_addon_cpp16OutputCallBackJs16jsOutputCallbackEP10uv_async_s",
@@ -3214,6 +3217,7 @@
3214
3217
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger13onEnvTeardownEPv",
3215
3218
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface11loadWeightsEP8js_env_sP18js_callback_info_s",
3216
3219
  "__ZN28qvac_lib_inference_addon_cpp16OutputCallBackJs13onEnvTeardownEPv",
3220
+ "__ZZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask5startIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEP10js_value_sP8js_env_sNS1_12CallbackDataIT_E4WorkENSC_7MarshalEENUlP11uv_handle_sE_8__invokeESG_",
3217
3221
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface13releaseLoggerEP8js_env_sP18js_callback_info_s",
3218
3222
  "__ZN23qvac_lib_infer_ocr_ggml14getBackendInfoEP8js_env_sP18js_callback_info_s"
3219
3223
  ]
@@ -7,7 +7,7 @@
7
7
  ],
8
8
  "current_versions": [
9
9
  {
10
- "version": "0.28"
10
+ "version": "0.29.1"
11
11
  }
12
12
  ],
13
13
  "exported_symbols": [
@@ -107,9 +107,11 @@
107
107
  "__ZTIZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask3runIZNS_7AddonJs9cancelJobENSt3__18optionalIyEEEUlvE0_EEP10js_value_sP8js_env_sOT_EUlSB_RKNS4_9monostateEE_",
108
108
  "__ZTSN28qvac_lib_inference_addon_cpp5model6IModelE",
109
109
  "__ZTIN28qvac_lib_inference_addon_cpp9out_handl21JsLogMsgOutputHandlerE",
110
+ "__ZTINSt3__110__function6__funcIPFP10js_value_sP8js_env_sRKN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEENS_9allocatorISC_EESB_EE",
110
111
  "__ZTSZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask3runIZNS_7AddonJs9cancelJobENSt3__18optionalIyEEEUlvE0_EEP10js_value_sP8js_env_sOT_EUlSB_RKNS4_9monostateEE_",
111
112
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger6state_E",
112
113
  "__ZTSN28qvac_lib_inference_addon_cpp5model12IModelCancelE",
114
+ "__ZTSFP10js_value_sP8js_env_sRKN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEE",
113
115
  "__ZTINSt3__110__function6__baseIFP10js_value_sRKN28qvac_lib_inference_addon_cpp6Output5ErrorEEEE",
114
116
  "__ZTSNSt3__110__function6__funcIZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask3runIZNS2_7AddonJs9cancelJobENS_8optionalIyEEEUlvE1_EEP10js_value_sP8js_env_sOT_EUlvE_NS_9allocatorISG_EEFNS_9monostateEvEEE",
115
117
  "__ZTSNSt3__114basic_ifstreamIcNS_11char_traitsIcEEEE",
@@ -149,6 +151,7 @@
149
151
  "__ZTSN28qvac_lib_inference_addon_cpp9out_handl27JsRuntimeStatsOutputHandlerE",
150
152
  "__ZTINSt3__117bad_function_callE",
151
153
  "__ZTSN28qvac_lib_inference_addon_cpp23OutputCallBackInterfaceE",
154
+ "__ZTSZN23qvac_lib_infer_ocr_ggml9assessFitEP8js_env_sP18js_callback_info_sEUlvE_",
152
155
  "__ZTSN28qvac_lib_inference_addon_cpp9out_handl24JsOutputHandlerInterfaceE",
153
156
  "__ZTINSt3__120__shared_ptr_pointerIPN2cv15ImageCollection4ImplENS_10shared_ptrIS3_E27__shared_ptr_default_deleteIS3_S3_EENS_9allocatorIS3_EEEE",
154
157
  "__ZTSZN28qvac_lib_inference_addon_cpp9out_handl21JsLogMsgOutputHandlerC1EvEUlRKNS_6Output6LogMsgEE_",
@@ -156,6 +159,7 @@
156
159
  "__ZTINSt3__114basic_ofstreamIcNS_11char_traitsIcEEEE",
157
160
  "__ZTSN28qvac_lib_inference_addon_cpp6Output5ErrorE",
158
161
  "__ZTSN28qvac_lib_inference_addon_cpp9out_handl19JsBaseOutputHandlerINS_6Output5ErrorEEE",
162
+ "__ZTSPFP10js_value_sP8js_env_sRKN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEE",
159
163
  "__ZTSNSt3__120__shared_ptr_emplaceIN28qvac_lib_inference_addon_cpp11OutputQueueENS_9allocatorIS2_EEEE",
160
164
  "__ZTIN28qvac_lib_inference_addon_cpp23OutputCallBackInterfaceE",
161
165
  "__ZTIN28qvac_lib_inference_addon_cpp5model15IModelAsyncLoadE",
@@ -172,10 +176,13 @@
172
176
  "__ZTSNSt3__110__function6__funcIZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask3runIZNS2_7AddonJs9cancelJobENS_8optionalIyEEEUlvE_EEP10js_value_sP8js_env_sOT_EUlSD_RKNS_9monostateEE_NS_9allocatorISJ_EEFSB_SD_SI_EEE",
173
177
  "__ZTINSt3__16vectorINS_4pairINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_7variantIJdxEEEEENS5_ISA_EEEE",
174
178
  "__ZTSN28qvac_lib_inference_addon_cpp9out_handl21JsLogMsgOutputHandlerE",
179
+ "__ZTIFP10js_value_sP8js_env_sRKN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEE",
180
+ "__ZTSNSt3__110__function6__funcIPFP10js_value_sP8js_env_sRKN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEENS_9allocatorISC_EESB_EE",
175
181
  "__ZTINSt3__120__shared_ptr_emplaceIN28qvac_lib_inference_addon_cpp8AddonCppENS_9allocatorIS2_EEEE",
176
182
  "__ZNSt3__19__any_imp17__unique_typeinfoINS_6vectorIN7easyocr4ggml8pipeline12InferredTextENS_9allocatorIS6_EEEEE4__idE",
177
183
  "__ZTSNSt3__110__function6__baseIFP10js_value_sRKN28qvac_lib_inference_addon_cpp6Output6LogMsgEEEE",
178
184
  "__ZTINSt3__110__function6__funcIZN28qvac_lib_inference_addon_cpp9out_handl27JsRuntimeStatsOutputHandlerC1EvEUlRKNS_6vectorINS_4pairINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_7variantIJdxEEEEENSA_ISF_EEEEE_NSA_ISK_EEFP10js_value_sSJ_EEE",
185
+ "__ZTSNSt3__110__function6__baseIFP10js_value_sP8js_env_sRKN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEE",
179
186
  "__ZTSN28qvac_lib_inference_addon_cpp6Output6LogMsgE",
180
187
  "__ZTSNSt3__110__function6__funcIZN28qvac_lib_inference_addon_cpp9out_handl21JsLogMsgOutputHandlerC1EvEUlRKNS2_6Output6LogMsgEE_NS_9allocatorIS9_EEFP10js_value_sS8_EEE",
181
188
  "__ZTINSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEEE",
@@ -188,8 +195,10 @@
188
195
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger16async_initiated_E",
189
196
  "__ZTSNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE",
190
197
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface13instancesMtx_E",
198
+ "__ZTINSt3__110__function6__funcIZN23qvac_lib_infer_ocr_ggml9assessFitEP8js_env_sP18js_callback_info_sEUlvE_NS_9allocatorIS7_EEFNS2_7ocr_fit12OcrFitResultEvEEE",
191
199
  "__ZTIN23qvac_lib_infer_ocr_ggml8OcrInputE",
192
200
  "__ZTSNSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEEE",
201
+ "__ZTSNSt3__110__function6__baseIFN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEvEEE",
193
202
  "__ZTIZN28qvac_lib_inference_addon_cpp9out_handl21JsLogMsgOutputHandlerC1EvEUlRKNS_6Output6LogMsgEE_",
194
203
  "__ZTSNSt3__110__function6__baseIFP10js_value_sRKN28qvac_lib_inference_addon_cpp6Output5ErrorEEEE",
195
204
  "__ZTINSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE",
@@ -205,10 +214,12 @@
205
214
  "__ZTIN28qvac_lib_inference_addon_cpp9out_handl17BaseOutputHandlerIP10js_value_sNSt3__16vectorINS4_4pairINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_7variantIJdxEEEEENSA_ISF_EEEEEE",
206
215
  "__ZTINSt3__120__shared_ptr_emplaceINS_5mutexENS_9allocatorIS1_EEEE",
207
216
  "__ZTSN8js_blobs15FinalizedStreamIcEE",
217
+ "__ZTIZN23qvac_lib_infer_ocr_ggml9assessFitEP8js_env_sP18js_callback_info_sEUlvE_",
208
218
  "__ZTINSt3__120__shared_ptr_emplaceIN28qvac_lib_inference_addon_cpp16OutputCallBackJs5StateENS_9allocatorIS3_EEEE",
209
219
  "__ZTSN28qvac_lib_inference_addon_cpp18SingleJobSchedulerE",
210
220
  "__ZTINSt3__120__shared_ptr_emplaceIN2cv11FileStorage4ImplENS_9allocatorIS3_EEEE",
211
221
  "__ZTSNSt3__120__shared_ptr_emplaceINS_6vectorIhNS_9allocatorIhEEEENS2_IS4_EEEE",
222
+ "__ZTINSt3__110__function6__baseIFP10js_value_sP8js_env_sRKN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEE",
212
223
  "__ZTIN28qvac_lib_inference_addon_cpp9out_handl17BaseOutputHandlerIP10js_value_sNS_6Output6LogMsgEEE",
213
224
  "__ZTSNSt3__120__shared_ptr_emplaceIN28qvac_lib_inference_addon_cpp16OutputCallBackJs5StateENS_9allocatorIS3_EEEE",
214
225
  "__ZTIN2cv3hal5DFT2DE",
@@ -219,6 +230,7 @@
219
230
  "__ZTSNSt3__119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE",
220
231
  "__ZTINSt3__110__function6__funcIZN28qvac_lib_inference_addon_cpp9out_handl20JsErrorOutputHandlerC1EvEUlRKNS2_6Output5ErrorEE_NS_9allocatorIS9_EEFP10js_value_sS8_EEE",
221
232
  "__ZTSPFvPvE",
233
+ "__ZTSNSt3__110__function6__funcIZN23qvac_lib_infer_ocr_ggml9assessFitEP8js_env_sP18js_callback_info_sEUlvE_NS_9allocatorIS7_EEFNS2_7ocr_fit12OcrFitResultEvEEE",
222
234
  "__ZTIN2cv3hal5DFT1DE",
223
235
  "__ZTSN28qvac_lib_inference_addon_cpp9out_handl17BaseOutputHandlerIP10js_value_sNS_6Output6LogMsgEEE",
224
236
  "__ZTINSt3__120__shared_ptr_emplaceIN28qvac_lib_inference_addon_cpp9out_handl27JsRuntimeStatsOutputHandlerENS_9allocatorIS3_EEEE",
@@ -249,6 +261,7 @@
249
261
  "__ZTSNSt3__110__function6__baseIFvRKN2cv5RangeEEEE",
250
262
  "__ZTINSt3__110__function6__baseIFNS_9monostateEvEEE",
251
263
  "__ZTINSt3__110__function6__funcIZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask3runIZNS2_7AddonJs9cancelJobENS_8optionalIyEEEUlvE_EEP10js_value_sP8js_env_sOT_EUlvE_NS_9allocatorISG_EEFNS_9monostateEvEEE",
264
+ "__ZTIPFP10js_value_sP8js_env_sRKN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEE",
252
265
  "__ZTIN28qvac_lib_inference_addon_cpp9out_handl24JsOutputHandlerInterfaceE",
253
266
  "__ZTIN28qvac_lib_inference_addon_cpp5model6IModelE",
254
267
  "__ZTSNSt3__16vectorINS_4pairINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_7variantIJdxEEEEENS5_ISA_EEEE",
@@ -259,6 +272,7 @@
259
272
  "__ZTSN2cv3hal5DCT2DE",
260
273
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger10log_queue_E",
261
274
  "__ZTSNSt3__120__shared_ptr_emplaceIN28qvac_lib_inference_addon_cpp9out_handl20JsErrorOutputHandlerENS_9allocatorIS3_EEEE",
275
+ "__ZTINSt3__110__function6__baseIFN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEvEEE",
262
276
  "__ZTSNSt3__113basic_filebufIcNS_11char_traitsIcEEEE",
263
277
  "__ZTIN28qvac_lib_inference_addon_cpp6Output6LogMsgE",
264
278
  "__ZTIN28qvac_lib_inference_addon_cpp9out_handl19JsBaseOutputHandlerINSt3__16vectorINS2_4pairINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_7variantIJdxEEEEENS8_ISD_EEEEEE",
@@ -532,9 +546,9 @@
532
546
  "_WebPAnimEncoderGetError",
533
547
  "_WebPConfigLosslessPreset",
534
548
  "__ZN2cv9rectangleERKNS_17_InputOutputArrayENS_6Point_IiEES4_RKNS_7Scalar_IdEEiii",
535
- "_jinit_d_diff_controller",
536
549
  "_jpeg_std_error",
537
550
  "_lzma_mf_bt2_skip",
551
+ "_jinit_d_diff_controller",
538
552
  "_lzma_simple_props_encode",
539
553
  "__ZNK2cv4UMat3dotERKNS_11_InputArrayE",
540
554
  "__ZNK2cv12MatAllocator5unmapEPNS_8UMatDataE",
@@ -3250,9 +3264,8 @@
3250
3264
  "_lzma_raw_encoder",
3251
3265
  "_jpeg_write_tables",
3252
3266
  "__ZNK2cv4UMat8assignToERS0_i",
3253
- "_png_get_y_pixels_per_meter",
3254
- "_png_write_start_row",
3255
3267
  "_png_get_x_offset_inches",
3268
+ "_png_get_y_pixels_per_meter",
3256
3269
  "__ZN2cv5utils5trace7details6Region4ImplD2Ev",
3257
3270
  "__ZN2cv3hal6sub64fEPKdmS2_mPdmiiPv",
3258
3271
  "_TIFFOpen",
@@ -3262,6 +3275,7 @@
3262
3275
  "_TIFFFdOpenExt",
3263
3276
  "_lzma_index_iter_rewind",
3264
3277
  "_TIFFGetStrileOffset",
3278
+ "_png_write_start_row",
3265
3279
  "_cvMaxS",
3266
3280
  "__TIFFsetLongArrayExt",
3267
3281
  "__ZN2cv4UMatC1EiPKiiNS_14UMatUsageFlagsE",
@@ -3273,10 +3287,10 @@
3273
3287
  "_png_get_cHRM_fixed",
3274
3288
  "_jsimd_h2v1_fancy_upsample",
3275
3289
  "__ZN2cv3minEdRKNS_3MatE",
3276
- "__ZN2cvmiERKNS_3MatERKNS_7Scalar_IdEE",
3290
+ "__ZN2cv4readERKNS_8FileNodeERNSt3__16vectorINS_6DMatchENS3_9allocatorIS5_EEEE",
3277
3291
  "_TIFFYCbCrToRGBInit",
3278
3292
  "__Z7cvTruncRKN2cv9softfloatE",
3279
- "__ZN2cv4readERKNS_8FileNodeERNSt3__16vectorINS_6DMatchENS3_9allocatorIS5_EEEE",
3293
+ "__ZN2cvmiERKNS_3MatERKNS_7Scalar_IdEE",
3280
3294
  "_TIFFErrorExtR",
3281
3295
  "__ZN2cv3hal6mul16sEPKsmS2_mPsmiiPv",
3282
3296
  "__ZN2cv10softdoubleC1Ey",
@@ -3300,13 +3314,16 @@
3300
3314
  ],
3301
3315
  "weak": [
3302
3316
  "__ZZZN28qvac_lib_inference_addon_cpp16OutputCallBackJs26initializeProcessingThreadENSt3__110shared_ptrINS_11OutputQueueEEEENKUlvE_clEvENUlP11uv_handle_sE_8__invokeES7_",
3317
+ "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask10onCompleteIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEvP10uv_async_s",
3303
3318
  "__ZZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask5startINSt3__19monostateEEEP10js_value_sP8js_env_sNS1_12CallbackDataIT_E4WorkENSB_7MarshalEENUlP11uv_handle_sE_8__invokeESF_",
3319
+ "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onEnvTeardownIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEvP22js_deferred_teardown_sPv",
3304
3320
  "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onCloseHandleINSt3__19monostateEEEvP11uv_handle_s",
3305
3321
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface8activateEP8js_env_sP18js_callback_info_s",
3306
3322
  "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onEnvTeardownINSt3__19monostateEEEvP22js_deferred_teardown_sPv",
3307
3323
  "__ZZN28qvac_lib_inference_addon_cpp6logger8JsLogger22closeAsyncHandleLockedEvENUlP11uv_handle_sE_8__invokeES3_",
3308
3324
  "__ZN23qvac_lib_infer_ocr_ggml14createInstanceEP8js_env_sP18js_callback_info_s",
3309
3325
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger13asyncCallbackEP10uv_async_s",
3326
+ "__ZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask13onCloseHandleIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEvP11uv_handle_s",
3310
3327
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface9setLoggerEP8js_env_sP18js_callback_info_s",
3311
3328
  "__ZN23qvac_lib_infer_ocr_ggml9assessFitEP8js_env_sP18js_callback_info_s",
3312
3329
  "__ZN28qvac_lib_inference_addon_cpp16OutputCallBackJs16jsOutputCallbackEP10uv_async_s",
@@ -3318,6 +3335,7 @@
3318
3335
  "__ZN28qvac_lib_inference_addon_cpp6logger8JsLogger13onEnvTeardownEPv",
3319
3336
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface11loadWeightsEP8js_env_sP18js_callback_info_s",
3320
3337
  "__ZN28qvac_lib_inference_addon_cpp16OutputCallBackJs13onEnvTeardownEPv",
3338
+ "__ZZN28qvac_lib_inference_addon_cpp2js11JsAsyncTask5startIN23qvac_lib_infer_ocr_ggml7ocr_fit12OcrFitResultEEEP10js_value_sP8js_env_sNS1_12CallbackDataIT_E4WorkENSC_7MarshalEENUlP11uv_handle_sE_8__invokeESG_",
3321
3339
  "__ZN28qvac_lib_inference_addon_cpp11JsInterface13releaseLoggerEP8js_env_sP18js_callback_info_s",
3322
3340
  "__ZN23qvac_lib_infer_ocr_ggml14getBackendInfoEP8js_env_sP18js_callback_info_s"
3323
3341
  ]
@@ -3,14 +3,20 @@
3
3
  const test = require('brittle')
4
4
  const path = require('bare-path')
5
5
  const { assessFit } = require('../..')
6
- const { ensureModelPath, ensureDoctrModels, platform } = require('./utils')
6
+ const { ensureModelPath, ensureDoctrModels, platform, createOcrGgml } = require('./utils')
7
7
 
8
8
  const gpuBackend = platform === 'darwin' || platform === 'ios' ? 'metal' : 'vulkan'
9
9
 
10
+ async function easyOcrPaths() {
11
+ return {
12
+ pathDetector: path.resolve(await ensureModelPath('detector_craft')),
13
+ pathRecognizer: path.resolve(await ensureModelPath('recognizer_latin'))
14
+ }
15
+ }
16
+
10
17
  test('assessFit reads both EasyOCR model descriptions without loading an image', async (t) => {
11
- const pathDetector = path.resolve(await ensureModelPath('detector_craft'))
12
- const pathRecognizer = path.resolve(await ensureModelPath('recognizer_latin'))
13
- const fit = assessFit({ pathDetector, pathRecognizer, backendDevice: 'cpu' })
18
+ const { pathDetector, pathRecognizer } = await easyOcrPaths()
19
+ const fit = await assessFit({ pathDetector, pathRecognizer, backendDevice: 'cpu' })
14
20
 
15
21
  t.ok(['fits', 'does-not-fit', 'error'].includes(fit.status))
16
22
  t.is(fit.deviceName, 'CPU')
@@ -31,7 +37,7 @@ test('assessFit reads both EasyOCR model descriptions without loading an image',
31
37
  else if (fit.status === 'does-not-fit') t.is(fit.reason, 'source-weights-exceed-memory')
32
38
  else t.ok(['uncertain', 'device-memory-unavailable'].includes(fit.reason))
33
39
 
34
- const reserved = assessFit({
40
+ const reserved = await assessFit({
35
41
  pathDetector,
36
42
  pathRecognizer,
37
43
  backendDevice: 'cpu',
@@ -43,7 +49,7 @@ test('assessFit reads both EasyOCR model descriptions without loading an image',
43
49
 
44
50
  test('assessFit returns model-unreadable for a missing recognizer', async (t) => {
45
51
  const pathDetector = path.resolve(await ensureModelPath('detector_craft'))
46
- const fit = assessFit({
52
+ const fit = await assessFit({
47
53
  pathDetector,
48
54
  pathRecognizer: path.join(pathDetector, 'missing-recognizer.gguf')
49
55
  })
@@ -52,11 +58,9 @@ test('assessFit returns model-unreadable for a missing recognizer', async (t) =>
52
58
  })
53
59
 
54
60
  test('assessFit uses the requested gpuDevice when selecting a backend', async (t) => {
55
- const pathDetector = path.resolve(await ensureModelPath('detector_craft'))
56
- const pathRecognizer = path.resolve(await ensureModelPath('recognizer_latin'))
57
- const request = { pathDetector, pathRecognizer, backendDevice: gpuBackend }
58
- const automatic = assessFit(request)
59
- const explicit = assessFit({ ...request, gpuDevice: 9999 })
61
+ const request = { ...(await easyOcrPaths()), backendDevice: gpuBackend }
62
+ const automatic = await assessFit(request)
63
+ const explicit = await assessFit({ ...request, gpuDevice: 9999 })
60
64
 
61
65
  t.is(explicit.deviceName, 'CPU', 'out-of-range GPU index falls back to CPU')
62
66
  t.is(explicit.deviceBytes, 0)
@@ -81,7 +85,7 @@ test('assessFit recognizes actual DocTR detector and CPU-assist placement', asyn
81
85
  detectionBackendDevice: gpuBackend,
82
86
  recognizerCpuAssist: false
83
87
  }
84
- const singleDevice = assessFit(request)
88
+ const singleDevice = await assessFit(request)
85
89
  t.ok(singleDevice.weightsBytes > 0, 'DocTR model metadata was read')
86
90
  t.ok(singleDevice.deviceName, 'DocTR backend was selected')
87
91
  t.ok(
@@ -94,11 +98,11 @@ test('assessFit recognizes actual DocTR detector and CPU-assist placement', asyn
94
98
  return
95
99
  }
96
100
 
97
- const assisted = assessFit({ ...request, recognizerCpuAssist: true })
101
+ const assisted = await assessFit({ ...request, recognizerCpuAssist: true })
98
102
  t.is(assisted.status, 'error')
99
103
  t.is(assisted.reason, 'unsupported-config', 'GPU recognition with CPU assist is split')
100
104
 
101
- const splitDetector = assessFit({
105
+ const splitDetector = await assessFit({
102
106
  ...request,
103
107
  backendDevice: 'cpu',
104
108
  detectionBackendDevice: gpuBackend
@@ -106,3 +110,61 @@ test('assessFit recognizes actual DocTR detector and CPU-assist placement', asyn
106
110
  t.is(splitDetector.status, 'error')
107
111
  t.is(splitDetector.reason, 'unsupported-config', 'CPU recognition with GPU detection is split')
108
112
  })
113
+
114
+ test('assessFit keeps the event loop responsive while fits are queued', async (t) => {
115
+ const request = { ...(await easyOcrPaths()), backendDevice: 'cpu' }
116
+ const expected = await assessFit(request)
117
+
118
+ let pending = true
119
+ let turns = 0
120
+ const spin = () => {
121
+ if (!pending) return
122
+ turns++
123
+ setImmediate(spin)
124
+ }
125
+ setImmediate(spin)
126
+
127
+ const fits = await Promise.all(Array.from({ length: 32 }, () => assessFit(request)))
128
+ pending = false
129
+
130
+ t.comment(`${turns} loop turns before the fits settled`)
131
+ t.ok(turns > 0, 'the loop turned while the fitter ran')
132
+ for (const fit of fits) {
133
+ t.is(fit.weightsBytes, expected.weightsBytes, 'every queued fit read the same models')
134
+ }
135
+ })
136
+
137
+ test('queued fits retain independent requests and all settle', async (t) => {
138
+ const request = { ...(await easyOcrPaths()), backendDevice: 'cpu' }
139
+ const first = assessFit(request)
140
+ const missing = assessFit({
141
+ ...request,
142
+ pathRecognizer: path.join(request.pathDetector, 'missing-recognizer.gguf')
143
+ })
144
+ request.marginBytes = Number.MAX_SAFE_INTEGER
145
+ const reserved = assessFit(request)
146
+ const [a, b, c] = await Promise.all([first, missing, reserved])
147
+
148
+ t.ok(a.weightsBytes > 0, 'the first call read both models')
149
+ if (a.reason !== 'device-memory-unavailable') {
150
+ t.ok(a.report.includes('margin=0 '), 'the first call owns its original margin')
151
+ }
152
+ t.is(b.reason, 'model-unreadable', 'an error outcome does not strand queued callers')
153
+ t.is(c.status, 'error', 'the later call owns its changed margin')
154
+ t.ok(['uncertain', 'device-memory-unavailable'].includes(c.reason))
155
+ })
156
+
157
+ test('a fit settles while a loaded model unloads', async (t) => {
158
+ const paths = await easyOcrPaths()
159
+ const model = createOcrGgml({ ...paths, langList: ['en'], backendDevice: 'cpu' })
160
+ try {
161
+ await model.load()
162
+ const pending = assessFit({ ...paths, backendDevice: 'cpu' })
163
+ await model.unload()
164
+ const fit = await pending
165
+ t.ok(fit.weightsBytes > 0, 'unloading the model did not invalidate the fit backend')
166
+ t.is(fit.deviceName, 'CPU')
167
+ } finally {
168
+ await model.unload()
169
+ }
170
+ })