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

Implemented yolo dataset support #487

Merged
merged 7 commits into from
Feb 7, 2023
Merged

Conversation

cansik
Copy link
Contributor

@cansik cansik commented Jan 15, 2023

I have implemented yolo dataset support to load data in the YOLO format as mentioned in #10. I have used the existing XML-to-COCO dataset and adapted it to support the yolo format.

The loader expects the image files to be either ".png", ".jpg", ".jpeg", ".bmp", ".tiff" and tries to find the best-matching one. Usually the img_path and ann_path are the same and contain .txt files as well as the image files.

Loading YOLO datasets can be slower because we have to open every image to determine the image size. This could be enhanced by using multi-processing, which currently is not implemented.

@RangiLyu
Copy link
Owner

Thanks for your contribution! Would you like to add a brief introduction to the Yolo format dataset in the README?
You can add the introduction at here:

1. **Prepare dataset**

Also, please run pip install pre-commit and then run pre-commit run --all-files to fix the lint.

@cansik
Copy link
Contributor Author

cansik commented Jan 30, 2023

Thank you for the hint about the formatting, I have updated the code using the pre-commit command.
Btw it was necessary to update the isort package to 5.12.0: PyCQA/isort#2077

@cansik
Copy link
Contributor Author

cansik commented Jan 30, 2023

@RangiLyu Readme has been adjusted as well. Would be great if you could have a look again.

@codecov
Copy link

codecov bot commented Feb 1, 2023

Codecov Report

Merging #487 (2357abd) into main (d8ba391) will decrease coverage by 1.05%.
The diff coverage is 20.87%.

@@            Coverage Diff             @@
##             main     #487      +/-   ##
==========================================
- Coverage   74.65%   73.60%   -1.05%     
==========================================
  Files          70       71       +1     
  Lines        4600     4691      +91     
  Branches      716      728      +12     
==========================================
+ Hits         3434     3453      +19     
- Misses        975     1045      +70     
- Partials      191      193       +2     
Flag Coverage Δ
unittests 73.60% <20.87%> (-1.05%) ⬇️

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

Impacted Files Coverage Δ
nanodet/data/dataset/__init__.py 47.82% <20.00%> (-7.73%) ⬇️
nanodet/data/dataset/yolo.py 20.93% <20.93%> (ø)
nanodet/util/logger.py 66.41% <0.00%> (-0.25%) ⬇️
nanodet/trainer/task.py 55.23% <0.00%> (ø)
nanodet/util/config.py 84.00% <0.00%> (+0.66%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@RangiLyu RangiLyu merged commit 0b78eba into RangiLyu:main Feb 7, 2023
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