Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async init() {
this.useFloatTextures = !GLOBALS.browserUtils.isMobile && !GLOBALS.browserUtils.isSafari;
tf.ENV.set('WEBGL_DOWNLOAD_FLOAT_ENABLED', false);
this.classifier = knnClassifier.create();
// Load mobilenet.
this.mobilenetModule = await mobilenet.load();
}
async bindPage() {
this.knn = knnClassifier.create();
this.mobilenet = await mobilenetModule.load();
this.start();
}
constructor() {
this.knnClassifier = knnClassifier.create();
this.mapStringToIndex = [];
}