Skip to main content

ScanData

PyPI version Python versions Downloads Monthly downloads Tests License: MIT Ruff GitHub stars

Audit your ML dataset before you train on it.

Point ScanData at a dataset folder and it tells you what will break your training: leakage between splits, label problems, shortcuts the model can cheat with, and image quality issues. Every finding comes with a severity, evidence and a concrete fix.

Early preview. This release ships the interactive CLI and the full check catalog. Dataset scanning is coming in the next release.

Install

pip install scandata

Requires Python 3.10 or newer. Works on Windows, macOS and Linux.

Quick start

Run it with no arguments to open the interactive menu:

scandata
   ____                  ____        _
  / ___|  ___ __ _ _ __ |  _ \  __ _| |_ __ _
  \___ \ / __/ _` | '_ \| | | |/ _` | __/ _` |
   ___) | (_| (_| | | | | |_| | (_| | || (_| |
  |____/ \___\__,_|_| |_|____/ \__,_|\__\__,_|

  ScanData · audit your dataset before you train on it
  Built with ❤ by Subham Divakar

› What would you like to do?
  » 1. Scan a dataset
    2. Results (last scan)
    3. Browse checks
    4. Recent scans
    5. Settings
    6. Help & about
    0. Exit
Key Action
↑ / ↓ Move
Enter Select
Esc or Ctrl+C Back one screen
← Back / ⌂ Main menu At the bottom of every screen

Or skip the menu and run commands directly, which is handy in scripts and CI:

scandata scan ./data --type image-cls          # scan a dataset folder
scandata list-checks                           # every check, in a table
scandata list-checks --section leakage         # one section only
scandata explain leak.near_dup                 # what a check does and why it matters
scandata --version
scandata --help

What it checks

Checks for image classification datasets, grouped by what they protect you from:

Section Catches
Integrity Corrupt or unreadable files, wrong extensions, mixed color modes, EXIF rotation, blank and tiny images, empty classes
Leakage Exact and near-duplicate images across train/val/test, the same image under different labels, source groups split across sets, train/test distribution shift
Labels Class imbalance, too few test examples per class, uneven stratification, suspected mislabels, overlapping classes
Quality Resolution and aspect-ratio spread, detail lost at training size, blur, exposure, normalisation stats
Shortcuts Labels predictable from metadata, filenames, global color or the background alone
Baselines Majority-class and linear-probe baselines, learning curve, recommended metric

Run scandata list-checks for the full list, or scandata explain <check-id> for details on any one.

Supported dataset layouts

class folders               split / class folders        manifest
data/                       data/                        data/
  cracked/   *.jpg            train/cracked/ ...           images/...
  uncracked/ *.jpg            val/...                      labels.csv
                              test/...                     (path,label[,split][,group])

ScanData works out the layout automatically.

Scan options

Flag Default Meaning
--type required Data type: image-cls
--mode fast fast runs on a CPU in minutes; deep adds embedding-based checks
--splits auto auto, none, or a manifest CSV
--group-regex none Regex with a named group group that pulls the source ID (patient, plant, slab) from filenames
--target-size none Training resolution, used to flag detail lost when resizing
--sample all Audit only N images per class
--config none YAML file that overrides thresholds
--out scandata_report.md Markdown report path
--json none Machine-readable findings
--fail-on none blocker or warn: exit with code 1 if findings reach that level
--seed 42 Seed for sampling

Exit codes: 0 OK, 1 the --fail-on threshold was hit, 2 error.

Contributing

Contributions are welcome, whether it's a bug report, a new check idea, docs or code. Feel free to reach out: open an issue or contact me through GitHub.

To contribute code:

  1. Fork the repo and clone your fork:
    git clone https://github.com/<your-username>/scandata.git
    cd scandata
    
  2. Create a virtual environment and install in editable mode with the dev tools:
    python -m venv .venv
    source .venv/bin/activate        # Windows: .venv\Scripts\activate
    pip install -e ".[dev]"
    
  3. Create a branch for your change:
    git checkout -b my-change
    
  4. Make your change, then run the tests and the linter:
    pytest
    ruff check src tests
    
  5. Push your branch and open a pull request describing what you changed and why.

For larger changes, such as a new check or data type, please open an issue first so we can agree on the approach.

License

MIT

Built with ❤ by Subham Divakar.

Metadata

Release files for scandata 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scandata 0.0.1
File Size Uploaded Provenance Actions
scandata-0.0.1.tar.gz 24.0 kB Without provenance Details for scandata-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scandata 0.0.1
File Interpreter ABI Platform Actions
scandata-0.0.1-py3-none-any.whl Python 3 none any Details for scandata-0.0.1-py3-none-any.whl

Total release size: 53.6 kB

Release files / scandata-0.0.1.tar.gz

Download URL scandata-0.0.1.tar.gz
Size 24.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a1f1c5eef63bda7e6089b0d90913ff2c8b61f75cb5b8258024114c9daec4649a
BLAKE2b-256 checksum
How to use checksums
a2df5ac2a1f71b05182e8dbb6e20c8b0546a2f11f13738a6e3635b1280349fff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release files / scandata-0.0.1-py3-none-any.whl

Download URL scandata-0.0.1-py3-none-any.whl
Size 29.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15d02be901a71a5def97827676d4614c9867577035286555b4afa14c7a5373fd
BLAKE2b-256 checksum
How to use checksums
22e825dd7bff1afc57434a129817c270e6b622c2ef21218deef6f6fbd26b2697
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Security for scandata 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page