Sketchy

class sketchkit.datasets.Sketchy(root: str | Path | None = None, load_all: bool = False, cislab_source: bool = False, skip_integrity_check: bool = False)[source]

The Sketchy Database (https://sketchy.eye.gatech.edu/), SVG subset.

This loader expects the archive sketches-06-04.7z to extract into a sketchy/ directory whose immediate subfolders are category names, each containing multiple .svg files. Any checked.txt or invalid.txt files present in category folders are ignored.

After extraction, SVGs listed in per-class invalid.txt files are automatically deleted (this behavior can be disabled via prune_invalid=False in download_sketchy_database).

The data is represented using cubic Bézier curves consistent with SketchKit.

Example

>>> data = Sketchy()
>>> len(data)
20000
>>> s = data[0]
>>> isinstance(s, Sketch)
True
Parameters:
  • root – Root directory where the dataset will be stored.

  • load_all – Whether to load all data into memory at initialization.

  • prune – Whether to prune invalid SVGs during download.

Private-members:

Special-members: