Last active
November 29, 2022 18:11
-
-
Save jacobmarks/cce8ac4c14acb8746b68e254365d68c0 to your computer and use it in GitHub Desktop.
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
# will count the number of samples in a dataset | |
sample_count = fo.Count() | |
# will retrieve the distinct labels in the `ground_truth` field | |
distinct_labels = fo.Distinct("ground_truth.detections.label") | |
# will compute a histogram of the `uniqueness` field | |
histogram_values = fo.HistogramValues("uniqueness") | |
# efficiently compute all three results | |
aggs = [sample_count, distinct_labels, histogram_values] | |
count, labels, hist = dataset.aggregate(aggs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment