Repository navigation
Fix #529: support YOLO datasets in the image detection evaluator - #644
Open
gtfrans2re wants to merge 1 commit into
Open
gtfrans2re wants to merge 1 commit into
gtfrans2re wants to merge 1 commit into
Conversation
Signed-off-by: gtfrans2re <francoisgonothitoure@gmail.com>
Author
|
Hi, @dpascualhe! Any plans to check this PR and merging if it's fine with you? |
This branch has not been deployed
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.
Closes #529
What changed
load_image_detection_dataset()andget_image_detection_dataset_key()ingui/tasks/image_detection/dataset_viewer.py, following the existingload_image_segmentation_dataset()pattern.load YOLO datasets on its own instead of only when the Viewer had cached them first.
and YOLO on the same folder/split no longer returns a stale dataset.
getvalue()instead ofread(), which returns emptybytes on a second read of the uploaded file.
Why
As @dpascualhe noted in the issue, YOLO is supported, but the Evaluator's fallback
loader only handled COCO. Whenever the Viewer hadn't cached the dataset (e.g., the
YAML wasn't uploaded yet), users saw "Only COCO datasets are currently supported
for evaluation."
Design decisions
model.eval()already callsmake_fname_global()on its own copy of the dataset, and the Viewer relies onrelative paths, so the Evaluator no longer globalizes the shared cached dataset.
tests/gui/test_image_detection.pythat Black wouldreformat were left untouched to keep the diff scoped to this issue.
How it was tested
master, passes with this PR).loading, and type-aware cache keys.
4 samples).
Screenshots
YOLO dataset loaded in the Evaluator:
Same dataset in the Dataset Viewer: