A dynamically quantized copy of LVFace-T_Glint360K.onnx from
bytedance-research/LVFace (MIT), for
on-device face embedding.
| File | Size | sha256 |
|---|---|---|
LVFace-T_Glint360K_int8.onnx |
19,821,170 bytes | 9b5470540cf22ac925e82a74bfcade10f3668da9ff10d5458ca5291a23462f5e |
Source: LVFace-T_Glint360K/LVFace-T_Glint360K.onnx at revision
b12702ab1f5c721748e054a66dc90e1edd1f0724 (76.7 MB, fp32).
from onnxruntime.quantization import QuantType, quantize_dynamic
from onnxruntime.quantization.shape_inference import quant_pre_process
quant_pre_process(src, pre)
quantize_dynamic(pre, dst, weight_type=QuantType.QInt8, per_channel=True,
op_types_to_quantize=["MatMul", "Gemm"])
Weights are quantized per channel. Activations are quantized at run time, so no calibration set was used. Because an activation's scale comes from the whole input tensor, run it unbatched (one face per call) so a face's embedding doesn't depend on its batch-mates.
The onnxruntime version used was not recorded, so running the recipe again gives an equivalent model but probably not these exact bytes. This upload exists so the file can be fetched by its hash.
MIT, as the upstream model. Copyright of the weights stays with the LVFace authors.