mirror of https://github.com/vladmandic/human
enable webgl uniform support for faster warmup
parent
4a5b7c40bb
commit
a0248a9f7c
|
@ -1,6 +1,6 @@
|
|||
# @vladmandic/human
|
||||
|
||||
Version: **2.1.1**
|
||||
Version: **2.1.2**
|
||||
Description: **Human: AI-powered 3D Face Detection & Rotation Tracking, Face Description & Recognition, Body Pose Tracking, 3D Hand & Finger Tracking, Iris Analysis, Age & Gender & Emotion Prediction, Gesture Recognition**
|
||||
|
||||
Author: **Vladimir Mandic <mandic00@live.com>**
|
||||
|
@ -9,8 +9,12 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
|
|||
|
||||
## Changelog
|
||||
|
||||
### **HEAD -> main** 2021/07/29 mandic00@live.com
|
||||
### **2.1.2** 2021/07/29 mandic00@live.com
|
||||
|
||||
|
||||
### **origin/main** 2021/07/29 mandic00@live.com
|
||||
|
||||
- fix typo
|
||||
- rebuild new release
|
||||
|
||||
### **2.1.1** 2021/07/29 mandic00@live.com
|
||||
|
|
|
@ -329,7 +329,8 @@ export class Human {
|
|||
if (this.tf.getBackend() === 'webgl' || this.tf.getBackend() === 'humangl') {
|
||||
this.tf.ENV.set('CHECK_COMPUTATION_FOR_ERRORS', false);
|
||||
this.tf.ENV.set('WEBGL_CPU_FORWARD', true);
|
||||
this.tf.ENV.set('WEBGL_PACK_DEPTHWISECONV', true);
|
||||
this.tf.ENV.set('WEBGL_PACK_DEPTHWISECONV', false);
|
||||
this.tf.ENV.set('WEBGL_USE_SHAPES_UNIFORMS', true);
|
||||
// if (!this.config.object.enabled) this.tf.ENV.set('WEBGL_FORCE_F16_TEXTURES', true); // safe to use 16bit precision
|
||||
if (typeof this.config['deallocate'] !== 'undefined' && this.config['deallocate']) { // hidden param
|
||||
log('changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:', true);
|
||||
|
|
|
@ -3,29 +3,6 @@
|
|||
* @external
|
||||
*/
|
||||
|
||||
// import from dist
|
||||
// get versions of all packages
|
||||
/*
|
||||
import * as packageBundle from '@tensorflow/tfjs/package.json';
|
||||
import * as packageCore from '@tensorflow/tfjs-core/package.json';
|
||||
import * as packageData from '@tensorflow/tfjs-data/package.json';
|
||||
import * as packageLayers from '@tensorflow/tfjs-layers/package.json';
|
||||
import * as packageConverter from '@tensorflow/tfjs-converter/package.json';
|
||||
// for backends, get version from source to avoid incorrect tree shaking
|
||||
import { version_cpu } from '@tensorflow/tfjs-backend-cpu/dist/index.js';
|
||||
import { version_webgl } from '@tensorflow/tfjs-backend-webgl/dist/index.js';
|
||||
import { version_wasm } from '@tensorflow/tfjs-backend-wasm/dist/index.js';
|
||||
|
||||
// export all
|
||||
export * from '@tensorflow/tfjs-core/dist/index.js';
|
||||
export * from '@tensorflow/tfjs-layers/dist/index.js';
|
||||
export * from '@tensorflow/tfjs-converter/dist/index.js';
|
||||
export * as data from '@tensorflow/tfjs-data/dist/index.js';
|
||||
export * from '@tensorflow/tfjs-backend-cpu/dist/index.js';
|
||||
export * from '@tensorflow/tfjs-backend-webgl/dist/index.js';
|
||||
export * from '@tensorflow/tfjs-backend-wasm/dist/index.js';
|
||||
*/
|
||||
|
||||
// import from src
|
||||
// get versions of all packages
|
||||
import { version as tfjsVersion } from '@tensorflow/tfjs/package.json';
|
||||
|
@ -39,6 +16,7 @@ import { version as tfjsBackendWASMVersion } from '@tensorflow/tfjs-backend-wasm
|
|||
|
||||
// export all
|
||||
// requires treeShaking:ignore-annotations due to tfjs misconfiguration
|
||||
/*
|
||||
export * from '@tensorflow/tfjs-core/src/index';
|
||||
export * from '@tensorflow/tfjs-layers/src/index';
|
||||
export * from '@tensorflow/tfjs-converter/src/index';
|
||||
|
@ -46,9 +24,17 @@ export * as data from '@tensorflow/tfjs-data/src/index';
|
|||
export * from '@tensorflow/tfjs-backend-cpu/src/index';
|
||||
export * from '@tensorflow/tfjs-backend-webgl/src/index';
|
||||
export * from '@tensorflow/tfjs-backend-wasm/src/index';
|
||||
/*
|
||||
*/
|
||||
|
||||
// export all
|
||||
export * from '@tensorflow/tfjs-core/dist/index.js';
|
||||
export * from '@tensorflow/tfjs-layers/dist/index.js';
|
||||
export * from '@tensorflow/tfjs-converter/dist/index.js';
|
||||
export * as data from '@tensorflow/tfjs-data/dist/index.js';
|
||||
export * from '@tensorflow/tfjs-backend-cpu/dist/index.js';
|
||||
export * from '@tensorflow/tfjs-backend-webgl/dist/index.js';
|
||||
export * from '@tensorflow/tfjs-backend-wasm/dist/index.js';
|
||||
|
||||
// export versions
|
||||
export const version = {
|
||||
tfjs: tfjsVersion,
|
||||
|
|
Loading…
Reference in New Issue