mapcv
A high-performance satellite imagery dataset creation tool for computer vision.
Statement of Need
Creating machine learning datasets from satellite imagery is traditionally a frustrating experience. Wrestling with heavy, notoriously complex GIS libraries like GDAL is a massive pain point for researchers who just want to train models.
Existing geospatial ecosystems are heavily analysis-first. mapcv is different. It is explicitly designed as a data creation-first tool. It provides a fast, end-to-end pipeline written in Python and Rust specifically optimized for fetching map tiles, rasterizing complex labels (KML/GeoJSON), and splitting areas into uniform, ML-ready patches. The target audience includes computer vision researchers, data scientists, and ML engineers who need an efficient and reliable way to prepare high-quality satellite datasets for training segmentation models without the traditional GIS headaches.
Installation
pip install mapcv
Requires Python 3.10 or newer. One pre-built wheel per platform (Linux x86-64 and aarch64 with glibc or musl, macOS, Windows) covers every supported Python version; other platforms build from source and need a Rust toolchain.
EOPF Sentinel-2 L2A Zarr support is optional:
pip install "mapcv[zarr]"
The zarr extra currently supports Python 3.10–3.13: its zarr 2 dependency has no Python 3.14 wheels yet.
Quick start
1. Scaffold a config file
mapcv init my_dataset.yaml
Open the file and fill in your region, imagery source, and (optionally) label path. Everything else has sensible defaults.
Note: XYZ sources must return standard 256x256 pixel tiles. You are responsible for complying with the imagery provider's license, attribution, rate limits, and terms. mapcv does not grant imagery rights.
2. Generate the dataset
mapcv generate my_dataset.yaml
This fetches tiles, rasterizes labels, extracts patches, and writes everything to the output directory specified in your config.
3. Re-split an existing dataset (optional)
mapcv split ./output --test-ratio 0.15 --val-ratio 0.10
Re-runs the train/val/test split from the existing manifest.json without re-downloading anything.
EOPF Sentinel-2 Zarr
Version 0.2.0 can read one local or anonymous public EOPF Sentinel-2 L2A product per run. It preserves the product's projected CRS, harmonizes selected bands with the EOPF backend, and writes bands-first float32 NPY patches.
region:
west: 10.0
south: 45.0
east: 10.2
north: 45.2
imagery:
type: eopf_zarr
path: /data/S2_L2A_PRODUCT.zarr
resolution: 10
bands: [b01, b02, b03, b04, b05, b06, b07, b08, b8a, b09, b11, b12]
chunk_rows: 1024
sampler:
patch_size: 256
writer:
staging_dir: ./dataset
image_format: npy
Private-store credentials, STAC discovery, mosaicking, cloud masking, GeoTIFF output, and Google Earth Engine integration are outside the 0.2.0 scope. See the migration guide and provider guidance.
Documentation
Full documentation including configuration reference, CLI reference, and API reference is available at tahamukhtar20.github.io/mapcv.
Contributing
Contributions are welcome. Please review the Contributing Guide and Code of Conduct before opening a pull request.
Citation
(Citation information will be added after publication.)
Author
Muhammad Taha Mukhtar · tahamukhtar20+mapcv@gmail.com
License
This project is licensed under the MIT License — see the LICENSE file for details.
Metadata
Release files for mapcv 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mapcv-0.2.0.tar.gz | 268.3 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| mapcv-0.2.0-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| mapcv-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ x86-64 | Details |
| mapcv-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ ARM64 | Details |
| mapcv-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| mapcv-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| mapcv-0.2.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64, macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64) | Details |
Total release size: 24.1 MB
Release files / mapcv-0.2.0.tar.gz
| Download URL | mapcv-0.2.0.tar.gz |
|---|---|
| Size | 268.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
218c224fd0c38dee6eb8a29004bb92b7762896901c603695797e52a9d48f8b57
|
|
BLAKE2b-256 checksum How to use checksums |
7b38b86ab940da7d4a3d59f50a8b29e63ebb4360e1a377240bab3bc45589fd83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logRelease files / mapcv-0.2.0-cp310-abi3-win_amd64.whl
| Download URL | mapcv-0.2.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
721163744daaf9a23dc0ea1310f5c041100a91df42a978dae67666504a811bcb
|
|
BLAKE2b-256 checksum How to use checksums |
9100ab536d7ed4c45a0d2bdb85eb35eebc312702ae3ee94427027bb597c22317
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logRelease files / mapcv-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | mapcv-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 3.8 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
2cb8866400e2ebef9a6e655c7afff835952766cc105ab38fa5b20f86b0a2b79a
|
|
BLAKE2b-256 checksum How to use checksums |
b67612a2f4d9a218356906d294e89c829ddc5d57372132ac95a620c70963eb44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logRelease files / mapcv-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | mapcv-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 3.7 MB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
0673988e7cbb6d55f99f59c80ec90afef8776f02dceac3ccd42003eab1ff29ba
|
|
BLAKE2b-256 checksum How to use checksums |
7d82c35926ad2896294bd009ef78608944de65a35fa8ca68c377b5d0c03e731a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logRelease files / mapcv-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | mapcv-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
3289db978b5f446c4060076fb893c7c8a89df16dbea636bef0c7c0087cbee463
|
|
BLAKE2b-256 checksum How to use checksums |
0c19c2c1d38748762e3ba92979761a82884cb742fe4c0c8048fe76bc703771d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logRelease files / mapcv-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | mapcv-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
98a8ef8fc542e9de600adaff73fbc752393bc63d58d4171fb451713858771d85
|
|
BLAKE2b-256 checksum How to use checksums |
d773c8c4c1ecce07802c87414d6801f12000040925f322bdf09668ef9a1355f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logRelease files / mapcv-0.2.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
| Download URL | mapcv-0.2.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
|---|---|
| Size | 6.5 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ae1879c3e67f45da37e4ea91be6936a1a826f3f65ee75561d3cb3859c6860966
|
|
BLAKE2b-256 checksum How to use checksums |
4d4f02ad4ea36d5c9ccb370caaf883192b85d337e685532e544b2cdfc3c85c3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency log