Repository navigation
Fix missing dataset splits and EXIF dimensions - #147
Conversation
Signed-off-by: wxs-lang <393456156@qq.com>
|
All Contributors have signed the CLA. ✅ |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
👋 Hello @wxs-lang, thank you for submitting a
For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀 |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
Reviewed the four added test files. The coverage otherwise matches the existing converter behavior, but this test uses Python 3.9-only syntax despite the repository advertising Python 3.8 support.
💬 Posted 1 inline comment
- 📝 LOW
tests/test_general_json2yolo.py:325On Python 3.8, this dictionary union raisesTypeErrorwhen the test runs becausedict | dictwas added in Python 3.9. The README advertises Python 3.8+, so the new test suite fails on a supported version. Replace the union with a Python 3.8-compatible way to setimages.
|
I have read the CLA Document and I sign the CLA |
Signed-off-by: wxs-lang <393456156@qq.com>
|
Thanks for confirming the CLA, @wxs-lang, and for contributing coverage for the converter edge cases and utility helpers. |
|
Thank you for the contribution. After reviewing the full diff, we are keeping this suite focused: the 961-line expansion tests many implementation details and duplicates existing test setup, and it asserts that a 50/50 split drops an input as well as preserving incorrect dimensions for EXIF orientations 5 and 7. Those assertions would lock in existing bugs rather than protect the desired behavior. We are closing this broad test-only change; a small regression test accompanying a proven fix would be more appropriate. |
|
Thank you, @wxs-lang. I reopened this and used your coverage to identify and fix dataset splitting and EXIF dimension bugs, keeping focused regression tests and the Labelbox conversion test. The full suite passes locally; CI is running on the updated branch. |
|
The final scope also fixes the ATH converter’s path-based split writer, found during review. I narrowed the retained tests to the split, ATH, and EXIF regressions so the PR stays focused; the existing Labelbox loader coverage remains. |
glenn-jocher
left a comment
There was a problem hiding this comment.
Reviewed the full updated diff. The fixes preserve all split indices, handle the ATH path input, and correct transposed EXIF dimensions. The full suite passes on Python 3.8 and 3.11; awaiting CI.
|
Merged—thank you, @wxs-lang, for the contribution and for surfacing the split and EXIF cases. The final change passed independent review, Python 3.8 and 3.11 validation, and CI. |
|
🎉 This PR has been merged! Thank you @wxs-lang, with contributions from @glenn-jocher and @pderrenger.
Together, these changes help preserve images across dataset splits and correctly report dimensions for transposed images. |
Dataset splitting can silently omit images when rounded partitions leave a remainder or when a split contains only index zero. The ATH converter also passes a path object to the split writer, which fails when writing a populated split. Images with EXIF orientations 5 and 7 report dimensions in the wrong order.
Use cumulative split boundaries, write nonempty splits, handle path inputs, and account for transposed orientations. Keep focused regression coverage in the existing converter tests.
Validation: the full test suite passed on Python 3.8 and 3.11. Reproduced the split and EXIF failures on the original code and the ATH failure before its path fix.
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Updated dataset splitting and EXIF dimension handling to preserve images across splits and correctly size transposed images.
📊 Key Changes
split_rows_simplenow accepts path inputs.exif_sizeswaps width and height for EXIF orientations 5–8; regression tests cover splitting, ATH conversion, and these orientations.🎯 Purpose & Impact