|
@@ -201,7 +201,8 @@ class ONNXDetector:
|
|
|
# 坐标转换
|
|
|
ratioh = self.orig_h / self.input_size[1]
|
|
|
ratiow = self.orig_w / self.input_size[0]
|
|
|
- detections[:, 2:6] *= np.array([ratiow, ratioh, ratiow, ratioh])
|
|
|
+ detections[:, 2
|
|
|
+ :6] *= np.array([ratiow, ratioh, ratiow, ratioh])
|
|
|
|
|
|
# NMS处理
|
|
|
keep = self.nms(detections[:, 2:6], detections[:, 1:2], self.confThreshold, 0.4)
|