zihangJiang / TokenLabeling

Pytorch implementation of "All Tokens Matter: Token Labeling for Training Better Vision Transformers"
Apache License 2.0
425 stars 36 forks source link

generate_label.py unable to find model lvvit_s #22

Closed AleMaiaF closed 2 years ago

AleMaiaF commented 2 years ago

Hi,

When I tried to run the label generation script for the model lvvit_s it returned an error "RuntimeError: Unknown model".

Solution: It worked when I added the line "import tlt.models" in the file generate_label.py.

zihangJiang commented 2 years ago

The generate_label.py is used to generate dense label maps using pre-trained models from timm. You can extend it to generate labels using lvvit models (I think import tlt.models can work but I haven't tested).

AleMaiaF commented 2 years ago

Just tried it. It seems to work well.

Thank you!