tusen-ai / SST

Code for a series of work in LiDAR perception, including SST (CVPR 22), FSD (NeurIPS 22), FSD++ (TPAMI 23), FSDv2, and CTRL (ICCV 23, oral).
Apache License 2.0
801 stars 102 forks source link

Question about sample topk of foreground points? #143

Closed eagle-chase closed 1 year ago

eagle-chase commented 1 year ago
if self.training and self.train_cfg.get('disable_pretrain', False) and not self.runtime_info.get('enable_detection', False):
            seg_scores = seg_scores[:, cls_id]
            topks = self.train_cfg.get('disable_pretrain_topks', [100, 100, 100])
            k = min(topks[cls_id], len(seg_scores))
            top_inds = torch.topk(seg_scores, k)[1]
            fg_mask = torch.zeros_like(seg_scores, dtype=torch.bool)
            fg_mask[top_inds] = True

Does anyone know why here we need to filter the points with the top 500 highest score for each category by score? After sampling, each class only have 500 points, Will it lose a lot of information? In my understanding, this is the point that constitutes all virtual voxels. Why is such a small threshold needed? Hope someone can give me some help, I'm very confused on this part, thanks a lot!

Abyssaledge commented 1 year ago

This is only enabled at the very beginning of training. You can refer to this hook for details: https://github.com/tusen-ai/SST/blob/main/mmdet3d/core/hook/fsd_hooks.py#L70C11-L70C11

eagle-chase commented 1 year ago

Thank you!