012daf57ac31d82366323e7ec27ab7c2cb678a09,utils.py,,non_max_suppression,#Any#Any#Any#Any#,41

Before Change



            max_detections = torch.cat(max_detections)
            // Get index of image
            image_index = max_detections.new(max_detections.size(0), 1).fill_(image_i)
            // Repeat the batch_id for as many detections of the class cls in the image
            max_detections = torch.cat((image_index, max_detections), 1)
            // Add max detections to outputs

After Change


    box_corner[:, :, 3] = prediction[:, :, 1] + prediction[:, :, 3] / 2
    prediction[:, :, :4] = box_corner[:, :, :4]

    output = [None for _ in range(len(prediction))]
    for image_i, image_pred in enumerate(prediction):
        // Filter out confidence scores below threshold
        conf_mask = (image_pred[:, 4] >= conf_thres).squeeze()
        image_pred = image_pred[conf_mask]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 012daf57ac31d82366323e7ec27ab7c2cb678a09
Time: 2018-05-27
Author: eriklindernoren@gmail.com
File Name: utils.py
Class Name:
Method Name: non_max_suppression


Project Name: elbayadm/attn2d
Commit Name: 9196c0b6544c916ef9f2178a9a45cc06d264db49
Time: 2019-01-24
Author: myleott@fb.com
File Name: fairseq/models/lstm.py
Class Name: LSTMDecoder
Method Name: forward