SamsungLabs / imvoxelnet

[WACV2022] ImVoxelNet: Image to Voxels Projection for Monocular and Multi-View General-Purpose 3D Object Detection
MIT License
282 stars 29 forks source link

What's the meaning of the perspective map in the paper? #26

Closed rockywind closed 3 years ago

rockywind commented 3 years ago

Hi, thank you for sharing the code! I never found the perspective map definition in the code.

def _compute_projection(img_meta, stride, angles): projection = [] intrinsic = torch.tensor(img_meta['lidar2img']['intrinsic'][:3, :3]) ratio = img_meta['ori_shape'][0] / (img_meta['img_shape'][0] / stride) intrinsic[:2] /= ratio

use predicted pitch and roll for SUNRGBDTotal test

if angles is not None: extrinsics = [] for angle in angles: extrinsics.append(get_extrinsics(angle).to(intrinsic.device)) else: extrinsics = map(torch.tensor, img_meta['lidar2img']['extrinsic']) for extrinsic in extrinsics: projection.append(intrinsic @ extrinsic[:3]) return torch.stack(projection)

filaPro commented 3 years ago

Hi @rockywind ,

You can simply ignore it. We copied this notation from Atlas article formula (2). It is just a term from perspective geometry when we reduce homogenous coordinates to regular ones.

rockywind commented 3 years ago

Yes, I see. Thank you very much!