Open SaulZhang opened 1 year ago
Hi, I just uploaded the get_flops.py for calculating GFLOPs, you can try it.
I run the following command under the directory /ViT-Adapter/segmentation: python get_flops.py configs/ade20k/upernet_deit_adapter_tiny_512_160k_ade20k.py but got an error: Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/mmcv/utils/registry.py", line 52, in build_from_cfg return obj_cls(*args) File "/usr/local/lib/python3.6/dist-packages/mmseg/models/segmentors/encoder_decoder.py", line 36, in init self.backbone = builder.build_backbone(backbone) File "/usr/local/lib/python3.6/dist-packages/mmseg/models/builder.py", line 20, in build_backbone return BACKBONES.build(cfg) File "/usr/local/lib/python3.6/dist-packages/mmcv/utils/registry.py", line 212, in build return self.build_func(args, **kwargs, registry=self) File "/usr/local/lib/python3.6/dist-packages/mmcv/cnn/builder.py", line 27, in build_model_from_cfg return build_from_cfg(cfg, registry, default_args) File "/usr/local/lib/python3.6/dist-packages/mmcv/utils/registry.py", line 45, in build_from_cfg f'{obj_type} is not in the {registry.name} registry') KeyError: 'ViTAdapter is not in the models registry'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "get_flops.py", line 100, in
oh, you should import mmcv_custom and mmseg_custom at the begining of this code
Hi, I can not find the reported GFlops on the paper about the model Vit-Adapter-L (Mask2former/Beit v2/crop size 896), can you tell me the relevant data or the method to calculate it. Thanks a lot!