-
-
Notifications
You must be signed in to change notification settings - Fork 16.5k
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
Update dataset_stats()
for HUB
#3536
Merged
Merged
Conversation
This file contains 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
Cleanup of b6fdd2e
@kalenmike this is our new function for dataset statistics. Example usage on VOC (20 classes). If test split is missing then it will have a value of None. from utils.datasets import *; dataset_stats('voc.yaml', verbose=True)
Scanning '../coco128/labels/train2017.cache' images and labels... 128 found, 0 missing, 2 empty, 0 corrupted: 100%|ββββββββββ| 128/128 [00:06<?, ?it/s]
Scanning '../VOC/labels/train.cache' images and labels... 16551 found, 0 missing, 0 empty, 0 corrupted: 100%|ββββββββββ| 16551/16551 [00:00<?, ?it/s]
Statistics: 100%|ββββββββββ| 16551/16551 [00:00<00:00, 260314.63it/s]
Scanning '../VOC/labels/val.cache' images and labels... 4952 found, 0 missing, 0 empty, 0 corrupted: 100%|ββββββββββ| 4952/4952 [00:00<?, ?it/s]
Statistics: 100%|ββββββββββ| 4952/4952 [00:00<00:00, 288326.74it/s] The function returns a dictionary: - nc: 20 # number of classes
names: # class names
- aeroplane
- bicycle
- bird
- boat
- bottle
- bus
- car
- cat
- chair
- cow
- diningtable
- dog
- horse
- motorbike
- person
- pottedplant
- sheep
- sofa
- train
- tvmonitor
train: # < --- train split
instances:
total: 40058
per_class:
- 1171
- 1064
- 1605
- 1140
- 1764
- 822
- 3267
- 1593
- 3152
- 847
- 824
- 2025
- 1072
- 1052
- 13256
- 1487
- 1070
- 814
- 925
- 1108
images:
total: 16551
unlabelled: 0
per_class:
- 908
- 795
- 1095
- 689
- 950
- 607
- 1874
- 1417
- 1564
- 444
- 738
- 1707
- 769
- 771
- 6095
- 772
- 421
- 736
- 805
- 831
val: # < --- val split
instances:
total: 12032
per_class:
- 285
- 337
- 459
- 263
- 469
- 213
- 1201
- 358
- 756
- 244
- 206
- 489
- 348
- 325
- 4528
- 480
- 242
- 239
- 282
- 308
images:
total: 4952
unlabelled: 0
per_class:
- 204
- 239
- 282
- 172
- 212
- 174
- 721
- 322
- 417
- 127
- 190
- 418
- 274
- 222
- 2007
- 224
- 97
- 223
- 259
- 229
test: null # < --- test split |
kalenmike
reviewed
Jun 8, 2021
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.
Looks good
@kalenmike great! PR is merged. |
Merged
BjarneKuehl
pushed a commit
to fhkiel-mlaip/yolov5
that referenced
this pull request
Aug 26, 2022
* Update `dataset_stats()` for HUB Cleanup of 03b286e * autodownload flag * Update general.py * cleanup
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.
Cleanup of b6fdd2e
π οΈ PR Summary
Made with β€οΈ by Ultralytics Actions
π Summary
Enhanced dataset handling with autodownload feature and simplified usage.
π Key Changes
autodownload
parameter to thedataset_stats
function for conditional dataset downloading.check_dataset
function.π― Purpose & Impact