Find issues in image datasets
Project description
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!
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'
- 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()
- 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
- Tutorial
- Run CleanVision on a HuggingFace dataset
- Run CleanVision on a Torchvision dataset
- Example script that can be run with:
python examples/run.py --path <FOLDER_WITH_IMAGES>
- Additional example notebooks
- Documentation
- Blog Post
- FAQ
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 | |
9 | Odd Size | Images that are abnormally large or small compared to the rest of the dataset | odd_size |
CleanVision supports Linux, macOS, and Windows and runs on Python 3.7+.
Join our community
-
The best place to learn is our Slack community. Join the discussion there to see how folks are using this library, discuss upcoming features, or ask for private support.
-
Need professional help with CleanVision? Join our #help Slack channel and message us there, or reach out via email: team@cleanlab.ai
-
Interested in contributing? See the contributing guide. An easy starting point is to consider issues marked
good first issue
or simply reach out in Slack. We welcome your help building a standard open-source library for data-centric computer vision! -
Ready to start adding your own code? See the development guide.
-
Have an issue? Search existing issues or submit a new issue.
-
Have ideas for the future of data-centric computer vision? Check out our active/planned Projects and what we could use your help with.
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.
Commercial licensing is available for enterprise teams that want to use CleanVision in production workflows, but are unable to open-source their code as is required by the current license. Please email us: team@cleanlab.ai
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cleanvision-0.3.6.tar.gz
.
File metadata
- Download URL: cleanvision-0.3.6.tar.gz
- Upload date:
- Size: 77.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a76441539ad7e77d6d7dc6f6e395d57dedef9d9b591295650c0fa9df77e5c68d |
|
MD5 | 89865958be4d3090465d9cc85f6c1008 |
|
BLAKE2b-256 | 5f91f2f87f3fa43b8cd71b82ab4a4c080a7cc3b160d69f8cc1073c88598f6faa |
File details
Details for the file cleanvision-0.3.6-py3-none-any.whl
.
File metadata
- Download URL: cleanvision-0.3.6-py3-none-any.whl
- Upload date:
- Size: 55.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54a23c6507f93d2524e5fb139654d2cc20faff179836111df57e59dc4d0301fe |
|
MD5 | e32807b0494141efce3be2de3b358521 |
|
BLAKE2b-256 | ea8272280ea07cb9ed02dc9f0b333aaf05b04dc0fd38e71044cbbdb0d32a4c16 |