Closed Chinartist closed 5 months ago
mask_mems = (torch.abs(feat_mems) > 0).float() feat_mem = basic.reduce_masked_mean(feat_mems, mask_mems, dim=1) # B, C, Z, Y, X feat_mem = feat_mem.permute(0, 1, 4, 3, 2) # [0, ...].unsqueeze(0) # ZYX -> XYZ
This function is from simple-bev, the main purpose is to provide the number of the projected camera of each 3d points (voxel), which is for the mean operation .
Tks!
mask_mems = (torch.abs(feat_mems) > 0).float() feat_mem = basic.reduce_masked_mean(feat_mems, mask_mems, dim=1) # B, C, Z, Y, X feat_mem = feat_mem.permute(0, 1, 4, 3, 2) # [0, ...].unsqueeze(0) # ZYX -> XYZ