-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Enhance] In browse dataset : CombinedDataset element are now browse in turn, and image saved into their dataset name folder #2985
[Enhance] In browse dataset : CombinedDataset element are now browse in turn, and image saved into their dataset name folder #2985
Conversation
…taset
tools/misc/browse_dataset.py
Outdated
progress_bar = mmengine.ProgressBar(len(dataset)) | ||
if isinstance(dataset, CombinedDataset): | ||
# Get indexes to traverse each dataset element in turn. | ||
max_length = min(min(dataset._lens), args.max_item_per_dataset) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- It is not recommended to use private attributes outside the class. Instead, it is recommended to add a new property for the
CombinedDataset
class. - There is no need to enforce a uniform number of items across datasets. Instead, the number of items per dataset can be dynamically determined as
min(len(subdataset), args.max_item_per_dataset)
, aligning with the intended behavior of themax_item_per_dataset
argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, Thx for commenting !
I added :
- A public property in
CombinedDataset
that return_lens
- Reformated to take account of your second point
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-1.x #2985 +/- ##
===========================================
+ Coverage 71.68% 71.72% +0.03%
===========================================
Files 293 293
Lines 20072 20074 +2
Branches 3408 3408
===========================================
+ Hits 14389 14398 +9
+ Misses 4865 4860 -5
+ Partials 818 816 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Motivation
Make it simpler to see the first N images of each dataset when using CombinedDataset.
Also put images in an appropriate folder named by their dataset name.
Modification
browse_dataset.py
--max-item-per-dataset
CombinedDataset
, browse each dataset by taking one element from each dataset in turn.prepare_datasets.md
Use cases (Optional)
for first 50 images of each dataset
for every images in each dataset
Checklist
Before PR:
After PR: