deepar 4.0.3-alpha-test → 4.1.0-alpha-720
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 +2 -2
- package/js/deepar.d.ts +47 -25
- package/js/deepar.esm.d.ts +47 -25
- package/js/deepar.esm.js +1 -1
- package/js/deepar.js +1 -1
- package/models/foot/foot-detection-96x96x6.bin +0 -0
- package/models/foot/foot-tracker-96x96x13-test.bin +0 -0
- package/models/foot/foot-tracker-96x96x18-test.bin +0 -0
- package/package.json +1 -1
- package/wasm/deepar.wasm +0 -0
- package/wasm/libxzimgPoseEstimation.wasm +0 -0
- package/models/foot/foot-detector-android.bin +0 -0
- package/models/foot/foot-detector-ios.bin +0 -0
- package/models/foot/foot-tracker-android.bin +0 -0
- package/models/foot/foot-tracker-ios.bin +0 -0
package/README.md
CHANGED
|
@@ -209,8 +209,8 @@ To use shoe try-on feature DeepAR needs to initialize foot tracking. All the `fo
|
|
|
209
209
|
|
|
210
210
|
```javascript
|
|
211
211
|
import poseEstimationWasmPath from 'deepar/wasm/libxzimgPoseEstimation.wasm';
|
|
212
|
-
import footDetectorPath from 'deepar/models/foot/foot-
|
|
213
|
-
import footTrackerPath from 'deepar/models/foot/foot-tracker-
|
|
212
|
+
import footDetectorPath from 'deepar/models/foot/foot-detection-96x96x6.bin';
|
|
213
|
+
import footTrackerPath from 'deepar/models/foot/foot-tracker-96x96x18-test.bin'; // or foot-tracker-96x96x13-test.bin
|
|
214
214
|
import footObjPath from 'deepar/models/foot/foot-model.obj';
|
|
215
215
|
|
|
216
216
|
// ...
|
package/js/deepar.d.ts
CHANGED
|
@@ -31,6 +31,12 @@ export interface FaceData {
|
|
|
31
31
|
*/
|
|
32
32
|
faceRect: number[];
|
|
33
33
|
}
|
|
34
|
+
export interface FootData {
|
|
35
|
+
/**
|
|
36
|
+
* True if the foot is detected, false otherwise.
|
|
37
|
+
*/
|
|
38
|
+
detected: boolean;
|
|
39
|
+
}
|
|
34
40
|
/**
|
|
35
41
|
* Functions that gets called by the DeepAR SDK.
|
|
36
42
|
* Pass them when creating {@link DeepAR} object in {@link DeepARParams.callbacks} object.
|
|
@@ -82,14 +88,20 @@ export interface DeepARCallbacks {
|
|
|
82
88
|
*/
|
|
83
89
|
onFaceVisibilityChanged?: (visible: boolean) => void;
|
|
84
90
|
/**
|
|
85
|
-
* Passes the information about the detected faces. If this callback is set it will get called every frame.
|
|
91
|
+
* Passes the information about the detected faces. If this callback is set, it will get called every frame when a face is detected.
|
|
86
92
|
* @param faceDataArray Information about all the tracked faces.
|
|
87
93
|
*/
|
|
88
94
|
onFaceTracked?: (faceDataArray: FaceData[]) => void;
|
|
89
95
|
/**
|
|
90
|
-
* Called when
|
|
96
|
+
* Called when foot tracking is fully initialized.
|
|
91
97
|
*/
|
|
92
|
-
|
|
98
|
+
onFootTrackingInitialized?: () => void;
|
|
99
|
+
/**
|
|
100
|
+
* Passes the information about the detected feet. If this callback is set, it will get called every frame when a foot is detected.
|
|
101
|
+
* @param leftFootData Information about the left foot.
|
|
102
|
+
* @param rightFootData Information about the right foot.
|
|
103
|
+
*/
|
|
104
|
+
onFeetTracked?: (leftFootData: FootData, rightFootData: FootData) => void;
|
|
93
105
|
/**
|
|
94
106
|
* Called when any DeepAR related event happens
|
|
95
107
|
* @param errorType Type of message.
|
|
@@ -128,26 +140,9 @@ export interface DeepARParams {
|
|
|
128
140
|
modelPath: string;
|
|
129
141
|
};
|
|
130
142
|
/**
|
|
131
|
-
* Object containing configuration for DeepAR foot tracking which is used for virtual shoe try on
|
|
143
|
+
* Object containing configuration for DeepAR foot tracking which is used for virtual shoe try on.
|
|
132
144
|
*/
|
|
133
|
-
footTrackingConfig?:
|
|
134
|
-
/**
|
|
135
|
-
* Path to the pose estimation wasm file, e.g. "/path/to/libPoseEstimation.wasm"
|
|
136
|
-
*/
|
|
137
|
-
poseEstimationWasmPath: string;
|
|
138
|
-
/**
|
|
139
|
-
* Path to the detector model, e.g. "/path/to/foot-detector-ios.bin"
|
|
140
|
-
*/
|
|
141
|
-
detectorPath: string;
|
|
142
|
-
/**
|
|
143
|
-
* Path to the tracker model, e.g. "/path/to/foot-tracker-ios.bin"
|
|
144
|
-
*/
|
|
145
|
-
trackerPath: string;
|
|
146
|
-
/**
|
|
147
|
-
* Path to the foot model object file, e.g. "/path/to/foot-model.obj"
|
|
148
|
-
*/
|
|
149
|
-
objPath: string;
|
|
150
|
-
};
|
|
145
|
+
footTrackingConfig?: DeepARFootTrackingConfig;
|
|
151
146
|
/**
|
|
152
147
|
* Path to deepar.wasm file. Something like "path/to/deepar.wasm".
|
|
153
148
|
*/
|
|
@@ -157,6 +152,28 @@ export interface DeepARParams {
|
|
|
157
152
|
*/
|
|
158
153
|
callbacks?: DeepARCallbacks;
|
|
159
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Foot tracking initialization parameters.
|
|
157
|
+
*/
|
|
158
|
+
export interface DeepARFootTrackingConfig {
|
|
159
|
+
/**
|
|
160
|
+
* Path to the pose estimation wasm file, e.g. "/path/to/libPoseEstimation.wasm".
|
|
161
|
+
*/
|
|
162
|
+
poseEstimationWasmPath: string;
|
|
163
|
+
/**
|
|
164
|
+
* Path to the detector model, e.g. "/path/to/foot-detection-96x96x6.bin".
|
|
165
|
+
*/
|
|
166
|
+
detectorPath: string;
|
|
167
|
+
/**
|
|
168
|
+
* Path to the tracker model, e.g. "/path/to/foot-tracker-96x96x18-test.bin".
|
|
169
|
+
* For better performance on older devices, you can use "/path/to/foot-tracker-96x96x13-test.bin".
|
|
170
|
+
*/
|
|
171
|
+
trackerPath: string;
|
|
172
|
+
/**
|
|
173
|
+
* Path to the foot model object file, e.g. "/path/to/foot-model.obj".
|
|
174
|
+
*/
|
|
175
|
+
objPath: string;
|
|
176
|
+
}
|
|
160
177
|
/**
|
|
161
178
|
* Describes the touch/click type.
|
|
162
179
|
*/
|
|
@@ -289,10 +306,15 @@ export declare class DeepAR {
|
|
|
289
306
|
*/
|
|
290
307
|
downloadFaceTrackingModel(path: string, callback?: () => void): void;
|
|
291
308
|
/**
|
|
292
|
-
* Downloads the foot tracking models
|
|
293
|
-
* @param
|
|
309
|
+
* Downloads the foot tracking models and initializes foot tracking.
|
|
310
|
+
* @param options Foot tracking initialization options.
|
|
311
|
+
* @param options.config Foot tracking configuration. It will extend any previously defined foot tracking configuration.
|
|
312
|
+
* @param options.onInitialized Callback that gets called when foot tracking is fully initialized.
|
|
294
313
|
*/
|
|
295
|
-
initializeFootTracking(
|
|
314
|
+
initializeFootTracking(options?: {
|
|
315
|
+
config?: DeepARFootTrackingConfig;
|
|
316
|
+
onInitialized?: () => void;
|
|
317
|
+
}): void;
|
|
296
318
|
/**
|
|
297
319
|
* Sets the face tracking model data.
|
|
298
320
|
* @param byteArray Face tracking model data.
|
package/js/deepar.esm.d.ts
CHANGED
|
@@ -31,6 +31,12 @@ export interface FaceData {
|
|
|
31
31
|
*/
|
|
32
32
|
faceRect: number[];
|
|
33
33
|
}
|
|
34
|
+
export interface FootData {
|
|
35
|
+
/**
|
|
36
|
+
* True if the foot is detected, false otherwise.
|
|
37
|
+
*/
|
|
38
|
+
detected: boolean;
|
|
39
|
+
}
|
|
34
40
|
/**
|
|
35
41
|
* Functions that gets called by the DeepAR SDK.
|
|
36
42
|
* Pass them when creating {@link DeepAR} object in {@link DeepARParams.callbacks} object.
|
|
@@ -82,14 +88,20 @@ export interface DeepARCallbacks {
|
|
|
82
88
|
*/
|
|
83
89
|
onFaceVisibilityChanged?: (visible: boolean) => void;
|
|
84
90
|
/**
|
|
85
|
-
* Passes the information about the detected faces. If this callback is set it will get called every frame.
|
|
91
|
+
* Passes the information about the detected faces. If this callback is set, it will get called every frame when a face is detected.
|
|
86
92
|
* @param faceDataArray Information about all the tracked faces.
|
|
87
93
|
*/
|
|
88
94
|
onFaceTracked?: (faceDataArray: FaceData[]) => void;
|
|
89
95
|
/**
|
|
90
|
-
* Called when
|
|
96
|
+
* Called when foot tracking is fully initialized.
|
|
91
97
|
*/
|
|
92
|
-
|
|
98
|
+
onFootTrackingInitialized?: () => void;
|
|
99
|
+
/**
|
|
100
|
+
* Passes the information about the detected feet. If this callback is set, it will get called every frame when a foot is detected.
|
|
101
|
+
* @param leftFootData Information about the left foot.
|
|
102
|
+
* @param rightFootData Information about the right foot.
|
|
103
|
+
*/
|
|
104
|
+
onFeetTracked?: (leftFootData: FootData, rightFootData: FootData) => void;
|
|
93
105
|
/**
|
|
94
106
|
* Called when any DeepAR related event happens
|
|
95
107
|
* @param errorType Type of message.
|
|
@@ -128,26 +140,9 @@ export interface DeepARParams {
|
|
|
128
140
|
modelPath: string;
|
|
129
141
|
};
|
|
130
142
|
/**
|
|
131
|
-
* Object containing configuration for DeepAR foot tracking which is used for virtual shoe try on
|
|
143
|
+
* Object containing configuration for DeepAR foot tracking which is used for virtual shoe try on.
|
|
132
144
|
*/
|
|
133
|
-
footTrackingConfig?:
|
|
134
|
-
/**
|
|
135
|
-
* Path to the pose estimation wasm file, e.g. "/path/to/libPoseEstimation.wasm"
|
|
136
|
-
*/
|
|
137
|
-
poseEstimationWasmPath: string;
|
|
138
|
-
/**
|
|
139
|
-
* Path to the detector model, e.g. "/path/to/foot-detector-ios.bin"
|
|
140
|
-
*/
|
|
141
|
-
detectorPath: string;
|
|
142
|
-
/**
|
|
143
|
-
* Path to the tracker model, e.g. "/path/to/foot-tracker-ios.bin"
|
|
144
|
-
*/
|
|
145
|
-
trackerPath: string;
|
|
146
|
-
/**
|
|
147
|
-
* Path to the foot model object file, e.g. "/path/to/foot-model.obj"
|
|
148
|
-
*/
|
|
149
|
-
objPath: string;
|
|
150
|
-
};
|
|
145
|
+
footTrackingConfig?: DeepARFootTrackingConfig;
|
|
151
146
|
/**
|
|
152
147
|
* Path to deepar.wasm file. Something like "path/to/deepar.wasm".
|
|
153
148
|
*/
|
|
@@ -157,6 +152,28 @@ export interface DeepARParams {
|
|
|
157
152
|
*/
|
|
158
153
|
callbacks?: DeepARCallbacks;
|
|
159
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Foot tracking initialization parameters.
|
|
157
|
+
*/
|
|
158
|
+
export interface DeepARFootTrackingConfig {
|
|
159
|
+
/**
|
|
160
|
+
* Path to the pose estimation wasm file, e.g. "/path/to/libPoseEstimation.wasm".
|
|
161
|
+
*/
|
|
162
|
+
poseEstimationWasmPath: string;
|
|
163
|
+
/**
|
|
164
|
+
* Path to the detector model, e.g. "/path/to/foot-detection-96x96x6.bin".
|
|
165
|
+
*/
|
|
166
|
+
detectorPath: string;
|
|
167
|
+
/**
|
|
168
|
+
* Path to the tracker model, e.g. "/path/to/foot-tracker-96x96x18-test.bin".
|
|
169
|
+
* For better performance on older devices, you can use "/path/to/foot-tracker-96x96x13-test.bin".
|
|
170
|
+
*/
|
|
171
|
+
trackerPath: string;
|
|
172
|
+
/**
|
|
173
|
+
* Path to the foot model object file, e.g. "/path/to/foot-model.obj".
|
|
174
|
+
*/
|
|
175
|
+
objPath: string;
|
|
176
|
+
}
|
|
160
177
|
/**
|
|
161
178
|
* Describes the touch/click type.
|
|
162
179
|
*/
|
|
@@ -289,10 +306,15 @@ export declare class DeepAR {
|
|
|
289
306
|
*/
|
|
290
307
|
downloadFaceTrackingModel(path: string, callback?: () => void): void;
|
|
291
308
|
/**
|
|
292
|
-
* Downloads the foot tracking models
|
|
293
|
-
* @param
|
|
309
|
+
* Downloads the foot tracking models and initializes foot tracking.
|
|
310
|
+
* @param options Foot tracking initialization options.
|
|
311
|
+
* @param options.config Foot tracking configuration. It will extend any previously defined foot tracking configuration.
|
|
312
|
+
* @param options.onInitialized Callback that gets called when foot tracking is fully initialized.
|
|
294
313
|
*/
|
|
295
|
-
initializeFootTracking(
|
|
314
|
+
initializeFootTracking(options?: {
|
|
315
|
+
config?: DeepARFootTrackingConfig;
|
|
316
|
+
onInitialized?: () => void;
|
|
317
|
+
}): void;
|
|
296
318
|
/**
|
|
297
319
|
* Sets the face tracking model data.
|
|
298
320
|
* @param byteArray Face tracking model data.
|