Skip to content

Add annotation_stats utility module#147

Open
manashk29 wants to merge 1 commit into
neuroinformatics-unit:mainfrom
manashk29:feat/annotation_stats_module
Open

Add annotation_stats utility module#147
manashk29 wants to merge 1 commit into
neuroinformatics-unit:mainfrom
manashk29:feat/annotation_stats_module

Conversation

@manashk29

@manashk29 manashk29 commented Mar 28, 2026

Copy link
Copy Markdown

Closes #146

What this PR does

Adds ethology/utils/annotation_stats.py a new utility module
that provides dataset-level statistics for ethology annotation
datasets.

New functions

  • dataset_summary(ds)
  • class_distribution(ds)
  • annotations_per_image(ds)
  • bbox_size_distribution(ds)

Tests

Added tests in
tests/test_unit/test_utils/test_annotation_stats.py
covering normal cases, parametrized inputs, and edge cases
(empty dataset, all-padding dataset, NaN shapes).

Related

making tools more accessible to users.

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

@manashk29 manashk29 marked this pull request as ready for review March 28, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add annotation_stats module for dataset-level statistics

1 participant