@64tensor/retouch-ml 0.0.0-stage → 0.4.0

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/package.json CHANGED
@@ -1,6 +1,65 @@
1
1
  {
2
2
  "name": "@64tensor/retouch-ml",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.4.0",
4
+ "description": "On-device ML tools for Rétouch: cutout, 4× upscale, erase, click-to-select, depth bokeh, denoise, face and object detection, video object tracking and OCR, through ONNX Runtime Web.",
5
+ "author": "64Tensor LLC (https://64tensor.com)",
6
+ "license": "MIT",
7
+ "homepage": "https://github.com/64Tensor/retouch/tree/main/packages/ml#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/64Tensor/retouch.git",
11
+ "directory": "packages/ml"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/64Tensor/retouch/issues"
15
+ },
16
+ "keywords": [
17
+ "retouch",
18
+ "image-editor",
19
+ "onnx",
20
+ "onnxruntime-web",
21
+ "webgpu",
22
+ "background-removal",
23
+ "super-resolution",
24
+ "inpainting",
25
+ "segment-anything",
26
+ "depth-estimation",
27
+ "denoise",
28
+ "ocr",
29
+ "object-detection",
30
+ "object-tracking"
31
+ ],
32
+ "type": "module",
33
+ "sideEffects": false,
34
+ "exports": {
35
+ ".": {
36
+ "types": "./dist/index.d.ts",
37
+ "default": "./dist/index.js"
38
+ },
39
+ "./third-party-models.json": "./third-party-models.json",
40
+ "./package.json": "./package.json"
41
+ },
42
+ "publishConfig": {
43
+ "access": "public"
44
+ },
45
+ "files": [
46
+ "dist",
47
+ "CHANGELOG.md",
48
+ "THIRD_PARTY_NOTICES.md",
49
+ "third-party-models.json"
50
+ ],
51
+ "dependencies": {
52
+ "onnxruntime-web": "^1.22.0"
53
+ },
54
+ "peerDependencies": {
55
+ "@64tensor/retouch": "^0.4.0"
56
+ },
57
+ "devDependencies": {
58
+ "@64tensor/retouch": "0.4.0"
59
+ },
60
+ "scripts": {
61
+ "build": "tsdown",
62
+ "typecheck": "tsc -p tsconfig.json && tsc -p tests/tsconfig.json"
63
+ },
64
+ "types": "./dist/index.d.ts"
6
65
  }
