Skip to content

Instantly share code, notes, and snippets.

@wkentaro
Created May 27, 2020 18:49
Show Gist options
  • Save wkentaro/19566c4c344b520fe02e23f2a3be68a0 to your computer and use it in GitHub Desktop.
Save wkentaro/19566c4c344b520fe02e23f2a3be68a0 to your computer and use it in GitHub Desktop.
import imgviz
import tqdm
import corvus_segmentation_models
dataset = corvus_segmentation_models.datasets.Warehouse20200526Dataset(
split="sim"
)
viewer = imgviz.io.PygletThreadedImageViewer(height=480, width=640 * 2)
for i in tqdm.trange(len(dataset)):
images = dataset[i]
viz = imgviz.tile(
[
images["gray"],
imgviz.label2rgb(
images["class_label"],
label_names=dataset.class_names,
loc="rb",
),
],
shape=(1, 2),
border=(255, 255, 255),
)
viewer.imshow(viz)
# max_depth = []
# for i in tqdm.trange(len(dataset)):
# images = dataset[i]
# max_depth.append(np.nanmax(images["depth"]))
# print(np.mean(max_depth))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment