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

贵阳网站开发多少钱搜狗搜索排名优化

贵阳网站开发多少钱,搜狗搜索排名优化,关闭WordPress摘要,h5作品欣赏目录 效果 模型信息 mot_ppyoloe_s_36e_ppvehicle.onnx vehicle_attribute_model.onnx 项目 代码 下载 其他 C# Onnx PP-Vehicle 车辆分析(包含:车辆检测,识别车型和车辆颜色) 效果 模型信息 mot_ppyoloe_s_36e_ppvehi…

目录

效果

模型信息

mot_ppyoloe_s_36e_ppvehicle.onnx 

vehicle_attribute_model.onnx

项目

代码

下载

其他


C# Onnx PP-Vehicle 车辆分析(包含:车辆检测,识别车型和车辆颜色)

效果

模型信息

mot_ppyoloe_s_36e_ppvehicle.onnx 

Inputs
-------------------------
name:image
tensor:Float[-1, 3, 640, 640]
name:scale_factor
tensor:Float[-1, 2]
---------------------------------------------------------------

Outputs
-------------------------
name:multiclass_nms3_0.tmp_0
tensor:Float[-1, 6]
name:multiclass_nms3_0.tmp_2
tensor:Int32[1]
---------------------------------------------------------------

vehicle_attribute_model.onnx

Inputs
-------------------------
name:x
tensor:Float[-1, 3, 192, 256]
---------------------------------------------------------------

Outputs
-------------------------
name:sigmoid_2.tmp_0
tensor:Float[-1, 19]
---------------------------------------------------------------

项目

VS2022

.net framework 4.8

OpenCvSharp 4.8

Microsoft.ML.OnnxRuntime 1.16.2

代码

using OpenCvSharp;
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Drawing;
using System.Text;

namespace Onnx_Demo
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }

        string fileFilter = "*.*|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png";
        string image_path = "";

        DateTime dt1 = DateTime.Now;
        DateTime dt2 = DateTime.Now;

        Mat image;

        PP_YOLOE pp_yoloe;
        VehicleAttr vehicleAttr;

        StringBuilder sb = new StringBuilder();

        private void button1_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = fileFilter;
            if (ofd.ShowDialog() != DialogResult.OK) return;

            pictureBox1.Image = null;
            pictureBox2.Image = null;
            textBox1.Text = "";

            image_path = ofd.FileName;
            pictureBox1.Image = new System.Drawing.Bitmap(image_path);
            image = new Mat(image_path);
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            pp_yoloe = new PP_YOLOE("model/mot_ppyoloe_s_36e_ppvehicle.onnx", 0.6f);

            vehicleAttr = new VehicleAttr("model/vehicle_attribute_model.onnx");

            image_path = "test_img/1.jpg";
            pictureBox1.Image = new Bitmap(image_path);

        }

        private unsafe void button2_Click(object sender, EventArgs e)
        {
            if (image_path == "")
            {
                return;
            }
            textBox1.Text = "检测中,请稍等……";
            pictureBox2.Image = null;
            sb.Clear();
            System.Windows.Forms.Application.DoEvents();

            image = new Mat(image_path);

            dt1 = DateTime.Now;
            List<BoxInfo> ltBoxInfo = pp_yoloe.Detect(image);
            dt2 = DateTime.Now;

            Mat result_image = image.Clone();
            //pp_yoloe.DrawPred(result_image, ltBoxInfo);

            sb.AppendLine("耗时:" + (dt2 - dt1).TotalMilliseconds + "ms");
            sb.AppendLine("------------------------------");

            for (int n = 0; n < ltBoxInfo.Count; n++)
            {

                Rect rect = new Rect();
                rect.X = (int)ltBoxInfo[n].xmin;
                rect.Y = (int)ltBoxInfo[n].ymin;
                rect.Width = (int)(ltBoxInfo[n].xmax - ltBoxInfo[n].xmin);
                rect.Height = (int)(ltBoxInfo[n].ymax - ltBoxInfo[n].ymin);
                Mat crop_img = new Mat(image, rect);

                string color_res_str = "color:";
                string type_res_str = "type:";

                vehicleAttr.Detect(crop_img, out color_res_str, out type_res_str);

                Cv2.Rectangle(result_image, new OpenCvSharp.Point(ltBoxInfo[n].xmin, ltBoxInfo[n].ymin), new OpenCvSharp.Point(ltBoxInfo[n].xmax, ltBoxInfo[n].ymax), new Scalar(0, 0, 255), 2);
                Cv2.PutText(result_image
                    , type_res_str + "," + color_res_str
                    , new OpenCvSharp.Point(ltBoxInfo[n].xmin, ltBoxInfo[n].ymin - 10)
                    , HersheyFonts.HersheySimplex
                    , 1
                    , new Scalar(0, 255, 0)
                    , 2);

                sb.AppendLine("vehicle:" + ltBoxInfo[n].score.ToString("0.00") + " " + type_res_str + "," + color_res_str);
            }


            if (pictureBox2.Image != null)
            {
                pictureBox2.Image.Dispose();
            }

            pictureBox2.Image = new System.Drawing.Bitmap(result_image.ToMemoryStream());
            textBox1.Text = sb.ToString();
        }

        private void pictureBox2_DoubleClick(object sender, EventArgs e)
        {
            Common.ShowNormalImg(pictureBox2.Image);
        }

        private void pictureBox1_DoubleClick(object sender, EventArgs e)
        {
            Common.ShowNormalImg(pictureBox1.Image);
        }
    }
}
 

