def non_max_suppression(np_input, window_size=3, threshold=NMS_Threshold):
under_threshold_indices = np_input < threshold
np_input[under_threshold_indices] = 0
return np_input*(np_input == maximum_filter(np_input, footprint=np.ones((window_size, window_size))))
评论列表
文章目录