|
|
@@ -3,7 +3,7 @@ from PIL import Image
|
|
|
|
|
|
import paddlex as pdx
|
|
|
|
|
|
-model_dir = "saved_model/remote_sensing_unet/best_model/"
|
|
|
+model_dir = "l8sparcs_remote_model/"
|
|
|
img_file = "dataset/remote_sensing_seg/data/LC80150242014146LGN00_23_data.tif"
|
|
|
label_file = "dataset/remote_sensing_seg/mask/LC80150242014146LGN00_23_mask.png"
|
|
|
color = [255, 255, 255, 0, 0, 0, 255, 255, 0, 255, 0, 0, 150, 150, 150]
|
|
|
@@ -11,6 +11,7 @@ color = [255, 255, 255, 0, 0, 0, 255, 255, 0, 255, 0, 0, 150, 150, 150]
|
|
|
# 预测并可视化预测结果
|
|
|
model = pdx.load_model(model_dir)
|
|
|
pred = model.predict(img_file)
|
|
|
+#pred = model.overlap_tile_predict(img_file, tile_size=[512, 512], pad_size=[64, 64], batch_size=32)
|
|
|
pdx.seg.visualize(
|
|
|
img_file, pred, weight=0., save_dir='./output/pred', color=color)
|
|
|
|