fix: ONNX face detection model scores/boxes dimension mismatch #592
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/face-pipeline-box-dim-mismatch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fix dimension mismatch between ONNX model outputs: scores has 4410 entries but boxes has only 3200 entries.
Root Cause
The loop iterated over
range(scores.shape[0])= 4410, butboxesonly has 3200 entries. This caused index out-of-bounds at i=3200. This was masked by an earlier numpy.item()bug (fixed in PR #588) that prevented the detection loop from reaching the out-of-bounds index.Changes
min(scores.shape[0], boxes.shape[0])for safety when output dimensions diverge