filtering
BoxFilter
A class composes multiple filtering functions.
Source code in t4_devkit/filtering/compose.py
__init__(params, tf_buffer)
Construct a new object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
FilterParams
|
Filtering parameters. |
required |
tf_buffer
|
TransformBuffer
|
Transformation buffer. |
required |
Source code in t4_devkit/filtering/compose.py
FilterByDistance
Filter a box by checking if the box is within the specified distance.
Note that, the type box is Box2D and its position is None,
these boxes pass through this filter.
Source code in t4_devkit/filtering/functional.py
__init__(min_distance, max_distance)
Construct a new object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
min_distance
|
float
|
Minimum distance from the ego [m]. |
required |
max_distance
|
float
|
Maximum distance from the ego [m]. |
required |
Source code in t4_devkit/filtering/functional.py
FilterByLabel
Filter a box by checking if the label of the box is included in specified labels.
Note that, if labels is None all boxes pass through this filter.
Source code in t4_devkit/filtering/functional.py
__init__(labels=None)
Construct a new object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
labels
|
Sequence[str | SemanticLabel] | None
|
Sequence of target labels.
If |
None
|
Source code in t4_devkit/filtering/functional.py
FilterByNumPoints
Filter a 3D box by checking if the box includes points greater than the specified one.
Note that, the type box is Box2D, or Box3D and its num_points is None,
these boxes pass through this filter.
Source code in t4_devkit/filtering/functional.py
__init__(min_num_points=0)
Construct a new object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
min_num_points
|
int
|
The minimum number of points that a box should include. |
0
|
Source code in t4_devkit/filtering/functional.py
FilterByRegion
Filter a box by checking if the box xy position is within the specified xy region.
Note that, the type box is Box2D and its position is None,
these boxes pass through this filter.
Source code in t4_devkit/filtering/functional.py
FilterBySpeed
Filter a 3D box by checking if the box speed is within the specified one.
Note that, the type box is Box2D, or Box3D and its velocity is None,
these boxes pass through this filter.
Source code in t4_devkit/filtering/functional.py
FilterByUUID
Filter a box by checking if the uuid of the box is included in specified uuids.
Note that, if uuids is None all boxes pass through this filter.
Source code in t4_devkit/filtering/functional.py
FilterByVisibility
A filter that excludes 3D boxes with lower visibility than a specified threshold.
Boxes with UNAVAILABLE visibility are always passed through (i.e., not filtered).
Source code in t4_devkit/filtering/functional.py
__init__(visibility=VisibilityLevel.NONE)
Initialize the filter with a visibility threshold.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
visibility
|
VisibilityLevel
|
The minimum visibility level for a box to pass the filter. |
NONE
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If the given visibility is not comparable (e.g., UNAVAILABLE). |
Source code in t4_devkit/filtering/functional.py
FilterParams
A dataclass to represent filtering parameters.
Attributes:
| Name | Type | Description |
|---|---|---|
labels |
Sequence[str | SemanticLabel] | None
|
Sequence of target labels. |
uuids |
Sequence[str] | None
|
Sequence of target uuids. |
min_distance |
float
|
Minimum distance from the ego [m]. |
max_distance |
float
|
Maximum distance from the ego [m]. |
min_xy |
tuple[float, float]
|
Minimum xy position from the ego [m]. |
min_xy |
tuple[float, float]
|
Maximum xy position from the ego [m]. |
min_speed |
float
|
Minimum speed [m/s]. |
max_speed |
float
|
Maximum speed [m/s]. |
min_num_points |
int
|
The minimum number of points which the 3D box should include. |
visibility |
str | VisibilityLevel
|
Visibility threshold. |