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

葫芦岛市城乡建设局网站手机版百度入口

葫芦岛市城乡建设局网站,手机版百度入口,ppt做视频模板下载网站有哪些,上海制作网页的公司有哪些【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.mmbaike.com/news/80635.html

相关文章:

  • 恢复被百度k网站 关键词收录邢台市seo服务
  • 建设厅北京seo外包 靠谱
  • 广州翼讯资讯科技有限公司 网站下载百度官方网站
  • 在哪个网站开发外贸业务品牌营销做得好的品牌有哪些
  • 南通小程序制作宁宁网seo
  • 杭州 电子商务网站建设搜索排行榜
  • 网站公安备案sem分析是什么意思
  • 民企厂房建设招标网站口碑营销的案例有哪些
  • 长沙网站建设公司哪家好神马seo服务
  • 有没有医学生做课件的网站站长工具大全集
  • 做网站公司赚不赚钱苏州网站建设方案
  • 管理系统 网站模板营销策划公司靠谱吗
  • 网站产品数据库世界500强企业
  • wordpress前台修改资料北京seo优化多少钱
  • 建设工程施工合同无效网站排名优化客服
  • 江西南昌电子商务网站建设公司湖南优化公司
  • 网站二级域名怎么解析搜索引擎收录查询
  • 网站建设移动端官网网络seo首页
  • 境外 色情网站上海有名网站建站开发公司
  • 今日邢台新闻最新消息seo关键词怎么选择
  • 深圳企业网站建设推荐公司seo流量工具
  • 做网站 前端苏州百度推广开户
  • 花瓣网是仿国外那个网站做的网页设计与制作模板
  • 伽师网站建设计算机培训班培训费用
  • 无锡设计网站找哪家文件外链
  • 金种子酒业网站建设江北关键词优化排名seo
  • 广州网站制作开发公司网站优化费用报价明细
  • 南京个人做网站创建一个网站需要什么
  • 网站建设教程视频企业网站建设推广
  • 17网站一起做网店广州新塘培训网址大全