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

training doesn't deliver #5

Open
STORMTROOPERRR opened this issue May 15, 2022 · 11 comments
Open

training doesn't deliver #5

STORMTROOPERRR opened this issue May 15, 2022 · 11 comments

Comments

@STORMTROOPERRR
Copy link

I have tried to use the default hyperparameters to train the posted model on SECOND dataset and I'm sure my dataset preparation is fine. Unluckily, it seems that the model fails to learn well and the binary change map generated by the network is far from satisfaction.
(the listed images are binary-change-map, change-detection-result-t1 and change-detection-result-t2)
train_10_CM
train_10_CM_A
train_10_CM_B
Maybe there are some settings in the scripts I failed to modify.
Could you offer me a pretrained.pth or some fine-tuned .pth checkpoint as in train_SCD.py line 55 that could help me out?
Many thanks.

@ggsDing
Copy link
Owner

ggsDing commented May 16, 2022

Hi,
What's the model you used and what's the accuracy?
It is hard to assess your result based on the prediction maps of a single area. Some images are just more difficult.

@STORMTROOPERRR
Copy link
Author

Honestly I just used the default hyperparameters in your scripts and the paper. And the model was the default SSCDl+SCLoss as in train_SCD Line 22.
Unfortunately the accuracy crashed not only far from the paper but seemed the model just didn't fit.
Could you upload a benchmark checkpoint .pth or pretrained .pth so called in train_SCD.py via Google Drive so that I can directly do some tests? Your model seems quite promising and I really wanna to witness a great result on that.
Many thanks.

@ggsDing
Copy link
Owner

ggsDing commented May 17, 2022

That's strange. I'll run the released codes and see what's wrong

@STORMTROOPERRR
Copy link
Author

Thanks a lot. Looking forward to your results.

@STORMTROOPERRR
Copy link
Author

STORMTROOPERRR commented May 17, 2022

And by the way, since the original SECOND dataset only has RGB labels and I want to use class-indexed labels just the same as your scripts default choice, I used the function "Color2Index" in your RS_ST.py to generate labels before training. I have done some checks on it and I'm sure no mistakes here.

@ggsDing
Copy link
Owner

ggsDing commented May 17, 2022

And by the way, since the original SECOND dataset only has RGB labels and I want to use class-indexed labels just the same as your scripts default choice, I used the function "Color2Index" in your RS_ST.py to generate labels before training. I have done some checks on it and I'm sure no mistakes here.

I just ran the codes again and did not see any problems. Here I provide a link to the trained model of SSCD-l+SCLoss.

@STORMTROOPERRR
Copy link
Author

And by the way, since the original SECOND dataset only has RGB labels and I want to use class-indexed labels just the same as your scripts default choice, I used the function "Color2Index" in your RS_ST.py to generate labels before training. I have done some checks on it and I'm sure no mistakes here.

I just ran the codes again and did not see any problems. Here I provide a link to the trained model of SSCD-l+SCLoss.

That's great! I'll do some deep checks then. Thanks again for the pretrained.

@STORMTROOPERRR
Copy link
Author

When I use the original script "pred_SCD", an error occurred when tried to save "pred_A" around Line 166.
The error was "ValueError: Image must be 2D (grayscale, RGB, or RGBA).", suggesting the shape of "pred_A" is [2, 256, 256]
The reason for this is that a few lines earlier the shape of the "change_mask" multiplying "pred_A" is [2, 256, 256]. I think there the "change_mask" should be [256,256] indicating the change region, don't know why there're two dimensions.

@STORMTROOPERRR
Copy link
Author

I then used torch.argmax to generate "change_mask" from "out_change" directly and this time no error when saving results.
However ,the output labels are like this, sparkled with strange white regions, while the gt is like the second pic. Could you help me out here?
00682_01
00682_01

@ggsDing
Copy link
Owner

ggsDing commented May 18, 2022

No I think you should use the sigmoid function to generate the change mask. I'll check the prediction codes later.

@ggsDing
Copy link
Owner

ggsDing commented May 19, 2022

When I use the original script "pred_SCD", an error occurred when tried to save "pred_A" around Line 166. The error was "ValueError: Image must be 2D (grayscale, RGB, or RGBA).", suggesting the shape of "pred_A" is [2, 256, 256] The reason for this is that a few lines earlier the shape of the "change_mask" multiplying "pred_A" is [2, 256, 256]. I think there the "change_mask" should be [256,256] indicating the change region, don't know why there're two dimensions.

Hi I think you used the wrong prediction function. pred_direct is for models with 2 outputs. For the sscd-l model, use the pred function at line71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants