CLI Reference
mapcv init
Section titled “mapcv init”Writes an annotated example config to a file, or prints it to stdout if no path is given.
mapcv init my_dataset.yamlOpen the file and fill in your region, tile source, and label path. Everything else has sensible defaults.
mapcv validate
Section titled “mapcv validate”Parses and validates a config file without downloading any tiles or writing any files. Run this after editing your config to catch errors before a long download.
mapcv validate my_dataset.yamlmapcv generate
Section titled “mapcv generate”Runs the full pipeline: tile download, label rasterization, patch sampling, and dataset writing.
mapcv generate my_dataset.yamlWhen it finishes you will find:
output/ Images/ patch_0000000.png patch_0000001.png ... Masks/ patch_0000000.png patch_0000001.png ... manifest.json splits/ train.txt val.txt test.txtMask pixels are 0 for background and 1..255 for class IDs. If no labels section is present in the config, no Masks/ directory is written. If no split section is present, no splits/ directory is written.
mapcv split
Section titled “mapcv split”Re-splits an existing dataset using its manifest.json without re-downloading or re-processing anything. Useful when you want to try different split ratios without rerunning the full pipeline.
mapcv split [OPTIONS] STAGING_DIR| Option | Default | Description |
|---|---|---|
--test-ratio | 0.2 | Fraction of all patches reserved for test. |
--val-ratio | 0.1 | Fraction of remainder used for validation. |
--labeled-ratios | 0.10 0.20 0.30 | Optional. Pass once per ratio, e.g. --labeled-ratios 0.10 --labeled-ratios 0.20. |
--seed | 42 | Random seed. |
--strategy | stratified | random or stratified. |
--sample-limit | — | Optional. Cap on total patches sampled. |
mapcv split ./output --test-ratio 0.15 --val-ratio 0.10Split files are written to STAGING_DIR/splits/ (e.g. output/splits/train.txt).