TCT模型部署步骤(1:准备)

1. 工具及库依赖

1.1. 需要安装的工具

  1. Visual Studio
  2. python3.8
  • 资源路径: D:\安装包\python-3.8.8-amd64
  1. CUDA11.1
  • 默认安装路径:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1
  • 压缩包中有一个cudnn-11.2-windows-x64-v8.1.1.33,要将该路径bin文件夹中的7个文件,拷贝到上面安装路径bin文件夹中;
  • 资源路径:E:\开发工具资源\TCT模型部署相关\cuda11.1.7z

1.2. 依赖的包

  • 使用路径:E:\Dev\TCTDetect\libs
  • 资源路径:E:\开发工具资源\TCT模型部署相关\libs.7z

1.3. 模型文件

用生成工具在本机生成331_best.engine、negative_yolo.engine两个模型;

  • 使用路径:E:\Dev\TCTDetect\models\convert
  • 资源路径:E:\开发工具资源\TCT模型部署相关\convert

1.4. 调试环境模拟

  • 使用路径:E:\Dev\TCTDetect\Projects
  • 资源路径:E:\开发工具资源\TCT模型部署相关\Projects.7z

2. 修改CMake文件

  • 注: Torch相关的要注释掉

1. Classifier

set(OpenCV_DIR "E:/Dev/TCTDetect/libs/opencv452/build")
set(TENSORRT_DIR "E:/Dev/TCTDetect/libs/TensorRT-7.2.3.4")
set(CUDA_DIR "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1")

2. ObjectDetect

set(TENSORRT_DIR "E:/Dev/TCTDetect/libs/TensorRT-7.2.3.4")
set(CUDA_DIR "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1")
set(TCTINFER_DIR "E:/Dev/TCTDetect/libs/tctinfer")

3. PreProcess

set(CUDA_DIR "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1")
set(OpenCV_DIR "E:/Dev/TCTDetect/libs/opencv452/build")

4. redis

set(REDIS_INCLUDE "E:/Dev/TCTDetect/libs/redis-3.0/deps/hiredis")
set(REDIS_LIB "E:/Dev/TCTDetect/libs/redis-3.0/msvs/x64/Release")

5. RNN

set(TENSORRT_DIR "E:/Dev/TCTDetect/libs/TensorRT-7.2.3.4")
set(CUDA_DIR "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1")
set(LOG_DIR "E:/Dev/TCTDetect/libs/spdlog-1.x")

6. Slide

set(OpenCV_DIR "E:/Dev/TCTDetect/libs/opencv452/build")
set(OPENSLIDE_DIR "E:/Dev/TCTDetect/libs/openslide-win64-20171122")
set(SDPC_DIR "E:/Dev/TCTDetect/libs/sdpc")

7. 最外层

set(OpenCV_DIR "E:/Dev/TCTDetect/libs/opencv452/build")
set(TENSORRT_DIR "E:/Dev/TCTDetect/libs/TensorRT-7.2.3.4")
set(CUDA_DIR "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.1")
set(LOG_DIR "E:/Dev/TCTDetect/libs/spdlog-1.x")
set(TCTINFER_DIR "E:/Dev/TCTDetect/libs/tctinfer")
set(JSON_DIR "E:/Dev/TCTDetect/libs/json")
set(REDIS_INCLUDE "E:/Dev/TCTDetect/libs/redis-3.0/deps/hiredis")
set(REDIS_LIB "E:/Dev/TCTDetect/libs/redis-3.0/msvs/x64/Release")

3. 用CMake编译源文件

版权声明:本文为CSDN博主「南城同学」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/Nine_Yao/article/details/122957946

南城同学

我还没有学会写个人说明!

暂无评论

发表评论

相关推荐

使用YOLOv5实现多路摄像头实时目标检测

前言 YOLOV5模型从发布到现在都是炙手可热的目标检测模型,被广泛运用于各大场景之中。因此,我们不光要知道如何进行yolov5模型的训练,而且还要知道怎么进行部署应用。在本篇博客中,我将