l5kit.dataset.select_agents module

l5kit.dataset.select_agents.get_valid_agents(frames_range: numpy.ndarray, dataset: l5kit.data.zarr_dataset.ChunkedDataset, th_agent_filter_probability_threshold: float, th_yaw_degree: float, th_extent_ratio: float, th_distance_av: float) Tuple[numpy.ndarray, collections.Counter, tuple]

Two types of filters are implemented: POINT-WISE: only the current state is considered COUPLE-WISE: 2 states considered (new and last added)

Return a boolean np.array with the same shape of agents and a counter of report

l5kit.dataset.select_agents.in_angular_distance(yaw1: numpy.ndarray, yaw2: numpy.ndarray, th: float) bool

Check if the absolute distance in degrees is under the given threshold

l5kit.dataset.select_agents.in_av_distance(av_translation: numpy.ndarray, agent_centroid: numpy.ndarray, th: float) bool
l5kit.dataset.select_agents.in_consecutive_frame(frame_idx: int, past_frame_idx: int) bool
l5kit.dataset.select_agents.in_extent_ratio(extent1: numpy.ndarray, extent2: numpy.ndarray, th: float) bool

Compute the two areas and then the ratio. The ratio is in the range [1, inf)

l5kit.dataset.select_agents.select_agents(zarr_dataset: l5kit.data.zarr_dataset.ChunkedDataset, th_agent_prob: float, th_yaw_degree: float, th_extent_ratio: float, th_distance_av: float) None

Filter agents from zarr INPUT_FOLDER according to multiple thresholds and store a boolean array of the same shape.

l5kit.dataset.select_agents.update_mask(mask: numpy.ndarray, agent_list: list) None