mirror of https://github.com/vladmandic/human
release rebuild
parent
9a94631146
commit
455c7f519d
|
@ -9,11 +9,12 @@
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
### **HEAD -> main** 2022/01/16 mandic00@live.com
|
### **2.6.1** 2022/01/20 mandic00@live.com
|
||||||
|
|
||||||
|
|
||||||
### **origin/main** 2022/01/15 mandic00@live.com
|
### **origin/main** 2022/01/17 mandic00@live.com
|
||||||
|
|
||||||
|
- prototype global fetch handler
|
||||||
- fix face box and hand tracking when in front of face
|
- fix face box and hand tracking when in front of face
|
||||||
|
|
||||||
### **2.5.8** 2022/01/14 mandic00@live.com
|
### **2.5.8** 2022/01/14 mandic00@live.com
|
||||||
|
|
21
TODO.md
21
TODO.md
|
@ -29,19 +29,22 @@ Feature is automatically disabled in NodeJS without user impact
|
||||||
|
|
||||||
<br><hr><br>
|
<br><hr><br>
|
||||||
|
|
||||||
## Pending Release Notes
|
## Human 2.6 Release Notes
|
||||||
|
|
||||||
- Add global model cache hander using indexdb in browser environments
|
- Add model cache hander using **IndexDB** in *browser* environments
|
||||||
see `config.cacheModels` setting for details
|
see `config.cacheModels` setting for details
|
||||||
- Add additional demos
|
- Add additional demos
|
||||||
`human-motion` and `human-avatar`
|
`human-motion` and `human-avatar`
|
||||||
- Updated samples image gallery
|
- Updated samples image gallery
|
||||||
- Fix face box detections when face is partially occluded
|
- Allow monkey-patching `fetch` in NodeJS
|
||||||
- Fix face box scaling
|
If `fetch` function is defined, it can be used to load models
|
||||||
- Fix hand tracking when hand is in front of face
|
from HTTP/HTTPS URLs regardless of `tfjs` platform support
|
||||||
- Fix compatibility with `ElectronJS`
|
- Fix `BlazeFace` detections when face is partially occluded
|
||||||
- Fix interpolation for some body keypoints
|
- Fix `BlazeFace` box scaling
|
||||||
- Updated blazepose calculations
|
- Fix `HandTrack` tracking when hand is in front of face
|
||||||
- Changes to blazepose and handlandmarks annotations
|
- Fix `ElectronJS` compatibility issues
|
||||||
|
- Fix body keypoints interpolation algorithm
|
||||||
|
- Updated `BlazePose` calculations
|
||||||
|
- Changes to `BlazePose` and `HandLandmark` annotations
|
||||||
- Strong typing for string enums
|
- Strong typing for string enums
|
||||||
- Updated `TFJS`
|
- Updated `TFJS`
|
||||||
|
|
|
@ -12,10 +12,6 @@ const options = {
|
||||||
|
|
||||||
async function httpHandler(url, init?): Promise<Response | null> {
|
async function httpHandler(url, init?): Promise<Response | null> {
|
||||||
if (options.debug) log('load model fetch:', url, init);
|
if (options.debug) log('load model fetch:', url, init);
|
||||||
if (typeof fetch === 'undefined') {
|
|
||||||
log('error loading model: fetch function is not defined:');
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return fetch(url, init);
|
return fetch(url, init);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,8 +27,8 @@ export async function loadModel(modelPath: string | undefined): Promise<GraphMod
|
||||||
const cachedModelName = 'indexeddb://' + modelPathSegments[modelPathSegments.length - 1].replace('.json', ''); // generate short model name for cache
|
const cachedModelName = 'indexeddb://' + modelPathSegments[modelPathSegments.length - 1].replace('.json', ''); // generate short model name for cache
|
||||||
const cachedModels = await tf.io.listModels(); // list all models already in cache
|
const cachedModels = await tf.io.listModels(); // list all models already in cache
|
||||||
const modelCached = options.cacheModels && Object.keys(cachedModels).includes(cachedModelName); // is model found in cache
|
const modelCached = options.cacheModels && Object.keys(cachedModels).includes(cachedModelName); // is model found in cache
|
||||||
// create model prototype and decide if load from cache or from original modelurl
|
const tfLoadOptions = typeof fetch === 'undefined' ? {} : { fetchFunc: (url, init?) => httpHandler(url, init) };
|
||||||
const model: GraphModel = new tf.GraphModel(modelCached ? cachedModelName : modelUrl, { fetchFunc: (url, init?) => httpHandler(url, init) }) as unknown as GraphModel;
|
const model: GraphModel = new tf.GraphModel(modelCached ? cachedModelName : modelUrl, tfLoadOptions) as unknown as GraphModel; // create model prototype and decide if load from cache or from original modelurl
|
||||||
try {
|
try {
|
||||||
// @ts-ignore private function
|
// @ts-ignore private function
|
||||||
model.findIOHandler(); // decide how to actually load a model
|
model.findIOHandler(); // decide how to actually load a model
|
||||||
|
|
2
wiki
2
wiki
|
@ -1 +1 @@
|
||||||
Subproject commit 811b06ec406bfea770d2a548e7c69575d9cb9232
|
Subproject commit af424150fe3dd66dae9d952989f60eb9ad87e5e4
|
Loading…
Reference in New Issue