Skip to main content

Find issues in image datasets

Project description

Screen Shot 2023-03-10 at 10 23 33 AM

CleanVision automatically detects potential issues in image datasets like images that are: blurry, under/over-exposed, (near) duplicates, etc. This data-centric AI package is a quick first step for any computer vision project to find problems in the dataset, which you want to address before applying machine learning. CleanVision is super simple -- run the same couple lines of Python code to audit any image dataset!

Read the Docs pypi os py_versions codecov Slack Community Twitter Cleanlab Studio

Installation

pip install cleanvision

Quickstart

Download an example dataset (optional). Or just use any collection of image files you have.

wget -nc 'https://cleanlab-public.s3.amazonaws.com/CleanVision/image_files.zip'
  1. Run CleanVision to audit the images.
from cleanvision import Imagelab

# Specify path to folder containing the image files in your dataset
imagelab = Imagelab(data_path="FOLDER_WITH_IMAGES/")

# 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()
  1. CleanVision diagnoses many types of issues, but you can also check for only specific issues.
issue_types = {"dark": {}, "blurry": {}}

imagelab.find_issues(issue_types=issue_types)

# Produce a report with only the specified issue_types
imagelab.report(issue_types=issue_types)

More resources on how to use CleanVision

Clean your data for better Computer Vision

The quality of machine learning models hinges on the quality of the data used to train them, but it is hard to manually identify all of the low-quality data in a big dataset. CleanVision helps you automatically identify common types of data issues lurking in image datasets.

This package currently detects issues in the raw images themselves, making it a useful tool for any computer vision task such as: classification, segmentation, object detection, pose estimation, keypoint detection, generative modeling, etc. To detect issues in the labels of your image data, you can instead use the cleanlab package.

In any collection of image files (most formats supported), CleanVision can detect the following types of issues:

Issue Type Description Issue Key Example
1 Exact Duplicates Images that are identical to each other exact_duplicates
2 Near Duplicates Images that are visually almost identical near_duplicates
3 Blurry Images where details are fuzzy (out of focus) blurry
4 Low Information Images lacking content (little entropy in pixel values) low_information
5 Dark Irregularly dark images (underexposed) dark
6 Light Irregularly bright images (overexposed) light
7 Grayscale Images lacking color grayscale
8 Odd Aspect Ratio Images with an unusual aspect ratio (overly skinny/wide) odd_aspect_ratio

This package is still a work in progress, so expect sharp edges. Feel free to submit any found bugs or desired functionality as an issue!

CleanVision supports Linux, macOS, and Windows and runs on Python 3.7+.

Join our community

License

Copyright (c) 2022 Cleanlab Inc.

cleanvision is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

cleanvision is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See GNU Affero General Public LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cleanvision-0.3.0.tar.gz (73.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cleanvision-0.3.0-py3-none-any.whl (53.6 kB view details)

Uploaded Python 3

File details

Details for the file cleanvision-0.3.0.tar.gz.

File metadata

  • Download URL: cleanvision-0.3.0.tar.gz
  • Upload date:
  • Size: 73.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for cleanvision-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a8e6fa5d682f7e24f21829a0d54d3be4a67b8bf06b0875d44f59ab0bf6a65849
MD5 e63de252788d69db3176e7f0dcfb6a8a
BLAKE2b-256 dbf5140eb73583f240f7a7bde04a304dd8121bf1ce91b7853905368d52899d5a

See more details on using hashes here.

File details

Details for the file cleanvision-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: cleanvision-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 53.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for cleanvision-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e966d3087bad5acecb59ee1ceaa1ab6ae112b49598fb78c7800113467d6b1a15
MD5 87d2333220179ebb023809764f193adf
BLAKE2b-256 bf4377851240046b1dee19cd010dbec4fc6efda94cd0cbd8c83c3d10547e8a34

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page