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)

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: 4

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: chainer/chainercv
Commit Name: 10c43c7c08cdce3583e68834133a89eb0dbfcf78
Time: 2017-06-19
Author: Hakuyume@users.noreply.github.com
File Name: chainercv/links/model/ssd/multibox_coder.py
Class Name: MultiboxCoder
Method Name: decode


Project Name: chainer/chainercv
Commit Name: 10c43c7c08cdce3583e68834133a89eb0dbfcf78
Time: 2017-06-19
Author: Hakuyume@users.noreply.github.com
File Name: chainercv/links/model/ssd/multibox_coder.py
Class Name: MultiboxCoder
Method Name: encode