Skip to content

Commit

Permalink
fix export pose model (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cathy0908 committed Jan 11, 2024
1 parent 447a166 commit cecb36a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions easycv/apis/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,12 @@ def _export_pose_topdown(model, cfg, filename, fp16=False, dummy_inputs=None):
model.to(device)

if hasattr(cfg, 'export') and getattr(cfg.export, 'type', 'raw') == 'raw':
from mmcv.utils.path import is_filepath

if hasattr(cfg, 'dataset_info') and is_filepath(cfg.dataset_info):
dataset_info_cfg = Config.fromfile(cfg.dataset_info)
cfg.dataset_info = dataset_info_cfg._cfg_dict['dataset_info']

return _export_common(model, cfg, filename)

def _dummy_inputs(cfg):
Expand Down

0 comments on commit cecb36a

Please sign in to comment.