"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

April 18, 2023

Automated image quality with cleanvision

What aspects are automated?

dark, light, odd_aspect_ratio, low_information, exact_duplicates, near_duplicates, blurry, grayscale images 



#https://github.com/cleanlab/cleanvision/
!pip install cleanvision
from google.colab import drive
drive.mount('/content/drive')
#dark, light, odd_aspect_ratio, low_information, exact_duplicates, near_duplicates, blurry, grayscale images
from cleanvision.imagelab import Imagelab
# Specify path to folder containing the image files in your dataset
imagelab = Imagelab(data_path="/content/drive/MyDrive/SampleImages/")
# Automatically check for a predefined list of issues within your dataset
imagelab.find_issues()
# Produce a neat report of the issues found in your dataset
imagelab.report()
#https://github.com/cleanlab/cleanvision/blob/main/examples/run.py
imagelab.save("./results")
#https://github.com/cleanlab/cleanvision-examples/blob/main/tutorial.ipynb
imagelab.issue_summary
imagelab.issues.head()
type(imagelab.issues)
imagelab.issues
#blurry_images = imagelab.issues[imagelab.issues["is_blurry_issue"] == True].sort_values(by=['blurry_score'])
#blurry_image_files = blurry_images.index.tolist()
imagelab.info.keys()
imagelab.info['statistics'].keys()
imagelab.info['statistics']['entropy']
imagelab.info['exact_duplicates']['num_sets']





Keep Exploring!!!

No comments: