Thank you for your quick response. I do the same for creating .pgw file but it doesn't work (I renamed detected_change to test5_predict). Am I missing something?
Unfortunately I can't share the images.
Before:
After:
This is the code:
from arcgis.learn import ChangeDetector
import os
import torch
torch.cuda.is_available = lambda : False
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model_path = r'C:/Users/maryam.barzegar/Desktop/hongkong/testcase4/change detection/Training6/models/change_detection_pansharpened_NIR8_resnet34'
cd = ChangeDetector.from_model (model_path, data= None)
test_images = r'C:/Users/maryam.barzegar/Desktop/hongkong/Testcase5/Training9/Inference/image'
before_img = os.path.join(test_images, 'test5_before.tif')
after_img = os.path.join(test_images, 'test5_after.tif')
cd.predict(crop_predict= True,
before_image=before_img,
after_image=after_img,
save=True)