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

Before Change


    for msk in mask:
        where = np.argwhere(msk)
        if len(where) > 0:
            y_min, x_min = where.min(0)
            y_max, x_max = where.max(0) + 1
        else:
            y_min, x_min, y_max, x_max = 0, 0, 0, 0
        bbox.append((y_min, x_min, y_max, x_max))

After Change


    R, H, W = mask.shape
    xp = cuda.get_array_module(mask)

    instance_index, ys, xs = xp.nonzero(mask)
    bbox = xp.zeros((R, 4), dtype=np.float32)
    for i in range(R):
        ys_i = ys[instance_index == i]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

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: rlworkgroup/garage
Commit Name: 8ed4339a6766191ca067ad76353c8fa480ba41ac
Time: 2020-09-14
Author: 31981600+yeukfu@users.noreply.github.com
File Name: src/garage/np/exploration_policies/add_gaussian_noise.py
Class Name: AddGaussianNoise
Method Name: get_action


Project Name: maciejkula/spotlight
Commit Name: 396303a7b84fe4f8b304a5878c487ff0b3a16097
Time: 2017-07-08
Author: maciej.kula@gmail.com
File Name: spotlight/sequence/representations.py
Class Name: CNNNet
Method Name: user_representation


Project Name: daavoo/pyntcloud
Commit Name: a4825f433649f1d3346e6443c3d4aea65d2cd506
Time: 2017-02-27
Author: daviddelaiglesiacastro@gmail.com
File Name: pyntcloud/structures/voxelgrid.py
Class Name: VoxelGrid
Method Name: get_feature_vector