当前位置: 首页 > news >正文

全国的p2p网站建设wordpress主题ent破解版

全国的p2p网站建设,wordpress主题ent破解版,工厂做网站,做网站能赚吗【2023-2-22】FastDeploy 安装编译教程 该测试 FastDeploy CPU版本。 1. fastDeploy库编译 1.1 官方预编译库下载 预编译库下载安装 1.2 自定义CPU版本库编译 官方编译FastDeploy教程 CMakeGUI VS 2019 IDE编译FastDeploy 本人编译教程 CMAKE_CONFIGURATION_TYPES 属性设…

【2023-2-22】FastDeploy 安装编译教程

该测试 FastDeploy CPU版本。

在这里插入图片描述

1. fastDeploy库编译

1.1 官方预编译库下载

预编译库下载安装

1.2 自定义CPU版本库编译

  • 官方编译FastDeploy教程

CMakeGUI + VS 2019 IDE编译FastDeploy

  • 本人编译教程
  1. CMAKE_CONFIGURATION_TYPES 属性设置为Release

  2. 请不要勾选WITH_GPUENABLE_TRT_BACKEND

  3. 开启ENABLE_PADDLE_BACKEND ENABLE_OPENVINO_BACKEND ENABLE_VISION

  4. 指定CMAKE_INSTALL_PREFIX 安装路径

  5. 生成fastdeploy.sln解决方案文件选择Release版本,生成编译,点击"INSTALL"->右键点击"生成"将编译好的SDK安装到先前指定的目录步骤⑤。
    在这里插入图片描述
    在这里插入图片描述

1.3 自定义GPU版本库编译

  • 官方编译FastDeploy教程

CMakeGUI + VS 2019 IDE编译FastDeploy

  • 本人编译教程
  1. CMAKE_CONFIGURATION_TYPES 属性设置为Release

  2. 勾选WITH_GPUENABLE_TRT_BACKEND

  3. 开启ENABLE_ORT_BACKEND ENABLE_PADDLE_BACKEND ENABLE_TRT_BACKEND ENABLE_OPENVINO_BACKEND ENABLE_VISION ENABLE_TEXT

  4. 设置CUDA TensorRT路径

CUDA_DIRECTORY            : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2
TRT_DRECTORY              : D:/Program Files/TensorRT-8.4.3.1
  1. 指定CMAKE_INSTALL_PREFIX 安装路径

  2. 生成fastdeploy.sln解决方案文件选择Release版本,生成编译,点击"INSTALL"->右键点击"生成"将编译好的SDK安装到先前指定的目录步骤⑤。
    请添加图片描述
    请添加图片描述

1.4 样例测试

picodet_l_320_coco_lcnet 模型下载

/** @Description: * @Version: 0.0.1* @Author: chccc* @Date: 2023-02-19 00:19:22* @LastEditors: chccc* @LastEditTime: 2023-02-20 17:23:21* @FilePath: \cpp\infer.cpp*/
#include <iostream>
#include "fastdeploy/vision.h"void PicoDetGpuInfer(const std::string& model_dir, const std::string& image_file)
{std::string model_file = "picodet_l_320_coco_lcnet/model.pdmodel";std::string params_file ="picodet_l_320_coco_lcnet/model.pdiparams";std::string config_file ="picodet_l_320_coco_lcnet/infer_cfg.yml";;auto option = fastdeploy::RuntimeOption();option.UseGpu(0);fastdeploy::vision::detection::PicoDet model = fastdeploy::vision::detection::PicoDet(model_file, params_file, config_file, option);std::cout<<typeid(model).name()<<std::endl;if (!model.Initialized()) {printf("[%s][%d] Error: fastdeploy::vision::detection::PicoDet initialized failed !\n", __func__, __LINE__);return;}auto im = cv::imread(image_file);auto im_bak = im.clone();auto start = std::chrono::system_clock::now();fastdeploy::vision::DetectionResult result;if (!model.Predict(&im, &result)) {printf("[%s][%d] Error: Failed to predict !\n", __func__, __LINE__);return;}//std::cout << res.Str() << std::endl;auto end = std::chrono::system_clock::now();auto duration = std::chrono::duration_cast<std::chrono::microseconds>(end - start);double costTime = double(duration.count()) * std::chrono::microseconds::period::num / std::chrono::microseconds::period::den;//printf("[%s][%d] model.Predict success, cost time: %lf s \n", __func__, __LINE__, costTime);std::cout << "==========================================================================" << std::endl;float score_thereshold = 0.8;int line_size = 2;float font_size = 1;auto vis_image = fastdeploy::vision::Visualize::VisDetection(im_bak, result, score_thereshold, line_size, font_size);std::string vis_image_path = "./images/vis_result.jpg";cv::imwrite(vis_image_path, vis_image);printf("[%s][%d] Visualized result saved in %s !\n", __func__, __LINE__, vis_image_path.c_str());
}int main()
{std::cout << "=============== TEST ===============" << std::endl;std::string model_dir = "./models/";;std::string image_file = "./images/1.jpg";//计时auto start = std::chrono::system_clock::now();PicoDetGpuInfer(model_dir, image_file);//计时auto end = std::chrono::system_clock::now();auto duration = std::chrono::duration_cast<std::chrono::microseconds>(end - start);double costTime = double(duration.count()) * std::chrono::microseconds::period::num / std::chrono::microseconds::period::den;printf("[%s][%d] Model infer success, cost time: %lf s \n", __func__, __LINE__, costTime);std::cout << "=============== Finished ===============" << std::endl;
}

在这里插入图片描述

http://www.yayakq.cn/news/660259/

相关文章:

  • 做网站上传视频给网站开发一个计算器功能
  • 海口企业自助建站系统wordpress把站
  • 即墨网站建设中国科技网官网
  • 做网站和微信小程序校园品牌推广方案
  • 国外php网站源码网站空间一般有多大
  • 做网站注意网站页脚包括什么
  • 类似淘宝商城网站建设方案外贸建站建在哪里
  • 建设银行网站的支付流程做网站有哪些导航条
  • 彩票网站建设基本流程中铁建设集团招聘官网
  • 无忧网站模板在线购物商城网站建设
  • 深圳集团网站建设专业公司网站首页index.php全屏展示代码怎么弄
  • 卡盟网站模板株洲本地新闻
  • 浙江建设三类人员报名网站企业市场网络推广方案
  • 商城网站建设费用上海浦东新区
  • 西安网站建设方案it运维发展方向
  • 南京个人网站建设10种网络营销方法
  • 个人网站做打赏流程如何开公司做网站
  • 免费网站搭建成立公司注意事项
  • 百度和阿里哪个厉害做网站管理咨询公司注册资本
  • 哪里可以做宝盈网站做自由行的网站
  • 三网合一网站建设报价站群优化公司
  • wordpress新增站点干部信息管理系统
  • 淘宝联盟怎么做自己的网站南宁网站建设公
  • 丰台怎样做网站重庆百度
  • 巫山集团网站建设怎么在服务器建立网站
  • 天元建设集团有限公司最新消息景德镇seo
  • 个体工商户能网站备案吗帝国cms商城
  • 网站空间800m宜昌网站设计制作公司
  • 网站设计 优帮云铁岭网络推广网站建设
  • php做网站模板学习电子商务网站建设与管理感想