Skip to content

Commit

Permalink
Update docs about filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxJa4 committed Jan 13, 2024
1 parent fd4c32c commit 9922dd3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions doc/06_perception/13_traffic_light_detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,22 @@ This method sets up a publisher for the traffic light state. It publishes to the

This method is called whenever a new image message is received. It performs traffic light detection by using `traffic_light_inference.py` on the image and publishes the result.
The result is a `TrafficLightState` message where the state is set to the detected traffic light state (1 for green, 2 for red, 4 for yellow, 0 for unknown).

## Filtering of images

### Vision Node

Objects, which are detected as traffic light by the RTDETR-X model (or others), must fulfill the following criterias to be published:

- At least a 30% (0.30) certainty/probablity of the classification model
- More than twice as tall (height) as it is wide (width)
- Above 360px (upper half of the 1280x720 image)

### Traffic Light Node

Objects, which are published by the Vision Node, are further filtered by the following criterias:

- Classification probabilities of "Unknown" and "Side" are either both below 1e-10 or one of both are below 1e-15
- "Side" is treated as "Unknown"
- Valid states (Red, Green, Yellow) must be present at least twice in a row to be actually published
- A state decays (state=0; "Unknown") after 2 seconds if there is no new info in the meantime

0 comments on commit 9922dd3

Please sign in to comment.