Skip to content

032_FaceMesh Score Normalization #423

Open
@cogency

Description

@cogency

Issue Type

Bug

OS

Windows

OS architecture

x86_64

Programming Language

Python

Framework

ONNX

Model name and Weights/Checkpoints URL

face_mesh_192x192_post.onnx

Description

I noticed the score output from FaceMesh is coming out as a logit, but the example video processing code referred to in:
https://github.com/PINTO0309/facemesh_onnx_tensorrt/blob/main/demo_video.py
uses it like a probability. This means that the threshold being applied will almost always pass since the positive logit will generally be larger than 1.0.

Solution: score needs to be converted to probability before being compared to threshold, i.e.
scoreProb = exp(score)/(1+exp(score))

It might be worth adding a note to the README.

Relevant Log Output

No response

URL or source code for simple inference testing code

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions