Skip to content

add INT8 per-channel static PTQ YuNet face detection model #309

Open
varun-jaiswal17 wants to merge 2 commits into
opencv:mainfrom
varun-jaiswal17:add-yunet-int8-perchannel
Open

add INT8 per-channel static PTQ YuNet face detection model #309
varun-jaiswal17 wants to merge 2 commits into
opencv:mainfrom
varun-jaiswal17:add-yunet-int8-perchannel

Conversation

@varun-jaiswal17
Copy link
Copy Markdown
Contributor

Adds a new INT8 per-channel statically quantized variant of the YuNet
face detection model, produced from the official FP32 model using ONNX
Runtime post-training quantization.

Per-channel quantization assigns one scale/zero-point per output channel
instead of one per entire layer, preserving per-channel weight distribution
and eliminating the accuracy gap seen in per-tensor quantization.

Conversion script

quantize_static(
    per_channel=True,
    weight_type=QuantType.QInt8,
    activation_type=QuantType.QUInt8,
    quant_format=QuantFormat.QDQ,
    calibrate_method=CalibrationMethod.MinMax,
)

@asmorkalov
Copy link
Copy Markdown
Contributor

Looks like we have to pay for git LFS. I cannot download the model. Do you have it somewhere else? Huggingface?

@varun-jaiswal17
Copy link
Copy Markdown
Contributor Author

Looks like we have to pay for git LFS. I cannot download the model. Do you have it somewhere else? Huggingface?

@asmorkalov
here is the google drive link for the model : https://drive.google.com/file/d/1P5MBGCJADkicXWEFRvDNfaJPkx4ibX7x/view?usp=sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants