updated embedding notes

master
Vladimir Mandic 2020-11-23 08:17:49 -05:00
parent 955e5a55f5
commit 3c1b6f7caf
2 changed files with 13 additions and 2 deletions

@ -22,9 +22,19 @@ const simmilarity = human.simmilarity(firstEmbedding, secondEmbedding);
console.log(`faces are ${100 * simmilarity}% simmilar`);
```
If the image or video frame have multiple faces and you want to match all of them, simply loop through all `results.face`
```js
for (let i = 0; i < secondResult.face.length; i++) {
const secondEmbedding = secondResult.face[i].embedding;
const simmilarity = human.simmilarity(firstEmbedding, secondEmbedding);
console.log(`face ${i} is ${100 * simmilarity}% simmilar`);
}
```
Embedding vectors are calulated values uniquely identifying a given face and presented as array of 192 float values
They can be stored as normal arrays and reused as needed
Simmilarity function calculates Eucilidean distance between all points in vector
Simmilarity function is based on Eucilidean distance between all points in vector
*Eucilidean distance is a square root of sum of squared distances between each point in (each value in 192-member array)*

@ -10,6 +10,7 @@
- Minimum version Firefox 55 from 2017
- WebGL: Lower performance due to Firefox handing of WebGL memory garbage collection
- WASM: For performance reasons it is recommended to enable `javascript.options.wasm.simd` in `about:config`
- WASM: Async operations are not supported (running multiple detections or models in parallel) Due to missing threaded WASM support in Firefox
- Web Workers: Not supported due to Firefox missing implementation for `OffscreenCanvas`
- **Safari**: *Limited support*
- Minimum version Safari 10.3