ray-local-models / README.md
Shusek00's picture
Add dynamic YuNet with bounded rectangular inputs
5a13095 verified
|
Raw History Blame Contribute Delete
5.41 kB
---
library_name: onnx
license: other
license_name: upstream-model-and-dataset-terms
license_link: https://huggingface.co/Shusek00/ray-local-models/blob/main/README.md#provenance-and-terms
tags:
- face-recognition
- face-detection
- onnx
- fp16
- mobile
base_model:
- minchul/cvlface_adaface_ir50_webface4m
---
# Ray Local model exports
Deployment exports for the Ray Local Suvio plugin, evaluated on Apple M1 Max and a
Qualcomm SM8850 Android device. These are converted pretrained models, not new training runs.
| File | Bytes | Role |
| --- | ---: | --- |
| `tinyfacematch-fp16.onnx` | 6,948,481 | Default recognizer, 128 dimensions |
| `adaface-ir50-webface4m-fp16.onnx` | 87,227,974 | Optional larger recognizer, 512 dimensions |
| `yunet-2026may-dynamic-fp32.onnx` | 229,738 | Shared face detector and five landmarks |
The base pair is 7,178,219 bytes. All three current files together are 94,406,193 bytes.
The earlier `yunet-2023mar-640-fp32.onnx` remains available for reproducing previous
benchmarks; current plugin packages include only the dynamic detector.
`manifest.json` records exact SHA-256 digests and tensor contracts. Applications should
pin an immutable repository commit and verify both length and digest before opening a file.
## Tensor contracts
Both recognizers take `input`: float32 `[1, 3, 112, 112]`, RGB, NCHW, after five-point
ArcFace alignment. Float16 weights and internal computation retain float32 public I/O.
- TinyFaceMatch: `(pixel - 127.5) / 128.0`; `embedding`: float32 `[1, 128]`, L2 normalized.
- AdaFace: `(pixel - 127.5) / 127.5`; `embedding`: float32 `[1, 512]`. L2 normalize the output.
This CVLFace export uses RGB; do not substitute the BGR convention of other AdaFace exports.
- YuNet: `input`: float32 `[1, 3, height, width]`, BGR pixels in `[0, 255]`.
Pad each spatial dimension to a multiple of 32. Ray limits the longest source edge to
640 without upscaling, then adds zero padding at the right and bottom. Decode `cls_*`,
`obj_*`, `bbox_*`, `kps_*` at strides 8, 16, 32 using the actual padded dimensions.
A 640×360 frame uses 640×384. The dynamic model shares the 2023 model's learned weights.
The detector is still required. A larger embedding model does not replace face detection
or correct inaccurate landmarks. Embeddings from different recognizers are incompatible.
## Measurements
Aggregate public benchmark evaluation on prealigned crops, canonical ten-fold held-out
threshold selection, no flip augmentation:
| Export | CFP-FP, 7,000 pairs | CPLFW, 6,000 pairs |
| --- | ---: | ---: |
| TinyFaceMatch FP16 | 96.1143% | 90.8667% |
| AdaFace FP16 | 98.9429% | 93.9167% |
Warm batch-one recognition latency with synthetic inputs: TinyFaceMatch / AdaFace
1.251 / 3.724 ms on M1 Max CoreML, and 0.920 / 4.689 ms on Qualcomm QNN HTP.
Android strict QNN profiles recorded accelerator execution with CPU graph fallback disabled.
These are standalone model measurements; application integration and session loading add cost.
Android incremental warm PSS with YuNet on CPU: approximately 149 / 443 MB.
These earlier combined-memory measurements used the fixed 640×640 detector.
Dynamic detector geometry was separately checked on synthetic inputs on M1 Max;
recognition inputs remain static 112×112. QNN EP requires static shapes, so the dynamic
detector uses CPU in the current host while supported recognizers can use QNN HTP.
This is process memory, not a measurement of all NPU memory. File size is not runtime memory.
No identity labels, user photos, per-pair scores or embeddings are distributed here.
## Provenance and terms
This repository does not grant new rights to upstream pretrained weights or training data.
- **AdaFace**: [CVLFace AdaFace IR50 WebFace4M](https://huggingface.co/minchul/cvlface_adaface_ir50_webface4m),
by Minchul Kim and collaborators. The upstream model card requires following the training
dataset's license. See [AdaFace (CVPR 2022)](https://arxiv.org/abs/2204.00964) and
[CVLFace](https://github.com/mk-minchul/CVLface). ONNX export at opset 17; static batch one;
FP16 conversion with ONNX Runtime 1.29.0 and ONNX 1.22.0.
- **TinyFaceMatch**: [yuvrajraina/tinyfacematch](https://github.com/yuvrajraina/tinyfacematch),
`tinyfacematch-128-pretrained.onnx`, upstream SHA-256
`6d8588c1dc1f91fab930be355d33d4b6be0b74d70c46ae0f9c65d89be2865aa4`.
The repository code is MIT, but the model metadata and export script identify
InsightFace `buffalo_s/w600k_mbf.onnx` as its pretrained base, followed by PCA projection.
[InsightFace's pretrained model terms](https://github.com/deepinsight/insightface/tree/master/model_zoo)
restrict the provided weights to non-commercial research. Do not treat the wrapper's MIT
license as commercial clearance for these derivative weights.
- **YuNet**: [OpenCV Zoo](https://github.com/opencv/opencv_zoo/tree/main/models/face_detection_yunet),
`face_detection_yunet_2026may.onnx`, revision `47534e27c9851bb1128ccc0102f1145e27f23f98`,
MIT model directory license. The current file is byte-identical to the official dynamic
FP32 export; it is not a retrained or larger detector. The legacy static file is retained
separately for reproducibility.
For any intended distribution or use, the applicable upstream model and dataset terms remain in force.
This export repository makes no independent claim of commercial permission.