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
python3 mmdeploy/tools/deploy.py mmdeploy/configs/mmpose/pose-detection_torchscript.py \
/data/zqh/project/mmpose/work_dirs/cid_hrnet-w32_8xb20-140e_coco-512x512/cid_hrnet-w32_8xb20-140e_coco-512x512.py \
/data/zqh/project/mmpose/work_dirs/cid_hrnet-w32_8xb20-140e_coco-512x512/best_coco_AP_epoch_40_0.pth \
/data/datasets/meter_circle/test_img_keypoints/crop_23-04-28-05_173.23.92.73_zoom-org_1_meter_new.jpg \
--work-dir /data/zqh/project/mmdeploy/mmpose_model/cid_hrnet-w32_8xb20-140e_coco-512x512 \
--device cpu \
--dump-info
05/18 17:51:02 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
05/18 17:51:02 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "mmpose_tasks" registry tree. As a workaround, the current "mmpose_tasks" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
05/18 17:51:05 - mmengine - INFO - Start pipeline mmdeploy.apis.pytorch2torchscript.torch2torchscript in subprocess
05/18 17:51:08 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
05/18 17:51:08 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "mmpose_tasks" registry tree. As a workaround, the current "mmpose_tasks" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
Loads checkpoint by local backend from path: /data/zqh/project/mmpose/work_dirs/cid_hrnet-w32_8xb20-140e_coco-512x512/best_coco_AP_epoch_40_0.pth
05/18 17:51:17 - mmengine - INFO - Export PyTorch model to torchscript.
/home/user/.local/lib/python3.8/site-packages/mmpose/models/utils/ops.py:49: TracerWarning: Converting a tensor to a Python integer might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
size = tuple(int(x) for x in size)
/home/user/.local/lib/python3.8/site-packages/mmpose/models/heads/heatmap_heads/cid_head.py:132: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if map_size > 300:
/home/user/.local/lib/python3.8/site-packages/mmpose/models/heads/heatmap_heads/cid_head.py:134: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
elif map_size > 200:
/home/user/.local/lib/python3.8/site-packages/mmdeploy/pytorch/functions/topk.py:28: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.
k = torch.tensor(k, device=input.device, dtype=torch.long)
/home/user/.local/lib/python3.8/site-packages/mmpose/models/heads/heatmap_heads/cid_head.py:106: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if indices.shape[1] == 3:
/home/user/.local/lib/python3.8/site-packages/mmpose/models/heads/heatmap_heads/cid_head.py:109: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
elif indices.shape[1] == 2:
05/18 17:53:28 - mmengine - INFO - Save PyTorch model: /data/zqh/project/mmdeploy/mmpose_model/cid_hrnet-w32_8xb20-140e_coco-512x512/end2end.pt.
05/18 17:53:29 - mmengine - INFO - Finish pipeline mmdeploy.apis.pytorch2torchscript.torch2torchscript
05/18 17:53:30 - mmengine - INFO - Start pipeline mmdeploy.apis.utils.utils.to_backend in main process
05/18 17:53:30 - mmengine - INFO - Finish pipeline mmdeploy.apis.utils.utils.to_backend
05/18 17:53:30 - mmengine - INFO - visualize torchscript model start.
05/18 17:53:37 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
05/18 17:53:37 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "mmpose_tasks" registry tree. As a workaround, the current "mmpose_tasks" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
05/18 17:53:37 - mmengine - WARNING - Failed to search registry with scope "mmpose" in the "backend_segmentors" registry tree. As a workaround, the current "backend_segmentors" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmpose" is a correct scope, or whether the registry is initialized.
2023-05-18:17:54:46 - root - ERROR - decode() missing 1 required positional argument: 'instance_scores'
Traceback (most recent call last):
File "/home/user/.local/lib/python3.8/site-packages/mmdeploy/utils/utils.py", line 41, in target_wrapper
result = target(*args, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/mmdeploy/apis/visualize.py", line 72, in visualize_model
result = model.test_step(model_inputs)[0]
File "/home/user/.local/lib/python3.8/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/user/.local/lib/python3.8/site-packages/mmengine/model/base_model/base_model.py", line 340, in _run_forward
results = self(**data, mode=mode)
File "/home/user/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/mmdeploy/codebase/mmpose/deploy/pose_detection_model.py", line 109, in forward
preds = self.head.decode(batch_outputs[0])
File "/home/user/.local/lib/python3.8/site-packages/mmpose/models/heads/base_head.py", line 73, in decode
keypoints, scores = _pack_and_call(outputs,
File "/home/user/.local/lib/python3.8/site-packages/mmpose/models/heads/base_head.py", line 56, in _pack_and_call
return func(*args)
TypeError: decode() missing 1 required positional argument: 'instance_scores'
05/18 17:54:47 - mmengine - ERROR - mmdeploy/tools/deploy.py - create_process - 82 - visualize torchscript model failed.
And the model I get is not correct,some sobel attributes is "NaN",and the type is "SymInt". .
Any one knows?Please contact me
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is my mmdeploy script and log.
And the model I get is not correct,some sobel attributes is "NaN",and the type is "SymInt".
.
Any one knows?Please contact me
Beta Was this translation helpful? Give feedback.
All reactions