1# -------------------------------------------------------- 2# Fast R-CNN 3# Copyright (c) 2015 Microsoft 4# Licensed under The MIT License [see LICENSE for details] 5# Written by Ross Girshick 6# -------------------------------------------------------- 7 8# from nms.gpu_nms import gpu_nms 9# from nms.cpu_nms import cpu_nms 10from .poly_nms import poly_gpu_nms 11def poly_nms_gpu(dets, thresh, force_cpu=False): 12 """Dispatch to either CPU or GPU NMS implementations.""" 13 14 if dets.shape[0] == 0: 15 return [] 16 return poly_gpu_nms(dets, thresh, device_id=0) 17 18 19