feat(data): pluggable label-format adapters (COCO/YOLO/VOC ingestion)#342
Open
stanlrt wants to merge 13 commits into
Open
feat(data): pluggable label-format adapters (COCO/YOLO/VOC ingestion)#342stanlrt wants to merge 13 commits into
stanlrt wants to merge 13 commits into
Conversation
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.
Summary
Adds pluggable label-format adapters so users can point
data.labels.formatat standard annotation files and RAITAP converts them to its native label shape
before alignment. No more hand-reformatting COCO/YOLO/VOC labels. Closes #338.
LabelFormatenum (native/coco/yolo/voc) +LabelsConfig.formatfield.
nativeis the default and a no-op (zero behaviour change).@label_formatdecorator +resolve_label_format_adapter, mirroringtask_families/registry.py.Pascal-VOC (detection). COCO/YOLO category ids pass through unchanged
(preserve the model's label space); VOC class names map via
model.class_namesorder, else the standard 20-class VOC order.DetectionFamily.load_labelsandload_classification_labels; both reuse the existing id-alignment logic viaan extracted
_align_detection_recordshelper.review, plus a final whole-branch review (verdict: ready to merge).
Notes / follow-up
sample_idby exact image-file name (flat image dir);classification still honours
labels.id_strategy. Documented indocs/modules/data/configuration.md. A follow-up to unify detection withid_strategy(+ e2e YOLO/VOC dispatch tests) is recommended.Checklist
data.labels.formatdefaultsto
native, which preserves prior behaviour exactly. Title has no!.before requesting review.
Optional
"Adding a label format" guide.
end-to-end tests through the dispatch seam (
test_label_formats.py).