HumanSignal / HumanSignal/label-studio

Incorrect label order for YOLO format.

Open
#6,416 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

**Describe the bug**
The exported YOLO format class order is incorrect. I did add the cateogray tag in label settings

Example:
Hi,

I am experiencing the same issues. Adding category tag does not work. I remember it does work in some previous version, but I forget which one is it.

Example:
notes.json
```
{
"categories": [
{
"id": "2",
"name": "safe_b"
},
{
"id": "0",
"name": "safe_h"
},
{
"id": "3",
"name": "n_safe_b"
},
{
"id": "1",
"name": "n_safe_h"
}
],
"info": {
"year": 2024,
"version": "1.0",
"contributor": "Label Studio"
}
}
```

classes.txt
```
safe_b
safe_h
n_safe_b
n_safe_h
```

The correct order:
1. safe_h
2. n_safe_h
3. safe_b
4. n_safe_b

I have checked the order for the labels, and it is following the order presented in `classes.txt`, which is not the correct one.

**To Reproduce**
Export using yolo format

**Expected behavior**
Export the dataset in yolo format with the correct order.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment (please complete the following information):**
docker, tag: `heartexlabs/label-studio:latest`

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.