Skip to content
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

Expose methods for calculating statistics on individual images for on the fly evaluation #210

Open
sanjanag opened this issue Jul 13, 2023 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@sanjanag
Copy link
Member

sanjanag commented Jul 13, 2023

Motivation

Sometimes statistics on images like blurriness, brightness, entropy need to be monitored in a streaming setting for each individual image. For example, measuring entropy of images in an inference pipeline. Right now CleanVision only supports issue detection in images in a batch setting.

Goal

The goal here is to expose calculation of statistics like entropy, brightness, etc, for individual images from the package wrapped inside a module.

Code Details

The methods exist in a private module src/cleanvision/issue_managers/image_property.py. The main methods here for calculating statistics and scores: calculate and get_scores can be found for each property.

API

from cleanvision.utils import get_entropy, get_low_information_score

entropy = get_entropy(image) # PIL image
low_information_score = get_low_information_score(image) # PIL image
@sanjanag sanjanag added good first issue Good for newcomers enhancement New feature or request labels Jul 13, 2023
@manulpatel
Copy link
Contributor

Hello @sanjanag! As per my understanding, we need to create individual files for each property (blurriness, brightness, entropy) inside utils directory. Further, the methods in these files are written same as in image_property.py. Correct?

@sanjanag
Copy link
Member Author

Hi @manulpatel ! No, we don't need to create individual files for each property, expose all of them from the same module. There's no need to copy over code as well, you just need to internally call the methods in image_property.py appropriately.

@jwmueller
Copy link
Member

Related to: #209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants