Skip to content

Reset CLEAR continuity across empty frames - #5174

Closed
FlorianPfaff wants to merge 2 commits into
mainfrom
agent/fix-clear-gap-continuity
Closed

Reset CLEAR continuity across empty frames#5174
FlorianPfaff wants to merge 2 commits into
mainfrom
agent/fix-clear-gap-continuity

Conversation

@FlorianPfaff

Copy link
Copy Markdown
Owner

Bug

evaluate_clear(...) retained previous_timestep_id when a frame had no ground-truth detections or no tracker detections.

The next non-empty frame therefore received the 1000-point continuity bonus from the last non-empty frame rather than from the immediately preceding timestep. After a detection gap, this could force a lower-similarity assignment, suppress legitimate ID switches, and reduce the accumulated MOTP similarity.

Fix

Clear the immediate-timestep association state before continuing from either empty-frame branch. The separate previous_id state is intentionally preserved, so ID switches are still scored against the last historical match after the object reappears.

Regression coverage

The new focused regression covers both gap forms:

  • no ground-truth detections with a tracker false positive;
  • ground-truth detections with no tracker detections.

In both cases, the post-gap frame must optimize by similarity without stale continuity, while still recording the resulting historical ID switches.

Validation

  • isolated reproduction: current behavior chooses stale same-ID assignments with 0 switches and MOTP sum 3.2;
  • patched behavior chooses the higher-similarity crossed assignments with 2 switches and MOTP sum 3.8;
  • branch comparison: 2 commits ahead, 0 behind main;
  • final diff: 2 production additions and one focused regression module.

GitHub Actions is the authoritative full repository validation.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 24.98s
✅ JSON prettier 7 0 0 0 0.91s
✅ JSON v8r 7 0 0 4.17s
✅ MARKDOWN markdownlint 68 0 0 0 1.67s
✅ MARKDOWN markdown-table-formatter 68 0 0 0 0.68s
✅ PYTHON black 1866 87 0 0 91.22s
✅ PYTHON isort 1866 139 0 0 2.35s
✅ REPOSITORY betterleaks yes no no 2.77s
✅ REPOSITORY checkov yes no no 50.1s
✅ REPOSITORY gitleaks yes no no 17.17s
✅ REPOSITORY git_diff yes no no 0.26s
✅ REPOSITORY secretlint yes no no 81.94s
✅ REPOSITORY syft yes no no 6.18s
✅ REPOSITORY trivy-sbom yes no no 5.87s
✅ REPOSITORY trufflehog yes no no 31.71s
✅ YAML prettier 11 0 0 0 0.62s
✅ YAML v8r 11 0 0 11.24s
✅ YAML yamllint 11 0 0 0.48s

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.6.0 --custom-flavor-setup --custom-flavor-linters PYTHON_BLACK,PYTHON_ISORT,COPYPASTE_JSCPD,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_BETTERLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

Copy link
Copy Markdown
Owner Author

Closing as superseded by #5237. Both PRs apply the exact same production change to reset previous_timestep_id across empty frames; #5237 is the newer replacement with the regression integrated into the existing tracking-metrics test module.

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.

1 participant