Skip to content

issues with batched_nms #1068

Answered by SunHao-AI
fred-xue asked this question in Q&A
Jul 21, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

I encountered the same problem, change the code to the following, and it can be run:

def batched_nms(predictions: torch.tensor, match_metric: str = "IOU", match_threshold: float = 0.5):
    """
    Apply non-maximum suppression to avoid detecting too many
    overlapping bounding boxes for a given object.
    Args:
        predictions: (tensor) The location preds for the image
            along with the class predscores, Shape: [num_boxes,5].
        match_metric: (str) IOU or IOS
        match_threshold: (float) The overlap thresh for
            match metric.
    Returns:
        A list of filtered indexes, Shape: [ ,]
    """

    # scores = predictions[:, 4].squeeze()
    # category_i…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fcakyon
Comment options

Answer selected by fcakyon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants