Skip to content

added class_dist#1857

Open
Vishal35198 wants to merge 2 commits intoroboflow:developfrom
Vishal35198:feat/class_dist_count
Open

added class_dist#1857
Vishal35198 wants to merge 2 commits intoroboflow:developfrom
Vishal35198:feat/class_dist_count

Conversation

@Vishal35198
Copy link

Added a functionality to get the class distribution -
def get_class_distribution(dataset: "DetectionDataset") -> Dict[str, int]: """ Returns a dictionary with class names as keys and sample counts as values. """ from collections import Counter all_classes = [] for det in dataset.annotations: all_classes.extend(det['class_names']) return dict(Counter(all_classes))

@CLAassistant
Copy link

CLAassistant commented Jun 4, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants