JialeCao001 / SipMask

SipMask: Spatial Information Preservation for Fast Image and Video Instance Segmentation (ECCV2020)
https://arxiv.org/pdf/2007.14772.pdf
MIT License
334 stars 54 forks source link

About CropSplit and CropSplitGt in mmdet.ops #44

Open ztt0821 opened 3 years ago

ztt0821 commented 3 years ago

Hi, When I use your code, I found one question about CropSplit and CropSplitGt in mmdet.ops. May I ask the function of the CropSplit. I found that you define self.crop_cuda = CropSplit(2) and self.crop_gt_cuda = CropSplitGt(2) at first, so what's the meaning of "2"? I have print the input feature map size of pred_masks = self.crop_cuda(pred_masks, bbox_dt), which is "[4,288,288, number of coefficient]", and output size is [288,288,number of coefficient]. May I ask what have done in CropSplit?

ztt0821 commented 3 years ago

I also found the input size of gt_mask_crop = self.crop_gt_cuda(gt_mask_new, bbox_dt) is [288, 288, number of coefficient], so does self.crop_cuda merge the 4 parts ?

JialeCao001 commented 3 years ago

@ztt0821 Yeah. These functions aim at combining 4 parts in cuda.

ztt0821 commented 3 years ago

@ztt0821 Yeah. These functions aim at combining 4 parts in cuda.

Thanks for your reply. May I ask what is the meaning of "2" in self.crop_cuda = CropSplit(2)? Does pred_masks = self.crop_cuda(pred_masks, bbox_dt) also crop the segmentation mask based on box location?

JialeCao001 commented 3 years ago

@ztt0821 It demonstrates that the regions of detected bounding box are split into 2x2 sub-regions for mask prediction. Yes, it crops the segmentation mask.