czczup / ViT-Adapter

[ICLR 2023 Spotlight] Vision Transformer Adapter for Dense Predictions
https://arxiv.org/abs/2205.08534
Apache License 2.0
1.26k stars 139 forks source link

KeyError: 'ViTAdapter is not in the models registry' #154

Open CatOneTwo opened 1 year ago

CatOneTwo commented 1 year ago

When I want to run the train.py in detection folders, the error occurs KeyError: 'ViTAdapter is not in the models registry'

I have installed the environment according to the ReadMe file, so how to fix this bug, thank you!

czczup commented 11 months ago

I'm really sorry for the late reply.

This is likely because the current path where the code is running has not been added to the PYTHONPATH. You can try the following cmd:

export PYTHONPATH="${PYTHONPATH}:$(pwd)"

yushanz commented 5 months ago

When I want to run the train.py in detection folders, the error occurs KeyError: 'ViTAdapter is not in the models registry'

I have installed the environment according to the ReadMe file, so how to fix this bug, thank you!

Hey I ran into the same problem :( It works if I run the official test script. But the same KeyError occurs if I want to build model in my own script. Can you share how you solved the problem? Thanks! :)

CardenB commented 3 months ago

@yushanz make sure you import mmdet_custom