使用属性为yolov8中的标签添加属性。

huangapple go评论93阅读模式
英文:

Use attributes for labels in yolov8

问题

I am new to this stuff and trying to train a model with yolov8. I have a dataset with 1k images labeled with cvat.ai where I have label named: Bear and that label has attribute male (checkbox false or true). If I export that dataset to yolo1.1 format then there is no attribute only label. If I export dataset to format coco1.0 then I see in json file an attribute. As far as I know I can only use yolo format right in yolov8?

我对这个东西还不太熟悉,尝试使用yolov8来训练一个模型。我有一个包含1千张图像的数据集,使用cvat.ai标记,其中有一个名为Bear的标签,该标签具有属性male(复选框为false或true)。如果我将该数据集导出为yolo1.1格式,那么就没有属性,只有标签。如果我将数据集导出为coco1.0格式,那么在json文件中我会看到一个属性。据我所知,我只能在yolov8中使用yolo格式,对吗?

I cannot find any resource which explains how to train a model with attributes in yolov8. I see only tutorials to train a model with multiple labels which I think in my case will lead to 2 detections at the same time.

我找不到任何关于如何在yolov8中训练带有属性的模型的资源。我只看到有关如何训练带有多个标签的模型的教程,我认为在我的情况下会导致同时进行2次检测。

英文:

I am new to this stuff and trying to train a model with yolov8. I have a dataset with 1k images labeled with cvat.ai where I have label named: Bear and that label has attribute male (checkbox false or true). If I export that dataset to yolo1.1 format then there is no attribute only label. If I export dataset to format coco1.0 then I see in json file a attribute. As far as I know I can only use yolo format right in yolov8?

I cannot find any resource which explains how to train a model with attributes in yolov8. I see only tutorials to train a model with multiple labels which I think in my case will lead to 2 detections at the same time.

答案1

得分: 1

是的,你只能在YOLOv8中使用yolo标签格式。根据任务不同,标签格式有所不同:检测、分割、分类和姿态估计。请查看这里:https://docs.ultralytics.com/datasets/。
这些格式不包括属性,只包括类别和坐标。你可以将类别'Bear'的'男性'属性翻译为两个yolo类别:'Bear-male'和'Bear-female'。
你可以在数据集的导出json文件中找到关于类别、属性和坐标的所有必要信息(例如coco json格式)。需要将这些数据提取出来,然后根据任务的要求构建新的yolo标签。
在这种情况下,如果有足够数量的男性和女性类别的数据,yolo模型将学会区分它们。数据不足可能会导致分类错误和同一对象的多次检测,因此在这种情况下,最好只使用一个类别'Bear',不区分性别。

英文:

Yes, you can only use the yolo label format in YOLOv8. There are differences in label format depending on the task: detection, segmentation, classification, and pose estimation. Check here: https://docs.ultralytics.com/datasets/.
These formats don't include attributes, only classes and coordinates. You can translate your 'male' attribute of the class 'Bear' to two classes for yolo: 'Bear-male' and 'Bear-female'.
You have all the needed information about classes, attributes, and coordinates in the exported json file of your dataset (coco json format, for instance). It will be necessary to take this data and compose new yolo labels with the format you need depending on the task.
In this case, having a sufficient amount of data for both, male and female classes, the yolo model will learn to differentiate them. The lack of data can lead to classification mistakes and multiple detections of the same object, so in this case, it can be better to use only one class 'Bear' without a gender.

huangapple
  • 本文由 发表于 2023年5月13日 21:02:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/76242874.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定