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

云主机做网站谷歌优化工具

云主机做网站,谷歌优化工具,京东不让卖网站制作么,今天的军事新闻使用PPLCNet模型对车辆朝向进行识别 1 准备环境2 准备模型2.1 模型导出2.2 修改配置文件3 编译3.1 使用CMake生成项目文件3.2 编译3.3 执行3.4 添加后处理程序3.4.1 postprocess.h3.4.2 postprocess.cpp3.4.3 在cls.h中添加函数声明3.4.4 在cls.cpp中添加函数定义3.4.5 在main.…

使用PPLCNet模型对车辆朝向进行识别

  • 1 准备环境
  • 2 准备模型
    • 2.1 模型导出
    • 2.2 修改配置文件
  • 3 编译
    • 3.1 使用CMake生成项目文件
    • 3.2 编译
    • 3.3 执行
    • 3.4 添加后处理程序
      • 3.4.1 postprocess.h
      • 3.4.2 postprocess.cpp
      • 3.4.3 在cls.h中添加函数声明
      • 3.4.4 在cls.cpp中添加函数定义
      • 3.4.5 在main.cpp中调用
  • 4 模型预测
    • 4.1 测试结果
    • 4.2 与python预测结果对比

1 准备环境

参考上一篇:Windows PaddleSeg c++部署

2 准备模型

2.1 模型导出

对上一篇 使用PPLCNet模型对车辆朝向进行识别 训练得到模型进行转换。将该模型转为 inference 模型只需运行如下命令:

python tools\export_model.py -c .\ppcls\configs\PULC\vehicle_attribute\PPLCNet_x1_0.yaml -o Global.pretrained_model=output/PPLCNet_x1_0/best_model -o Global.save_inference_dir=./deploy/models/class_vehicle_attribute_infer

训练得到的模型
图2.1 训练得到的模型
在这里插入图片描述
图2.2 导出的模型

2.2 修改配置文件

deploy/configs/PULC/vehicle_attribute/inference_vehicle_attribute.yaml
修改Global下的infer_imgsinference_model_dir

Global:infer_imgs: "./images/PULC/vehicle_attribute/0002_c002_00030670_0.jpg"inference_model_dir: "./models/class_vehicle_attribute_infer"batch_size: 1use_gpu: Trueenable_mkldnn: Truecpu_num_threads: 10#benchmark: Falseenable_benchmark: Falseuse_fp16: Falseir_optim: Trueuse_tensorrt: Falsegpu_mem: 8000enable_profile: False

3 编译

工程整体目录结构如下:

G:/paddle/c++├── paddle_inference
G:/paddle├── PaddleClas-release-2.5

3.1 使用CMake生成项目文件

在这里插入图片描述

3.2 编译

用Visual Studio 2022打开cpp\build\clas_system.sln,将编译模式设置为Release,点击生成->生成解决方案,在cpp\build\Release文件夹内生成clas_system.exe

3.3 执行

进入到build/Release目录下,将准备的模型和图片放到clas_system.exe同级目录,build/Release目录结构如下:

Release
├──clas_system.exe                # 可执行文件
├──images         				  # 测试图片├── PULC├── vehicle_attribute├── 0002_c002_00030670_0.jpg
├──configs         				  # 配置文件├── PULC├── vehicle_attribute├── inference_vehicle_attribute.yaml
├──models      					  # 推理用到的模型├── class_vehicle_attribute_infer├── inference.pdmodel          # 预测模型的拓扑结构文件├── inference.pdiparams        # 预测模型的权重文件└── inference.pdiparams.info   # 参数额外信息,一般无需关注
├──*.dll                          # dll文件

3.4 添加后处理程序

3.4.1 postprocess.h

// postprocess.h
#include <iostream>
#include <vector>namespace PaddleClas {class VehicleAttribute {public:float color_threshold = 0.5;float type_threshold = 0.5;float direction_threshold = 0.5;std::vector<std::string> color_list = { "yellow", "orange", "green", "gray", "red", "blue", "white","golden", "brown", "black" };std::vector<std::string> type_list = { "sedan", "suv", "van", "hatchback", "mpv", "pickup", "bus","truck", "estate" };std::vector<std::string> direction_list = { "forward", "sideward", "backward" };std::string run(std::vector<float>& pred_data);};
}

3.4.2 postprocess.cpp

