找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 56|回复: 0

[经验求助] yolo如何导出.weights和.cfg

[复制链接]

2万

主题

128

回帖

10万

积分

管理员

积分
105812
发表于 2024-2-8 07:24:17 | 显示全部楼层 |阅读模式 IP:山东省临沂市 移动

登录后更精彩...O(∩_∩)O...

您需要 登录 才可以下载或查看,没有账号?立即注册

×
yolo如何导出.weights和.cfg





各位老师好,最近新接触一个opencv库中的函数cv::dnn::readnet()函数;        参数1是yolo训练好的模型.weights后缀文件,
        参数2是超参数.cfg后缀的文件。
如何才能得到这2个后缀的文件呢(*.weigthts和*.cfg),或者其他的也行,因为yolov8训练好的都是*.pt和*.yaml配套。网上还可以发现能导出*.onnx,但是第二个参数怎么整呀?
如何导出一套来呢?只要能用上readnet函数就可以。



官网解释:
Net cv::dnn::readNet
(const String &model,

const String &config = "",

const String &framework = ""
)


Python:
cv.dnn.readNet(model[, config[, framework]]) ->retval
cv.dnn.readNet(framework, bufferModel[, bufferConfig]) ->retval
Parameters
[in]modelBinary file contains trained weights. The following file extensions are expected for models from different frameworks:
[in]configText file contains network configuration. It could be a file with the following extensions:
[in]frameworkExplicit framework name tag to determine a format.

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|IOTsec-Zone|在线工具|CTF WiKi|CTF平台汇总|CTF show|ctfhub|棱角安全|rutracker|攻防世界|php手册|peiqi文库|CyberChef|猫捉鱼铃|手机版|小黑屋|cn-sec|分享屋 ( 鲁ICP备2021028754号 )

GMT+8, 2024-5-7 05:32

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表