You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/mnt/workspace/project/2022AW/09/HDR/mmseg/models/backbones/mit.py:311: UserWarning: DeprecationWarning: pretrained is a deprecated, please use "init_cfg" instead
warnings.warn('DeprecationWarning: pretrained is a deprecated, '
Use load_from_local loader
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-6-db1a521dfe39>in<module>
3 seg_model = init_segmentor(
4 config=seg_cfg_file,
----> 5 checkpoint='./demo_work_dirs/Interhand_seg/iter_237500.pth',
6 )
/mnt/workspace/project/2022AW/09/HDR/mmseg/apis/inference.py in init_segmentor(config, checkpoint, device)
33 model = build_segmentor(config.model, test_cfg=config.get('test_cfg'))
34 if checkpoint is not None:
---> 35 checkpoint = load_checkpoint(model, checkpoint, map_location='cpu')
36 model.CLASSES = checkpoint['meta']['CLASSES']
37 model.PALETTE = checkpoint['meta']['PALETTE']
/home/pai/lib/python3.6/site-packages/mmcv/runner/checkpoint.py in load_checkpoint(model, filename, map_location, strict, logger, revise_keys)
525 dict or OrderedDict: The loaded checkpoint.
526 """--> 527 checkpoint = _load_checkpoint(filename, map_location, logger) 528 # OrderedDict is a subclass of dict 529 if not isinstance(checkpoint, dict):/home/pai/lib/python3.6/site-packages/mmcv/runner/checkpoint.py in _load_checkpoint(filename, map_location, logger) 464 information, which depends on the checkpoint. 465 """
--> 466 return CheckpointLoader.load_checkpoint(filename, map_location, logger)
467
468
/home/pai/lib/python3.6/site-packages/mmcv/runner/checkpoint.py in load_checkpoint(cls, filename, map_location, logger)
242 class_name = checkpoint_loader.__name__
243 mmcv.print_log(f'Use {class_name} loader', logger)
--> 244 return checkpoint_loader(filename, map_location)
245
246
/home/pai/lib/python3.6/site-packages/mmcv/runner/checkpoint.py in load_from_local(filename, map_location)
259 if not osp.isfile(filename):
260 raise IOError(f'{filename} is not a checkpoint file')
--> 261 checkpoint = torch.load(filename, map_location=map_location)
262 return checkpoint
263
/home/pai/lib/python3.6/site-packages/torch/serialization.py in load(f, map_location, pickle_module, **pickle_load_args)
598 # reset back to the original position.
599 orig_position = opened_file.tell()
--> 600 with _open_zipfile_reader(opened_file) as opened_zipfile:
601 if _is_torchscript_zip(opened_zipfile):
602 warnings.warn("'torch.load' received a zip file that looks like a TorchScript archive"
/home/pai/lib/python3.6/site-packages/torch/serialization.py in __init__(self, name_or_buffer)
240 class _open_zipfile_reader(_opener):
241 def __init__(self, name_or_buffer) -> None:
--> 242 super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer))
243
244
RuntimeError: PytorchStreamReader failed reading zip archive: invalid header or archive is corrupted
The text was updated successfully, but these errors were encountered:
Dear author,
I have encountered an error when I try to call the segmentation network. I sincerely need your help, thank you!
Error
The text was updated successfully, but these errors were encountered: