def nms(dets, thresh):
    """Apply classic DPM-style greedy NMS."""
    if dets.shape[0] == 0:
        return []
    return cython_nms.nms(dets, thresh)
Apply classic DPM-style greedy NMS.
detectron/utils/boxes.py