How to use the imgviz.data.arc2017 function in imgviz

To help you get started, we’ve selected a few imgviz examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wkentaro / imgviz / examples / io_examples / pyglet_imshow.py View on Github external
def get_images():
    data = imgviz.data.arc2017()
    yield data["rgb"]
    yield imgviz.depth2rgb(data["depth"], min_value=0.3, max_value=1)
    yield imgviz.label2rgb(data["class_label"])
github wkentaro / imgviz / examples / depth2rgb.py View on Github external
def depth2rgb():
    data = imgviz.data.arc2017()

    depthviz = imgviz.depth2rgb(data["depth"], min_value=0.3, max_value=1)

    # -------------------------------------------------------------------------

    plt.figure(dpi=200)

    plt.subplot(121)
    plt.title("rgb")
    plt.imshow(data["rgb"])
    plt.axis("off")

    plt.subplot(122)
    plt.title("depth (colorized)")
    plt.imshow(depthviz)
    plt.axis("off")
github wkentaro / imgviz / examples / tile.py View on Github external
def tile():
    data = imgviz.data.arc2017()

    rgb = data["rgb"]
    bboxes = data["bboxes"].astype(int)
    masks = data["masks"] == 1
    crops = []
    for bbox, mask in zip(bboxes, masks):
        slice_ = slice(bbox[0], bbox[2]), slice(bbox[1], bbox[3])
        rgb_crop = rgb[slice_]
        mask_crop = mask[slice_]
        crops.append(rgb_crop * mask_crop[:, :, None])
    tiled = imgviz.tile(imgs=crops, border=(255, 255, 255))

    # -------------------------------------------------------------------------

    plt.figure(dpi=200)