Conversation
…valuation geometry
vcharraut
marked this pull request as ready for review
September 14, 2026 16:00
… improve readability
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Improve lane attribution at intersections and between opposing lanes, while reducing frame-to-frame lane flicker.
Replace the linear distance/heading score and topology-dependent switching costs with a vehicle-axis fit:
The axis term distinguishes crossing lanes while treating forward and reverse headings as parallel to the same lane. The smaller direction term resolves nearby opposing lanes without dominating physical proximity.
0.35 × (vehicle_width / 2)²when switching away from an existing lane. This stabilizes near-equal candidates; an ineligible previous lane cannot remain selected.How
This PR has been totally made via LLM. I created a benchmark to quantify the current score of the lane selection algorithm and asked a LLM to improve it.
Benchmark and methodology
[-0.25, 0.25]m with seed20260808. Vehicles are 4.5 m long, 2 m wide, and evaluated at 10 m/s.Before / after results
Lane accuracy accepts any human-listed lane ID. Wrong-way accuracy compares the annotated flag with the selected lane's heading (
cos(heading_difference) < 0above 2.5 m/s). Combined accuracy requires both to be correct.The weighted score is
sum(case_weight × combined_correct) / sum(case_weight): allbetween_*cases have weight 1.2, ambiguous intersections 0.95, and other cases 1.0. Percentage-point changes use unrounded values.Largest lane-accuracy gains:
On combined correctness, 46 cases improve and 3 regress:
intersection_000_ambiguous,perpendicular_lane_97, andoffset_left_lane_167.Intersection stability
A separate temporal ablation replays 50 intersection poses for 20 frames each, alternates position by ±2 cm and heading by ±0.5°, and feeds the selected lane back into the next frame.
This comparison isolates the switching margin within the new algorithm; it is not the old-versus-new static benchmark. Increasing the coefficient from 0.25 to 0.35 leaves all 330 static result rows unchanged.