Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IO-1341][external] Yolo Exporting #630

Merged
merged 4 commits into from
Jul 11, 2023
Merged

[IO-1341][external] Yolo Exporting #630

merged 4 commits into from
Jul 11, 2023

Conversation

owencjones
Copy link
Contributor

File overwriting bug in YOLO conversions.

Problem

In a scenario where two files are in a directory structure with the same name:

|-image.json
|-image_2.json
|
|--folder_1
|    |-image.png
|--folder_2
|    |-image.png

The use of the AnnotationFile attribute filename is used to define the output filenames (image.txt and image.txt), and this causes a clash, in which one file output overwrites the other.

Solution

Instead of using AnnotationFile.filename, it's better to use the .stem attribute of the path to the json file, as these are in the same directory, and can't share a name.

Changelog

Changed file to use Path.stem instead of AnnotationFile.filename

@linear
Copy link

linear bot commented Jul 11, 2023

IO-1341 BUG: The "darwin convert" command creates converted annotation files named using the "name" field in the input Darwin JSON file

BUG submission from: John Wilkie
Summary (describe an issue):
The "darwin convert" command creates converted annotation files named using the "name" field in the input Darwin JSON file. This causes issues for datasets where there are multiple items with the same name in different folders, because they are given unique suffixes (e.g _2) when pulled. The name of the converted file then does not match the name of the corresponding item.

Is there any issue with instead making the function use the filename of the input file itself?

The impact of this is fairly small, clients can simply opt to remove duplicate names for now pre-conversion
Share Loom/Screenshots with Console/Network opened:
N/A
Darwin affected version
V2
Environment (production/staging; browser and OS ver-sion)
V2
Impact
All (all Darwin users are impacted)
Priority
🟠 High - important issue, but has workaround
Steps to reproduce

Expected Behaviour

Team & Dataset Link

Intercom ticket
https://app.intercom.com/a/inbox/pb9z3asr/inbox/admin/6377589/conversation/222079?view=List

@owencjones owencjones merged commit 2633577 into master Jul 11, 2023
@owencjones owencjones deleted the io-1341 branch July 11, 2023 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants