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

inference with a pretrained model #39

Open
Tsardoz opened this issue Jun 11, 2022 · 4 comments
Open

inference with a pretrained model #39

Tsardoz opened this issue Jun 11, 2022 · 4 comments

Comments

@Tsardoz
Copy link

Tsardoz commented Jun 11, 2022

Hi this looks great but I am a bit confused.
I want to use a pretrained topformer model for inference for evaluation then maybe to use it for custom training.
I am confused about the steps.
I downloaded a model from here https://github.com/hustvl/TopFormer
In the ade20k.yaml file what do I put for the BACKBONE (in MODEL)? Also for PRETRAINED?
Or is the BACKBONE the starting weights for transfer learning?

@sithu31296
Copy link
Owner

Hi, I am sorry for confusion. TopFormer is not updated in this repo yet. I am updating the whole codebase and will release later.

@Tsardoz
Copy link
Author

Tsardoz commented Jun 11, 2022

Thanks but I am still confused.
If I download any segformer model from their git even the B3 used as demo (and shows it working well) I get terrible results.
eg. segformer.b3.512x512.ade.160k from https://drive.google.com/drive/folders/1GAku0G0iR9DsBxCbfENWMJ27c5lYUeQA
Is the format different? Do I need to retrain the model?
B0 looks like it might compete with Topformer but again, terrible results with a downloaded pretrain.

@sithu31296
Copy link
Owner

I suggest to use the pretrained models provided in this repo from here. Not all of the weights from official repositories are compatible with the modified (simplified) code base in this repo. But still it should work after modifying some of the keys and values in the pretrained weights. This is the example result I tested with the SegFormer-B2 model. The result is pretty good.

@Tsardoz
Copy link
Author

Tsardoz commented Jun 11, 2022 via email

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