6#include <torch/torch.h>
32torch::Tensor
nms(
const torch::Tensor &bboxes,
const torch::Tensor &scores,
33 float iou_threshold = 0.45);
43 float confThreshold = 0.25,
44 float iouThreshold = 0.45,
45 int maxDetections = 300);
torch::Tensor nms(const torch::Tensor &bboxes, const torch::Tensor &scores, float iou_threshold=0.45)
Non-maximum suppression on bounding boxes.
torch::Tensor non_max_suppression(torch::Tensor predictions, float confThreshold=0.25, float iouThreshold=0.45, int maxDetections=300)
YOLO-style non-maximum suppression with class-aware filtering.
torch::Tensor xywh_to_xyxy(const torch::Tensor &x)
Convert bounding boxes from (cx,cy,w,h) to (x1,y1,x2,y2) format.
torch::Tensor xyxy_to_xywh(const torch::Tensor &x)
Convert bounding boxes from (x1,y1,x2,y2) to (cx,cy,w,h) format.