ScanData
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:
- Fork the repo and clone your fork:
git clone https://github.com/<your-username>/scandata.git cd scandata
- 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]"
- Create a branch for your change:
git checkout -b my-change
- Make your change, then run the tests and the linter:
pytest ruff check src tests
- 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
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)
| 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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 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.