Skip to content

feat(tracker): adjust generalized IoU threshold based on object speed - #11237

Merged
ogrex merged 9 commits into
autowarefoundation:mainfrom
ogrex:feat/multi_object_tracker/giou_by_object_speed
Aug 20, 2025
Merged

ogrex merged 9 commits into
autowarefoundation:mainfrom
ogrex:feat/multi_object_tracker/giou_by_object_speed

Conversation

@ogrex

@ogrex ogrex commented Aug 19, 2025 •

Copy link
Copy Markdown
Contributor

Need to merge with autowarefoundation/autoware_launch#1615

Description

This pull request enhances the logic for merging overlapped trackers in the multi-object tracker by introducing a dynamic threshold for the generalized IoU metric that adapts based on the speed of the tracked object. This change aims to improve the accuracy of tracker pruning, especially for objects with unknown classifications, by making the overlap criteria more sensitive to object motion.

Tracker pruning logic improvements

  • Added the calcGeneralizedIoUThresholdUnknown function in processor.cpp to compute a speed-dependent generalized IoU threshold, allowing for more nuanced handling of static and moving objects when their classification is unknown.
  • Updated the overlap check in mergeOverlappedTracker to use the dynamic IoU threshold for unknown objects, replacing the previous static threshold and improving merge decisions for moving versus static targets.
  • Inserted logic to calculate the speed of the relevant object (target if known, otherwise source) and apply the new threshold accordingly during tracker merging.

Detailed Explanation of Parameters

static_target_speed

  • Objects moving below this speed should always be detected when there is a nearby unknown object.
  • Current setting: 1.38 m/s (≈5 km/h), which corresponds to normal pedestrian walking speed.
  • Rationale: A vehicle moving at this low speed is nearly the same as a walking human, nearby unknown pedestrians should be reliably detected.

moving_target_speed

  • Objects moving above this speed should always merge with nearby unknown objects to prevent false unknown detections.
  • Current setting: 5.5 m/s (≈20 km/h), which represents a typical speed of a car in slow urban driving.
  • Rationale: At this speed, the object should be treated as a normal vehicle, and we should avoid false unknown detections.

Comparison

Before(Red) After(Green)
After this fix, the UNKNOWN object is kept without being merged into nearby TRUCK

simplescreenrecorder-2025-08-19_11.12.30.mp4

For moving target, UNKNOWN is merged as before

simplescreenrecorder-2025-08-19_11.37.05.mp4

In simulated scenes where we put different speed TRUCK with UNKNOWN nearby:
Before

before.mp4

After

after.mp4

Related links

Parent Issue:

  • Link

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions Bot added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Aug 19, 2025
@github-actions

github-actions Bot commented Aug 19, 2025 •

Copy link
Copy Markdown

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@ogrex
ogrex force-pushed the feat/multi_object_tracker/giou_by_object_speed branch from 93d9232 to 6b0ca5d Compare August 19, 2025 07:12
@ogrex
ogrex requested a review from linick-kang August 19, 2025 08:02
@xmfcx
xmfcx force-pushed the feat/multi_object_tracker/giou_by_object_speed branch from 0cf7d6f to 28651ac Compare August 19, 2025 18:22
@xmfcx

xmfcx commented Aug 19, 2025

Copy link
Copy Markdown
Contributor

I've rebased this PR to main to test if it works, you can continue as usual, thanks 👍

ogrex added 4 commits August 20, 2025 13:12
…t speed

Signed-off-by: lei.gu <lei.gu@tier4.jp>
Signed-off-by: lei.gu <lei.gu@tier4.jp>
This reverts commit c7e79ee.

Signed-off-by: lei.gu <lei.gu@tier4.jp>
…racy

Signed-off-by: lei.gu <lei.gu@tier4.jp>
@ogrex
ogrex force-pushed the feat/multi_object_tracker/giou_by_object_speed branch from c999f79 to dbebca0 Compare August 20, 2025 04:12
@ogrex ogrex added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Aug 20, 2025
@ogrex
ogrex requested a review from Copilot August 20, 2025 04:14

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

This pull request enhances the multi-object tracker by implementing dynamic generalized IoU thresholds for merging overlapped trackers based on target object speed. The improvement specifically addresses scenarios where objects have unknown classifications by making the overlap criteria more sensitive to object motion, preventing incorrect merging of static and moving objects.

  • Added speed-dependent IoU threshold calculation for unknown objects using linear interpolation between static and moving speed ranges
  • Updated tracker merging logic to use dynamic thresholds when one object has unknown classification
  • Enhanced merge decision accuracy by considering object velocity in overlap determination

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov

