From d1d35451c10a64aca674eb2bfdde2912a10c4345 Mon Sep 17 00:00:00 2001
From: YouAnsheng <youansheng@pku.edu.cn>
Date: Thu, 29 Nov 2018 12:43:22 +0800
Subject: [PATCH] Update gpu_nms.pyx

Fix bug for gpu_nms.
---
 mmdet/ops/nms/gpu_nms.pyx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mmdet/ops/nms/gpu_nms.pyx b/mmdet/ops/nms/gpu_nms.pyx
index e5ae725..65af87f 100644
--- a/mmdet/ops/nms/gpu_nms.pyx
+++ b/mmdet/ops/nms/gpu_nms.pyx
@@ -19,7 +19,7 @@ memory_pool = {}
 def gpu_nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh,
             np.int32_t device_id=0):
     cdef int boxes_num = dets.shape[0]
-    cdef int boxes_dim = dets.shape[1]
+    cdef int boxes_dim = 5
     cdef int num_out
     cdef size_t base
     cdef np.ndarray[np.int32_t, ndim=1] \
@@ -29,7 +29,7 @@ def gpu_nms(np.ndarray[np.float32_t, ndim=2] dets, np.float thresh,
     cdef np.ndarray[np.int_t, ndim=1] \
         order = scores.argsort()[::-1]
     cdef np.ndarray[np.float32_t, ndim=2] \
-        sorted_dets = dets[order, :]
+        sorted_dets = dets[order, :5]
     cdef float cthresh = thresh
     if device_id not in memory_pool:
         with nogil:
-- 
GitLab