open-cd icon indicating copy to clipboard operation
open-cd copied to clipboard

How to apply this model to large-sized images?

Open crystallo3921 opened this issue 1 year ago • 2 comments

Thank you so much for your remarkable contributions to the field of change detection! I have successfully trained and inferred this model using the provided samples. However, I have a question regarding the inference of changes between two large-sized images, such as high-resolution satellite or aerial images. Could you please advise me on how to apply this model in such cases?

I have previously employed the sliding window strategy, which enabled me to successfully infer changes in a pair of high-resolution aerial images. However, in this particular scenario, all the configurations are written in files, and the training and testing processes are automated using Runner. I have carefully reviewed the mmengine documentation, but I am still a bit confused, especially regarding the adjustment of configurations. Could you kindly provide some guidance and insights? Your assistance is greatly appreciated. Thank you so much!

crystallo3921 avatar Jun 12 '23 07:06 crystallo3921

Thanks for your attention, you can refer here.

likyoo avatar Jun 12 '23 10:06 likyoo

Thanks for your attention, you can refer here.

Thank you so much for your prompt reply. I would like to provide more specific details regarding my question. When I modify the line from 'test_cfg=dict(mode='whole')' to 'test_cfg=dict(mode='slide', crop_size=crop_size, stride=(crop_size[0]//2, crop_size[1]//2))', I would like to know how the remaining test configuration parameters should be adjusted accordingly.

Because I intend to switch the test dataset to two large-sized images,without labels, what changes should I make to the test_dataset parameters? The origin test_dataset in config is:

test_dataloader = dict( batch_size=1, num_workers=4, persistent_workers=True, sampler=dict(type='DefaultSampler', shuffle=False), dataset=dict( type='LEVIR_CD_Dataset', data_root='data/LEVIR-CD', data_prefix=dict( seg_map_path='test/label', img_path_from='test/A', img_path_to='test/B'), pipeline=[ dict(type='MultiImgLoadImageFromFile'), dict(type='MultiImgResize', scale=(1024, 1024), keep_ratio=True), dict(type='MultiImgLoadAnnotations'), dict(type='MultiImgPackSegInputs') ]))

Should I modify the dataset type('LEVIR_CD_Dataset') or create a customized dataset?

Additionally, could you please advise on any other parameters that are relevant to the test section and may require modification?

crystallo3921 avatar Jun 15 '23 09:06 crystallo3921