Skip to content

Allow empty label on Ultralytics YOLO dataset#1264

Merged
vinnamkim merged 1 commit intoopen-edge-platform:developfrom
imyhxy:yolo-empty-label
Feb 7, 2024
Merged

Allow empty label on Ultralytics YOLO dataset#1264
vinnamkim merged 1 commit intoopen-edge-platform:developfrom
imyhxy:yolo-empty-label

Conversation

@imyhxy
Copy link
Copy Markdown
Contributor

@imyhxy imyhxy commented Feb 7, 2024

Summary

In Ultralytics YOLO dataset, there is no label required for the background images. But in datumaro, the _check_ann_file_impl of the _YoloLooseImporter class will filter all empty label .txt and does not search for images without label .txt. This PR will not search for images without label .txt but will add images with empty label .txt to the dataset.

How to test

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have added the description of my changes into CHANGELOG.​
  • I have updated the documentation accordingly

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below).
# Copyright (C) 2023 Intel Corporation
#
# SPDX-License-Identifier: MIT

@imyhxy imyhxy requested review from a team as code owners February 7, 2024 01:57
@imyhxy imyhxy requested review from wonjuleee and removed request for a team February 7, 2024 01:57
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 7, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (784e039) 80.54% compared to head (5b8b469) 80.54%.
Report is 1 commits behind head on develop.

Files Patch % Lines
src/datumaro/plugins/data_formats/yolo/importer.py 50.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1264      +/-   ##
===========================================
- Coverage    80.54%   80.54%   -0.01%     
===========================================
  Files          271      271              
  Lines        30438    30457      +19     
  Branches      5930     5932       +2     
===========================================
+ Hits         24517    24532      +15     
- Misses        4532     4536       +4     
  Partials      1389     1389              
Flag Coverage Δ
ubuntu-20.04_Python-3.8 80.52% <78.94%> (-0.01%) ⬇️
windows-2022_Python-3.8 80.51% <78.94%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

@vinnamkim vinnamkim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for fixing what we missed.

@vinnamkim vinnamkim merged commit f2b930f into open-edge-platform:develop Feb 7, 2024
@imyhxy imyhxy deleted the yolo-empty-label branch March 28, 2024 06:51
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