VarifocalNet icon indicating copy to clipboard operation
VarifocalNet copied to clipboard

KeyError: 'ATSSVGFLHead is not in the head registry'

Open TalentedMUSE opened this issue 2 years ago • 9 comments

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 avatar Feb 17 '22 02:02 TalentedMUSE

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

TalentedMUSE avatar Feb 17 '22 02:02 TalentedMUSE

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.

hyz-xmaster avatar Feb 17 '22 05:02 hyz-xmaster

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

TalentedMUSE avatar Feb 17 '22 05:02 TalentedMUSE

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

hyz-xmaster avatar Feb 17 '22 08:02 hyz-xmaster

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.

TalentedMUSE avatar Feb 17 '22 09:02 TalentedMUSE

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.

hyz-xmaster avatar Feb 17 '22 09:02 hyz-xmaster

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 avatar Feb 17 '22 09:02 TalentedMUSE

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.

TalentedMUSE avatar Feb 17 '22 11:02 TalentedMUSE

Cool!

hyz-xmaster avatar Feb 17 '22 12:02 hyz-xmaster