using OpenCvSharp;
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Drawing;
using System.Text;namespace Onnx_Demo
{public partial class frmMain : Form{public frmMain(){InitializeComponent();}string fileFilter = "*.*|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png";string image_path = "";DateTime dt1 = DateTime.Now;DateTime dt2 = DateTime.Now;Mat image;PP_YOLOE pp_yoloe;VehicleAttr vehicleAttr;StringBuilder sb = new StringBuilder();private void button1_Click(object sender, EventArgs e){OpenFileDialog ofd = new OpenFileDialog();ofd.Filter = fileFilter;if (ofd.ShowDialog() != DialogResult.OK) return;pictureBox1.Image = null;pictureBox2.Image = null;textBox1.Text = "";image_path = ofd.FileName;pictureBox1.Image = new System.Drawing.Bitmap(image_path);image = new Mat(image_path);}private void Form1_Load(object sender, EventArgs e){pp_yoloe = new PP_YOLOE("model/mot_ppyoloe_s_36e_ppvehicle.onnx", 0.6f);vehicleAttr = new VehicleAttr("model/vehicle_attribute_model.onnx");image_path = "test_img/1.jpg";pictureBox1.Image = new Bitmap(image_path);}private unsafe void button2_Click(object sender, EventArgs e){if (image_path == ""){return;}textBox1.Text = "检测中,请稍等……";pictureBox2.Image = null;sb.Clear();System.Windows.Forms.Application.DoEvents();image = new Mat(image_path);dt1 = DateTime.Now;List<BoxInfo> ltBoxInfo = pp_yoloe.Detect(image);dt2 = DateTime.Now;Mat result_image = image.Clone();//pp_yoloe.DrawPred(result_image, ltBoxInfo);sb.AppendLine("耗时:" + (dt2 - dt1).TotalMilliseconds + "ms");sb.AppendLine("------------------------------");for (int n = 0; n < ltBoxInfo.Count; n++){Rect rect = new Rect();rect.X = (int)ltBoxInfo[n].xmin;rect.Y = (int)ltBoxInfo[n].ymin;rect.Width = (int)(ltBoxInfo[n].xmax - ltBoxInfo[n].xmin);rect.Height = (int)(ltBoxInfo[n].ymax - ltBoxInfo[n].ymin);Mat crop_img = new Mat(image, rect);string color_res_str = "color:";string type_res_str = "type:";vehicleAttr.Detect(crop_img, out color_res_str, out type_res_str);Cv2.Rectangle(result_image, new OpenCvSharp.Point(ltBoxInfo[n].xmin, ltBoxInfo[n].ymin), new OpenCvSharp.Point(ltBoxInfo[n].xmax, ltBoxInfo[n].ymax), new Scalar(0, 0, 255), 2);Cv2.PutText(result_image, type_res_str + "," + color_res_str, new OpenCvSharp.Point(ltBoxInfo[n].xmin, ltBoxInfo[n].ymin - 10), HersheyFonts.HersheySimplex, 1, new Scalar(0, 255, 0), 2);sb.AppendLine("vehicle:" + ltBoxInfo[n].score.ToString("0.00") + " " + type_res_str + "," + color_res_str);}if (pictureBox2.Image != null){pictureBox2.Image.Dispose();}pictureBox2.Image = new System.Drawing.Bitmap(result_image.ToMemoryStream());textBox1.Text = sb.ToString();}private void pictureBox2_DoubleClick(object sender, EventArgs e){Common.ShowNormalImg(pictureBox2.Image);}private void pictureBox1_DoubleClick(object sender, EventArgs e){Common.ShowNormalImg(pictureBox1.Image);}}
}

下载

源码下载

其他

C# PaddleOCR 车牌识别参考 https://lw112190.blog.csdn.net/article/details/131010997

http://www.tj-hxxt.cn/news/48967.html

相关文章:

  • 在线A视频网站(级做爰片)百度识图网页入口
  • 手机网站按那个尺寸做中文搜索引擎有哪些
  • WordPress如何设置付费下载苏州seo排名公司
  • 做违法网站 服务器放在狗爹西安做网站的网络公司
  • 搜索引擎网站盈利模式百度快速排名优化工具
  • 鸡西市法院的网站建设公司外贸推广建站
  • wordpress auth_keyseo网站seo
  • dedecms购物网站模板百度导航下载2020新版语音
  • 松江做公司网站最新长尾关键词挖掘
  • 以人为本网站建设空间出租百度信息流广告代理
  • 美国做空机构浑水网站百度seo排名优化
  • 做水果网站特点分析报告成都外贸seo
  • 郑州最好的男科医院是什么医院360手机优化大师下载
  • 做苗木网站哪家好怎么提高百度关键词排名
  • 湖南郴州市房价湖南seo推广软件
  • 做网站很累武汉网站设计
  • lamp网站怎么建设山东省住房和城乡建设厅
  • 做外包的网站有哪些问题最近一周的重大新闻
  • 网站制作方案设计hao123网址大全浏览器设为主页
  • 新闻网站个人可以做吗网站策划书模板
  • 做网站备案谁做自己怎么做一个网页
  • 网站建设需要什么研究条件站外seo是什么
  • wordpress后台紧致谷歌字体谷歌优化推广
  • 银川网站制作公司如何营销
  • 优质作文网站网络服务商在哪咨询
  • 网站只能在vps里打开宁德seo
  • 网站如何做品牌宣传佐力药业股票
  • 东莞商城网站推广建设seo怎么优化武汉厂商
  • 南京做网站具体需要多少钱海南seo快速排名优化多少钱
  • 有关建筑网站建设方案免费外链生成器