Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix edge cases #126

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion projects/mmdet3d_plugin/uniad/detectors/uniad_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def forward_test(self,
tmp_pos = copy.deepcopy(img_metas[0][0]['can_bus'][:3])
tmp_angle = copy.deepcopy(img_metas[0][0]['can_bus'][-1])
# first frame
if self.prev_frame_info['scene_token'] is None:
if self.prev_frame_info['prev_bev'] is None:
img_metas[0][0]['can_bus'][:3] = 0
img_metas[0][0]['can_bus'][-1] = 0
# following frames
Expand Down
9 changes: 7 additions & 2 deletions projects/mmdet3d_plugin/uniad/detectors/uniad_track.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ def _forward_single_frame_train(
all_matched_indices=None,
all_instances_pred_logits=None,
all_instances_pred_boxes=None,
is_last=False,
):
"""
Perform forward only on one frame. Called in forward_train
Expand Down Expand Up @@ -470,8 +471,11 @@ def _forward_single_frame_train(
tmp = {}
tmp["init_track_instances"] = self._generate_empty_tracks()
tmp["track_instances"] = track_instances
out_track_instances = self.query_interact(tmp)
out["track_instances"] = out_track_instances
if is_last:
out["track_instances"] = None
else:
out_track_instances = self.query_interact(tmp)
out["track_instances"] = out_track_instances
return out

def select_active_track_query(self, track_instances, active_index, img_metas, with_mask=True):
Expand Down Expand Up @@ -567,6 +571,7 @@ def forward_track_train(self,
all_matched_idxes,
all_instances_pred_logits,
all_instances_pred_boxes,
is_last=(i==num_frame-1),
)
# all_query_embeddings: len=dec nums, N*256
# all_matched_idxes: len=dec nums, N*2
Expand Down