updated face description

master
Vladimir Mandic 2021-03-24 11:08:38 -04:00
parent ad7e00dab1
commit 11e68676b2
3 changed files with 62 additions and 5 deletions

@ -47,8 +47,8 @@ all configurable in `browse.js:ui` configuration object and in the UI itself:
### Face Recognition Demo
To see a demo of all all face embedding features,
see `demo/embedding.html` which uses `demo/embedding.js` as JavaSript module
To see a demo of all all face description & embedding features,
see `demo/facematch.html` which uses `demo/facematch.js` as JavaSript module
It highlights functionality such as:

@ -2,7 +2,7 @@
<br>
To see a demo of all all face embedding features, see `/demo/embedding.js`
To see a demo of all all face embedding features, see `/demo/facematch.js`
It highlights functionality such as:
- Loading images
@ -129,7 +129,7 @@ Last parameter is optional and notes a minimal threshold for a match
Database can be further stored in a JS or JSON file and retrieved when needed to have
a permanent database of faces that can be expanded over time to cover any number of known faces
For example, see `/demo/embedding.js` and example database `/demo/faces.json`:
For example, see `/demo/facematch.js` and example database `/demo/faces.json`:
```js
// download db with known faces
@ -159,4 +159,4 @@ To achieve optimal result, `Human` performs following operations on an image bef
extracts all faces from them, processed them and then allows
for a selection of any face which sorts faces by similarity
Demo is available in `demo/embedding.html` which uses `demo/embedding.js` as JavaSript module
Demo is available in `demo/facematch.html` which uses `demo/facematch.js` as JavaSript module

57
Issues.md Normal file

@ -0,0 +1,57 @@
# Common Issues
## 1. Using Human with additional version of TFJS
When using `Human` library version with `TFJS` bundled and you try to load another copy of `TFJS` explicitly, you will see warnings in the console/inspector output
Additionally, if those two versions of `TFJS` as incompatible, it will result in runtime issues
Typically error message is:
```log
Platform browser has already been set. Overwriting the platform with [object Object].
cpu backend was already registered. Reusing existing backend factory.
The kernel '_FusedMatMul' for backend 'cpu' is already registered
The kernel 'Abs' for backend 'cpu' is already registered
...
```
Solution:
- Since `Human` already pre-packages `TFJS`, you do not need to import `TFJS` explicitly
- If you want to explicitly import `TFJS` into your project,
you should use `-nobundle` version of `Human` library that does not pre-package `TFJS`
## 2. Using Human with custom bundler
If you're using `Human` library with a custom bundler, bundler may not be able
to recognize target platform and automatically exclude unnecessary dependencies
This happens when using server-side-bundling to create a client-side package, for example inside `NextJS`.
Typically error message is:
```log
Error: Module not found: Can't resolve 'fs'
```
Solution: Configure custom bundler to mark specific dependencies as external
Example:
- ESBuild configuration:
```json
{ external: ['fs', 'buffer', 'util', 'os'] }
```
- WebPack configuration:
```json
externals: {
'fs': 'commonjs2 fs',
'buffer': 'commonjs2 buffer',
'util': 'commonjs2 util',
'os': 'os fs'
}
```