Python配合yolov11开发对象检测软件

  1. 上编文件写了yolov11开发分类,写篇文章写开发对象检测软件
  2. 环境配置onnx 1.16.1,onnx-graphsurgeon 0.5.2,onnxruntime 1.19.2,onnxruntime-gpu 1.19.2,onnxslim 0.1.34,torch 2.3.1+cu121,torchaudio 2.3.1+cu121,torchvision 0.18.1+cu121,PySide6 6.6.1,PySide6-Addons 6.6.1,PySide6-Essentials 6.6.1
  3. 分类使用的数据集,halcon的pill_bag对象检测的数据集
    4.软件界面



5.关键代码

bash 复制代码
 image_mat_ = self.CoverQImageToMat()
            results_=self.Model.predict(image_mat_)
            for result_ in  results_:
                boxes_ = result_.boxes
                # names_=results_.names
                for box_ in boxes_:
                    x_,y_,w_,h_=box_.xywh[0]
                    c=box_.cls
                    cls_=self.Model.names[int(c)]
                    self.BoxX.append(float(x_))
                    self.BoxY.append(float(y_))
                    self.BoxWidth.append(float(w_))
                    self.BoxHeight.append(float(h_))
                    self.BoxClass.append(cls_)
bash 复制代码
  ###运行推理
            # outputs=self.OnnxModel.run(["output0"],{"images":image_np_})
            outputs = self.OnnxModel.run([output_onnx_.name], {input_onnx_.name: image_np_})
            len(outputs)
            # print("OutputShape:", outputs.shape)
            ###outputs处理
            output_onnx_ = outputs[0][0]
            print("OutputOnxxShape:", output_onnx_.shape)

            ###转换 行列
            output_onnx_ = output_onnx_.transpose()
            print("OutputOnxxShape:", output_onnx_.shape)
            row = output_onnx_[0]
            print(row)  ###输出下第一个特征

6.推理效果

相关推荐
步、步、为营3 分钟前
.NET 事件模式举例介绍
java·开发语言·.net
~plus~6 分钟前
WPF八大法则:告别模态窗口卡顿
开发语言·经验分享·后端·程序人生·c#
march of Time16 分钟前
go工具库:hertz api框架 hertz client的使用
开发语言·golang·iphone
程序员三藏33 分钟前
如何使用Jmeter进行压力测试?
自动化测试·软件测试·python·测试工具·jmeter·测试用例·压力测试
carpell36 分钟前
【语义分割专栏】3:Segnet原理篇
人工智能·python·深度学习·计算机视觉·语义分割
24K纯学渣38 分钟前
Python编码格式化之PEP8编码规范
开发语言·ide·python·pycharm
怒视天下39 分钟前
零基础玩转Python生物信息学:数据分析与算法实现
开发语言·python
zhanshuo1 小时前
Python元组黑科技:3招让数据安全暴增200%,学生管理系统实战揭秘!
python
空中湖1 小时前
免费批量图片格式转换工具
图像处理·python·程序人生
GISer_Jing1 小时前
Three.js中AR实现详解并详细介绍基于图像标记模式AR生成的详细步骤
开发语言·javascript·ar