Upload mass_generate_examples.py
Browse files
mass_generate_examples.py
CHANGED
|
@@ -43,9 +43,9 @@ if __name__ == "__main__":
|
|
| 43 |
test_ridge = torch.from_numpy(imageio.imread('dataset_large/Ridge_11417648.tiff'))[None, None, :].to(dtype=torch.float16, device='cuda')
|
| 44 |
test_basin = torch.from_numpy(imageio.imread('dataset_large/Basins_11417648.tiff'))[None, None, :].to(dtype=torch.float16, device='cuda')
|
| 45 |
gt = torch.from_numpy(imageio.imread('dataset_large/11417648.tiff'))[None, None, :].to(dtype=torch.float16, device='cuda')
|
| 46 |
-
water_level =
|
| 47 |
-
num_steps =
|
| 48 |
-
num_images =
|
| 49 |
|
| 50 |
test_basin = (test_basin >= water_level).to(torch.float16)
|
| 51 |
test_ridge = test_ridge.expand(num_images, -1, -1, -1)
|
|
@@ -100,7 +100,7 @@ if __name__ == "__main__":
|
|
| 100 |
|
| 101 |
# Plot condition image
|
| 102 |
im1 = axes[1].imshow(basin_display, cmap='gray')
|
| 103 |
-
axes[1].set_title('Basin Condition', fontsize=12, pad=2)
|
| 104 |
axes[1].set_axis_off()
|
| 105 |
|
| 106 |
# Plot ground truth image
|
|
|
|
| 43 |
test_ridge = torch.from_numpy(imageio.imread('dataset_large/Ridge_11417648.tiff'))[None, None, :].to(dtype=torch.float16, device='cuda')
|
| 44 |
test_basin = torch.from_numpy(imageio.imread('dataset_large/Basins_11417648.tiff'))[None, None, :].to(dtype=torch.float16, device='cuda')
|
| 45 |
gt = torch.from_numpy(imageio.imread('dataset_large/11417648.tiff'))[None, None, :].to(dtype=torch.float16, device='cuda')
|
| 46 |
+
water_level = 0.0
|
| 47 |
+
num_steps = 50
|
| 48 |
+
num_images = 16
|
| 49 |
|
| 50 |
test_basin = (test_basin >= water_level).to(torch.float16)
|
| 51 |
test_ridge = test_ridge.expand(num_images, -1, -1, -1)
|
|
|
|
| 100 |
|
| 101 |
# Plot condition image
|
| 102 |
im1 = axes[1].imshow(basin_display, cmap='gray')
|
| 103 |
+
axes[1].set_title(f'Basin Condition at level {water_level}', fontsize=12, pad=2)
|
| 104 |
axes[1].set_axis_off()
|
| 105 |
|
| 106 |
# Plot ground truth image
|