@@ -0,0 +1,345 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "package": "@64tensor/retouch-ml",
4
+ "description": "The default models this package downloads at runtime. The weights are not part of this package or its MIT license. Notices and license texts are in THIRD_PARTY_NOTICES.md.",
5
+ "disclaimer": "A record of what was read at source on the date given, not legal advice. Training-data terms are separate from model licenses, and this record does not clear them.",
6
+ "models": [
7
+ {
8
+ "id": "modnet",
9
+ "model": "MODNet",
10
+ "feature": "Cutout",
11
+ "license": "Apache-2.0",
12
+ "licenseEvidence": "The author's README says the code, models and demos are released under Apache-2.0.",
13
+ "authorRepo": "https://github.com/ZHKKKe/MODNet",
14
+ "copyrightLines": [],
15
+ "pinRepo": "https://huggingface.co/Xenova/modnet",
16
+ "pinRevision": "fa2fa546052fba4c08921230a26cc69a333fca12",
17
+ "isAuthorRepo": false,
18
+ "files": [
19
+ {
20
+ "constant": "DEFAULT_CUTOUT_MODEL_URL",
21
+ "url": "https://huggingface.co/Xenova/modnet/resolve/fa2fa546052fba4c08921230a26cc69a333fca12/onnx/model.onnx",
22
+ "size": 25888640,
23
+ "sha256": "07c308cf0fc7e6e8b2065a12ed7fc07e1de8febb7dc7839d7b7f15dd66584df9"
24
+ }
25
+ ],
26
+ "trainingData": [
27
+ {
28
+ "name": "Flickr portraits, OpenImages, SPS",
29
+ "terms": "Not read.",
30
+ "termsRead": false
31
+ }
32
+ ],
33
+ "openPoints": [],
34
+ "checkedAt": "2026-11-07"
35
+ },
36
+ {
37
+ "id": "real-esrgan-x4plus",
38
+ "model": "Real-ESRGAN x4plus",
39
+ "feature": "Upscale",
40
+ "license": "BSD-3-Clause",
41
+ "licenseEvidence": "The author's repo is BSD-3-Clause and publishes the weights as its own release assets. It makes no separate statement about the weights.",
42
+ "authorRepo": "https://github.com/xinntao/Real-ESRGAN",
43
+ "copyrightLines": ["Copyright (c) 2021, Xintao Wang"],
44
+ "pinRepo": "https://huggingface.co/fernandotonon/QtMeshEditor-realesrgan-onnx",
45
+ "pinRevision": "766bac4b35aaeefe85a065ece8ee2f827b1314d8",
46
+ "isAuthorRepo": false,
47
+ "files": [
48
+ {
49
+ "constant": "DEFAULT_UPSCALE_MODEL_URL",
50
+ "url": "https://huggingface.co/fernandotonon/QtMeshEditor-realesrgan-onnx/resolve/766bac4b35aaeefe85a065ece8ee2f827b1314d8/RealESRGAN_x4plus.onnx",
51
+ "size": 67132609,
52
+ "sha256": "c999e5e3365a23cda6d627c407005076c160f420d6b122a0ef7c9d4210aee96a"
53
+ }
54
+ ],
55
+ "trainingData": [
56
+ {
57
+ "name": "DIV2K (part of DF2K)",
58
+ "terms": "The dataset's site says it is for academic research only, and that image copyright stays with the owners.",
59
+ "termsUrl": "https://data.vision.ee.ethz.ch/cvl/DIV2K/",
60
+ "termsRead": true
61
+ },
62
+ {
63
+ "name": "Flickr2K (part of DF2K), OST",
64
+ "terms": "Not read.",
65
+ "termsRead": false
66
+ }
67
+ ],
68
+ "openPoints": [
69
+ "The weights license is inferred from the author's repo license, not stated by the author."
70
+ ],
71
+ "checkedAt": "2026-11-07"
72
+ },
73
+ {
74
+ "id": "lama",
75
+ "model": "LaMa",
76
+ "feature": "Erase",
77
+ "license": "Apache-2.0",
78
+ "licenseEvidence": "The author's repo is Apache-2.0. It makes no separate statement about the weights. The pinned conversion is tagged apache-2.0 and has no license file.",
79
+ "authorRepo": "https://github.com/advimman/lama",
80
+ "copyrightLines": ["Copyright [2021] Samsung Research"],
81
+ "pinRepo": "https://huggingface.co/Carve/LaMa-ONNX",
82
+ "pinRevision": "c3c0c9e468934d62e79c329e35d82dd09ff8c444",
83
+ "isAuthorRepo": false,
84
+ "files": [
85
+ {
86
+ "constant": "DEFAULT_INPAINT_MODEL_URL",
87
+ "url": "https://huggingface.co/Carve/LaMa-ONNX/resolve/c3c0c9e468934d62e79c329e35d82dd09ff8c444/lama_fp32.onnx",
88
+ "size": 208044816,
89
+ "sha256": "1faef5301d78db7dda502fe59966957ec4b79dd64e16f03ed96913c7a4eb68d6"
90
+ }
91
+ ],
92
+ "trainingData": [
93
+ {
94
+ "name": "Places2",
95
+ "terms": "The terms of use limit the images to non-commercial research and education, and bar distributing them.",
96
+ "termsUrl": "http://places2.csail.mit.edu/download-private.html",
97
+ "termsRead": true
98
+ }
99
+ ],
100
+ "openPoints": [
101
+ "The weights license is inferred from the author's repo license, not stated by the author.",
102
+ "The conversion's card describes a modified FourierUnit from a fork, and it is a third party's work, not 64Tensor's."
103
+ ],
104
+ "checkedAt": "2026-11-07"
105
+ },
106
+ {
107
+ "id": "ultraface",
108
+ "model": "UltraFace RFB-320",
109
+ "feature": "Detect (faces)",
110
+ "license": "MIT",
111
+ "licenseEvidence": "This file comes from the author's own MIT-licensed repo, at the pinned commit.",
112
+ "authorRepo": "https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB",
113
+ "copyrightLines": ["Copyright (c) 2019 linzai"],
114
+ "pinRepo": "https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB",
115
+ "pinRevision": "dffdddda9794a50607cba8f318507a28c1c27cab",
116
+ "isAuthorRepo": true,
117
+ "files": [
118
+ {
119
+ "constant": "DEFAULT_FACE_MODEL_URL",
120
+ "url": "https://raw.githubusercontent.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB/dffdddda9794a50607cba8f318507a28c1c27cab/models/onnx/version-RFB-320.onnx",
121
+ "size": 1270727,
122
+ "sha256": "34cd7e60aeff28744c657de7a3dc64e872d506741de66987f3426f2b79f88017"
123
+ }
124
+ ],
125
+ "trainingData": [
126
+ {
127
+ "name": "WIDER FACE",
128
+ "terms": "The dataset's site lists a Creative Commons BY-NC-ND license.",
129
+ "termsUrl": "http://shuoyang1213.me/WIDERFACE/",
130
+ "termsRead": true
131
+ }
132
+ ],
133
+ "openPoints": [
134
+ "The dataset's non-commercial, no-derivatives terms are the strictest in this list, and this is a face model."
135
+ ],
136
+ "checkedAt": "2026-11-07"
137
+ },
138
+ {
139
+ "id": "yolox-nano",
140
+ "model": "YOLOX-nano",
141
+ "feature": "Detect (objects), Track",
142
+ "license": "Apache-2.0",
143
+ "licenseEvidence": "The author's repo is Apache-2.0 and publishes the weights as its release assets. The pinned mirror is tagged apache-2.0 and has no license file.",
144
+ "authorRepo": "https://github.com/Megvii-BaseDetection/YOLOX",
145
+ "copyrightLines": ["Copyright (c) 2021-2022 Megvii Inc. All rights reserved."],
146
+ "pinRepo": "https://huggingface.co/hr16/yolox-onnx",
147
+ "pinRevision": "a124b32c3b7c5cebda1c7cd96178f0f9d2050125",
148
+ "isAuthorRepo": false,
149
+ "files": [
150
+ {
151
+ "constant": "DEFAULT_OBJECT_MODEL_URL",
152
+ "url": "https://huggingface.co/hr16/yolox-onnx/resolve/a124b32c3b7c5cebda1c7cd96178f0f9d2050125/yolox_nano.onnx",
153
+ "size": 3659407,
154
+ "sha256": "c789161ed43c8269fcd4e67c67eeeb4e80c622da2eb296a20bc6007bd18a0b7d"
155
+ }
156
+ ],
157
+ "trainingData": [
158
+ {
159
+ "name": "COCO",
160
+ "terms": "Not read.",
161
+ "termsRead": false
162
+ }
163
+ ],
164
+ "openPoints": [],
165
+ "checkedAt": "2026-11-07"
166
+ },
167
+ {
168
+ "id": "slimsam-77",
169
+ "model": "SlimSAM-77",
170
+ "feature": "Select",
171
+ "license": "Apache-2.0",
172
+ "licenseEvidence": "The author's repo and Segment Anything, which it derives from, are both Apache-2.0. The pinned conversion is tagged apache-2.0 and has no license file.",
173
+ "authorRepo": "https://github.com/czg1225/SlimSAM",
174
+ "copyrightLines": [],
175
+ "pinRepo": "https://huggingface.co/Xenova/slimsam-77-uniform",
176
+ "pinRevision": "5850ab45f587c112167512ffef949107115e26a0",
177
+ "isAuthorRepo": false,
178
+ "files": [
179
+ {
180
+ "constant": "DEFAULT_SAM_ENCODER_URL",
181
+ "url": "https://huggingface.co/Xenova/slimsam-77-uniform/resolve/5850ab45f587c112167512ffef949107115e26a0/onnx/vision_encoder.onnx",
182
+ "size": 23276014,
183
+ "sha256": "9f8433273a6750b587779baa0cf5508111001bf7e7acfcf585d370139fd366d0"
184
+ },
185
+ {
186
+ "constant": "DEFAULT_SAM_DECODER_URL",
187
+ "url": "https://huggingface.co/Xenova/slimsam-77-uniform/resolve/5850ab45f587c112167512ffef949107115e26a0/onnx/prompt_encoder_mask_decoder.onnx",
188
+ "size": 16557892,
189
+ "sha256": "f4514391764fbd56e08e119060d874ecd7d52994bfb1968af159e12d4943b5bb"
190
+ }
191
+ ],
192
+ "trainingData": [
193
+ {
194
+ "name": "SA-1B",
195
+ "terms": "Meta describes a research-only license on the dataset's page. The full text was not read.",
196
+ "termsUrl": "https://ai.meta.com/datasets/segment-anything/",
197
+ "termsRead": false
198
+ }
199
+ ],
200
+ "openPoints": [],
201
+ "checkedAt": "2026-11-07"
202
+ },
203
+ {
204
+ "id": "depth-anything-v2-small",
205
+ "model": "Depth Anything V2 Small",
206
+ "feature": "Depth",
207
+ "license": "Apache-2.0",
208
+ "licenseEvidence": "The author's README says the Small model is under Apache-2.0. Base, Large and Giant are CC-BY-NC-4.0 and are not used here.",
209
+ "authorRepo": "https://github.com/DepthAnything/Depth-Anything-V2",
210
+ "copyrightLines": [],
211
+ "pinRepo": "https://huggingface.co/onnx-community/depth-anything-v2-small",
212
+ "pinRevision": "4472b7362082ad9968fee890ca0f1e5aca36b93d",
213
+ "isAuthorRepo": false,
214
+ "files": [
215
+ {
216
+ "constant": "DEFAULT_DEPTH_MODEL_URL",
217
+ "url": "https://huggingface.co/onnx-community/depth-anything-v2-small/resolve/4472b7362082ad9968fee890ca0f1e5aca36b93d/onnx/model_quantized.onnx",
218
+ "size": 27258801,
219
+ "sha256": "fcf51f1b230362b28690bb9d1809bf0431f29cad20534e3f589bd7285547f20d"
220
+ }
221
+ ],
222
+ "trainingData": [
223
+ {
224
+ "name": "Virtual KITTI 2",
225
+ "terms": "Listed as CC BY-NC-SA 3.0.",
226
+ "termsUrl": "https://europe.naverlabs.com/proxy-virtual-worlds-vkitti-2/",
227
+ "termsRead": true
228
+ },
229
+ {
230
+ "name": "ImageNet-21K, Places365, SA-1B and others named in the paper",
231
+ "terms": "Not read in full for this model.",
232
+ "termsRead": false
233
+ }
234
+ ],
235
+ "openPoints": [],
236
+ "checkedAt": "2026-11-07"
237
+ },
238
+ {
239
+ "id": "scunet-real-psnr",
240
+ "model": "SCUNet real-PSNR",
241
+ "feature": "Denoise",
242
+ "license": "Apache-2.0 OR MIT",
243
+ "licenseEvidence": "The author's SCUNet repo is Apache-2.0, but its download script fetches weights from releases of the author's MIT-licensed KAIR repo. The pinned conversion is tagged apache-2.0, and its LICENSE.txt is MIT text.",
244
+ "authorRepo": "https://github.com/cszn/SCUNet",
245
+ "copyrightLines": [
246
+ "Copyright 2022 Kai Zhang (cskaizhang@gmail.com, https://cszn.github.io/). All rights reserved.",
247
+ "Copyright (c) 2020 Kai Zhang (cskaizhang@gmail.com)",
248
+ "Copyright (c) 2019 Kai Zhang"
249
+ ],
250
+ "pinRepo": "https://huggingface.co/Heliosoph/scunet-onnx",
251
+ "pinRevision": "6d11417ee2fbcc73783c502a238ac115097754fe",
252
+ "isAuthorRepo": false,
253
+ "files": [
254
+ {
255
+ "constant": "DEFAULT_DENOISE_MODEL_URL",
256
+ "url": "https://huggingface.co/Heliosoph/scunet-onnx/resolve/6d11417ee2fbcc73783c502a238ac115097754fe/scunet_color_real_psnr.onnx",
257
+ "size": 3798678,
258
+ "sha256": "231be201ab413dbc999d7951caa9844846b93a12a40a41e037d6b5888ed4e88c"
259
+ },
260
+ {
261
+ "constant": "DEFAULT_DENOISE_DATA_URL",
262
+ "url": "https://huggingface.co/Heliosoph/scunet-onnx/resolve/6d11417ee2fbcc73783c502a238ac115097754fe/scunet_color_real_psnr.onnx.data",
263
+ "size": 73138176,
264
+ "sha256": "98825ea1210b641c71e5f052f582c70c49fd44b35387ebe2c034268c17df3feb"
265
+ }
266
+ ],
267
+ "trainingData": [
268
+ {
269
+ "name": "WED, DIV2K, Flickr2K (named in the paper; the exact real-PSNR set is unconfirmed)",
270
+ "terms": "DIV2K's site says it is for academic research only. The others were not read.",
271
+ "termsUrl": "https://data.vision.ee.ethz.ch/cvl/DIV2K/",
272
+ "termsRead": false
273
+ }
274
+ ],
275
+ "openPoints": [
276
+ "The author hasn't said which of the two licenses covers these weights, so both notices are reproduced."
277
+ ],
278
+ "checkedAt": "2026-11-07"
279
+ },
280
+ {
281
+ "id": "pp-ocrv4-det",
282
+ "model": "PP-OCRv4 detector",
283
+ "feature": "Read text",
284
+ "license": "Apache-2.0",
285
+ "licenseEvidence": "PaddleOCR is Apache-2.0. RapidOCR, which made this conversion, says copyright in the weights stays with the PaddleOCR rights holders and that conversions stay under Apache-2.0.",
286
+ "authorRepo": "https://github.com/PaddlePaddle/PaddleOCR",
287
+ "copyrightLines": ["Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved."],
288
+ "pinRepo": "https://huggingface.co/SWHL/RapidOCR",
289
+ "pinRevision": "1cfba2e90fc938db55889873735088de210cc173",
290
+ "isAuthorRepo": false,
291
+ "files": [
292
+ {
293
+ "constant": "DEFAULT_TEXT_DETECTOR_URL",
294
+ "url": "https://huggingface.co/SWHL/RapidOCR/resolve/1cfba2e90fc938db55889873735088de210cc173/PP-OCRv4/ch_PP-OCRv4_det_infer.onnx",
295
+ "size": 4745517,
296
+ "sha256": "d2a7720d45a54257208b1e13e36a8479894cb74155a5efe29462512d42f49da9"
297
+ }
298
+ ],
299
+ "trainingData": [
300
+ {
301
+ "name": "Not identified",
302
+ "terms": "Not read.",
303
+ "termsRead": false
304
+ }
305
+ ],
306
+ "openPoints": [],
307
+ "checkedAt": "2026-11-07"
308
+ },
309
+ {
310
+ "id": "pp-ocrv5-latin",
311
+ "model": "PP-OCRv5 Latin recognizer",
312
+ "feature": "Read text",
313
+ "license": "Apache-2.0",
314
+ "licenseEvidence": "PaddleOCR is Apache-2.0, and PaddlePaddle's model card for the Latin recognizer says the same. The pinned conversion is tagged apache-2.0 and has no license file.",
315
+ "authorRepo": "https://github.com/PaddlePaddle/PaddleOCR",
316
+ "copyrightLines": ["Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved."],
317
+ "pinRepo": "https://huggingface.co/monkt/paddleocr-onnx",
318
+ "pinRevision": "7b02d0a30a07ba2b92ad1ff5a8941ae2c633de65",
319
+ "isAuthorRepo": false,
320
+ "files": [
321
+ {
322
+ "constant": "DEFAULT_TEXT_RECOGNIZER_URL",
323
+ "url": "https://huggingface.co/monkt/paddleocr-onnx/resolve/7b02d0a30a07ba2b92ad1ff5a8941ae2c633de65/languages/latin/rec.onnx",
324
+ "size": 7862832,
325
+ "sha256": "614ffc2d6d3902d360fad7f1b0dd455ee45e877069d14c4e51a99dc4ef144409"
326
+ },
327
+ {
328
+ "constant": "DEFAULT_TEXT_DICTIONARY_URL",
329
+ "url": "https://huggingface.co/monkt/paddleocr-onnx/resolve/7b02d0a30a07ba2b92ad1ff5a8941ae2c633de65/languages/latin/dict.txt",
330
+ "size": 1634,
331
+ "sha256": "3c0a8a79b612653c25f765271714f71281e4e955962c153e272b7b8c1d2b13ff"
332
+ }
333
+ ],
334
+ "trainingData": [
335
+ {
336
+ "name": "Not identified",
337
+ "terms": "Not read.",
338
+ "termsRead": false
339
+ }
340
+ ],
341
+ "openPoints": [],
342
+ "checkedAt": "2026-11-07"
343
+ }
344
+ ]
345
+ }