90b78b1379b3423aa3b4b5d0de7313f88bda23ab,chainercv/utils/mask/mask_to_bbox.py,,mask_to_bbox,#Any#,5

Before Change


    xp = cuda.get_array_module(mask)

    // CuPy does not support argwhere yet
    mask = cuda.to_cpu(mask)

    bbox = []
    for msk in mask:
        where = np.argwhere(msk)

After Change


        x_min = xs_i.min()
        y_max = ys_i.max() + 1
        x_max = xs_i.max() + 1
        bbox[i] = xp.array([y_min, x_min, y_max, x_max], dtype=np.float32)
    return bbox
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: chainer/chainercv
Commit Name: 90b78b1379b3423aa3b4b5d0de7313f88bda23ab
Time: 2019-02-17
Author: yuyuniitani@gmail.com
File Name: chainercv/utils/mask/mask_to_bbox.py
Class Name:
Method Name: mask_to_bbox


Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 9b0a0dd6fe7b4ac021d91acc6b4f96b403dd6b67
Time: 2019-04-26
Author: eriklindernoren@live.se
File Name: models.py
Class Name: Darknet
Method Name: forward


Project Name: chainer/chainerrl
Commit Name: 08ed4e477612d49e27baa7bad64be75110a5db0c
Time: 2016-06-09
Author: muupan@gmail.com
File Name: agents/dqn.py
Class Name: DQN
Method Name: act