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
I've looked at the docs and changed everything I can, but I'm still getting the error
/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/mmengine/optim/optimizer/zero_optimizer.py:11: DeprecationWarning: `TorchScript` support for functional optimizers is deprecated and will be removed in a future PyTorch release. Consider using the `torch.compile` optimizer instead.
from torch.distributed.optim import \
Loads checkpoint by local backend from path: /home/ps/.cache/torch/hub/checkpoints/mmpose_anime-face_hrnetv2.pth
/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/mmengine/runner/checkpoint.py:347: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
checkpoint = torch.load(filename, map_location=map_location)
/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/mmpose/apis/inference.py:121: UserWarning: Can not load dataset_meta from the checkpoint or the model config. Use COCO metainfo by default.
warnings.warn('Can not load dataset_meta from the checkpoint or the '
/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/mmpose/datasets/datasets/utils.py:102: UserWarning: The metainfo config file "configs/_base_/datasets/coco.py" does not exist. A matched config file "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/mmpose/.mim/configs/_base_/datasets/coco.py" will be used instead.
warnings.warn(
Loads checkpoint by local backend from path: /home/ps/.cache/torch/hub/checkpoints/mmdet_anime-face_yolov3.pth
/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/mmengine/runner/checkpoint.py:347: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
checkpoint = torch.load(filename, map_location=map_location)
Traceback (most recent call last):
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/ps/.vscode-server/extensions/ms-python.debugpy-2025.0.0/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 71, in <module>
cli.main()
File "/home/ps/.vscode-server/extensions/ms-python.debugpy-2025.0.0/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 501, in main
run()
File "/home/ps/.vscode-server/extensions/ms-python.debugpy-2025.0.0/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 351, in run_file
runpy.run_path(target, run_name="__main__")
File "/home/ps/.vscode-server/extensions/ms-python.debugpy-2025.0.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 310, in run_path
return _run_module_code(code, init_globals, run_name, pkg_name=pkg_name, script_name=fname)
File "/home/ps/.vscode-server/extensions/ms-python.debugpy-2025.0.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 127, in _run_module_code
_run_code(code, mod_globals, init_globals, mod_name, mod_spec, pkg_name, script_name)
File "/home/ps/.vscode-server/extensions/ms-python.debugpy-2025.0.0/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 118, in _run_code
exec(code, run_globals)
File "/home/ps/workspace/projects/mesh-fitter/src/main.py", line 24, in <module>
ai.detect_face.detect_face(img, output_path="models/base_female_face_with_landmarks.jpg")
File "/home/ps/workspace/projects/mesh-fitter/src/ai/detect_face.py", line 11, in detect_face
results = detector(new_image)
File "/home/ps/workspace/projects/mesh-fitter/src/ai/anime_face_detector/detector.py", line 133, in __call__
boxes = self._detect_faces(image)
File "/home/ps/workspace/projects/mesh-fitter/src/ai/anime_face_detector/detector.py", line 73, in _detect_faces
boxes = inference_detector(self.face_detector, image)[0]
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/mmdet/apis/inference.py", line 189, in inference_detector
results = model.test_step(data_)[0]
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/mmengine/model/base_model/base_model.py", line 145, in test_step
return self._run_forward(data, mode='predict') # type: ignore
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/mmengine/model/base_model/base_model.py", line 361, in _run_forward
results = self(**data, mode=mode)
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/mmdet/models/detectors/base.py", line 94, in forward
return self.predict(inputs, data_samples)
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/mmdet/models/detectors/single_stage.py", line 109, in predict
x = self.extract_feat(batch_inputs)
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/mmdet/models/detectors/single_stage.py", line 146, in extract_feat
x = self.backbone(batch_inputs)
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/mmdet/models/backbones/darknet.py", line 157, in forward
x = cr_block(x)
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/mmcv/cnn/bricks/conv_module.py", line 281, in forward
x = self.conv(x)
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 458, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 454, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
TypeError: conv2d() received an invalid combination of arguments - got (list, Parameter, NoneType, tuple, tuple, tuple, int), but expected one of:
* (Tensor input, Tensor weight, Tensor bias = None, tuple of ints stride = 1, tuple of ints padding = 0, tuple of ints dilation = 1, int groups = 1)
didn't match because some of the arguments have invalid types: (list of [Tensor], Parameter, NoneType, tuple of (int, int), tuple of (int, int), tuple of (int, int), int)
* (Tensor input, Tensor weight, Tensor bias = None, tuple of ints stride = 1, str padding = "valid", tuple of ints dilation = 1, int groups = 1)
didn't match because some of the arguments have invalid types: (list of [Tensor], Parameter, NoneType, tuple of (int, int), tuple of (int, int), tuple of (int, int), int)
/home/ps/mambaforge/envs/mesh-fitter/lib/python3.10/tempfile.py:869: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmppfgq15nb'>
_warnings.warn(warn_message, ResourceWarning)
Following. I'm trying to do the opposite - Go from a config written for MMdet 3.x but use it in code/ a model with weights that follow the MMdet 2.x convention.
Where did you get an MMdet 2.x config from @vipcxj ?
I've looked at the docs and changed everything I can, but I'm still getting the error
yolo3 config:
old config:
The text was updated successfully, but these errors were encountered: