CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hukaixuan19970627

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: hukaixuan19970627/yolov5_obb
Path: blob/master/DOTA_devkit/poly_nms_gpu/nms_wrapper.py
Views: 475
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
10
from .poly_nms import poly_gpu_nms
11
def 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