Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-overlapping crop #12

Closed
angle011 opened this issue Mar 15, 2022 · 4 comments
Closed

Non-overlapping crop #12

angle011 opened this issue Mar 15, 2022 · 4 comments
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@angle011
Copy link

angle011 commented Mar 15, 2022

Hi wgcban,
I'm really interested in your project.I want to reproduce ChangeFormer in LEVIR-CD.There are two Simple questions
1)you want to put LEVIR img (1024x1024)into non- overlapping 256. Do you means divide one image(1024x1024) into 16 images(256x256)?In other issues,you say There has image perparation code in /data_preparation,but I dont find,(of course if there is no code provided I can write by myself)
2)In paper,you have 6096/762/762 train/val/test-------but my LEVIR have 445--train(1024x1024),if you divide one into 16 there are 445x16=7120 train dataset

@wgcban wgcban added documentation Improvements or additions to documentation question Further information is requested labels Mar 15, 2022
@wgcban
Copy link
Owner

wgcban commented Mar 15, 2022

Hi @angle011,

Thank you for your interest in our work.

  1. Yes, you are correct. What I meant by '' creating non-overlapping patches'' is that dividing original 1024x1024 images into 16 crops. You can find the dataset preparation code here ChangeFormer/data_preparation/levir_cd_256.m. You just need to run the code in MATLAB and it will generate the dataset in the required order.
  2. You are correct and thank you for pointing out a typing mistake in the paper. Finally, we have 7120/1024/2048 for train/val/test , respectively. I will update this in the next version.

Also, I have uploaded my processed LEVIR-CD and DSIFN-CD datasets to the DropBox and you can download the final datasets here:

Accordingly, I have updated the readme file as follows:
https://github.com/wgcban/ChangeFormer/blob/main/README.md#links-to-download-processed-datsets-used-for-trainvaltest

Let me know if you have more questions!
Best,
Chaminda

@wgcban wgcban pinned this issue Mar 15, 2022
This was referenced Mar 15, 2022
@wgcban wgcban unpinned this issue Mar 16, 2022
@angle011
Copy link
Author

Hi @wgcban ,
I reproduce changeformer in LEVIR-CD .but I got some funny problems,
I have trained the model with the script you provided /run_ChangeFormer_LEVIR.sh with 3090. But when I check the metrics ,I find the mIou is 0.90( after I trained 200 epoches) rather than 0.8248.It confuses me a lot.
I have check the num of train_dataset and val_dataset(7120/2048) . I want to know wheather I have forget something in your codes
my project name is CD_ChangeFormerV6_LEVIR_b20_lr0.0001_adamw_train_val_200_linear_ce_multi_train_True_multi_infer_False_shuffle_AB_False_embed_dim_256
my log file s here
log.txt

@wgcban
Copy link
Owner

wgcban commented Mar 17, 2022

Hi @angle011

I'm happy to hear that you were able to reproduce ChangeFormer results! Congrats!

As I can see from your log.txt the last time the best model was updated is at the 181-th epoch.

Here are the corresponding CD performance metrics copied from your log.txt:


acc: 0.99012 miou: 0.90476 mf1: 0.94791 iou_0: 0.98966 iou_1: 0.81987 F1_0: 0.99480 F1_1: 0.90102 precision_0: 0.99370 precision_1: 0.92051 recall_0: 0.99591 recall_1: 0.88234
Lastest model updated. Epoch_acc=0.9479, Historical_best_acc=0.9478 (at epoch 180)


Here, I have highlighted the performance metrics that I have reported in the paper.

As you can see, the results that you obtained are almost closer to what I have reported in my paper. I think you are confused with the F1 score and IOU.

In my paper, I have reported IoU = 82.48 (change class iou-iou_1) and F1=90.40 (change class F1 score-f1_1), and you obtained IoU = 81.98 and F1=90.10, which are almost close to each other.

I hope this answers your question!
Let me know if you have further questions.

Best,
Chaminda

@wgcban wgcban closed this as completed Mar 19, 2022
@chilin0525
Copy link

Hi @wgcban ,
I also have question about non-overlapping crop,
Does cropping size related to detect some tiny change? e.g. using 128x128 as a patch better than 256x256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants