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

Pretrained model on ECSSD dataset #9

Closed
rakesh-reddy95 opened this issue Nov 15, 2022 · 6 comments
Closed

Pretrained model on ECSSD dataset #9

rakesh-reddy95 opened this issue Nov 15, 2022 · 6 comments

Comments

@rakesh-reddy95
Copy link

rakesh-reddy95 commented Nov 15, 2022

I see that the code is updated for res2net but the backbone model isn't due to which the keys are mis-matched while loading. Can I get the backbone model with the updated network?

@plemeri
Copy link
Owner

plemeri commented Nov 16, 2022

Hello again, glad to see you back.

Unfortunately, we only have one option for Res2Net backbone model, so if you need any specific dataset for training, you need to change the yaml config file of res2net backbone network (InSPyReNet_Res2Net50.yaml). You can find how to change training dataset is in Getting Started / preparation section.

Moreover, for SwinB backbone, there are various options of pre-trained checkpoints, but we don't have a checkpoint for trained with ECSSD dataset only since it usually used for benchmark only.

If you need a specific checkpoint and cannot access to any GPU machine, then please let me know that I can train on my machine as you need.

Thank you

@plemeri plemeri closed this as completed Nov 16, 2022
@plemeri
Copy link
Owner

plemeri commented Nov 16, 2022

Unintentionally closed issue while responding. Reopening for further comments.

@plemeri plemeri reopened this Nov 16, 2022
@rakesh-reddy95
Copy link
Author

Thanks, I figured it out and made a comment. I have reverted to the code to the commit 76767a9 to make it work. I see the lines:
self.avgpool = nn.AdaptiveAvgPool2d(1)
self.fc = nn.Linear(512 * block.expansion, num_classes)

has been removed while the existing model's graph fetches for it as the model is trained using this. Hence the error is being occured:
[RuntimeError: Error(s) in loading state_dict for ResNet: Missing key(s) in state_dict: "fc.weight", "fc.bias". in loading state_dict of a resnet model]

And was able to fix upon reverting.

@plemeri
Copy link
Owner

plemeri commented Nov 16, 2022

We actually removed find_unused_parameters=True from loading pre-trained checkpoint and changed ImageNet pre-trained checkpoint for res2net to resolve the runtime error that you mentioned. You can download again from Getting Started / backbone checkpoints section. Please replace the old checkpoint with new one.

Therefore, reverting the commit 76767a9 is unnecessary so far. Sorry for the inconvenience.

@plemeri plemeri pinned this issue Nov 16, 2022
@rakesh-reddy95
Copy link
Author

Thank you for the quick turnaround. Can close this issue now.

@plemeri
Copy link
Owner

plemeri commented Nov 16, 2022

Glad to be your help. Please feel free to contact me anytime. Have a great day!

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