diff options
author | carp <25677564+carp@users.noreply.github.com> | 2020-07-13 13:40:11 -0400 |
---|---|---|
committer | carp <25677564+carp@users.noreply.github.com> | 2020-07-13 13:40:11 -0400 |
commit | 50e411320563894d411b0c37d37cb16105a908af (patch) | |
tree | 01e1a43e11f9e51cf6a46d9a3d40814b76ad6d7b /anime-face-detector/nms_wrapper.py | |
parent | f457064bb15a00010959e664492d87f3bfe82537 (diff) | |
download | yaoi-communism-50e411320563894d411b0c37d37cb16105a908af.tar.gz yaoi-communism-50e411320563894d411b0c37d37cb16105a908af.zip |
removing submodule
Diffstat (limited to 'anime-face-detector/nms_wrapper.py')
-rw-r--r-- | anime-face-detector/nms_wrapper.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/anime-face-detector/nms_wrapper.py b/anime-face-detector/nms_wrapper.py deleted file mode 100644 index ca900e8..0000000 --- a/anime-face-detector/nms_wrapper.py +++ /dev/null @@ -1,29 +0,0 @@ -from enum import Enum - - -class NMSType(Enum): - PY_NMS = 1 - CPU_NMS = 2 - GPU_NMS = 3 - - -default_nms_type = NMSType.PY_NMS - - -class NMSWrapper: - def __init__(self, nms_type=default_nms_type): - assert type(nms_type) == NMSType - if nms_type == NMSType.PY_NMS: - from nms.py_cpu_nms import py_cpu_nms - self._nms = py_cpu_nms - elif nms_type == NMSType.CPU_NMS: - from nms.cpu_nms import cpu_nms - self._nms = cpu_nms - elif nms_type == NMSType.GPU_NMS: - from nms.gpu_nms import gpu_nms - self._nms = gpu_nms - else: - raise ValueError('current nms type is not implemented yet') - - def __call__(self, *args, **kwargs): - return self._nms(*args, **kwargs) |