ppu-doc-correction 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +32 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -6,6 +6,8 @@ A lightweight, type-safe document image correction library for Node.js, Bun, and
6
6
  2. **`TextUnwarpService`** — geometric document unwarping (UVDoc model)
7
7
  3. **`TextOrientService`** — text line orientation classification (0/180 degrees)
8
8
 
9
+ ![ppu-doc-correction demo](https://raw.githubusercontent.com/PT-Perkasa-Pilar-Utama/ppu-doc-correction/refs/heads/main/assets/ppu-doc-correction-demo.png)
10
+
9
11
  Each service is fully self-contained: it handles model downloading, caching, ONNX session management, and cleanup independently. Models are lazily loaded on first use -- only the model you need is downloaded.
10
12
 
11
13
  ## Installation
@@ -171,6 +173,36 @@ Each service accepts its own options object:
171
173
  bun task bench index
172
174
  ```
173
175
 
176
+ ```bash
177
+ > bun task bench
178
+ $ bun scripts/task.ts bench
179
+ Running benchmark: doc-orient.bench.ts
180
+ clk: ~2.96 GHz
181
+ cpu: Apple M1
182
+ runtime: bun 1.3.7 (arm64-darwin)
183
+
184
+ benchmark avg (min … max) p75 / p99 (min … top 1%)
185
+ ------------------------------------------- -------------------------------
186
+ DocOrientService.run() 137.59 ms/iter 138.61 ms █ █
187
+ (135.59 ms … 139.92 ms) 139.59 ms █▅ ▅ ▅█ ▅ ▅ ▅ ▅
188
+ ( 0.00 b … 31.02 mb) 16.63 mb ██▁▁▁█▁▁██▁▁▁█▁█▁█▁▁█
189
+ Running benchmark: text-orient.bench.ts
190
+ clk: ~3.03 GHz
191
+ cpu: Apple M1
192
+ runtime: bun 1.3.7 (arm64-darwin)
193
+
194
+ benchmark avg (min … max) p75 / p99 (min … top 1%)
195
+ ------------------------------------------- -------------------------------
196
+ TextOrientService.run() 11.54 ms/iter 11.59 ms ▅ █▅
197
+ (11.31 ms … 11.99 ms) 11.90 ms ▃█▃██▃████
198
+ ( 0.00 b … 3.38 mb) 1.41 mb ▄██████████▁▁▄█▄▁▄█▁▄
199
+ Running benchmark: text-unwarp.bench.ts
200
+ TextUnwarpService.run()
201
+
202
+ 3448.26 ms (includes model load)
203
+ output: 9570021 bytes
204
+ ```
205
+
174
206
  ## Contributing
175
207
 
176
208
  1. **Fork** the repository
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ppu-doc-correction",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Lightweight, type-safe document image correction for Node.js, Bun, and browsers. Provides orientation classification, text unwarping (UVDoc), and text line orientation correction.",
5
5
  "keywords": [
6
6
  "bun-compatible",