update wiki

master
Vladimir Mandic 2022-09-14 07:40:47 -04:00
parent a4cc793d5a
commit 9785618d94
1 changed files with 11 additions and 2 deletions

@ -15,7 +15,7 @@ It highlights functionality such as:
## Usage
To use face similarity compare feature, you must first enable `face.description` module
To use face similarity compare feature, make sure `face.description` module is enabled (default)
to calculate embedding vectors *(a.k.a. face descriptors)* for both all images you want to compare
To achieve accurate results, it is also highly recommended to have `face.mesh` and `face.detection.rotation`
@ -42,7 +42,7 @@ const similarity = human.similarity(firstResult.face[0].embedding, secondResult.
console.log(`faces are ${100 * similarity}% simmilar`);
```
If the image or video frame have multiple faces and you want to match all of them, simply loop through all `results.face`
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 < currentResult.face.length; i++) {
@ -52,6 +52,15 @@ for (let i = 0; i < currentResult.face.length; i++) {
}
```
However, note that default configuration only detects first face in the frame, so increase maximum number of detected faces as well:
```js
const myConfig = {
face: {
detector: { maxDetected: 100 },
},
};
```
Additional helper function is `human.enhance(face)` which returns an enhanced tensor
of a face image that can be further visualized with