WXinlong / SOLO

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

What does this code snippet in solo_head.py mean? I'm so confused. #249

Open raintowing opened 8 months ago

raintowing commented 8 months ago

def points_nms(heat, kernel=2):  # kernel must be 2   hmax = nn.functional.max_pool2d(   heat, (kernel, kernel), stride=1, padding=1)   keep = (hmax[:, :, :-1, :-1] == heat).float()   return heat * keep