备注
您正在阅读 MMClassification 0.x 版本的文档。MMClassification 0.x 会在 2022 年末被切换为次要分支。建议您升级到 MMClassification 1.0 版本,体验更多新特性和新功能。请查阅 MMClassification 1.0 的安装教程、迁移教程以及更新日志。
mmcls.models.TIMMBackbone¶
- class mmcls.models.TIMMBackbone(model_name, features_only=False, pretrained=False, checkpoint_path='', in_channels=3, init_cfg=None, **kwargs)[源代码]¶
Wrapper to use backbones from timm library.
More details can be found in timm. See especially the document for feature extraction.
- 参数
model_name (str) – Name of timm model to instantiate.
features_only (bool) – Whether to extract feature pyramid (multi-scale feature maps from the deepest layer at each stride). For Vision Transformer models that do not support this argument, set this False. Defaults to False.
pretrained (bool) – Whether to load pretrained weights. Defaults to False.
checkpoint_path (str) – Path of checkpoint to load at the last of
timm.create_model
. Defaults to empty string, which means not loading.in_channels (int) – Number of input image channels. Defaults to 3.
init_cfg (dict or list[dict], optional) – Initialization config dict of OpenMMLab projects. Defaults to None.
**kwargs – Other timm & model specific arguments.