fix: Change YOLO import default image extension choices to .jpg, .jpeg, .png #353
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This simple PR fixes the default image extension choices when using label-studio-converter to import YOLO data.
yolo.py
, the function definition forconvert_yolo_to_ls
usesimage_ext=".jpg,.jpeg,.png"
as the default image extension options. However, this default choice is overridden by the default--image-ext
argument, which is just".jpg"
.--image-ext
argument to match the function default, because it seems like that's what was intended by the original authors of the code.--image-ext
argument from".jpg"
to".jpg,.jpeg.png"
Ultimately, this change makes it easier for a new user to use
label-studio-converter
without having to know about the--image-ext
argument, which isn't documented anywhere. The Tutorial: Importing Local YOLO Pre-Annotated Images to Label Studio doesn't discuss the--image_ext
argument at all, so new users could potentially be tripped up when they try to import images that aren't.jpg
.