codecov Bot commented Aug 20, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 20.34%. Comparing base (3e58091) to head (7bc384e).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...i_object_tracker/src/multi_object_tracker_node.cpp 0.00% 4 Missing ⚠️
...e_multi_object_tracker/src/processor/processor.cpp 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11237      +/-   ##
==========================================
+ Coverage   20.20%   20.34%   +0.13%     
==========================================
  Files        1512     1513       +1     
  Lines      109848   110079     +231     
  Branches    35940    36006      +66     
==========================================
+ Hits        22200    22397     +197     
- Misses      70526    70742     +216     
+ Partials    17122    16940     -182     
Flag Coverage Δ *Carryforward flag
daily 21.85% <ø> (-0.01%) ⬇️ Carriedforward from e2f9741
daily-cuda 20.20% <ø> (-0.01%) ⬇️ Carriedforward from e2f9741
differential 38.22% <66.66%> (?)
differential-cuda 38.22% <66.66%> (?)
total-cuda 20.19% <ø> (-0.01%) ⬇️ Carriedforward from e2f9741

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

ogrex added 3 commits August 20, 2025 13:30
…ed threshold handling

Signed-off-by: lei.gu <lei.gu@tier4.jp>
… for clarity

Signed-off-by: lei.gu <lei.gu@tier4.jp>
…for clarity on speed thresholds

Signed-off-by: lei.gu <lei.gu@tier4.jp>
@technolojin

Copy link
Copy Markdown
Contributor

Similar issue has been resolved with this fix

before

Screenshot from 2025-08-19 16-55-45 Screenshot from 2025-08-19 16-55-54

after

Screenshot from 2025-08-19 16-53-33

…eeds and IoU threshold

Signed-off-by: lei.gu <lei.gu@tier4.jp>
@ogrex
ogrex force-pushed the feat/multi_object_tracker/giou_by_object_speed branch from 2f7294d to 7bc384e Compare August 20, 2025 07:53
@ogrex ogrex changed the title feat(tracker): adjust generalized IoU threshold based on target object speed feat(tracker): adjust generalized IoU threshold based on object speed Aug 20, 2025
@ogrex
ogrex marked this pull request as ready for review August 20, 2025 07:57

@technolojin technolojin 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.

LGTM

@ogrex
ogrex merged commit f7bc4e7 into autowarefoundation:main Aug 20, 2025
@github-project-automation github-project-automation Bot moved this from To Triage to Done in Software Working Group Aug 20, 2025
@ogrex
ogrex deleted the feat/multi_object_tracker/giou_by_object_speed branch August 20, 2025 08:45
ogrex added a commit to tier4/autoware_universe that referenced this pull request Aug 20, 2025
…autowarefoundation#11237)

* feat(tracker): adjust generalized IoU threshold based on target object speed

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tests): add merge test bench and update existing tests

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* Revert "feat(tests): add merge test bench and update existing tests"

This reverts commit c7e79ee.

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tracker): update IoU threshold values for improved tracking accuracy

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tracker): refactor calcGeneralizedIoUThresholdUnknown for improved threshold handling

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* fix(tracker): restore comment on generalized IoU threshold adjustment for clarity

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* fix(tracker): enhance comments in calcGeneralizedIoUThresholdUnknown for clarity on speed thresholds

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tracker): add pruning parameters for static and moving target speeds and IoU threshold

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* fix(tracker): rename target speed parameters to object speed for clarity

Signed-off-by: lei.gu <lei.gu@tier4.jp>

---------

Signed-off-by: lei.gu <lei.gu@tier4.jp>
rej55 pushed a commit to tier4/autoware_universe that referenced this pull request Aug 21, 2025
…t speed (#2323)

feat(tracker): adjust generalized IoU threshold based on object speed (autowarefoundation#11237)

* feat(tracker): adjust generalized IoU threshold based on target object speed



* feat(tests): add merge test bench and update existing tests



* Revert "feat(tests): add merge test bench and update existing tests"

This reverts commit c7e79ee.



* feat(tracker): update IoU threshold values for improved tracking accuracy



* feat(tracker): refactor calcGeneralizedIoUThresholdUnknown for improved threshold handling



* fix(tracker): restore comment on generalized IoU threshold adjustment for clarity



* fix(tracker): enhance comments in calcGeneralizedIoUThresholdUnknown for clarity on speed thresholds



* feat(tracker): add pruning parameters for static and moving target speeds and IoU threshold



* fix(tracker): rename target speed parameters to object speed for clarity



---------

Signed-off-by: lei.gu <lei.gu@tier4.jp>
mkquda pushed a commit to tier4/autoware_universe that referenced this pull request Mar 16, 2026
…autowarefoundation#11237)

* feat(tracker): adjust generalized IoU threshold based on target object speed

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tests): add merge test bench and update existing tests

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* Revert "feat(tests): add merge test bench and update existing tests"

This reverts commit c7e79ee.

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tracker): update IoU threshold values for improved tracking accuracy

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tracker): refactor calcGeneralizedIoUThresholdUnknown for improved threshold handling

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* fix(tracker): restore comment on generalized IoU threshold adjustment for clarity

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* fix(tracker): enhance comments in calcGeneralizedIoUThresholdUnknown for clarity on speed thresholds

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tracker): add pruning parameters for static and moving target speeds and IoU threshold

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* fix(tracker): rename target speed parameters to object speed for clarity

Signed-off-by: lei.gu <lei.gu@tier4.jp>

---------

Signed-off-by: lei.gu <lei.gu@tier4.jp>
mkquda pushed a commit to tier4/autoware_universe that referenced this pull request Apr 22, 2026
…autowarefoundation#11237)

* feat(tracker): adjust generalized IoU threshold based on target object speed

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tests): add merge test bench and update existing tests

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* Revert "feat(tests): add merge test bench and update existing tests"

This reverts commit c7e79ee.

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tracker): update IoU threshold values for improved tracking accuracy

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tracker): refactor calcGeneralizedIoUThresholdUnknown for improved threshold handling

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* fix(tracker): restore comment on generalized IoU threshold adjustment for clarity

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* fix(tracker): enhance comments in calcGeneralizedIoUThresholdUnknown for clarity on speed thresholds

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tracker): add pruning parameters for static and moving target speeds and IoU threshold

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* fix(tracker): rename target speed parameters to object speed for clarity

Signed-off-by: lei.gu <lei.gu@tier4.jp>

---------

Signed-off-by: lei.gu <lei.gu@tier4.jp>
tier4-autoware-public-bot Bot pushed a commit to tier4/autoware_universe_sensing_perception that referenced this pull request Jul 16, 2026
…autowarefoundation/autoware_universe#11237)

* feat(tracker): adjust generalized IoU threshold based on target object speed

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tests): add merge test bench and update existing tests

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* Revert "feat(tests): add merge test bench and update existing tests"

This reverts commit c7e79eec0b9928723175b3d52d9e235719a0932f.

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tracker): update IoU threshold values for improved tracking accuracy

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tracker): refactor calcGeneralizedIoUThresholdUnknown for improved threshold handling

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* fix(tracker): restore comment on generalized IoU threshold adjustment for clarity

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* fix(tracker): enhance comments in calcGeneralizedIoUThresholdUnknown for clarity on speed thresholds

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tracker): add pruning parameters for static and moving target speeds and IoU threshold

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* fix(tracker): rename target speed parameters to object speed for clarity

Signed-off-by: lei.gu <lei.gu@tier4.jp>

---------

Signed-off-by: lei.gu <lei.gu@tier4.jp>
tier4-autoware-public-bot Bot pushed a commit to tier4/autoware_universe_sensing_perception that referenced this pull request Jul 16, 2026
…autowarefoundation/autoware_universe#11237)

* feat(tracker): adjust generalized IoU threshold based on target object speed

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tests): add merge test bench and update existing tests

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* Revert "feat(tests): add merge test bench and update existing tests"

This reverts commit c7e79eec0b9928723175b3d52d9e235719a0932f.

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tracker): update IoU threshold values for improved tracking accuracy

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tracker): refactor calcGeneralizedIoUThresholdUnknown for improved threshold handling

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* fix(tracker): restore comment on generalized IoU threshold adjustment for clarity

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* fix(tracker): enhance comments in calcGeneralizedIoUThresholdUnknown for clarity on speed thresholds

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* feat(tracker): add pruning parameters for static and moving target speeds and IoU threshold

Signed-off-by: lei.gu <lei.gu@tier4.jp>

* fix(tracker): rename target speed parameters to object speed for clarity

Signed-off-by: lei.gu <lei.gu@tier4.jp>

---------

Signed-off-by: lei.gu <lei.gu@tier4.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:perception Advanced sensor data processing and environment understanding. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants