mmdeployv0.6 mmdetectionv2.4、mmcv-full1.6安装及环境搭建

news2024/9/21 11:04:54

一、安装条件

Step 1.创建conda虚拟环境并激活

conda create -n mmdeploy python=3.8 -y   #创建环境
conda activate mmdeploy                 #激活环境

Step 2.安装 PyTorch

#如果网不好,可以这样安装
pip3 install torch==1.8.1+cu111 torchvision==0.9.1+cu111   -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
 
#验证是否安装成功
 
>>> import torchvision
>>> import torch
>>> import.__version__
  File "<stdin>", line 1
    import.__version__
          ^
SyntaxError: invalid syntax
>>> torch.__version__
'1.11.0+cu113'

在这里插入图片描述
在这里插入图片描述

二、安装mmcv-full 1.6.0

1、pip安装

pip install mmcv-full==1.6.0

2、源码安装

https://github.com/open-mmlab/mmcv.git
cd mmcv
MMCV_WITH_OPS=1 python -m pip install -e . -v

3、验证安装

python .dev_scripts/check_installation.py

在这里插入图片描述

三、安装推理引擎

1、安装ONNXRuntime

安装ONNXRuntime的python包

pip install onnxruntime==1.8.1

2、安装预编译包要求的推理后端 TensorRT

在本例中,我们需要安装 TensorRT(含 cuDNN)推理引擎。因在 NVIDIA 官网下载软件包,必须要登录认证,所以请预先登录并下载所需的 TensorRT 和 cuDNN。请注意: TensorRT 版本、cuDNN 版本要和 CUDA 版本匹配。适用于 x86_64 架构的 TensorRT 8.2 GA Update 2

下载完毕后,您可以参考如下方法安装。这里,我们以 TensorRT 8.2.3.0、cuDNN 8.2 为例:
在这里插入图片描述
在这里插入图片描述

# !!! 从 NVIDIA 官网下载 与 cuda toolkit 匹配的 tensorrt 到当前的工作目录
tar -zxvf TensorRT-8.2.3.0.Linux.x86_64-gnu.cuda-11.4.cudnn8.2.tar.gz
cd TensorRT-8.2.3.0
python -m pip install TensorRT-8.2.3.0/python/tensorrt-8.2.3.0-cp37-none-linux_x86_64.whl 
pip install pycuda

# vim ~/.bashrc 配置环境变量,添加下面两行,根据自己的目录修改,最后source ~/.bashrc  使生效。
export TENSORRT_DIR=/home/xbsj/gaoying/lib/TensorRT-8.2.3.0
export LD_LIBRARY_PATH=${TENSORRT_DIR}/lib:$LD_LIBRARY_PATH

二、源码安装mmdeploy v0.6 环境

1、安装 MMDeploy 和 SDK

从 v0.5.0 之后,MMDeploy 开始提供预编译包MMDeploy Release V0.6.0。
在这里插入图片描述

1、MMDeploy-onnxruntime 预编译包

在这里插入图片描述

python -m pip install dist/mmdeploy-0.6.0-py38-none-linux_x86_64.whl
python -m pip install sdk/python/mmdeploy_python-0.6.0-cp38-none-linux_x86_64.whl
2、MMDeploy-TensoRT 预编译包

CuDNN下载地址

您可以根据目标软硬件平台,从这里选择并下载预编译包。在 NVIDIA 设备上,我们推荐使用 MMDeploy-TensoRT 预编译包:

wget https://github.com/open-mmlab/mmdeploy/releases/download/v0.6.0/mmdeploy-0.6.0-linux-x86_64-cuda11.1-tensorrt8.2.3.0.tar.gz

tar -zxvf mmdeploy-0.6.0-linux-x86_64-cuda11.1-tensorrt8.2.3.0.tar.gz

cd mmdeploy-0.6.0-linux-x86_64-cuda11.1-tensorrt8.2.3.0

在这里插入图片描述

python -m pip install dist/mmdeploy-0.6.0-py38-none-linux_x86_64.whl
python -m pip install sdk/python/mmdeploy_python-0.6.0-cp38-none-linux_x86_64.whl
pip install pycuda

# vim ~/.bashrc 配置环境变量,添加下面,根据自己的目录修改,最后source ~/.bashrc  使生效。
export LD_LIBRARY_PATH=/work1/sre/hyliu41/MMproject/mmdeploy-0.6.0-linux-x86_64-cuda11.1-tensorrt8.2.3.0/sdk/lib:$LD_LIBRARY_PATH            # 改为自己的目录
export TENSORRT_DIR=$(pwd)/TensorRT-8.2.3.0
export LD_LIBRARY_PATH=${TENSORRT_DIR}/lib:$LD_LIBRARY_PATH
# !!! Moreover, download cuDNN 8.2.1 CUDA 11.x tar package from NVIDIA, and extract it to the current directory
export CUDNN_DIR=$(pwd)/cuda
export LD_LIBRARY_PATH=$CUDNN_DIR/lib64:$LD_LIBRARY_PATH
cd ..

在这里插入图片描述
在这里插入图片描述

3、安装mmdetectionv2.4

在这里插入图片描述
在这里插入图片描述

https://github.com/open-mmlab/mmdetection.git
cd mmdetection
pip install -r requirements/build.txt
pip install -v -e .

三、模型转换与推理

1、Faster RCNN

在准备工作就绪后,我们可以使用 MMDeploy 中的工具 deploy.py,将 OpenMMLab 的 PyTorch 模型转换成推理后端支持的格式。

以 MMDetection 中的 Faster R-CNN 为例,我们可以使用如下命令,将 PyTorch 模型转换成可部署在 NVIDIA GPU 上的 TenorRT 模型:

# 克隆 mmdeploy 仓库。转换时,需要使用 mmdeploy 仓库中的配置文件,建立转换流水线
git clone --recursive https://github.com/open-mmlab/mmdeploy.git
python -m pip install -r mmdeploy/requirements/runtime.txt


# 克隆 mmdetection 仓库。转换时,需要使用 mmdetection 仓库中的模型配置文件,构建 PyTorch nn module
python -m pip install mmdet==2.24.0
git clone https://github.com/open-mmlab/mmdetection.git

# 下载 Faster R-CNN 模型权重
cd ./mmdetection/checkpoints
wget https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth -O faster_rcnn_r50_fpn_1x_coco.pth

# 设置工作路径
cd ../../mmdeploy
mkdir mmdeploy_models
mkdir mmdeploy_models/faster_rcnn

# 执行转换命令,实现端到端的转换[[模板]]
python ${MMDEPLOY_DIR}/tools/deploy.py \
    ${MMDEPLOY_DIR}/configs/mmdet/detection/detection_tensorrt_dynamic-320x320-1344x1344.py \
    ${MMDET_DIR}/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py \
    ${CHECKPOINT_DIR}/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth \
    ${MMDET_DIR}/demo/demo.jpg \
    --work-dir ${WORK_DIR} \
    --device cuda:0 \
    --dump-info

# 执行转换命令,实现端到端的转换
python tools/deploy.py configs/mmdet/detection/detection_tensorrt_dynamic-320x320-1344x1344.py ../mmdetection/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py ../mmdetection/checkpoints/faster_rcnn_r50_fpn_1x_coco.pth ../mmdetection/demo/demo.jpg --work-dir mmdeploy_models/faster_rcnn/ --device cuda:0 --dump-info

您可以将上述模型转换为 onnx 模型并执行 ONNX 运行时推理,只需将“detection_tensorrt_dynamic-320x320-1344x1344.py”更改为“detection_onnxruntime_dynamic.py”并将“–device”设为“cpu”即可。

1、 问题

在这里插入图片描述

2、推理模型

模型转换后,我们不仅可以通过模型转换器进行推理,还可以通过推理SDK进行推理。
(1)通过模型转换器进行推理
模型转换器提供了统一的inference_model API 来完成这项工作,使所有推理后端 API 对用户透明。以之前转换的 Faster R-CNN tensorrt 模型为例

2、yolov3

在 中找到模型的代码库文件夹configs/。要转换 yolov3 模型,您需要检查configs/mmdet文件夹。

