Skip to content

perf(api): vectorize computeOks [boost 6.05x] - #111

Merged
MiXaiLL76 merged 1 commit into
mainfrom
pr/P-7
Aug 23, 2026
Merged

perf(api): vectorize computeOks [boost 6.05x]#111
MiXaiLL76 merged 1 commit into
mainfrom
pr/P-7

Conversation

@Borda

@Borda Borda commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Changes:

  • Stack detection keypoints once and vectorize each ground truth comparison across detections.
  • Preserve baseline per-row reduction order and add visible/unlabeled keypoint regression coverage.

Impact:

  • Fixed direct computeOks workload improved from 0.023877019 s to 0.003949417 s (6.05x) with bit-identical output.

Verification:

  • pre-commit run --files faster_coco_eval/core/cocoeval.py tests/test_compute_oks.py
  • python -m pytest -p no:rerunfailures -q (147 passed, 2 skipped)

Residual limits:

  • Performance evidence covers one macOS arm64 direct-call workload; CI and broader workload coverage remain unobserved.

part of #80

Changes:
- Stack detection keypoints once and vectorize each ground truth comparison across detections.
- Preserve baseline per-row reduction order and add visible/unlabeled keypoint regression coverage.

Impact:
- Fixed direct computeOks workload improved from 0.023877019 s to 0.003949417 s (6.05x) with bit-identical output.

Verification:
- pre-commit run --files faster_coco_eval/core/cocoeval.py tests/test_compute_oks.py
- python -m pytest -p no:rerunfailures -q (147 passed, 2 skipped)

Residual limits:
- Performance evidence covers one macOS arm64 direct-call workload; CI and broader workload coverage remain unobserved.

---

Co-authored-by: Codex <codex@openai.com>
@Borda
Borda requested review from MiXaiLL76 and a balanced review from Copilot August 15, 2026 18:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Vectorizes OKS computation across detections while preserving numerical behavior.

Changes:

  • Stacks detection keypoints for vectorized distance calculations.
  • Adds visible and unlabeled keypoint regression coverage.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
faster_coco_eval/core/cocoeval.py Vectorizes per-ground-truth OKS calculations.
tests/test_compute_oks.py Verifies bit-identical OKS outputs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Borda Borda added the enhancement New feature or request label Aug 16, 2026
@Borda

Borda commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator Author

@MiXaiLL76 seems to be ready for review...

@Borda

Borda commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

@MiXaiLL76 could you pls have a look... 🐰

@MiXaiLL76
MiXaiLL76 merged commit 40e7fe4 into main Aug 23, 2026
16 checks passed
@MiXaiLL76
MiXaiLL76 deleted the pr/P-7 branch August 23, 2026 15:05
@MiXaiLL76 MiXaiLL76 mentioned this pull request Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants