diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f6fafa1..6e46f53d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,10 @@ Repository: **** ## Changelog -### **HEAD -> main** 2021/04/05 mandic00@live.com +### **HEAD -> main** 2021/04/06 mandic00@live.com +- add dynamic viewport and fix web worker +- add cdn links ### **1.3.4** 2021/04/04 mandic00@live.com diff --git a/package.json b/package.json index c94a9da6..1d7063a6 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,6 @@ "tensorflow" ], "devDependencies": { - "@microsoft/api-extractor": "^7.13.2", "@tensorflow/tfjs": "^3.3.0", "@tensorflow/tfjs-backend-cpu": "^3.3.0", "@tensorflow/tfjs-backend-wasm": "^3.3.0", @@ -63,8 +62,8 @@ "@tensorflow/tfjs-node": "^3.3.0", "@tensorflow/tfjs-node-gpu": "^3.3.0", "@types/node": "^14.14.37", - "@typescript-eslint/eslint-plugin": "^4.20.0", - "@typescript-eslint/parser": "^4.20.0", + "@typescript-eslint/eslint-plugin": "^4.21.0", + "@typescript-eslint/parser": "^4.21.0", "@vladmandic/pilogger": "^0.2.15", "chokidar": "^3.5.1", "dayjs": "^1.10.4", @@ -78,7 +77,7 @@ "rimraf": "^3.0.2", "seedrandom": "^3.0.5", "simple-git": "^2.37.0", - "tslib": "^2.1.0", + "tslib": "^2.2.0", "typedoc": "^0.20.35", "typescript": "^4.2.3" } diff --git a/src/human.ts b/src/human.ts index e0f3abf7..c2707d2c 100644 --- a/src/human.ts +++ b/src/human.ts @@ -28,7 +28,8 @@ export type Tensor = typeof tf.Tensor; export type { Config } from './config'; export type { Result } from './result'; /** Defines all possible input types for **Human** detection */ -export type Input = Tensor | ImageData | ImageBitmap | HTMLImageElement | HTMLVideoElement | HTMLCanvasElement | OffscreenCanvas; +export type Input = Tensor | typeof Image | ImageData | ImageBitmap | HTMLImageElement | HTMLMediaElement | HTMLVideoElement | HTMLCanvasElement | OffscreenCanvas; + /** Error message */ export type Error = { error: string }; /** Instance of TensorFlow/JS */ diff --git a/src/image/image.ts b/src/image/image.ts index 13eead58..6031ac77 100644 --- a/src/image/image.ts +++ b/src/image/image.ts @@ -22,6 +22,7 @@ export function process(input, config): { tensor: tf.Tensor, canvas: OffscreenCa && !(typeof ImageData !== 'undefined' && input instanceof ImageData) && !(typeof ImageBitmap !== 'undefined' && input instanceof ImageBitmap) && !(typeof HTMLImageElement !== 'undefined' && input instanceof HTMLImageElement) + && !(typeof HTMLMediaElement !== 'undefined' && input instanceof HTMLMediaElement) && !(typeof HTMLVideoElement !== 'undefined' && input instanceof HTMLVideoElement) && !(typeof HTMLCanvasElement !== 'undefined' && input instanceof HTMLCanvasElement) && !(typeof OffscreenCanvas !== 'undefined' && input instanceof OffscreenCanvas)