mirror of https://github.com/vladmandic/human
add exception handlers to all demos
parent
835bc65c00
commit
4b2bf9f45c
|
@ -11,6 +11,7 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
|
|||
|
||||
### **HEAD -> main** 2021/04/25 mandic00@live.com
|
||||
|
||||
- major update for 1.8 release candidate
|
||||
|
||||
### **origin/main** 2021/04/25 mandic00@live.com
|
||||
|
||||
|
|
3
TODO.md
3
TODO.md
|
@ -34,6 +34,3 @@ Build:
|
|||
- Build NodeJS deliverables in non-minified form
|
||||
|
||||
### TBD
|
||||
|
||||
- Remove modelPaths
|
||||
- NodeJS Exception handling
|
||||
|
|
|
@ -162,6 +162,13 @@ async function setupCamera() {
|
|||
}
|
||||
|
||||
async function main() {
|
||||
window.addEventListener('unhandledrejection', (evt) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(evt.reason || evt);
|
||||
document.getElementById('log').innerHTML = evt?.reason?.message || evt?.reason || evt;
|
||||
evt.preventDefault();
|
||||
});
|
||||
|
||||
await human.load();
|
||||
const video = await setupCamera();
|
||||
if (video) {
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
</div>
|
||||
<span id="desc" style="visibility: hidden; font-size: 0.4rem;"></span><br>
|
||||
</div>
|
||||
<div style="height: 10px"></div>
|
||||
<div id="list" style="height: 10px"></div>
|
||||
Extracted Faces - click on a face to sort by similarity and get a known face match:<br>
|
||||
<div id="faces"></div>
|
||||
</div>
|
||||
|
|
|
@ -168,6 +168,13 @@ async function createDB() {
|
|||
}
|
||||
|
||||
async function main() {
|
||||
window.addEventListener('unhandledrejection', (evt) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(evt.reason || evt);
|
||||
document.getElementById('list').innerHTML = evt?.reason?.message || evt?.reason || evt;
|
||||
evt.preventDefault();
|
||||
});
|
||||
|
||||
// pre-load human models
|
||||
await human.load();
|
||||
|
||||
|
|
|
@ -588,6 +588,14 @@ async function drawWarmup(res) {
|
|||
}
|
||||
|
||||
async function main() {
|
||||
window.addEventListener('unhandledrejection', (evt) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(evt.reason || evt);
|
||||
document.getElementById('log').innerHTML = evt?.reason?.message || evt?.reason || evt;
|
||||
status('exception error');
|
||||
evt.preventDefault();
|
||||
});
|
||||
|
||||
log('demo starting ...');
|
||||
|
||||
// parse url search params
|
||||
|
|
|
@ -321,3 +321,20 @@
|
|||
2021-04-25 14:09:17 [36mINFO: [39m Generate types: ["src/human.ts"]
|
||||
2021-04-25 14:09:21 [36mINFO: [39m Update Change log: ["/home/vlado/dev/human/CHANGELOG.md"]
|
||||
2021-04-25 14:09:21 [36mINFO: [39m Generate TypeDocs: ["src/human.ts"]
|
||||
2021-04-25 14:28:38 [36mINFO: [39m @vladmandic/human version 1.8.0
|
||||
2021-04-25 14:28:38 [36mINFO: [39m User: vlado Platform: linux Arch: x64 Node: v16.0.0
|
||||
2021-04-25 14:28:38 [36mINFO: [39m Build: file startup all type: production config: {"minifyWhitespace":true,"minifyIdentifiers":true,"minifySyntax":true}
|
||||
2021-04-25 14:28:38 [35mSTATE:[39m Build for: node type: tfjs: {"imports":1,"importBytes":39,"outputBytes":696,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-04-25 14:28:38 [35mSTATE:[39m Build for: node type: node: {"imports":35,"importBytes":514853,"outputBytes":474171,"outputFiles":"dist/human.node.js"}
|
||||
2021-04-25 14:28:38 [35mSTATE:[39m Build for: nodeGPU type: tfjs: {"imports":1,"importBytes":43,"outputBytes":700,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-04-25 14:28:38 [35mSTATE:[39m Build for: nodeGPU type: node: {"imports":35,"importBytes":514857,"outputBytes":474175,"outputFiles":"dist/human.node-gpu.js"}
|
||||
2021-04-25 14:28:38 [35mSTATE:[39m Build for: nodeWASM type: tfjs: {"imports":1,"importBytes":81,"outputBytes":746,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-04-25 14:28:38 [35mSTATE:[39m Build for: nodeWASM type: node: {"imports":35,"importBytes":514903,"outputBytes":474225,"outputFiles":"dist/human.node-wasm.js"}
|
||||
2021-04-25 14:28:38 [35mSTATE:[39m Build for: browserNoBundle type: tfjs: {"imports":1,"importBytes":2488,"outputBytes":1394,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-04-25 14:28:39 [35mSTATE:[39m Build for: browserNoBundle type: esm: {"imports":35,"importBytes":515551,"outputBytes":295025,"outputFiles":"dist/human.esm-nobundle.js"}
|
||||
2021-04-25 14:28:39 [35mSTATE:[39m Build for: browserBundle type: tfjs: {"modules":1267,"moduleBytes":4085087,"imports":7,"importBytes":2488,"outputBytes":1101728,"outputFiles":"dist/tfjs.esm.js"}
|
||||
2021-04-25 14:28:40 [35mSTATE:[39m Build for: browserBundle type: iife: {"imports":35,"importBytes":1615885,"outputBytes":1393158,"outputFiles":"dist/human.js"}
|
||||
2021-04-25 14:28:40 [35mSTATE:[39m Build for: browserBundle type: esm: {"imports":35,"importBytes":1615885,"outputBytes":1393116,"outputFiles":"dist/human.esm.js"}
|
||||
2021-04-25 14:28:40 [36mINFO: [39m Generate types: ["src/human.ts"]
|
||||
2021-04-25 14:28:45 [36mINFO: [39m Update Change log: ["/home/vlado/dev/human/CHANGELOG.md"]
|
||||
2021-04-25 14:28:45 [36mINFO: [39m Generate TypeDocs: ["src/human.ts"]
|
||||
|
|
2
wiki
2
wiki
|
@ -1 +1 @@
|
|||
Subproject commit 906244487754b61fd24f49fe2db91ea68264137d
|
||||
Subproject commit 11c9fd09a38aa5876a13befb41012e8997ba84c9
|
Loading…
Reference in New Issue