コード例 #1
0
def nms(dets, thresh, force_cpu=False):
    """Dispatch to either CPU or GPU NMS implementations."""

    if dets.shape[0] == 0:
        return []
    if gpu_nms_available and cfg.USE_GPU_NMS and not force_cpu:
        return gpu_nms(dets, thresh, device_id=cfg.GPU_ID)
    else:
        return cpu_nms(dets, thresh)
コード例 #2
0
ファイル: nms_wrapper.py プロジェクト: OlegBoulanov/CNTK
def nms(dets, thresh, force_cpu=False):
    """Dispatch to either CPU or GPU NMS implementations."""

    if dets.shape[0] == 0:
        return []
    if gpu_nms_available and cfg.USE_GPU_NMS and not force_cpu:
        return gpu_nms(dets, thresh, device_id=cfg.GPU_ID)
    else:
        return cpu_nms(dets, thresh)
コード例 #3
0
ファイル: nms_wrapper.py プロジェクト: AllanYiin/CNTK
def nms(dets, thresh, use_gpu_nms=True, device_id=0):
    '''
    Dispatches the call to either CPU or GPU NMS implementations
    '''
    if dets.shape[0] == 0:
        return []
    if gpu_nms_available and use_gpu_nms:
        return gpu_nms(dets, thresh, device_id=device_id)
    else:
        return cpu_nms(dets, thresh)
コード例 #4
0
def nms(dets, thresh, use_gpu_nms=True, device_id=0):
    '''
    Dispatches the call to either CPU or GPU NMS implementations
    '''
    if dets.shape[0] == 0:
        return []
    if gpu_nms_available and use_gpu_nms:
        return gpu_nms(dets, thresh, device_id=device_id)
    else:
        return cpu_nms(dets, thresh)