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

KeyError: 'ATSSVGFLHead is not in the head registry' #23

Open
TalentedMUSE opened this issue Feb 17, 2022 · 10 comments
Open

KeyError: 'ATSSVGFLHead is not in the head registry' #23

TalentedMUSE opened this issue Feb 17, 2022 · 10 comments

Comments

@TalentedMUSE
Copy link

Hello, I run the vfnet_r50_fpn_1x_coco.py and it works fine. However, when I run the vfl_atss_r50_fpn_1x_coco.py, I come across such problem, just as the title says. I have checked the init.py, and find ATSSVGFLHead is already there.
from .atss_vgfl_head import ATSSVGFLHead
__all__ = [ 'AnchorFreeHead', 'AnchorHead', 'GuidedAnchorHead', 'FeatureAdaption', 'RPNHead', 'GARPNHead', 'RetinaHead', 'RetinaSepBNHead', 'GARetinaHead', 'SSDHead', 'FCOSHead', 'RepPointsHead', 'FoveaHead', 'FreeAnchorRetinaHead', 'ATSSHead', 'FSAFHead', 'NASFCOSHead', 'PISARetinaHead', 'PISASSDHead', 'GFLHead', 'CornerHead', 'YOLACTHead', 'YOLACTSegmHead', 'YOLACTProtonet', 'YOLOV3Head', 'PAAHead', 'SABLRetinaHead', 'CentripetalHead', 'VFNetHead', 'TransformerHead', 'StageCascadeRPNHead', 'CascadeRPNHead', 'EmbeddingRPNHead', 'ATSSRawHead', 'ATSSVGFLHead', 'VFNetRawHead' ]
Also, the atss_vgfl_head.py has already registered such module by @HEADS.register_module(). So I am confused about where the problem is, and I would like you to give me some advice. Thanks aaaaa lot~~

@TalentedMUSE
Copy link
Author

the train command is the same:
python tools/train.py xxxx

@hyz-xmaster
Copy link
Owner

This is a bit weird. You may first check if you are using the correct version of mmdet. And then if there is atss_vgfl_head.py in the mmdet/models/dense_heads/ folder.

@TalentedMUSE
Copy link
Author

This is a bit weird. You may first check if you are using the correct version of mmdet. And then if there is atss_vgfl_head.py in the mmdet/models/dense_heads/ folder.

image
actually there is atss_vgfl_head.py in such folder. My mmdet version is 2.10.0, mmcv 1.2.4, torch 1.7.0

@hyz-xmaster
Copy link
Owner

You may refer to this issue to see if you can get any help.

@TalentedMUSE
Copy link
Author

You may refer to this issue to see if you can get any help.

Really Strange... I tried custom_imports = dict( imports=['mmdet.models.dense_heads.atss_vgfl_head'], and got such error:
ModuleNotFoundError: No module named 'mmdet.models.dense_heads.atss_vgfl_head'
However, when I tried [mmdet.models.dense_heads.vfnet_head], it worked.
As you can see, the atss_vgfl_head.py is already under dense_heads folder.

@hyz-xmaster
Copy link
Owner

I think you may try running "pip install mmdet" in your environment to see if it works. According to your description, although you're using mmdet 2.10.0, it seems not the one tailored for VarifocalNet.

@TalentedMUSE
Copy link
Author

I think you may try running "pip install mmdet" in your environment to see if it works. According to your description, although you're using mmdet 2.10.0, it seems not the one tailored for VarifocalNet.

Thanks a lot~ I will try it later

@TalentedMUSE
Copy link
Author

I think you may try running "pip install mmdet" in your environment to see if it works. According to your description, although you're using mmdet 2.10.0, it seems not the one tailored for VarifocalNet.

Thanks a loooot~ I finally know that it is due to my installation of mmdet(2.10.0) is not exactly the same as your mmdet folder.

@hyz-xmaster
Copy link
Owner

Cool!

@IamMichaelMeng
Copy link

I think you may try running "pip install mmdet" in your environment to see if it works. According to your description, although you're using mmdet 2.10.0, it seems not the one tailored for VarifocalNet.

Thanks a loooot~ I finally know that it is due to my installation of mmdet(2.10.0) is not exactly the same as your mmdet folder.

Hi! It looks like you're running into the same issue I had. How did you solve it? Was it just a matter of running pip install mmdet?

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

3 participants