当前位置:网站首页>YOLOv5 training data prompts No labels found, with_suffix is used, WARNING: Ignoring corrupted image and/or label appears during yolov5 training
YOLOv5 training data prompts No labels found, with_suffix is used, WARNING: Ignoring corrupted image and/or label appears during yolov5 training
2022-08-03 12:14:00 【Is seven uncle ah】
YOLOv5 training data prompts No labels found [Pro-test yolo to load the label file only needs to modify the img2label_paths
function changes to load the label file]
Looking carefully at the file datasets.py for data loading and processing, I found that there is a sentence that will find the corresponding labels folder according to the location of the images folder in step 2:
The place where YOLOv5 loads the label is in this place in datasets.py
, we just modify the path to load the label to place the label for our own.
In this img2label_paths
function, our modifications are as follows: [Because we put the label and img in the same folder, we can just modify the suffix name directly]
with_suffix(suffix) replace the extension, return the new path, the extension will remain unchanged
You can also use with_suffix(suffix)
to modify the suffix, but this method needs to import the Path('/hidog/text.tar.gz')
class,
This is used in YOLOv5, used when checking the cache file
- [The cache will continue until the check data file is executed, which contains nc, nf, etc., which can display whether the data is found, lost, damaged, etc. on the console. For example, when the input image is a raw image that cannot be processed by yolo, it will be nc+=1 accumulated, and finally printed in the console]
Use of .replace()
function in YOLOv5
yolov5 is used like this
WARNING: Ignoring corrupted image and/or label during yolov5 training
When using the yolov5 training data set, the following alarm appears
WARNING: Ignoring corrupted image and/or label
We found the place where the warning was found in the debug order
The reason is that the image I input is in the .raw
format that YOLOv5 cannot process. Here we choose to convert .raw
to .png
or .tif
image and then upload it.
Reference: Python standard library pathlib
Reference: WARNING: Ignoring corrupted image and/or label appears during yolov5 training
YOLOv5 training data prompt No labels found
边栏推荐
猜你喜欢
随机推荐
Simple implementation of a high-performance clone of Redis using .NET (1)
技术总监需要会些什么?也太难了!
广州番禺:暑期防溺水,安全不放假
mysql进阶(二十四)防御SQL注入的方法总结
ROS中编译通过但是遇到可执行文件找不到的问题
R语言使用ggpubr包的ggtexttable函数可视化表格数据(直接绘制表格图或者在图像中添加表格数据)、使用tab_add_vline函数自定义表格中竖线(垂直线)的线条类型以及线条粗细
Take you understand the principle of CDN technology
【必读要点】Pod控制器Deployment更新、回退详解
详解虚拟机!京东大佬出品HotSpot VM源码剖析笔记(附完整源码)
"Digital Economy Panorama White Paper" Financial Digital User Chapter released!
ThreadLocal源码解析及使用场景
LeetCode-1161. 最大层内元素和
想学自动化测试网课哪个好?过了人告诉你:适合自己的才是最重要
浅谈程序员的职业操守
如何免费获得一个市全年的气象数据?降雨量气温湿度太阳辐射等等数据
[论文阅读] (23)恶意代码作者溯源(去匿名化)经典论文阅读:二进制和源代码对比
-找树根-
基于Sikuli GUI图像识别框架的PC客户端自动化测试实践
LeetCode-142. 环形链表 II
第3章 搭建短视频App基础架构