@framefields/vision 0.0.0-stage → 2.0.2
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/LICENCE +202 -0
- package/dist/chunk-CFhWmker.mjs +36 -0
- package/dist/index-DwGxgTRf.d.mts +1118 -0
- package/dist/index-DwGxgTRf.d.mts.map +1 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +6 -0
- package/dist/registry-CSFimt7C.mjs +196 -0
- package/dist/registry-CSFimt7C.mjs.map +1 -0
- package/dist/schemas.d.mts +198 -0
- package/dist/schemas.d.mts.map +1 -0
- package/dist/schemas.mjs +118 -0
- package/dist/schemas.mjs.map +1 -0
- package/dist/src-DbPyIIat.mjs +2810 -0
- package/dist/src-DbPyIIat.mjs.map +1 -0
- package/dist/web.d.mts +59 -0
- package/dist/web.d.mts.map +1 -0
- package/dist/web.mjs +131 -0
- package/dist/web.mjs.map +1 -0
- package/package.json +64 -3
- package/README.md +0 -3
package/dist/web.mjs
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "./chunk-CFhWmker.mjs";
|
|
2
|
+
import { a as modelKeyFor, i as VISION_VARIANTS, n as VISION_MODELS, r as VISION_TASKS, t as COCO_CLASSES } from "./registry-CSFimt7C.mjs";
|
|
3
|
+
import { A as decodeRtmdetIns, C as PoseSkeletonRenderer, D as decodeSelfie, E as COCO17_KEYPOINT_NAMES, F as preprocessSpec, I as toSourcePoint, L as analyzeSequence, M as PREPROCESS_BY_FAMILY, N as computeInputTransform, O as COCO17_KEYPOINT_COUNT, P as imageToTensor, R as TemporalObjectTracker, S as SegmentationTexturePool, T as COCO17_KEYPOINTS, _ as createNeutralLandmarks, a as VisionBundle, b as VisionModelStore, c as matchPoseToTracks, d as mergeSubjectMask, f as selectSubjectMask, g as setDefaultSessionProvider, h as createDefaultSessionProvider, i as pinNodeToObject, j as probabilityToAlpha, k as decodeRtmo, l as SpatialLandmarkTransformer, m as NodeSessionProvider, n as VisionNode, o as createVisionBundle, p as VisionRunner, r as pinNodeToLandmark, s as getPersonBoundingBox, t as src_exports, u as maskBounds, v as createNeutralObjectResult, w as COCO17_BONES, x as getDefaultModelsDir, y as createNeutralPoseResult, z as computeIoU } from "./src-DbPyIIat.mjs";
|
|
4
|
+
|
|
5
|
+
export * from "@framefields/core"
|
|
6
|
+
|
|
7
|
+
//#region src/runtime/webgpu-provider.ts
|
|
8
|
+
const ORT_WEB_SPECIFIER = "onnxruntime-web";
|
|
9
|
+
const defaultLoader = () => import(
|
|
10
|
+
/* @vite-ignore */
|
|
11
|
+
ORT_WEB_SPECIFIER
|
|
12
|
+
);
|
|
13
|
+
var WebGPUProvider = class {
|
|
14
|
+
kind = "webgpu";
|
|
15
|
+
_loader;
|
|
16
|
+
_providers;
|
|
17
|
+
_wasmFallback;
|
|
18
|
+
_ortPromise;
|
|
19
|
+
constructor(options = {}) {
|
|
20
|
+
this._loader = options.loader ?? defaultLoader;
|
|
21
|
+
this._providers = options.executionProviders ?? ["webgpu", "wasm"];
|
|
22
|
+
this._wasmFallback = options.wasmFallback !== false;
|
|
23
|
+
}
|
|
24
|
+
ort() {
|
|
25
|
+
if (!this._ortPromise) this._ortPromise = this._loader().catch((err) => {
|
|
26
|
+
this._ortPromise = void 0;
|
|
27
|
+
throw new Error(`onnxruntime-web failed to load (${String(err)}). Install it in the browser bundle or pass a custom loader.`);
|
|
28
|
+
});
|
|
29
|
+
return this._ortPromise;
|
|
30
|
+
}
|
|
31
|
+
async createSession(modelBytes) {
|
|
32
|
+
const ort = await this.ort();
|
|
33
|
+
let session;
|
|
34
|
+
try {
|
|
35
|
+
session = await ort.InferenceSession.create(modelBytes, {
|
|
36
|
+
executionProviders: [...this._providers],
|
|
37
|
+
graphOptimizationLevel: "all",
|
|
38
|
+
logSeverityLevel: 3
|
|
39
|
+
});
|
|
40
|
+
} catch (err) {
|
|
41
|
+
if (!this._wasmFallback || !this._providers.includes("webgpu")) throw err;
|
|
42
|
+
session = await ort.InferenceSession.create(modelBytes, {
|
|
43
|
+
executionProviders: ["wasm"],
|
|
44
|
+
graphOptimizationLevel: "all",
|
|
45
|
+
logSeverityLevel: 3
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
run: async (input) => {
|
|
50
|
+
const inputName = session.inputNames.includes(input.name) ? input.name : session.inputNames[0] ?? input.name;
|
|
51
|
+
const results = await session.run({ [inputName]: new ort.Tensor("float32", input.data, [...input.dims]) });
|
|
52
|
+
const outputs = {};
|
|
53
|
+
for (const [name, tensor] of Object.entries(results)) outputs[name] = {
|
|
54
|
+
data: tensor.data,
|
|
55
|
+
dims: [...tensor.dims]
|
|
56
|
+
};
|
|
57
|
+
return outputs;
|
|
58
|
+
},
|
|
59
|
+
release: () => {
|
|
60
|
+
session.release();
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Convenience factory: a `SessionProvider` type guard for the browser entry. Kept tiny so
|
|
67
|
+
* `@framefields/vision/web` stays tree-shakeable.
|
|
68
|
+
*/
|
|
69
|
+
function createWebGPUProvider(options) {
|
|
70
|
+
return new WebGPUProvider(options);
|
|
71
|
+
}
|
|
72
|
+
/** True when the environment exposes a WebGPU device (synchronous capability probe). */
|
|
73
|
+
function hasWebGPU() {
|
|
74
|
+
return typeof navigator !== "undefined" && "gpu" in navigator;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/web.ts
|
|
79
|
+
var web_exports = /* @__PURE__ */ __exportAll({
|
|
80
|
+
COCO17_BONES: () => COCO17_BONES,
|
|
81
|
+
COCO17_KEYPOINTS: () => COCO17_KEYPOINTS,
|
|
82
|
+
COCO17_KEYPOINT_COUNT: () => COCO17_KEYPOINT_COUNT,
|
|
83
|
+
COCO17_KEYPOINT_NAMES: () => COCO17_KEYPOINT_NAMES,
|
|
84
|
+
COCO_CLASSES: () => COCO_CLASSES,
|
|
85
|
+
NodeSessionProvider: () => NodeSessionProvider,
|
|
86
|
+
PREPROCESS_BY_FAMILY: () => PREPROCESS_BY_FAMILY,
|
|
87
|
+
PoseSkeletonRenderer: () => PoseSkeletonRenderer,
|
|
88
|
+
SegmentationTexturePool: () => SegmentationTexturePool,
|
|
89
|
+
SpatialLandmarkTransformer: () => SpatialLandmarkTransformer,
|
|
90
|
+
TemporalObjectTracker: () => TemporalObjectTracker,
|
|
91
|
+
VISION_MODELS: () => VISION_MODELS,
|
|
92
|
+
VISION_TASKS: () => VISION_TASKS,
|
|
93
|
+
VISION_VARIANTS: () => VISION_VARIANTS,
|
|
94
|
+
VisionBundle: () => VisionBundle,
|
|
95
|
+
VisionModelStore: () => VisionModelStore,
|
|
96
|
+
VisionNode: () => VisionNode,
|
|
97
|
+
VisionRunner: () => VisionRunner,
|
|
98
|
+
WebGPUProvider: () => WebGPUProvider,
|
|
99
|
+
analyzeSequence: () => analyzeSequence,
|
|
100
|
+
computeInputTransform: () => computeInputTransform,
|
|
101
|
+
computeIoU: () => computeIoU,
|
|
102
|
+
createDefaultSessionProvider: () => createDefaultSessionProvider,
|
|
103
|
+
createNeutralLandmarks: () => createNeutralLandmarks,
|
|
104
|
+
createNeutralObjectResult: () => createNeutralObjectResult,
|
|
105
|
+
createNeutralPoseResult: () => createNeutralPoseResult,
|
|
106
|
+
createVisionBundle: () => createVisionBundle,
|
|
107
|
+
createWebGPUProvider: () => createWebGPUProvider,
|
|
108
|
+
decodeRtmdetIns: () => decodeRtmdetIns,
|
|
109
|
+
decodeRtmo: () => decodeRtmo,
|
|
110
|
+
decodeSelfie: () => decodeSelfie,
|
|
111
|
+
getDefaultModelsDir: () => getDefaultModelsDir,
|
|
112
|
+
getPersonBoundingBox: () => getPersonBoundingBox,
|
|
113
|
+
hasWebGPU: () => hasWebGPU,
|
|
114
|
+
imageToTensor: () => imageToTensor,
|
|
115
|
+
maskBounds: () => maskBounds,
|
|
116
|
+
matchPoseToTracks: () => matchPoseToTracks,
|
|
117
|
+
mergeSubjectMask: () => mergeSubjectMask,
|
|
118
|
+
modelKeyFor: () => modelKeyFor,
|
|
119
|
+
pinNodeToLandmark: () => pinNodeToLandmark,
|
|
120
|
+
pinNodeToObject: () => pinNodeToObject,
|
|
121
|
+
preprocessSpec: () => preprocessSpec,
|
|
122
|
+
probabilityToAlpha: () => probabilityToAlpha,
|
|
123
|
+
selectSubjectMask: () => selectSubjectMask,
|
|
124
|
+
setDefaultSessionProvider: () => setDefaultSessionProvider,
|
|
125
|
+
toSourcePoint: () => toSourcePoint
|
|
126
|
+
});
|
|
127
|
+
__reExport(web_exports, src_exports);
|
|
128
|
+
|
|
129
|
+
//#endregion
|
|
130
|
+
export { COCO17_BONES, COCO17_KEYPOINTS, COCO17_KEYPOINT_COUNT, COCO17_KEYPOINT_NAMES, COCO_CLASSES, NodeSessionProvider, PREPROCESS_BY_FAMILY, PoseSkeletonRenderer, SegmentationTexturePool, SpatialLandmarkTransformer, TemporalObjectTracker, VISION_MODELS, VISION_TASKS, VISION_VARIANTS, VisionBundle, VisionModelStore, VisionNode, VisionRunner, WebGPUProvider, analyzeSequence, computeInputTransform, computeIoU, createDefaultSessionProvider, createNeutralLandmarks, createNeutralObjectResult, createNeutralPoseResult, createVisionBundle, createWebGPUProvider, decodeRtmdetIns, decodeRtmo, decodeSelfie, getDefaultModelsDir, getPersonBoundingBox, hasWebGPU, imageToTensor, maskBounds, matchPoseToTracks, mergeSubjectMask, modelKeyFor, pinNodeToLandmark, pinNodeToObject, preprocessSpec, probabilityToAlpha, selectSubjectMask, setDefaultSessionProvider, toSourcePoint };
|
|
131
|
+
//# sourceMappingURL=web.mjs.map
|
package/dist/web.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.mjs","names":[],"sources":["../src/runtime/webgpu-provider.ts","../src/web.ts"],"sourcesContent":["/**\n * Browser / WebGPU session provider .\n *\n * Mirrors `NodeSessionProvider` but uses `onnxruntime-web` with the WebGPU execution provider\n * and a WASM fallback. The ORT module is imported lazily behind an injectable loader, so:\n * - the Node core entry never pulls browser code, and\n * - unit tests can run fully offline with a fake module.\n *\n * `onnxruntime-web` is an OPTIONAL peer dependency — consumers of `@framefields/vision/web`\n * provide it; the main `@framefields/vision` entry never touches it.\n */\n\nimport type {\n\tSessionProvider,\n\tVisionSession,\n\tVisionTensorInput,\n\tVisionTensorOutputs,\n} from \"./session-provider.js\";\n\n/** Minimal structural view of the `onnxruntime-web` module — isolates the ORT API surface. */\nexport interface OrtWebTensor {\n\treadonly data: Float32Array | BigInt64Array | Int32Array;\n\treadonly dims: readonly number[];\n}\n\nexport interface OrtWebSession {\n\treadonly inputNames: readonly string[];\n\trun(feeds: Record<string, unknown>): Promise<Record<string, OrtWebTensor>>;\n\trelease(): Promise<void>;\n}\n\nexport interface OrtWebModule {\n\treadonly InferenceSession: {\n\t\tcreate(\n\t\t\tmodelBytes: Uint8Array,\n\t\t\toptions: {\n\t\t\t\texecutionProviders: string[];\n\t\t\t\tgraphOptimizationLevel?: \"disabled\" | \"basic\" | \"extended\" | \"all\";\n\t\t\t\t/** 0 verbose … 4 fatal. */\n\t\t\t\tlogSeverityLevel?: 0 | 1 | 2 | 3 | 4;\n\t\t\t},\n\t\t): Promise<OrtWebSession>;\n\t};\n\t/** ORT tensor constructor (called with `new`). */\n\treadonly Tensor: new (\n\t\ttype: \"float32\",\n\t\tdata: Float32Array,\n\t\tdims: readonly number[],\n\t) => unknown;\n}\n\nexport interface WebGPUProviderOptions {\n\t/** Injected ORT loader — defaults to a dynamic `import(\"onnxruntime-web\")`. */\n\treadonly loader?: () => Promise<OrtWebModule>;\n\t/** Execution providers in priority order. Defaults to `[\"webgpu\", \"wasm\"]`. */\n\treadonly executionProviders?: readonly string[];\n\t/** Fall back to WASM automatically if the WebGPU session fails to create. Default true. */\n\treadonly wasmFallback?: boolean;\n}\n\nconst ORT_WEB_SPECIFIER = \"onnxruntime-web\";\n\nconst defaultLoader = (): Promise<OrtWebModule> =>\n\timport(\n\t\t/* @vite-ignore */ ORT_WEB_SPECIFIER\n\t) as unknown as Promise<OrtWebModule>;\n\nexport class WebGPUProvider implements SessionProvider {\n\tpublic readonly kind = \"webgpu\" as const;\n\n\tprivate readonly _loader: () => Promise<OrtWebModule>;\n\tprivate readonly _providers: readonly string[];\n\tprivate readonly _wasmFallback: boolean;\n\tprivate _ortPromise?: Promise<OrtWebModule>;\n\n\tconstructor(options: WebGPUProviderOptions = {}) {\n\t\tthis._loader = options.loader ?? defaultLoader;\n\t\tthis._providers = options.executionProviders ?? [\"webgpu\", \"wasm\"];\n\t\tthis._wasmFallback = options.wasmFallback !== false;\n\t}\n\n\tprivate ort(): Promise<OrtWebModule> {\n\t\tif (!this._ortPromise) {\n\t\t\tthis._ortPromise = this._loader().catch((err: unknown) => {\n\t\t\t\tthis._ortPromise = undefined;\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`onnxruntime-web failed to load (${String(err)}). ` +\n\t\t\t\t\t\t\"Install it in the browser bundle or pass a custom loader.\",\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t\treturn this._ortPromise;\n\t}\n\n\tpublic async createSession(modelBytes: Uint8Array): Promise<VisionSession> {\n\t\tconst ort = await this.ort();\n\n\t\tlet session: OrtWebSession;\n\t\ttry {\n\t\t\tsession = await ort.InferenceSession.create(modelBytes, {\n\t\t\t\texecutionProviders: [...this._providers],\n\t\t\t\tgraphOptimizationLevel: \"all\",\n\t\t\t\t// Errors only: node-placement notes print as console errors otherwise.\n\t\t\t\tlogSeverityLevel: 3,\n\t\t\t});\n\t\t} catch (err) {\n\t\t\tif (!this._wasmFallback || !this._providers.includes(\"webgpu\")) throw err;\n\t\t\tsession = await ort.InferenceSession.create(modelBytes, {\n\t\t\t\texecutionProviders: [\"wasm\"],\n\t\t\t\tgraphOptimizationLevel: \"all\",\n\t\t\t\t// Errors only: node-placement notes print as console errors otherwise.\n\t\t\t\tlogSeverityLevel: 3,\n\t\t\t});\n\t\t}\n\n\t\treturn {\n\t\t\trun: async (input: VisionTensorInput): Promise<VisionTensorOutputs> => {\n\t\t\t\tconst inputName = session.inputNames.includes(input.name)\n\t\t\t\t\t? input.name\n\t\t\t\t\t: (session.inputNames[0] ?? input.name);\n\t\t\t\tconst results = await session.run({\n\t\t\t\t\t[inputName]: new ort.Tensor(\"float32\", input.data, [...input.dims]),\n\t\t\t\t});\n\t\t\t\tconst outputs: Record<string, VisionTensorOutputs[string]> = {};\n\t\t\t\tfor (const [name, tensor] of Object.entries(results)) {\n\t\t\t\t\toutputs[name] = {\n\t\t\t\t\t\tdata: tensor.data,\n\t\t\t\t\t\tdims: [...tensor.dims],\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn outputs;\n\t\t\t},\n\t\t\trelease: () => {\n\t\t\t\tvoid session.release();\n\t\t\t},\n\t\t};\n\t}\n}\n\n/**\n * Convenience factory: a `SessionProvider` type guard for the browser entry. Kept tiny so\n * `@framefields/vision/web` stays tree-shakeable.\n */\nexport function createWebGPUProvider(\n\toptions?: WebGPUProviderOptions,\n): WebGPUProvider {\n\treturn new WebGPUProvider(options);\n}\n\n/** True when the environment exposes a WebGPU device (synchronous capability probe). */\nexport function hasWebGPU(): boolean {\n\treturn typeof navigator !== \"undefined\" && \"gpu\" in navigator;\n}\n","/**\n * Browser entry (`@framefields/vision/web`).\n *\n * Re-exports the full engine plus the WebGPU session provider. Consumers pass a provider to\n * the runner explicitly (keeps the runner environment-agnostic and tree-shakeable):\n *\n * const runner = VisionRunner.create({ provider: createWebGPUProvider() });\n *\n * `onnxruntime-web` is an optional peer dependency, loaded lazily on the first session.\n */\n\nexport * from \"./index.js\";\nexport * from \"./runtime/webgpu-provider.js\";\n"],"mappings":";;;;;;;AA4DA,MAAM,oBAAoB;AAE1B,MAAM,sBACL;;CACoB;;AAGrB,IAAa,iBAAb,MAAuD;CACtD,AAAgB,OAAO;CAEvB,AAAiB;CACjB,AAAiB;CACjB,AAAiB;CACjB,AAAQ;CAER,YAAY,UAAiC,EAAE,EAAE;AAChD,OAAK,UAAU,QAAQ,UAAU;AACjC,OAAK,aAAa,QAAQ,sBAAsB,CAAC,UAAU,OAAO;AAClE,OAAK,gBAAgB,QAAQ,iBAAiB;;CAG/C,AAAQ,MAA6B;AACpC,MAAI,CAAC,KAAK,YACT,MAAK,cAAc,KAAK,SAAS,CAAC,OAAO,QAAiB;AACzD,QAAK,cAAc;AACnB,SAAM,IAAI,MACT,mCAAmC,OAAO,IAAI,CAAC,8DAE/C;IACA;AAEH,SAAO,KAAK;;CAGb,MAAa,cAAc,YAAgD;EAC1E,MAAM,MAAM,MAAM,KAAK,KAAK;EAE5B,IAAI;AACJ,MAAI;AACH,aAAU,MAAM,IAAI,iBAAiB,OAAO,YAAY;IACvD,oBAAoB,CAAC,GAAG,KAAK,WAAW;IACxC,wBAAwB;IAExB,kBAAkB;IAClB,CAAC;WACM,KAAK;AACb,OAAI,CAAC,KAAK,iBAAiB,CAAC,KAAK,WAAW,SAAS,SAAS,CAAE,OAAM;AACtE,aAAU,MAAM,IAAI,iBAAiB,OAAO,YAAY;IACvD,oBAAoB,CAAC,OAAO;IAC5B,wBAAwB;IAExB,kBAAkB;IAClB,CAAC;;AAGH,SAAO;GACN,KAAK,OAAO,UAA2D;IACtE,MAAM,YAAY,QAAQ,WAAW,SAAS,MAAM,KAAK,GACtD,MAAM,OACL,QAAQ,WAAW,MAAM,MAAM;IACnC,MAAM,UAAU,MAAM,QAAQ,IAAI,GAChC,YAAY,IAAI,IAAI,OAAO,WAAW,MAAM,MAAM,CAAC,GAAG,MAAM,KAAK,CAAC,EACnE,CAAC;IACF,MAAM,UAAuD,EAAE;AAC/D,SAAK,MAAM,CAAC,MAAM,WAAW,OAAO,QAAQ,QAAQ,CACnD,SAAQ,QAAQ;KACf,MAAM,OAAO;KACb,MAAM,CAAC,GAAG,OAAO,KAAK;KACtB;AAEF,WAAO;;GAER,eAAe;AACd,IAAK,QAAQ,SAAS;;GAEvB;;;;;;;AAQH,SAAgB,qBACf,SACiB;AACjB,QAAO,IAAI,eAAe,QAAQ;;;AAInC,SAAgB,YAAqB;AACpC,QAAO,OAAO,cAAc,eAAe,SAAS"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,67 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@framefields/vision",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"description": "On-device vision for framefields: RTMDet-Ins detection + instance masks, RTMO pose, and Selfie Segmenter mattes over ONNX Runtime.",
|
|
4
|
+
"version": "2.0.2",
|
|
5
|
+
"private": false,
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"license": "Apache-2.0",
|
|
12
|
+
"module": "./dist/index.mjs",
|
|
13
|
+
"types": "./dist/index.d.mts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.mts",
|
|
17
|
+
"development": "./src/index.ts",
|
|
18
|
+
"import": "./dist/index.mjs",
|
|
19
|
+
"default": "./dist/index.mjs"
|
|
20
|
+
},
|
|
21
|
+
"./schemas": {
|
|
22
|
+
"types": "./dist/schemas.d.mts",
|
|
23
|
+
"development": "./src/schemas.ts",
|
|
24
|
+
"import": "./dist/schemas.mjs",
|
|
25
|
+
"default": "./dist/schemas.mjs"
|
|
26
|
+
},
|
|
27
|
+
"./web": {
|
|
28
|
+
"types": "./dist/web.d.mts",
|
|
29
|
+
"development": "./src/web.ts",
|
|
30
|
+
"import": "./dist/web.mjs",
|
|
31
|
+
"default": "./dist/web.mjs"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist/**"
|
|
36
|
+
],
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"onnxruntime-web": "^1.24.0"
|
|
39
|
+
},
|
|
40
|
+
"peerDependenciesMeta": {
|
|
41
|
+
"onnxruntime-web": {
|
|
42
|
+
"optional": true
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"onnxruntime-node": "^1.24.0",
|
|
47
|
+
"webgpu": "^0.4.0",
|
|
48
|
+
"zod": "^4.3.6",
|
|
49
|
+
"@framefields/core": "2.0.2",
|
|
50
|
+
"@framefields/tensor-webgpu": "2.0.2"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@types/node": "^24.1.0",
|
|
54
|
+
"skia-canvas": "^3.0.8",
|
|
55
|
+
"tsdown": "^0.19.0",
|
|
56
|
+
"typescript": "^5.8.3",
|
|
57
|
+
"vitest": "^4.1.5",
|
|
58
|
+
"@framefields/tsconfig": "2.0.2"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build": "tsdown",
|
|
62
|
+
"dev": "tsdown --watch",
|
|
63
|
+
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
|
64
|
+
"test": "vitest run",
|
|
65
|
+
"test:models": "FRAMEFIELDS_VISION_E2E=1 vitest run src/models.e2e.test.ts"
|
|
66
|
+
}
|
|
6
67
|
}
|
package/README.md
DELETED