Created
May 27, 2020 18:49
-
-
Save wkentaro/19566c4c344b520fe02e23f2a3be68a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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