Quickstart

1. Install From Source

DatasetLint requires Python 3.10 or newer.

git clone https://github.com/gagandeepreehal/datasetlint.git
cd datasetlint
python3.11 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
python -m pip install -e ".[dev,docs]"

Use python3.10, python3.11, or python3.12 if that is the interpreter name on your machine.

2. Validate The Passing Example

datasetlint examples/minimal_dataset

Expected result:

DatasetLint report for .../examples/minimal_dataset: passed with 0 issue(s) (error=0, warning=0, info=0).

3. Inspect Other Output Formats

datasetlint examples/minimal_dataset --format json
datasetlint examples/minimal_dataset --format markdown
datasetlint examples/minimal_dataset --format html > report.html
datasetlint report examples/minimal_dataset --out report.html

4. Run Focused Checks

datasetlint examples/minimal_dataset --checks labels
datasetlint examples/minimal_dataset --checks sync
datasetlint examples/minimal_dataset --checks labels,sync

5. Run The Failure Example

datasetlint examples/bad_dataset

This exits with code 1 because the fixture intentionally contains missing files, invalid calibration, timestamp issues, label problems, and trajectory anomalies.

Generated sample reports are committed for quick inspection:

  • examples/reports/minimal_report.json
  • examples/reports/bad_report.json
  • examples/reports/bad_report.md

6. Compute Stats And Diffs

datasetlint stats examples/minimal_dataset
datasetlint diff examples/minimal_dataset examples/bad_dataset
datasetlint adapters examples/minimal_dataset

7. Inspect Adapter Manifests

datasetlint adapters list
datasetlint adapters detect tests/fixtures/coco_dataset
datasetlint inspect tests/fixtures/coco_dataset --adapter coco
datasetlint validate tests/fixtures/kitti_object --adapter kitti
datasetlint export-manifest tests/fixtures/coco_dataset --adapter coco --output manifest.json

These commands inspect normalized manifests for common external dataset formats. They are separate from datasetlint lint, which runs the native folder rule engine.

8. Use The Python API

from datasetlint import compare_datasets, compute_dataset_stats, lint_dataset
from datasetlint.adapters import load_dataset, validate_dataset

report = lint_dataset("examples/minimal_dataset")
print(report.summary())

stats = compute_dataset_stats("examples/minimal_dataset")
print(stats.frame_counts)

diff = compare_datasets("examples/minimal_dataset", "examples/bad_dataset")
print(diff.summary)

manifest = load_dataset("tests/fixtures/coco_dataset", adapter="coco")
adapter_report = validate_dataset("tests/fixtures/kitti_object", adapter="kitti")

Minimal Dataset Shape

my_dataset/
  metadata.json
  calibration.json
  sensors/
    camera_front.csv
  images/
    000001.jpg
{
  "dataset_name": "sample_log",
  "version": "0.1",
  "sensors": ["camera_front"],
  "duration_sec": 0.1
}
timestamp,path,width,height
0.0,images/000001.jpg,1280,720