admin管理员组文章数量:1596270
参考:https://github/hpc203/yolov5-lite-onnxruntime
https://github/hpc203/yolov5-dnn-cpp-python
1、onnxruntime 加载推理yolo v5 onnx
import cv2
import numpy as np
import argparse
import onnxruntime as ort
import math
class yolov5_lite():
def __init__(self, model_pb_path, label_path, confThreshold=0.5, nmsThreshold=0.5, objThreshold=0.5):
so = ort.SessionOptions()
so.log_severity_level = 3
self = ort.InferenceSession(model_pb_path, so)
self.classes = list(map(lambda x: x.strip(), open(label_path, 'r').readlines()))
self.num_classes = len(self.classes)
anchors = [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119
本文标签: 实时摄像头加载Yoloonnxruntime
版权声明:本文标题:yolo v5 onnxruntime与opencv cv2加载部署推理、实时摄像头检测 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dongtai/1728257305a1151170.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论