标记数据以便在自定义数据集上训练yolov5模型

发布于 2025-01-28 02:04:32 字数 650 浏览 3 评论 0原文

I used the source code (

问题是,在标记图像后,我尝试在Roboflow中训练模型,但我无法使用图像的注释。

我的注释在txt文件中,以以下格式:

2 0.3107142857142857 0.5509554140127388 0.30714285714285716 0.89171974522293
1 0.9696428571428571 0.39331210191082805 0.060714285714285714 0.7292993630573248
1 0.7241071428571428 0.5047770700636943 0.23035714285714284 0.9713375796178344
1 0.07946428571428571 0.4968152866242038 0.15892857142857142 0.9745222929936306
1 0.4982142857142857 0.5031847133757962 0.17857142857142858 0.9617834394904459

当我尝试在Roboflow上传时,显示了消息: 请添加您的LabelMap文本文件(如果有一个),以将数字类标识符转换为可读的名称。

有人知道什么是最好的转换方法或如何使LabelMap进行标签?

I used the source code (ModifiedOpenLabelling) to label my images for Train YOLOv5 Object Detection.

The problem is that after labeling my images, I tried to train a model in roboflow, but I could not use the annotations of the images.

My annotations are in a txt file, in the following format:

2 0.3107142857142857 0.5509554140127388 0.30714285714285716 0.89171974522293
1 0.9696428571428571 0.39331210191082805 0.060714285714285714 0.7292993630573248
1 0.7241071428571428 0.5047770700636943 0.23035714285714284 0.9713375796178344
1 0.07946428571428571 0.4968152866242038 0.15892857142857142 0.9745222929936306
1 0.4982142857142857 0.5031847133757962 0.17857142857142858 0.9617834394904459

When I tried to upload in roboflow, the message was shown:
Please add your labelmap text file (if you have one) to translate the numeric class identifiers into human-readable names.

Does anyone know what is the best way to do this conversion or how I can make the labelmap?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忘年祭陌 2025-02-04 02:04:32

本文解释了LabelMaps: https://blog.roboflow.com/label-map/

我建议创建一个“ data.yaml”文件。确保将“火车”和“验证”设置文件夹的文件夹路径的引用更新;确保“ NC”(类数)字段与数据集中的类匹配;并更新列表中的标签名称。

​“ rel =“ nofollow noreferrer”>修改类生成带有您想要的类名称的数据集的版本,然后从那里继续您的项目,或将修改后的类数据集版本导出到新项目,并继续使用那里的永久性“新”标签。

此外,我强烈建议继续在Roboflow上标记新项目,因为我们有能力以26种不同格式的注释摄入和转换数据集: https://roboflow.com/formats

this article explains labelmaps: https://blog.roboflow.com/label-map/

I would suggest creating a "data.yaml" file. Be sure to update the references to the folder paths for your "train" and "validation" set folders; ensure the "nc" (number of classes) field matches the number of classes in your dataset; and update the label names in the list.
Example data.yaml file from Roboflow - exported in YOLOv5 Pytorch format

Another option is to upload the images to Roboflow, use Modify Classes to generate a version of the dataset with the class names you desire, and continue your project from there, or export the Modified Classes dataset version to a new project and continue with the permanent "new" label names from there.

Additionally, I highly recommend continuing to label new projects on Roboflow, as we have the ability to ingest and convert datasets with annotations in 26 different formats: https://roboflow.com/formats

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文