在 中找到模型的任务文件夹configs/codebase_folder/。对于 yolov3 模型,您需要检查configs/mmdet/detection文件夹。

在 中找到部署配置文件configs/codebase_folder/task_folder/。要将 yolov3 模型部署到 onnx 后端,您可以使用configs/mmdet/detection/detection_onnxruntime_dynamic.py。

python ./tools/deploy.py \
    configs/mmdet/detection/detection_tensorrt_dynamic-320x320-1344x1344.py \
    $PATH_TO_MMDET/configs/yolo/yolov3_d53_8xb8-ms-608-273e_coco.py \
    $PATH_TO_MMDET/checkpoints/yolo/yolov3_d53_mstrain-608_273e_coco_20210518_115020-a2c3acb8.pth \
    $PATH_TO_MMDET/demo/demo.jpg \
    --work-dir work_dir \
    --show \
    --device cuda:0

${MMDEPLOY_DIR}/tools/deploy.py 是一个方便模型转换的工具。您可以阅读 如何转换模型 了解更多细节。

detection_tensorrt_dynamic-320x320-1344x1344.py 是一个参数配置文件。该文件的命名遵循如下规则:

<任务名>_<推理后端>-[后端特性]_<动态模型支持>.py

python tools/check_env.py

在这里插入图片描述
在这里插入图片描述

四、参考博客

【mmdeploy】【TODO】使用mmdeploy将mmdetection模型转tensorrt
6.6.tensorRT高级(1)-mmdetection框架下yolox模型导出并推理
mmdetection模型转onnx和tensorrt实战
MMDeploy部署实战系列
windows环境下使用mmdetection+mmdeploy训练自定义数据集并转成onnx格式部署
【环境搭建:onnx模型部署】onnxruntime-gpu安装与测试(python)
mmdeploy windows下pth2onnx 并对onnx进行量化

四、问题

添加链接描述

在这里插入图片描述

问题1、由于未注册,无法对 ONNX 模型运行评估MMCVDeformConv2d

在这里插入图片描述
在这里插入图片描述
转换为 ONNX 的日志:

(llens) ➜  experiments sh execute.sh
[2022-05-05 21:18:00.119] [mmdeploy] [info] [model.cpp:95] Register 'DirectoryModel'
/workspace/model/mmdetection/mmdet/datasets/utils.py:70: UserWarning: "ImageToTensor" pipeline is replaced by "DefaultFormatBundle" for batch inference. It is recommended to manually replace it in the test data pipeline in your config file.
  'data pipeline in your config file.', UserWarning)
2022-05-05 21:18:01,365 - mmdeploy - INFO - torch2onnx start.
[2022-05-05 21:18:03.182] [mmdeploy] [info] [model.cpp:95] Register 'DirectoryModel'
load checkpoint from local path: /workspace/experiments/deploy_test_0505/best_instance_mAP_epoch_18.pth
/workspace/model/mmdetection/mmdet/datasets/utils.py:70: UserWarning: "ImageToTensor" pipeline is replaced by "DefaultFormatBundle" for batch inference. It is recommended to manually replace it in the test data pipeline in your config file.
  'data pipeline in your config file.', UserWarning)
2022-05-05 21:18:05,391 - mmdeploy - WARNING - DeprecationWarning: get_onnx_config will be deprecated in the future. 
2022-05-05:21:18:05,mmdeploy WARNING  [utils.py:92] DeprecationWarning: get_onnx_config will be deprecated in the future. 
/workspace/mmdeploy/mmdeploy/core/optimizers/function_marker.py:158: 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!
  ys_shape = tuple(int(s) for s in ys.shape)
