X2Paddle
X2Paddle copied to clipboard
yolo模型转onnx转paddle,模型转换成功预测失败:ValueError: (InvalidArgument) Python object is not type of St10shared_ptrIN6paddle10imperative7VarBaseEE
yolo模型转onnx转paddle,模型转换成功预测失败:ValueError: (InvalidArgument) Python object is not type of St10shared_ptrIN6paddle10imperative7VarBaseEE
/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddle/vision/transforms/functional_pil.py:36: DeprecationWarning: NEAREST is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.NEAREST or Dither.NONE instead.
'nearest': Image.NEAREST,
/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddle/vision/transforms/functional_pil.py:37: DeprecationWarning: BILINEAR is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BILINEAR instead.
'bilinear': Image.BILINEAR,
/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddle/vision/transforms/functional_pil.py:38: DeprecationWarning: BICUBIC is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead.
'bicubic': Image.BICUBIC,
/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddle/vision/transforms/functional_pil.py:39: DeprecationWarning: BOX is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BOX instead.
'box': Image.BOX,
/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddle/vision/transforms/functional_pil.py:40: DeprecationWarning: LANCZOS is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.LANCZOS instead.
'lanczos': Image.LANCZOS,
/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddle/vision/transforms/functional_pil.py:41: DeprecationWarning: HAMMING is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.HAMMING instead.
'hamming': Image.HAMMING
/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddlex/paddleseg/models/losses/decoupledsegnet_relax_boundary_loss.py:19: DeprecationWarning: Please use `shift` from the `scipy.ndimage` namespace, the `scipy.ndimage.interpolation` namespace is deprecated.
from scipy.ndimage.interpolation import shift
/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddlex/paddleseg/transforms/functional.py:18: DeprecationWarning: Please use `distance_transform_edt` from the `scipy.ndimage` namespace, the `scipy.ndimage.morphology` namespace is deprecated.
from scipy.ndimage.morphology import distance_transform_edt
/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/sklearn/utils/multiclass.py:13: DeprecationWarning: Please use `spmatrix` from the `scipy.sparse` namespace, the `scipy.sparse.base` namespace is deprecated.
from scipy.sparse.base import spmatrix
/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddlex/ppcls/data/preprocess/ops/timm_autoaugment.py:38: DeprecationWarning: BILINEAR is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BILINEAR instead.
_RANDOM_INTERPOLATION = (Image.BILINEAR, Image.BICUBIC)
/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddlex/ppcls/data/preprocess/ops/timm_autoaugment.py:38: DeprecationWarning: BICUBIC is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead.
_RANDOM_INTERPOLATION = (Image.BILINEAR, Image.BICUBIC)
/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddle/tensor/creation.py:130: DeprecationWarning: `np.object` is a deprecated alias for the builtin `object`. To silence this warning, use `object` by itself. Doing this will not modify any behavior and is safe.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
if data.dtype == np.object:
W0901 10:00:24.208906 3157986 device_context.cc:447] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 11.6, Runtime API Version: 11.0
W0901 10:00:24.211457 3157986 device_context.cc:465] device: 0, cuDNN Version: 8.1.
Traceback (most recent call last):
File "/opt/deeplearning/Ryan/yolox-bb/paddle_test.py", line 22, in <module>
result = main(image)
File "/opt/deeplearning/Ryan/yolox-bb/pd_model/x2paddle_code.py", line 448, in main
out = model(x2paddle_images)
File "/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/layers.py", line 917, in __call__
return self._dygraph_call_func(*inputs, **kwargs)
File "/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/layers.py", line 907, in _dygraph_call_func
outputs = self.forward(*inputs, **kwargs)
File "/opt/deeplearning/Ryan/yolox-bb/pd_model/x2paddle_code.py", line 170, in forward
x2paddle_467 = paddle.strided_slice(x=x2paddle_images, axes=[2], starts=[0], ends=[2147483647], strides=[2])
File "/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddle/tensor/manipulation.py", line 2183, in strided_slice
return paddle.fluid.layers.strided_slice(
File "/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddle/fluid/layers/nn.py", line 11361, in strided_slice
helper.append_op(
File "/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op
return self.main_program.current_block().append_op(*args, **kwargs)
File "/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddle/fluid/framework.py", line 3163, in append_op
_dygraph_tracer().trace_op(type,
File "/opt/envs/miniconda3/envs/x2paddle/lib/python3.8/site-packages/paddle/fluid/dygraph/tracer.py", line 43, in trace_op
self.trace(type, inputs, outputs, attrs,
ValueError: (InvalidArgument) Python object is not type of St10shared_ptrIN6paddle10imperative7VarBaseEE (at /paddle/paddle/fluid/pybind/imperative.cc:79)
具体信息
- 转换模型后用处
- [ ] 使用 Paddle 框架/ PaddleInference 推理预测
- [ ] 使用 Paddle-Lite 做移动端推理
- 模型来源 YOLOX:https://github.com/Megvii-BaseDetection/YOLOX
- 应用场景 服务端国产芯片操作系统
- 版本信息 PaddlePaddle => 2.2.2 gpu X2Paddle => :1.3.8: 来源框架版本PyTorch => :1.7.1:
- 您的联系方式(邮箱/微信/电话)
@SJJ-dot 麻烦提供一下onnx模型吧,这边看一下
另外,可以描述一下以下两个问题吗: 1、具体业务场景 2、为什么有转到Paddle部署的需求呢?
感谢~