mjq11302010044/RRPN

The nms_test.py on cpu and gpu get different results

auroua opened this issue · 7 comments

When I run the code nms_test.py using gpu. I got the result [0, 3]. When I run the same code using cpu, I got [0, 1, 3].

@auroua could you plz provide the input of nms API and which function you use?

@auroua There may be some naming mistakes like import gpu_nms as cpu_nms.

I run the nms_test.py without any modification. The input to nms function is:

boxes = np.array([
			[50, 50, 100, 100, 0, 0.99],
			[60, 60, 100, 100, 0, 0.88],#keep 0.68
			[50, 50, 100, 100, 45.0, 0.66],#discard 0.70
			[200, 200, 100, 100, 0, 0.77],#keep 0.0
		], dtype=np.float32)

The cpu_nms I used is from rotation.rotate_cpu_nms import rotate_cpu_nms as cpu_nms, and the gpu_nms is from rotation.rotate_gpu_nms import rotate_gpu_nms as cpu_nms .

The environment is

  • cuda 9.0
  • python 3.6

@auroua Okay, here we suggest using rotation.rotate_polygon_nms which is exactly the skew-nms we use in our code : )

@auroua One more thing to pay attention is that the order of box parameter should be [x, y, h, w, theta], instead of [..., w, h,...]

Thanks.
The rotation.rotate_polygon_nms get the same result.