Open raintowing opened 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
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