Shortcuts

mmengine.hub.get_config

mmengine.hub.get_config(cfg_path, pretrained=False)[source]

Get config from external package.

Parameters
  • cfg_path (str) – External relative config path.

  • pretrained (bool) – Whether to save pretrained model path. If pretrained==True, the url of pretrained model can be accessed by cfg.model_path. Defaults to False.

Return type

mmengine.config.config.Config

Examples

>>> cfg = get_config('mmdet::faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py', pretrained=True)
>>> # Equivalent to
>>> # cfg = Config.fromfile('/path/to/faster-rcnn_r50_fpn_1x_coco.py')
>>> cfg.model_path
https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth
Returns

A Config parsed from external package.

Return type

Config

Parameters
  • cfg_path (str) –

  • pretrained (bool) –

Read the Docs v: stable
Versions
latest
stable
v0.10.2
v0.10.1
v0.10.0
v0.9.1
v0.9.0
v0.8.5
v0.8.4
v0.8.3
v0.8.2
v0.8.1
v0.8.0
v0.7.4
v0.7.3
v0.7.2
v0.7.1
v0.7.0
v0.6.0
v0.5.0
v0.4.0
v0.3.0
v0.2.0
Downloads
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.