deepar 5.6.20 → 5.6.21
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/VERSION.txt +1 -1
- package/file_sizes.json +1 -0
- package/js/deepar.esm.js +1 -1
- package/js/deepar.js +1 -1
- package/js/dynamicModules/xzimg.js +1 -1
- package/js/dynamicModules/xzimg.js.LICENSE.txt +3 -103
- package/js/types/DeepAR.d.ts +6 -7
- package/js/types/callbacks.d.ts +5 -0
- package/js/types/dynamicImport.d.ts +10 -0
- package/js/types/dynamicModules/xzimg/index.d.ts +1 -1
- package/js/types/errors.d.ts +6 -0
- package/js/types/fetch.d.ts +51 -0
- package/js/types/flags_wasm.d.ts +8 -0
- package/js/types/initParams.d.ts +25 -5
- package/js/types/version.d.ts +1 -1
- package/js/types/watch-ticking.d.ts +8 -0
- package/models/foot/foot-detector-96x96x6-q8.bin +0 -0
- package/package.json +1 -1
- package/split_sum.webp +0 -0
- package/wasm/deepar.wasm +0 -0
- package/wasm/dyArcorePhysics.wasm +0 -0
- package/wasm/dyArcoreScripting.wasm +0 -0
- package/wasm/libxzimgPoseEstimation.wasm +0 -0
- package/wasm/tfjs-backend-wasm-simd.wasm +0 -0
- package/wasm/tfjs-backend-wasm-threaded-simd.wasm +0 -0
- package/wasm/tfjs-backend-wasm.wasm +0 -0
- package/models/foot/foot-detection-96x96x6.bin +0 -0
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/*! *****************************************************************************
|
|
2
|
-
Copyright (c) Microsoft Corporation.
|
|
3
|
-
|
|
4
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
-
purpose with or without fee is hereby granted.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
***************************************************************************** */
|
|
15
|
-
|
|
16
1
|
/**
|
|
17
2
|
* @license
|
|
18
3
|
* Copyright 2017 Google LLC. All Rights Reserved.
|
|
@@ -82,23 +67,6 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
82
67
|
* =============================================================================
|
|
83
68
|
*/
|
|
84
69
|
|
|
85
|
-
/**
|
|
86
|
-
* @license
|
|
87
|
-
* Copyright 2019 Google LLC. All Rights Reserved.
|
|
88
|
-
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
89
|
-
* you may not use this file except in compliance with the License.
|
|
90
|
-
* You may obtain a copy of the License at
|
|
91
|
-
*
|
|
92
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
93
|
-
*
|
|
94
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
95
|
-
* distributed under the License is distributed on an 'AS IS' BASIS,
|
|
96
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
97
|
-
* See the License for the specific language governing permissions and
|
|
98
|
-
* limitations under the License.
|
|
99
|
-
* =============================================================================
|
|
100
|
-
*/
|
|
101
|
-
|
|
102
70
|
/**
|
|
103
71
|
* @license
|
|
104
72
|
* Copyright 2020 Google Inc. All Rights Reserved.
|
|
@@ -133,23 +101,6 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
133
101
|
* =============================================================================
|
|
134
102
|
*/
|
|
135
103
|
|
|
136
|
-
/**
|
|
137
|
-
* @license
|
|
138
|
-
* Copyright 2020 Google LLC. All Rights Reserved.
|
|
139
|
-
* Licensed under the Apache License, Version 2.0 (the License);
|
|
140
|
-
* you may not use this file except in compliance with the License.
|
|
141
|
-
* You may obtain a copy of the License at
|
|
142
|
-
*
|
|
143
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
144
|
-
*
|
|
145
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
146
|
-
* distributed under the License is distributed on an AS IS BASIS,
|
|
147
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
148
|
-
* See the License for the specific language governing permissions and
|
|
149
|
-
* limitations under the License.
|
|
150
|
-
* =============================================================================
|
|
151
|
-
*/
|
|
152
|
-
|
|
153
104
|
/**
|
|
154
105
|
* @license
|
|
155
106
|
* Copyright 2021 Google LLC. All Rights Reserved.
|
|
@@ -169,41 +120,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
169
120
|
|
|
170
121
|
/**
|
|
171
122
|
* @license
|
|
172
|
-
* Copyright
|
|
173
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
174
|
-
* you may not use this file except in compliance with the License.
|
|
175
|
-
* You may obtain a copy of the License at
|
|
176
|
-
*
|
|
177
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
178
|
-
*
|
|
179
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
180
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
181
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
182
|
-
* See the License for the specific language governing permissions and
|
|
183
|
-
* limitations under the License.
|
|
184
|
-
* =============================================================================
|
|
185
|
-
*/
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* @license
|
|
189
|
-
* Copyright 2022 Google LLC.
|
|
190
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
191
|
-
* you may not use this file except in compliance with the License.
|
|
192
|
-
* You may obtain a copy of the License at
|
|
193
|
-
*
|
|
194
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
195
|
-
*
|
|
196
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
197
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
198
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
199
|
-
* See the License for the specific language governing permissions and
|
|
200
|
-
* limitations under the License.
|
|
201
|
-
* =============================================================================
|
|
202
|
-
*/
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* @license
|
|
206
|
-
* Copyright 2022 Google LLC. All Rights Reserved.
|
|
123
|
+
* Copyright 2023 Google LLC.
|
|
207
124
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
208
125
|
* you may not use this file except in compliance with the License.
|
|
209
126
|
* You may obtain a copy of the License at
|
|
@@ -220,24 +137,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
220
137
|
|
|
221
138
|
/**
|
|
222
139
|
* @license
|
|
223
|
-
* Copyright
|
|
224
|
-
* Licensed under the Apache License, Version 2.0 (the 'License');
|
|
225
|
-
* you may not use this file except in compliance with the License.
|
|
226
|
-
* You may obtain a copy of the License at
|
|
227
|
-
*
|
|
228
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
229
|
-
*
|
|
230
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
231
|
-
* distributed under the License is distributed on an 'AS IS' BASIS,
|
|
232
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
233
|
-
* See the License for the specific language governing permissions and
|
|
234
|
-
* limitations under the License.
|
|
235
|
-
* =============================================================================
|
|
236
|
-
*/
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* @license
|
|
240
|
-
* Copyright 2023 Google LLC.
|
|
140
|
+
* Copyright 2023 Google LLC. All Rights Reserved.
|
|
241
141
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
242
142
|
* you may not use this file except in compliance with the License.
|
|
243
143
|
* You may obtain a copy of the License at
|
|
@@ -254,7 +154,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
254
154
|
|
|
255
155
|
/**
|
|
256
156
|
* @license
|
|
257
|
-
* Copyright
|
|
157
|
+
* Copyright 2025 Google LLC. All Rights Reserved.
|
|
258
158
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
259
159
|
* you may not use this file except in compliance with the License.
|
|
260
160
|
* You may obtain a copy of the License at
|
package/js/types/DeepAR.d.ts
CHANGED
|
@@ -4,9 +4,8 @@ import { DeepARCallbacks } from "./callbacks";
|
|
|
4
4
|
import { DeepARParams } from "./initParams";
|
|
5
5
|
import { LogType } from "./logType";
|
|
6
6
|
import { ScriptingAPI } from "./scriptingApi";
|
|
7
|
-
import type * as xzimg from "./dynamicModules/xzimg/index";
|
|
8
|
-
import type * as mediaPipe from "./dynamicModules/mediaPipe/index";
|
|
9
7
|
import { FootData } from "./footData";
|
|
8
|
+
import { DynamicDeps } from "./dynamicImport";
|
|
10
9
|
export declare type ToneMapping = "Linear" | "Reinhard" | "Cineon" | "ACES" | "AGX" | "Neutral";
|
|
11
10
|
declare global {
|
|
12
11
|
interface Window extends DynamicDeps {
|
|
@@ -16,10 +15,6 @@ declare global {
|
|
|
16
15
|
require?: (modules: string[], onLoad: (mod: unknown) => void, onError: () => void) => void;
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
|
-
interface DynamicDeps {
|
|
20
|
-
__deeparDynamicJsModule_xzimg__: typeof xzimg;
|
|
21
|
-
__deeparDynamicJsModule_mediaPipe__: typeof mediaPipe;
|
|
22
|
-
}
|
|
23
18
|
/**
|
|
24
19
|
* Initialize the DeepAR SDK.<br><br>
|
|
25
20
|
* @param params Initialization parameters.
|
|
@@ -557,5 +552,9 @@ export declare class DeepAR {
|
|
|
557
552
|
left: FootData;
|
|
558
553
|
right: FootData;
|
|
559
554
|
} | null;
|
|
555
|
+
addPreRenderListener(listener: () => void): void;
|
|
556
|
+
addPostRenderListener(listener: () => void): void;
|
|
557
|
+
removePreRenderListener(listener: () => void): void;
|
|
558
|
+
removePostRenderListener(listener: () => void): void;
|
|
559
|
+
setWatchTicking(isTicking: boolean, beatsPerSecond?: number): void;
|
|
560
560
|
}
|
|
561
|
-
export {};
|
package/js/types/callbacks.d.ts
CHANGED
|
@@ -40,6 +40,11 @@ export interface DeepARCallbacks {
|
|
|
40
40
|
* @internal
|
|
41
41
|
*/
|
|
42
42
|
onFootTrackingInitialized?: (fovY: number, filteringDelay: number, width: number, height: number) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Called when face tracking is fully initialized.
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
onFaceTrackingInitialized?: (fovY: number, width: number, height: number) => void;
|
|
43
48
|
/**
|
|
44
49
|
* Called when segmentation is fully initialized.
|
|
45
50
|
* Be sure to check {@link DeepAR.isSegmentationInitialized} before setting this callback.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as xzimg from "./dynamicModules/xzimg";
|
|
2
|
+
import type * as mediaPipe from "./dynamicModules/mediaPipe";
|
|
3
|
+
import { CombinedGlobalProgress, GlobalProgress } from "./fetch";
|
|
4
|
+
export interface DynamicDeps {
|
|
5
|
+
__deeparDynamicJsModule_xzimg__: typeof xzimg;
|
|
6
|
+
__deeparDynamicJsModule_mediaPipe__: typeof mediaPipe;
|
|
7
|
+
}
|
|
8
|
+
export declare function disposeDynamicImports(): void;
|
|
9
|
+
export declare const dynamicImportXzimg: (path: string) => (progress: GlobalProgress | CombinedGlobalProgress) => Promise<typeof xzimg>;
|
|
10
|
+
export declare const dynamicImportMediaPipe: (path: string) => (progress: GlobalProgress | CombinedGlobalProgress) => Promise<typeof mediaPipe>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Foot, Segmentation, VideoManager, Geometry } from "../../../../xzimg/xzimg.esm";
|
|
1
|
+
export { Foot, Segmentation, VideoManager, Geometry, shutdownTfjs } from "../../../../xzimg/xzimg.esm";
|
package/js/types/errors.d.ts
CHANGED
|
@@ -4,3 +4,9 @@
|
|
|
4
4
|
export declare class SwitchEffectCanceled extends Error {
|
|
5
5
|
constructor(message?: string);
|
|
6
6
|
}
|
|
7
|
+
export declare class NoCameraError extends Error {
|
|
8
|
+
constructor(message?: string);
|
|
9
|
+
}
|
|
10
|
+
export declare class CameraPermissionDeniedError extends Error {
|
|
11
|
+
constructor(message?: string);
|
|
12
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export declare function setFileSizes(sizes: any): void;
|
|
2
|
+
export interface Progress {
|
|
3
|
+
loaded: number;
|
|
4
|
+
total: number;
|
|
5
|
+
}
|
|
6
|
+
interface FileProgress extends Progress {
|
|
7
|
+
isFailed: boolean;
|
|
8
|
+
dataPromise: Promise<ArrayBuffer>;
|
|
9
|
+
data: ArrayBuffer | null;
|
|
10
|
+
isStarted: boolean;
|
|
11
|
+
xhr: XMLHttpRequest;
|
|
12
|
+
isLengthComputable: boolean;
|
|
13
|
+
isEventLengthComputable: boolean;
|
|
14
|
+
isCancelled: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class GlobalProgress {
|
|
17
|
+
private files;
|
|
18
|
+
private totalProgress;
|
|
19
|
+
onProgress?: (progress: Progress) => void;
|
|
20
|
+
startImmediately: boolean;
|
|
21
|
+
constructor(startImmediately?: boolean);
|
|
22
|
+
downloadFile(url: string, type?: XMLHttpRequestResponseType, startImmediately?: boolean): Promise<ArrayBuffer>;
|
|
23
|
+
addCustomProgress(): (progress: Progress) => void;
|
|
24
|
+
private reportProgress;
|
|
25
|
+
getFileProgress(url: string): FileProgress;
|
|
26
|
+
getProgress(): Progress;
|
|
27
|
+
getFilePromises(url: string): Promise<ArrayBuffer>;
|
|
28
|
+
getFileData(url: string): ArrayBuffer | null;
|
|
29
|
+
getFilesList(): string[];
|
|
30
|
+
isUrlTracked(url: string): boolean;
|
|
31
|
+
dispose(): void;
|
|
32
|
+
startDownloading(): void;
|
|
33
|
+
allFilesHaveSize(): boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare class CombinedGlobalProgress {
|
|
36
|
+
private progressArray;
|
|
37
|
+
private progressGroupId;
|
|
38
|
+
private groupWeight;
|
|
39
|
+
private totalProgress;
|
|
40
|
+
onProgress?: (progress: Progress) => void;
|
|
41
|
+
addGlobalProgress(globalProgress: GlobalProgress, groupId?: number): void;
|
|
42
|
+
setGroupWeight(groupId: number, weight: number): void;
|
|
43
|
+
getFileProgress(url: string): FileProgress;
|
|
44
|
+
getProgress(): Progress;
|
|
45
|
+
getFilePromises(url: string): Promise<ArrayBuffer>;
|
|
46
|
+
getFileData(url: string): ArrayBuffer | null;
|
|
47
|
+
getFilesList(): string[];
|
|
48
|
+
isUrlTracked(url: string): boolean;
|
|
49
|
+
dispose(): void;
|
|
50
|
+
}
|
|
51
|
+
export {};
|
package/js/types/initParams.d.ts
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { ToneMapping } from "./DeepAR";
|
|
2
|
+
import { Progress } from "./fetch";
|
|
3
|
+
export declare type SwitchEffectOptions = {
|
|
4
|
+
slot?: string;
|
|
5
|
+
face?: number;
|
|
6
|
+
envmap?: string | ArrayBufferLike;
|
|
7
|
+
diamondEnvMap?: string | ArrayBufferLike;
|
|
8
|
+
onProgress?: (progress: Progress) => void;
|
|
9
|
+
trackingInit?: {
|
|
10
|
+
foot?: boolean;
|
|
11
|
+
wrist?: boolean;
|
|
12
|
+
face?: boolean;
|
|
13
|
+
segmentation?: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
2
16
|
/**
|
|
3
17
|
* Parameters for the initialization of {@link DeepAR} object.
|
|
4
18
|
*/
|
|
@@ -26,7 +40,12 @@ export interface DeepARParams {
|
|
|
26
40
|
* The URL of a DeepAR effect file. This effect will be applied when DeepAR is initialized.
|
|
27
41
|
* This parameter is optional. You can always later switch to a different effect with {@link DeepAR.switchEffect}.
|
|
28
42
|
*/
|
|
29
|
-
effect?: string;
|
|
43
|
+
effect?: string | ArrayBufferLike;
|
|
44
|
+
/**
|
|
45
|
+
* Options for switching effects
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
effectOptions?: Omit<SwitchEffectOptions, 'onProgress'>;
|
|
30
49
|
/**
|
|
31
50
|
* Path to the root directory of the DeepAR SDK. This path will be used to locate and download all the additional needed files like ML models and wasm files.
|
|
32
51
|
* By default, this points to the JsDelivr CDN. For example "https://cdn.jsdelivr.net/npm/deepar@5.0.0/".<br>
|
|
@@ -64,6 +83,11 @@ export interface DeepARParams {
|
|
|
64
83
|
* ```
|
|
65
84
|
*/
|
|
66
85
|
canvas?: HTMLCanvasElement;
|
|
86
|
+
/**
|
|
87
|
+
* Callback that will be called with the progress of the initialization.
|
|
88
|
+
* @internal
|
|
89
|
+
*/
|
|
90
|
+
onProgress?: (progress: Progress) => void;
|
|
67
91
|
/**
|
|
68
92
|
* Additional DeepAR options.
|
|
69
93
|
*/
|
|
@@ -127,10 +151,6 @@ export interface DeepARParams {
|
|
|
127
151
|
* Path to the tracker model, e.g. "/path/to/deepar/models/face-cnn/face-track-19-v2.bin".
|
|
128
152
|
*/
|
|
129
153
|
trackerPath?: string;
|
|
130
|
-
/**
|
|
131
|
-
* Path to the face model object file, e.g. "/path/to/deepar/models/face/face-rigid.obj".
|
|
132
|
-
*/
|
|
133
|
-
objPath?: string;
|
|
134
154
|
/**
|
|
135
155
|
* Path to tfjs-backend-wasm.wasm file, e.g. "path/to/deepar/wasm/tfjs-backend-wasm.wasm"
|
|
136
156
|
*/
|
package/js/types/version.d.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface DeepARInterface {
|
|
2
|
+
addPreRenderListener: (listener: () => void) => void;
|
|
3
|
+
removePreRenderListener: (listener: () => void) => void;
|
|
4
|
+
changeParameterVector: (name: string, parameterGroup: string, parameterType: string, index: number, x: number, y: number, z: number) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function addClock(deepAR: DeepARInterface, beatsPerSecond?: number): void;
|
|
7
|
+
export declare function removeClock(deepAR: DeepARInterface): void;
|
|
8
|
+
export {};
|
|
Binary file
|
package/package.json
CHANGED
package/split_sum.webp
ADDED
|
Binary file
|
package/wasm/deepar.wasm
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|