This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
products:sbc:vim4:npu:demos:facenet [2024/12/03 02:49] louis |
products:sbc:vim4:npu:demos:facenet [2025/06/11 22:05] (current) louis |
||
---|---|---|---|
Line 6: | Line 6: | ||
{{indexmenu_n> | {{indexmenu_n> | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | FaceNet is a face recognition model. It will convert a face image into a feature map. Compare the feature map between image and face database. Here are two judgment indicators, cosine similarity and Euclidean distance. The closer the cosine similarity is to 1 and the closer the Euclidean distance is to 0, the more similar is between two faces. | ||
+ | |||
+ | Here takes **lin_1.jpg** as example. Inference results on VIM4. | ||
+ | |||
+ | {{: | ||
+ | |||
===== Get Source Code ===== | ===== Get Source Code ===== | ||
Line 28: | Line 37: | ||
==== Get Convert Tool ==== | ==== Get Convert Tool ==== | ||
- | Download Tool from [[gl> | + | Download Tool from [[gh> |
```shell | ```shell | ||
$ git lfs install | $ git lfs install | ||
- | $ git lfs clone https://gitlab.com/ | + | $ git lfs clone https://github.com/ |
$ cd vim4_npu_sdk | $ cd vim4_npu_sdk | ||
$ ls | $ ls | ||
Line 43: | Line 52: | ||
<WRAP important> | <WRAP important> | ||
- | If your kernel is older than 241129, please use version before tag ddk-3.4.7.7. | + | If your kernel is older than 241129, please use branch npu-ddk-1.7.5.5. |
</ | </ | ||
Line 163: | Line 172: | ||
$ ./facenet -m ../ | $ ./facenet -m ../ | ||
``` | ``` | ||
- | |||
- | {{: | ||
Here are two comparison methods, **Euclidean distance** and **cosine similarity**. | Here are two comparison methods, **Euclidean distance** and **cosine similarity**. |