swc-17 / SparseDrive

SparseDrive: End-to-End Autonomous Driving via Sparse Scene Representation
MIT License
184 stars 11 forks source link

Question about the `T_temp2cur` in instance_bank.py #7

Closed jiangjudging closed 3 days ago

jiangjudging commented 3 days ago

In lines 100-108:

 T_temp2cur = self.cached_anchor.new_tensor(
                    np.stack(
                        [
                            x["T_global_inv"]
                            @ self.metas["img_metas"][i]["T_global"]
                            for i, x in enumerate(metas["img_metas"])
                        ]
                    )
                )

The result of x["T_global_inv"] @ self.metas["img_metas"][i]["T_global"] should always be identity matrix, which is not the expected result.

swc-17 commented 3 days ago

x["T_global_inv"] is from current frame while self.metas["img_metas"][i]["T_global"] is from previous frame.

jiangjudging commented 3 days ago

x["T_global_inv"] is from current frame while self.metas["img_metas"][i]["T_global"] is from previous frame.

I see. I have ignored the self in self.metas["img_metas"][i]["T_global"]. Thanks for your reply.