Parse labels in YoloObjectDetectionDatasetArgs.list_image_info#674
Merged
simonschoelly merged 1 commit intomainfrom Mar 30, 2026
Merged
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR changes the YOLO object detection data pipeline so YOLOObjectDetectionDatasetArgs.list_image_info() parses label files and returns parsed bbox/class data (instead of returning label file paths), updating the dataset and tests accordingly.
Changes:
- Update
YOLOObjectDetectionDatasetArgs.list_image_info()to read YOLO label files, filter/mask classes, and emit serialized bbox/class data. - Update
YOLOObjectDetectionDataset.__getitem__()to consume bbox/class data fromimage_info(via JSON) instead of reading label files on-demand. - Rename/adjust the YOLO object detection label helper to return Python lists and update tests to match.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/lightly_train/_data/yolo_object_detection_dataset.py |
Moves label parsing/mapping into list_image_info() and switches __getitem__() to consume parsed labels. |
src/lightly_train/_data/file_helpers.py |
Changes the YOLO object detection label reader to return lists (and renames the function accordingly). |
tests/_data/test_yolo_object_detection_dataset.py |
Updates dataset construction in tests to use list_image_info() output. |
tests/_data/test_file_helpers.py |
Updates tests for the renamed label reader and list-based return types. |
c772dd8 to
8469a23
Compare
Contributor
|
/review |
guarin
reviewed
Mar 30, 2026
guarin
approved these changes
Mar 30, 2026
8469a23 to
1e865ce
Compare
This was referenced Mar 30, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What has changed and why?
This PR makes it so that
YOLOObjectDetectionDatasetArgs.list_image_infoparses the label files and returns the parsed results instead of returning the paths to the label files.How has it been tested?
I relayed on the existing tests which had to be slightly changed.
Did you update CHANGELOG.md?
Did you update the documentation?