TuSimple / centerformer

Implementation for CenterFormer: Center-based Transformer for 3D Object Detection (ECCV 2022)
MIT License
293 stars 28 forks source link

Positional embedding in RPN_transformer_deformable_multitask #31

Open kushal-git312 opened 1 year ago

kushal-git312 commented 1 year ago

Hello,

I would like to know that is there any specific reason for using task_id along with x_coor, y_coor while creating pos_embedding ?

    if self.pos_embedding_type == "linear":
        if len(self.tasks)>1:
            self.pos_embedding = nn.Linear(3, self._num_filters[-1] * 2)

Anyhow we know that 6 task_id ct_feats are concatenated next to each other and are sliced accordingly later in the below code snippet.

    for idx, task in enumerate(self.tasks):
        out_dict_list[idx]["ct_feat"] = ct_feat[:, :, idx * self.obj_num : (idx+1) * self.obj_num]

what is the purpose of diluting ct_feat dimensions (256) with task_id.

Thanking you in advance.