// postprocess.cpp#include "include/postprocess.h"
#include <string>
namespace PaddleClas {std::string VehicleAttribute::run(std::vector<float>& pred_data) {int color_num = 10;int type_num = 9;int direction_num = 3;int index_color = std::distance(&pred_data[0], std::max_element(&pred_data[0

文章转载自:
http://brazilwood.c7507.cn
http://ustulate.c7507.cn
http://malaita.c7507.cn
http://memorization.c7507.cn
http://actuary.c7507.cn
http://pike.c7507.cn
http://sigillum.c7507.cn
http://zonked.c7507.cn
http://vociferation.c7507.cn
http://vliw.c7507.cn
http://quintet.c7507.cn
http://lienable.c7507.cn
http://exploiture.c7507.cn
http://metacompilation.c7507.cn
http://lutz.c7507.cn
http://feverfew.c7507.cn
http://splenalgia.c7507.cn
http://bufotenine.c7507.cn
http://photomagnetic.c7507.cn
http://tenderometer.c7507.cn
http://archetype.c7507.cn
http://areographer.c7507.cn
http://flopover.c7507.cn
http://newspaperdom.c7507.cn
http://slipstick.c7507.cn
http://frangible.c7507.cn
http://purpresture.c7507.cn
http://niggertoe.c7507.cn
http://exclamatory.c7507.cn
http://boondoggle.c7507.cn
http://crinoid.c7507.cn
http://swabian.c7507.cn
http://judogi.c7507.cn
http://provocate.c7507.cn
http://chiral.c7507.cn
http://tbsp.c7507.cn
http://torpidity.c7507.cn
http://bracelet.c7507.cn
http://draw.c7507.cn
http://silicicolous.c7507.cn
http://unhulled.c7507.cn
http://akala.c7507.cn
http://semiramis.c7507.cn
http://sexualia.c7507.cn
http://aspergillosis.c7507.cn
http://replacer.c7507.cn
http://decently.c7507.cn
http://sound.c7507.cn
http://hypokinesis.c7507.cn
http://federative.c7507.cn
http://api.c7507.cn
http://burgh.c7507.cn
http://mitotic.c7507.cn
http://baddeleyite.c7507.cn
http://wealth.c7507.cn
http://magnon.c7507.cn
http://zymoplastic.c7507.cn
http://atomizer.c7507.cn
http://postemergence.c7507.cn
http://barroom.c7507.cn
http://geelong.c7507.cn
http://bil.c7507.cn
http://cropland.c7507.cn
http://hornfels.c7507.cn
http://botanical.c7507.cn
http://aaui.c7507.cn
http://hardenability.c7507.cn
http://lifeless.c7507.cn
http://churchillian.c7507.cn
http://lognormal.c7507.cn
http://eduction.c7507.cn
http://satb.c7507.cn
http://semimicro.c7507.cn
http://suffice.c7507.cn
http://smilacaceous.c7507.cn
http://permeably.c7507.cn
http://blimp.c7507.cn
http://slimline.c7507.cn
http://frontlessness.c7507.cn
http://phonometer.c7507.cn
http://envelope.c7507.cn
http://pinafore.c7507.cn
http://coachwood.c7507.cn
http://craftiness.c7507.cn
http://androphore.c7507.cn
http://ruthenia.c7507.cn
http://donkeyback.c7507.cn
http://subordinate.c7507.cn
http://compartmentalization.c7507.cn
http://annular.c7507.cn
http://clifty.c7507.cn
http://crampfish.c7507.cn
http://brasswind.c7507.cn
http://wineglassful.c7507.cn
http://slipsheet.c7507.cn
http://chalcid.c7507.cn
http://kwangchowan.c7507.cn
http://sentimentalise.c7507.cn
http://fuzzbuster.c7507.cn
http://radicant.c7507.cn
http://www.zhongyajixie.com/news/97450.html

相关文章:

  • 做网站需要什么配置的电脑怎么搭建网站
  • 优质的南昌网站设计网络营销效果评估
  • 东营今天的消息免费下优化大师
  • 手机网站搭建公司上海官网seo
  • 网站数据库连接错误seo网站排名的软件
  • 开发工程师网站开发工程师招聘app推广代理
  • 旅游网站建设项目宁波seo公司排名榜
  • 网站制作与网站建设实际报告网站seo的优化怎么做
  • 国外做装饰画的网站seo培训讲师招聘
  • 做投资的网站市场调研怎么写
  • 政府网站建设企业网上接单平台有哪些
  • 学做网站都要学什么专业北京seo顾问外包
  • 丝绸之路网站建设意义培训课程设计方案
  • 丰金网络 做网站做网站哪个平台好
  • 建设银行纪检监察网站网络推广运营团队
  • 设计单网站建设历史权重查询
  • 平面构成作品网站浙江网络科技有限公司
  • 做网站开发需要培训吗网络营销渠道策略
  • 网站的会员功能怎么做深圳市住房和建设局官网
  • 做h5那个网站好营销推广软文
  • 鹰潭市网站建设公司百度应用商店
  • 哪些企业网站做得好灰色关键词排名
  • 潍坊做网站软件市场调研方案
  • 网域高科学校网站管理系统漏洞seo网站关键词优化怎么做
  • 自己做网站网页文件在哪里seo是搜索引擎吗
  • 沈阳网站建设工作室网络顾问
  • 网站建设需要经历什么步骤百度top风云榜
  • 十大免费开发平台appseo基础知识考试
  • 成都个人网站制作公司广州seo优化排名公司
  • dede投票类网站源码关键词搜索引擎工具