HumanSignal / HumanSignal/label-studio

Import distinguishes files with same name but different path. Export YOLO format does not.

Open
#6,438 2 comments 1 reaction 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**
Import respects uniqueness of following file structure, but export YOLO format does not.

Local files imported as source storage with following file structure:

.

└── _dirs
├── _dir_1
│ ├── image_1.png
│ ├── image_2.png
│ └── image_3.png
└── _dir_2
├── image_1.png
└── image_2.png

**To Reproduce**
Steps to reproduce the behavior:
1. Import is successful and 5 unique images are flagged for annotation.
2. Annotations are completed.
3. Export as YOLO format
4. Only three images and respective annotations are exported. For example: image_1 and image_2 from dir_2. image_3 from dir_1.

**Expected behavior**
I would expect that since import distinguishes these as unique files (since they have unique paths) then export should do the same. Of course, there is ambiguity around how to preserve uniqueness in export, I would suggest either of the following:
\
Schema 1

.

└── _images
└── _dirs
├── _dir_1
│ ├── image_1.png
│ ├── image_2.png
│ └── image_3.png
└── _dir_2
├── image_1.png
└── image_2.png

\
OR
\
Schema 2
.

└── _images
├── image_1.png
├── image_2.png
├── image_3.png
├── image_1(1).png
└── image_2(1).png

**Environment:**
- OS: MacOS Sonoma V14.6
- Label Studio Version V1.13.1

**Attempted Workaround**
Attempted to filter for just annotations/images from dir_1, export that and then do similar for dir_2? Tried doing that using UI Data Manager, but didn't work. Will also investigate using API.

Any suggestions for a workaround would be appreciated!

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.