Expose image property utilities for on-the-fly image statistics #264
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.
Summary
This PR exposes lightweight, public
get_*utility functions for computing image statistics (e.g. entropy, brightness, blurriness, aspect ratio) directly from in-memoryPIL.Imageobjects.These utilities internally reuse existing logic in
image_property.pyand do not duplicate any implementation.Fixes: #210
Motivation
CleanVision currently computes image statistics only as part of dataset-wide issue detection (
Imagelab+IssueManager). However, users may want to compute the same statistics:This PR addresses that need by exposing a small, stable utility API, as discussed in #210.
What this PR does
get_*helper functions (e.g.get_entropy,get_brightness,get_blurriness) toimage_property.pycleanvision.utilsfor easy accessExample Usage