目前我只有yolov5模型,以及配置好opencv环境变量的vs,没有一个很好的思路
1条回答 默认 最新
关注 - 这篇博客: 2021.09.02更新说明 c++下使用opencv部署yolov5模型 (三)中的 一、设置yolov5网络的一些参数。 部分也许能够解决你的问题, 你可以仔细阅读以下内容或跳转源博客中阅读:
对Yolo类加一点细节,设置一些必要的网络参数
//参数为私有参数,当然也可以是设置成公开或者保护。 private: //计算归一化函数 float Sigmoid(float x) { return static_cast<float>(1.f / (1.f + exp(-x))); } //anchors const float netAnchors[3][6] = { { 10.0, 13.0, 16.0, 30.0, 33.0, 23.0 },{ 30.0, 61.0, 62.0, 45.0, 59.0, 119.0 },{ 116.0, 90.0, 156.0, 198.0, 373.0, 326.0 } }; //stride const float netStride[3] = { 8.0, 16.0, 32.0 }; const int netWidth = 640; //网络模型输入大小 const int netHeight = 640; float nmsThreshold = 0.45; float boxThreshold = 0.35; float classThreshold = 0.35; //类名 std::vector<std::string> className = { "person", "bicycle", "car", "motorcycle", "airplane", "bus", "train", "truck", "boat", "traffic light", "fire hydrant", "stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse", "sheep", "cow", "elephant", "bear", "zebra", "giraffe", "backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee", "skis", "snowboard", "sports ball", "kite", "baseball bat", "baseball glove", "skateboard", "surfboard", "tennis racket", "bottle", "wine glass", "cup", "fork", "knife", "spoon", "bowl", "banana", "apple", "sandwich", "orange", "broccoli", "carrot", "hot dog", "pizza", "donut", "cake", "chair", "couch", "potted plant", "bed", "dining table", "toilet", "tv", "laptop", "mouse", "remote", "keyboard", "cell phone", "microwave", "oven", "toaster", "sink", "refrigerator", "book", "clock", "vase", "scissors", "teddy bear", "hair drier", "toothbrush" };
解决评论 打赏 举报无用 1- 这篇博客: 2021.09.02更新说明 c++下使用opencv部署yolov5模型 (三)中的 一、设置yolov5网络的一些参数。 部分也许能够解决你的问题, 你可以仔细阅读以下内容或跳转源博客中阅读:
悬赏问题
- ¥15 单纯型python实现编译报错
- ¥15 c++2013读写oracle
- ¥15 c++ gmssl sm2验签demo
- ¥15 关于模的完全剩余系(关键词-数学方法)
- ¥15 有没有人懂这个博图程序怎么写,还要跟SFB连接,真的不会,求帮助
- ¥15 PVE8.2.7无法成功使用a5000的vGPU,什么原因
- ¥15 is not in the mmseg::model registry。报错,模型注册表找不到自定义模块。
- ¥15 安装quartus II18.1时弹出此error,怎么解决?
- ¥15 keil官网下载psn序列号在哪
- ¥15 想用adb命令做一个通话软件,播放录音