我是靠谱客的博主 勤劳铃铛,这篇文章主要介绍YOLOV5出现.acceptable suffix is [‘.pt‘]的错误||不使用权重报错,现在分享给大家,希望可以做个参考。

YOLOV5 5.0版本及以前 如果训练自己的数据集不使用预训练权重 会报错.acceptable suffix is ['.pt'] 解决办法 找到general.py里的check_suffix函数,用下面的代码替换:

def check_suffix(file='yolov5s.pt', suffix=('.pt',), msg=''):
# Check file(s) for acceptable suffix
if file and suffix:
if isinstance(suffix, str):
suffix = [suffix]
for f in file if isinstance(file, (list, tuple)) else [file]:
s = Path(f).suffix.lower()
# file suffix
if len(s):
assert s in suffix, f"{msg}{f} acceptable suffix is {suffix}"

最后

以上就是勤劳铃铛最近收集整理的关于YOLOV5出现.acceptable suffix is [‘.pt‘]的错误||不使用权重报错的全部内容,更多相关YOLOV5出现.acceptable内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(60)

评论列表共有 0 条评论

立即
投稿
返回
顶部