f7a41e4ddaa12a5cb19d0458431e88a16edd10b6,chainercv/visualizations/vis_instance_segmentation.py,,vis_instance_segmentation,#Any#Any#Any#Any#Any#Any#Any#Any#,9

Before Change


    // Returns newly instantiated matplotlib.axes.Axes object if ax is None
    ax = vis_image(img, ax=ax)

    canvas_img = np.zeros((mask.shape[1], mask.shape[2], 4), dtype=np.uint8)
    for i, (color, bb, msk) in enumerate(zip(colors, bbox, mask)):
        rgba = np.append(color, alpha * 255)
        bb = np.round(bb).astype(np.int32)
        y_min, x_min, y_max, x_max = bb

After Change


    n_inst = len(bbox)
    colors = np.array([_default_cmap(l) for l in range(1, n_inst + 1)])

    canvas_img = img.transpose((1, 2, 0)).copy()
    for i, (color, bb, msk) in enumerate(zip(colors, bbox, mask)):
        bb = np.round(bb).astype(np.int32)
        y_min, x_min, y_max, x_max = bb
        if y_max > y_min and x_max > x_min:
            canvas_img[msk] = alpha * color + canvas_img[msk] * (1 - alpha)

        caption = []
        if label is not None and label_names is not None:
            lb = label[i]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: chainer/chainercv
Commit Name: f7a41e4ddaa12a5cb19d0458431e88a16edd10b6
Time: 2018-03-26
Author: yuyuniitani@gmail.com
File Name: chainercv/visualizations/vis_instance_segmentation.py
Class Name:
Method Name: vis_instance_segmentation


Project Name: keras-team/keras
Commit Name: a78ad01bb44137f206dc8167626ea8cf73c7958b
Time: 2016-07-06
Author: yosinski@users.noreply.github.com
File Name: keras/layers/recurrent.py
Class Name: Recurrent
Method Name: get_initial_states


Project Name: microsoft/nni
Commit Name: 89fa23cb77746d36b4f1ff6cd4fcefbab18c7d70
Time: 2020-06-11
Author: 38930155+chicm-ms@users.noreply.github.com
File Name: src/sdk/pynni/tests/test_compressor.py
Class Name: CompressorTestCase
Method Name: test_torch_l1filter_pruner