/opt/conda/envs/llens/lib/python3.7/site-packages/torch/nn/functional.py:2359: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').
  _verify_batch_size([input.size(0) * input.size(1) // num_groups, num_groups] + list(input.size()[2:]))
/opt/conda/envs/llens/lib/python3.7/site-packages/mmcv/ops/deform_conv.py:299: 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!
  input_pad = (x.size(2) < self.kernel_size[0]) or (x.size(3) <
/opt/conda/envs/llens/lib/python3.7/site-packages/mmcv/ops/deform_conv.py:301: 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 input_pad:
/opt/conda/envs/llens/lib/python3.7/site-packages/mmcv/ops/deform_conv.py:181: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').
  output_size += ((in_size + (2 * pad) - kernel) // stride_ + 1, )
/opt/conda/envs/llens/lib/python3.7/site-packages/mmcv/ops/deform_conv.py:182: 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 not all(map(lambda s: s > 0, output_size)):
/opt/conda/envs/llens/lib/python3.7/site-packages/mmcv/ops/deform_conv.py:89: 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!
  cur_im2col_step = min(ctx.im2col_step, input.size(0))
/opt/conda/envs/llens/lib/python3.7/site-packages/mmcv/ops/deform_conv.py:91: 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!
  ) == 0, 'batch size must be divisible by im2col_step'
/opt/conda/envs/llens/lib/python3.7/site-packages/mmcv/ops/deform_conv.py:310: 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 input_pad:
/opt/conda/envs/llens/lib/python3.7/site-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at  ../aten/src/ATen/native/TensorShape.cpp:2157.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
/workspace/mmdeploy/mmdeploy/codebase/mmdet/models/dense_heads/base_dense_head.py:95: 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!
  assert cls_score.size()[-2:] == bbox_pred.size()[-2:]
/workspace/mmdeploy/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)
/workspace/mmdeploy/mmdeploy/pytorch/functions/topk.py:33: 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!
  return ctx.origin_func(input, k, dim=dim, largest=largest, sorted=sorted)
/workspace/model/mmdetection/mmdet/core/bbox/coder/distance_point_bbox_coder.py:58: 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!
  assert points.size(0) == pred_bboxes.size(0)
/workspace/model/mmdetection/mmdet/core/bbox/coder/distance_point_bbox_coder.py:59: 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!
  assert points.size(-1) == 2
/workspace/model/mmdetection/mmdet/core/bbox/coder/distance_point_bbox_coder.py:60: 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!
  assert pred_bboxes.size(-1) == 4
/workspace/mmdeploy/mmdeploy/codebase/mmdet/core/post_processing/bbox_nms.py:92: 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.
  iou_threshold = torch.tensor([iou_threshold], dtype=torch.float32)
/workspace/mmdeploy/mmdeploy/codebase/mmdet/core/post_processing/bbox_nms.py:93: 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.
  score_threshold = torch.tensor([score_threshold], dtype=torch.float32)
/workspace/mmdeploy/mmdeploy/mmcv/ops/nms.py:40: TracerWarning: Converting a tensor to a Python float 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!
  score_threshold = float(score_threshold)
/workspace/mmdeploy/mmdeploy/mmcv/ops/nms.py:41: TracerWarning: Converting a tensor to a Python float 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!
  iou_threshold = float(iou_threshold)
/opt/conda/envs/llens/lib/python3.7/site-packages/mmcv/ops/nms.py:160: 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!
  assert boxes.size(1) == 4
/opt/conda/envs/llens/lib/python3.7/site-packages/mmcv/ops/nms.py:161: 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!
  assert boxes.size(0) == scores.size(0)
/opt/conda/envs/llens/lib/python3.7/site-packages/mmcv/ops/nms.py:29: 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 max_num > 0:
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
/opt/conda/envs/llens/lib/python3.7/site-packages/torch/onnx/symbolic_opset9.py:2819: UserWarning: Exporting aten::index operator of advanced indexing in opset 11 is achieved by combination of multiple ONNX operators, including Reshape, Transpose, Concat, and Gather. If indices include negative values, the exported graph will produce incorrect results.
  "If indices include negative values, the exported graph will produce incorrect results.")
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
WARNING: The shape inference of mmdeploy::MMCVDeformConv2d type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
2022-05-05 21:18:29,953 - mmdeploy - INFO - torch2onnx success.
2022-05-05 21:18:29,954 - mmdeploy - WARNING - "visualize_model" has been skipped may be because it's             running on a headless device.
2022-05-05 21:18:29,954 - mmdeploy - INFO - All process success.

评估 ONNX 模型的日志:

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2039492.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

基于python的百度迁徙迁入、迁出数据分析(十)

副标题&#xff1a;从百度迁徙数据看——迁徙数据特征分析 书接上文&#xff0c;我们先回顾一下我们统计的时间口径&#xff1a;2024年2月1日——2024年8月1日&#xff0c;这里包含了春运、清明、五一、端午、四个中大型国定假日&#xff0c;我们详细分析一下在当下的统计周期…

GOIP语音网关对接VOS3000技巧 落地于呼叫配置

GOIP语音网关对接VOS3000技巧 落地和呼叫以鼎信GOIP网关为例 首先登录vos端&#xff0c;添加落地网关和账户 账户添加&#xff1a; 账户管理&#xff0c;先添加账户然后应用&#xff0c;在过滤看看是否添加成功 给账户添加一个费率 双击费率数量添加费率的地区前缀&#xff0…

关于宠物浮毛对身体是否有害?宠物空气净化器选对告别浮毛困扰

说到宠物掉毛&#xff0c;大家是不是都会心里咯噔一下&#xff0c;担心这会不会对身体有啥不好&#xff1f;这确实是很多养宠人&#xff0c;还有那些正打算养宠的朋友心里的一块大石头。而且啊&#xff0c;这浮毛问题还常常成了家庭纷争的源头&#xff0c;特别是那些怀孕了的、…

【约数之和】

题目 TLE代码 #include<bits/stdc.h> using namespace std; typedef long long LL; #define x first #define y secondconst int N 5e710; const int MOD 9901; LL a, b; unordered_map<int, int> cnt; LL res 1; LL fast(int base, int expo) {LL result 1;…

TreeSet的排序方式

一.TreeSet的特点&#xff1a; 二.TreeSet对象排序练习题&#xff1a; 需求&#xff1a;利用TreeSet存储整数并进行排序 package com.itheima.a06mySet; ​ import java.util.TreeSet; ​ public class A05_TreeSetDemo1 {public static void main(String[] args) {//1.创建T…

链表算法题一

​ 旋转链表 旋转链表 首先考虑特殊情况 若给定链表为空表或者单个节点,则直接返回head,不需要旋转操作.题目给定条件范围: 0 < k < 2 ∗ 1 0 9 0 < k < 2 * 10^9 0<k<2∗109,但是受给定链表长度的限制,比如示例2中,k4与k1的效果等价. 那么可以得出kk%l…

QLabel设置图像的方法+绘制文本换行显示

1、QLabel设置图像有两种方法 (1) void setPicture(const QPicture &); (2) void setPixmap(const QPixmap &); QPicture和QPixmap都是继承于QPaintDevice&#xff0c;它们都可以通过加载图片的方式获取&#xff1a;bool load(QIODevice *dev, const char *format …

8.8网络编程

笔记 网络基础 一.网络通信的引入 IPC通信方式&#xff0c;只能完成同一台主机之间多个进程间的通信&#xff0c;在实现跨主机的多个进程间通信时&#xff0c;就显得力不从心了。所以我们引入了网络通信&#xff0c;基于套接字socket的通信方式&#xff0c;能够完成同一主机…

AI Agent工程师认证-学习笔记(2)——【多Agent】AgentScope

基础学习链接&#xff1a;【多Agent】AgentScope学习指南 速通攻略&#xff1a;零基础做个多智能体游戏 Agentscope入门文档&#xff1a;AgentScope 初探 应用开发进阶&#xff1a;AgentScope应用开发入门 AgentScope官方文档&#xff1a;AgentScope官方文档 AgentScope开…

Ghidra:开源软件逆向工程框架

Ghidra 是一个软件逆向工程 (SRE) 框架 Ghidra 是一种尖端的开源软件逆向工程 (SRE) 框架&#xff0c;是美国国家安全局 (NSA) 研究局的产品。 Ghidra 该框架具有高端软件分析工具&#xff0c;使用户能够分析跨各种平台&#xff08;包括 Windows、macOS 和 Linux&#xff09…

【区块链+金融服务】港融区域股权服务平台 | FISCO BCOS应用案例

中国证监会在 2020 年启动了区块链建设试点工作&#xff0c;提出建设基于区块链的场外市场登记系统和交易报告库&#xff0c;利 用区块链去中心化、不易篡改、安全稳定等技术特点&#xff0c;构建区域性股权市场数字化信任机制&#xff0c;为区域性股权市场 提供基础支撑设施。…

【网编】——UDP编程

宏观操作 服务器&#xff1a;socket创套接字—bind绑定连接—recvfrom接收数据/sendto发送数据 客户端&#xff1a;socket创套接字—sendto发送数/recvfrom接收数据—close关闭套接字 函数 recv ssize_t recvfrom ( int sockfd , void * buf , size_t len , int flags , str…

【秋招笔试】8.11大疆秋招(第三套)-三语言题解

🍭 大家好这里是 春秋招笔试突围,一起备战大厂笔试 💻 ACM金牌团队🏅️ | 多次AK大厂笔试 | 编程一对一辅导 ✨ 本系列打算持续跟新 春秋招笔试题 👏 感谢大家的订阅➕ 和 喜欢💗 和 手里的小花花🌸 ✨ 笔试合集传送们 -> 🧷春秋招笔试合集 🍒 本专栏已收…

实时推荐算法的架构

1. 实时推荐算法的架构设计 偷得浮生半日闲&#xff0c;跟大家一起聊一聊大家最喜欢的实时推荐算法架构&#xff0c;具体如图1.1&#xff0c;架构的详解则见下一章节《2. 实时推荐算法架构设计详解》。 图 1.1 实时推荐算法的架构设计 2. 实时推荐算法架构设计详解 2.1 数据源…

MySQL 数据类型详解及SQL语言分类-DDL篇

在数据库开发中&#xff0c;选择合适的数据类型和理解SQL语言的分类是非常重要的。今天详细介绍MySQL中的数据类型&#xff0c;包括数值类型、字符串类型和日期类型&#xff0c;并解释SQL语言的四大分类&#xff1a;DDL、DML、DQL和DCL。 1.MySQL 数据类型 SQL语言是不区分大…

C++ 126类和对象_ 运算符重载_仿函数调用

126类和对象_ 运算符重载_仿函数调用 学习内容 仿函数调用 结果 代码 #include<iostream> using namespace std;//cout 在这里&#xff0c;没有它会报错 #include<string>//126类和对象_ 运算符重载_仿函数调用 //学习内容 //仿函数调用class MyPrint { …

【在线+sdwebui】在线免费运行stable-diffusion-webui (无需配置环境)

在线运行平台: https://platform.virtaicloud.com/gemini_web/auth/register 一、进入项目页面启动环境 项目&#xff1a;https://open.virtaicloud.com/web/project/detail/460841914028511232 1.1 点击运行 1.2 克隆环境到注册后的平台 1.3 自动适配项目最低配置的显卡 &…

Java面试题--JVM大厂篇之高并发Java应用的秘密武器:深入剖析GC优化实战案例

引言: 晚上好,Java开发者们!在高并发的现代应用中,垃圾回收器(GC)是Java性能优化的重要环节。尤其在CMS(Concurrent Mark-Sweep)GC曾经担任主角的日子里,适当的调优和优化措施至关重要。本篇文章将通过三个实际案例,探讨如何在不同场景中优化CMS GC,为你揭示Java性能…

前端如何使用Nginx代理dist网页,代理websocket,代理后端

本文将指导您如何配置Nginx以代理前后端分离的项目&#xff0c;并特别说明了对WebSocket的代理设置。通过本教程&#xff0c;您将能够实现一次性配置&#xff0c;进而使项目能够在任意局域网服务器上部署&#xff0c;并可通过IP地址或域名访问服务。 笔者建议 先速览本文了解大…

再见Figma!!新的设计,代码协作神器!【送源码】

软件介绍 Penpot 是一款专门用来帮助设计师和开发者更好地合作的软件。它可以让设计师轻松地做出漂亮的设计稿&#xff0c;还能让这些设计稿变成真正的网站或者应用的一部分。这样&#xff0c;设计师和开发者之间就不会因为沟通不畅而产生麻烦了。 Penpot 专为设计师与开发者之…