WXinlong / SOLO

SOLO and SOLOv2 for instance segmentation, ECCV 2020 & NeurIPS 2020.
Other
1.69k stars 307 forks source link

Some implement details wants to confirm #170

Closed ShinoSpace closed 3 years ago

ShinoSpace commented 3 years ago

I read through the entire code and found maybe a little different with paper solov2. these question are raised from solov2_head.py. here's my think:

  1. in method split_feats:
def split_feats(self, feats):
        return (F.interpolate(feats[0], scale_factor=0.5, mode='bilinear'),
                feats[1],
                feats[2],
                feats[3],
                F.interpolate(feats[4], size=feats[3].shape[-2:], mode='bilinear'))

is that means you use FPN features scale from 1/4 to 1/64, and the 1/4, 1/64 feature are down and up to 1/8, 1/32 respectively?

  1. in loss ->solov2_target_single:
mask_feat_size = ins_pred.size()[-2:]
ins_label_list, cate_label_list, ins_ind_label_list, grid_order_list = multi_apply(
            self.solov2_target_single,
            gt_bbox_list,
            gt_label_list,
            gt_mask_list,
            mask_feat_size=mask_feat_size)

when label assignment in method loss:

upsampled_size = (mask_feat_size[0] * 4, mask_feat_size[1] * 4)
coord_w = int((center_w / upsampled_size[1]) // (1. / num_grid))
coord_h = int((center_h / upsampled_size[0]) // (1. / num_grid))

is that means the unified representation is 1/4 scaled?

appreciate to your answer!

manueldiaz96 commented 3 years ago

Yes, the final mask_feat_pred is of scale 1/4 of the original image. You can also check it by adding a mask_feat_pred.shape print in the forward pass of single_stage_ins.py

ShinoSpace commented 3 years ago

Yes, the final mask_feat_pred is of scale 1/4 of the original image. You can also check it by adding a mask_feat_pred.shape print in the forward pass of single_stage_ins.py

got it, thanks for your ans! appreciate!