NJU-LHRS / offical-SGSLN

The code of SGSLN
72 stars 6 forks source link

About the model result on LEVIR-CD dataset #4

Closed Ozone-oo closed 9 months ago

Ozone-oo commented 9 months ago

I reproduced the parameter configuration according to the paper, but the experiments did not meet expectations on the LEVIR-CD dataset. Do you plan to provide pre-trained models?

training hyper-parameter

epochs: int = 250 # Number of epochs batch_size: int = 64 # Batch size inference_ratio = 2 # batch_size in val and test equal to batch_size*inference_ratio learning_rate: float = 1e-3 # Learning rate factor = 0.1 # learning rate decreasing factor patience = 12 # schedular patience warm_up_step = 500 # warm up step weight_decay: float = 1e-3 # AdamW optimizer weight decay amp: bool = True # if use mixed precision or not load: str = False # Load model and/or optimizer from a .pth file for testing or continuing training max_norm: float = 20 # gradient clip max norm

evaluate hyper-parameter

evaluate_epoch: int = 30 # start evaluate after training for evaluate epochs stage_epoch = [0, 0, 0, 0, 0] # adjust learning rate after every stage epoch save_checkpoint: bool = True # if save checkpoint of model or not save_interval: int = 10 # save checkpoint every interval epoch save_best_model: bool = True # if save best model or not

log wandb hyper-parameter

log_wandb_project: str = 'dpcd_paper' # wandb project name

data transform hyper-parameter

noise_p: float = 0.8 # probability of adding noise

model hyper-parameter

dropout_p: float = 0.3 # probability of dropout patch_size: int = 256 # size of input image

y = 2 # ECA-net parameter b = 1 # ECA-net parameter

walking-shadow commented 9 months ago

We are sorry that we cannot provide pre-trained models. When we trained on the LEIVR-CD dataset, we did not use dropout, and the noise_p was set to 0.3. This was because the LEVIR-CD dataset has an ample amount of data, and the scenes are not too complex. Dropout and high noise_p settings were only used on the SYSU and NJDS datasets because their scenes are complex, and they have smaller datasets. Additionally, when cropping the LEVIR-CD dataset, there is a 128-pixel overlap between 256x256 images. You can try these new settings to see if the results can meet the benchmarks in the paper. By the way, what are your current test metrics?

Ozone-oo commented 9 months ago

Thank you for your response. The F1 Score for the LEVIR-CD test set using SGSLN/512 is 91.90. Additionally, the paper states, 'Following [11], we crop the images into 256×256 pixel patches with an overlap of 128 pixels on each side (horizontal and vertical), and split the samples into training, validation, and test sets in a 7:1:2 ratio.' Does this mean that a 1024×1024 picture is ultimately divided into 64 smaller 256×256 patches? 1x1024x1024 -> 64x256x256

walking-shadow commented 9 months ago

A 1024×1024 picture is ultimately divided into 7×7 smaller 256×256 patches, like a conv with kernel size = 256 and stride = 128. BTW, your experimental results 91.90 is quite near 92.33, I think change the dropout and noise_p hyperparameter and the data crop methon would make you there.

Ozone-oo commented 9 months ago

Motivated by your response, I will re-run the experiment.