Skip to main content

Vision Data Curation (VDC)

Vision Data Curation (VDC) is a data-curation toolkit in the Birder ecosystem for cleaning, filtering and sampling large-scale image datasets. Built for computer vision researchers and practitioners who want higher-quality data with less manual effort.

At its core, VDC embraces a data-centric AI philosophy, aiming to enhance the quality and diversity of your datasets with minimal manual intervention. By providing a structured, iterative pipeline, VDC helps researchers and practitioners build higher-performing models by starting with better data.

Features

VDC provides modular tools for dataset cleanup:

  • Input validation - detect corrupt files, invalid formats, low resolution, or extreme aspect ratios
  • Rotation correction - correct 90°/180°/270° orientation errors
  • Example-based filtering - remove images similar to a set of unwanted examples
  • Image quality filtering - remove images based on aesthetic score or NSFW classification
  • Duplicate removal - identify and remove near-duplicate images from your dataset
  • Hierarchical K-Means sampling - select diverse, representative subsets from large datasets

The Curation Pipeline

flowchart LR
    A[Raw<br/>Dataset] --> V[Validation]
    V --> R[Rotation]
    R --> D[Dedup]
    D --> E[Example<br/>Filter]
    E --> Q[Quality Filter<br/>Aesthetic/NSFW]
    Q --> S[Cluster-based<br/>Sampling]
    S --> F[Curated<br/>Dataset]

    U[Unwanted<br/>Examples] --> E

Installation

From PyPI

pip install vision-data-curation

From Source

git clone https://gitlab.com/birder/vision-data-curation.git
cd vision-data-curation
pip install -e .

Developing directly from the project root allows for script and configuration execution as if fully installed.

Usage

Each step is a script under vdc.scripts.

Examples:

# Report corrupt/invalid images
python -m vdc.scripts.sanitize_images data/raw_images/

# Filter based on "Unwanted examples"
python -m vdc.scripts.filter_by_examples data/embeddings.csv --examples-embeddings-file bad_examples.csv
  • Run python -m vdc.scripts to see available scripts
  • Run python -m vdc.scripts.<script> --help for options

Model Downloads: VDC automatically downloads the aesthetic and NSFW predictor heads to the models/ directory (defined by vdc.conf.settings.MODELS_DIR). Embedding models used with VDC, such as SSCD, PE and CLIP, are managed separately by Birder and should be downloaded with python -m birder.tools download-model <model> before running Birder prediction commands.

Configuration

  • Default settings live in vdc/conf/config.json
  • A config.json in your project root will take precedence (or pass --config to any script)

Visualization & Exploration

VDC provides accompanying R Markdown notebooks (found in the notebooks/ directory) to visually inspect and understand the impact of various curation steps, aiding in data-driven decision making.

While these notebooks use the .Rmd extension, they are entirely written in Python. This choice was made for their text-based nature, which significantly improves version control by producing clean and meaningful Git diffs compared to traditional .ipynb files.

For a seamless interactive experience in a Jupyter environment, we recommend installing jupytext (pip install jupytext). With jupytext installed, you can open and run .Rmd files directly in Jupyter as if they were .ipynb notebooks.

Documentation

For detailed walkthroughs, examples, and in-depth guides, please refer to our full documentation.

License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details.

Download files

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

Source Distribution

vision_data_curation-0.1.1.tar.gz (60.5 kB view details)

Uploaded Source

Built Distribution

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

vision_data_curation-0.1.1-py3-none-any.whl (72.4 kB view details)

Uploaded Python 3

File details

Details for the file vision_data_curation-0.1.1.tar.gz.

File metadata

  • Download URL: vision_data_curation-0.1.1.tar.gz
  • Upload date:
  • Size: 60.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for vision_data_curation-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a96c0af549e65932627616968045e45457d07a004066d341dd07ff21b5cde0ec
MD5 66f1b10697039306381c677217a245ec
BLAKE2b-256 a8ad89ba5119afc389b9a6c3b254ef33ba6d02ca2b4c9f95aec191ae7b864f95

See more details on using hashes here.

File details

Details for the file vision_data_curation-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for vision_data_curation-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 135a7707fb695bebf50d7a765a0c627c32d36fc25f650854d9639c1f11709754
MD5 7b7d571e7fe7816d08e15d602412ea65
BLAKE2b-256 22708e41100d9ae643241dabb0a3b408906928e216d6586054a786f626201c47

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 Sentry Error logging StatusPage Status page