Susan19900316 / yolov5_tensorrt_int8

yolov5 tensorrt int8量化方法汇总
57 stars 13 forks source link

Why does the nms operator you provide contain no logic code about nms? #6

Closed RedHeartSecretMan closed 9 months ago

RedHeartSecretMan commented 9 months ago
def forward(
    ctx,
    boxes,
    scores,
    background_class=-1,
    box_coding=1,
    iou_threshold=0.45,
    max_output_boxes=100,
    plugin_version="1",
    score_activation=0,
    score_threshold=0.25,
):
    batch_size, num_boxes, num_classes = scores.shape
    num_det = torch.randint(0, max_output_boxes, (batch_size, 1), dtype=torch.int32)
    det_boxes = torch.randn(batch_size, max_output_boxes, 4)
    det_scores = torch.randn(batch_size, max_output_boxes)
    det_classes = torch.randint(0, num_classes, (batch_size, max_output_boxes), dtype=torch.int32)
    return num_det, det_boxes, det_scores, det_classes
Susan19900316 commented 9 months ago

@RedHeartSecretMan onnx has no NMS operator. The class TRT8_NMS is registered for TRT::EfficientNMS_TRT

RedHeartSecretMan commented 9 months ago

thanks!