https://github.com/vladmandic/insightface
InsightFace for TFJS
https://github.com/vladmandic/insightface
face-recognition insightface tensorflow tfjs
Last synced: 8 months ago
JSON representation
InsightFace for TFJS
- Host: GitHub
- URL: https://github.com/vladmandic/insightface
- Owner: vladmandic
- License: mit
- Archived: true
- Created: 2022-08-04T15:59:32.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-18T17:04:07.000Z (about 3 years ago)
- Last Synced: 2024-10-27T22:44:45.021Z (12 months ago)
- Topics: face-recognition, insightface, tensorflow, tfjs
- Language: TypeScript
- Homepage: http://vladmandic.github.io/insightface/public
- Size: 41.9 MB
- Stars: 11
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# InsightFace for TFJS
TFJS port of InsightFace
## Models
Repository contains pretrained **TFJS graph models** for the following **InsightFace** variations
- `human-faceres`: *included for reference*, 6.7MB weights
- `human-mobilefacenet`: *included for reference*, 5.0MB weights
- `insightface-mobilenet-emore`: 6.7MB weights, 1.6ms avg
- `insightface-mobilenet-swish`: 12MB weights, 3.0ms avg
- `insightface-ghostnet-strides1`: 7.8MB weighs, 9.3ms avg
- `insightface-ghostnet-strides2`: 7.7MB weights, 7.4ms avg
- `insightface-efficientnet-b0`: 13MB weights, 9.8ms avg### Notes
- Models have been quantized to **F16** for size
- All models take `[1, 112, 112, 3]` cropped and normalized `[0..1]` image of a face as input
and produce as single float array as output which represents face embedding
- Performance numbers are using RTX3060## Demo & Compare
Demo app in `/src` uses `Human` library to detect and crop faces from input images before running `InsightFace` models to calculate face descriptors (embeddings)
And yes, you can use any other face detection method
### Sample Images
GitHub repository is void of sample images, beforing running demo place any number of images of any resolution containing one or more faces into `/assets/samples/`
## Sample Screenshot

### RunUse built-in dev server to compile sources and start a web server:
> npm run dev
## Credits
- Original implementation:
- Keras port:## TBD
- Optimize `similarity` in (%) from raw `distance`
- Find best `face.scale` per model