You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In agent_motion_prediction.ipynb:
The below seems to only work with valuse -51 to -23348 (with indices capped at -23846) agent_indices = eval_agent_dataset.get_frame_indices(frame_number) .
A quick inspection shows that in agent.py:
self.agents_indices has values with max:1795829, min:33543, shape:(13985,) yet agents_start_index and agents_end_index are 0 and 37 respectively (frames[frame_idx]["agent_index_interval"] = array([0, 38]))
Hence there will be no valid indices and the below will return an empty array:
def get_frame_indices(self, frame_idx: int) -> np.ndarray:
"""
Get indices for the given frame. Here __getitem__ iterate over valid agents indices.
This means ``__getitem__(0)`` matches the first valid agent in the dataset.
Args:
frame_idx (int): index of the scene
Returns:
np.ndarray: indices that can be used for indexing with __getitem__
"""
frames = self.dataset.frames
assert frame_idx < len(frames), f"frame_idx {frame_idx} is over len {len(frames)}"
agents_start_index = frames[frame_idx]["agent_index_interval"][0]
agents_end_index = frames[frame_idx]["agent_index_interval"][1] - 1
mask_valid_indices = (self.agents_indices >= agents_start_index) * (self.agents_indices <= agents_end_index)
indices = np.nonzero(mask_valid_indices)[0]
return indices
I'm unfamiliar with the code but the get_frame_indices in the parent class is different to that in the AgentDataset class.
The text was updated successfully, but these errors were encountered:
In
agent_motion_prediction.ipynb
:The below seems to only work with valuse -51 to -23348 (with indices capped at -23846)
agent_indices = eval_agent_dataset.get_frame_indices(frame_number)
.A quick inspection shows that in
agent.py
:self.agents_indices
has values with max:1795829, min:33543, shape:(13985,) yetagents_start_index
andagents_end_index
are 0 and 37 respectively (frames[frame_idx]["agent_index_interval"] = array([0, 38])
)Hence there will be no valid indices and the below will return an empty array:
I'm unfamiliar with the code but the get_frame_indices in the parent class is different to that in the AgentDataset class.
The text was updated successfully, but these errors were encountered: