def nms(dets, thresh): if dets.shape[0] == 0: return [] if cfg.USE_GPU_NMS: return gpu_nms(dets, thresh, device_id=cfg.GPU_ID) else: return cython_nms(dets, thresh)
def nms(dets, thresh): if dets.shape[0] == 0: return [] if pure_python_nms: # print("Fall back to pure python nms") return py_cpu_nms(dets, thresh) if cfg.USE_GPU_NMS: return gpu_nms(dets, thresh, device_id=cfg.GPU_ID) else: return cython_nms(dets, thresh)
def nms(dets, thresh): if dets.shape[0] == 0: return [] if pure_python_nms: # print("Fall back to pure python nms") return py_cpu_nms(dets, thresh) if cfg.USE_GPU_NMS: return gpu_nms(dets, thresh, device_id=cfg.GPU_ID) else: return cython_nms(dets, thresh)
def nms(dets, thresh): #print('dets',dets) if dets.shape[0] == 0: return [] if cfg.USE_GPU_NMS: try: return gpu_nms(dets, thresh, device_id=cfg.GPU_ID) except: return cython_nms(dets, thresh) else: return cython_nms(dets, thresh)