目录
python opencv 矩形框 nms
nanodet用到了:
nanodet onnx踩坑记录_jacke121的专栏-CSDN博客
代码示例:
import cv2
boxes=[
[100,20,30,40],
[10,20,30,40]
]
confidences=[
0.5,
0.6
]
confThreshold=0.3
nmsThreshold=0.3
aaa=cv2.dnn.NMSBoxes(boxes, confidences, confThreshold, nmsThreshold)
print(aaa)
opencv c++ 矩形框 nms例子:
float score_threshold = 0.4;
float nms_threshold = 0.4;
vector<Rect> bboxes;
Rect rect1(Point2f(0, 0), Size2f(20, 20));
bboxes.push_back(rect1);