Skip to main content

The StarCraft Image dataset

Project description

StarCraftImage Dataset


PyPI License

Welcome! This is the repository for the StarCraftImage dataset from the paper: StarCraftImage: A Dataset For Prototyping Spatial Reasoning Methods For Multi-Agent Environments. This README has basic installation and quickstart usage but our project webpage has more documentation: StarCraftImage project webpage.

If you use this dataset, please cite the following paper:

@inproceedings{kulinski2023starcraftimage,
  title={StarCraftImage: A Dataset for Prototyping Spatial Reasoning Methods for Multi-Agent Environments},
  author={Kulinski, Sean and Waytowich, Nicholas R and Hare, James Z and Inouye, David I},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={22004--22013},
  year={2023}
}

Installation

We recommend using the pip package manager to install sc2image.

pip install sc2image

Note, this does not include the dataset-demos folder which contains jupyter notebooks which show example uses of the dataset. To use them, you should install from source via:

git clone git@github.com:inouye-lab/starcraftimage.git
cd starcraftimage
pip install -e .

Quickstart

:warning: For more detailed documentation and example uses, visit the dataset docs for using sc2image.

There are three main StarCraftII datasets. Each dataset includes images summarize a 10 second window (255 frames) of a StarCraftII replay.

  1. StarCraftImage: This is the main 3.6 million sample dataset which includes multiple image formats:'sparse-hyperspectral', 'dense-hyperspectral', 'bag-of-units', 'bag-of-units-first', and contains all unit positioning information throughout the window. This dataset can be used via the following:

    from sc2image.dataset import StarCraftImage
    sc2image = StarCraftImage(root="data", download=True)
    

    This will download the StarCraftImage dataset to the data directory (if it does not already exist there). As this dataset has over 3.6 million samples, this might take a while to download. However, you can use the standalone StarCraftCIFAR10 and StarCraftMNIST versions below.

  2. StarCraftCIFAR10: This is a simplified version of the StarCraftImage dataset which exactly matches the setup of the CIFAR10 dataset. All images have been condensed into a three channel (RGB) image where the Red channel corresponds to Player 2 units, Green correspond to neutral units, and Blue to Player 1 units. The 10 classes equate to: (map_name, did_window_happen_in_first_half_of_replay). The dataset can be loaded via:

    from sc2image.dataset import StarCraftCIFAR10
    sc2image_cifar10 = StarCraftCIFAR10(root="data", download=True)
    
  3. StarCraftMNIST: This is a further simplified version of the StarCraftImage dataset which exactly matches the setup of the MNIST dataset. The grayscale images show to the seen last seen timestamps for units each pixel location, and the 10 classes match that of StarCraftCIFAR10. The dataset can be loaded via:

    from sc2image.dataset import StarCraftMNIST
    sc2image_mnist = StarCraftMNIST(root="data", download=True)
    

Example uses

Please see the starcraftimage-quickstart jupyter notebook in the dataset-demos folder to see details on using this dataset!

Bug reports

If you run into any issues, please feel free to open an issue in this repository or email us via the corresponding author email in the main paper.

Cheers!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sc2image-1.0.4.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sc2image-1.0.4-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file sc2image-1.0.4.tar.gz.

File metadata

  • Download URL: sc2image-1.0.4.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for sc2image-1.0.4.tar.gz
Algorithm Hash digest
SHA256 6e421bf086260ef96d1d105bae3c971fd6c19d849bc6f87c616e067ffd407174
MD5 36d921bc7453aa0b2b53a42606cbb8fe
BLAKE2b-256 80f37dba2c6a06e5d9570698f091f32f0aa6dbe5ebdfed06ab7ffb9f40b8312e

See more details on using hashes here.

File details

Details for the file sc2image-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: sc2image-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for sc2image-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 43be337bb4a97268255973e864c2d733500f67b7cf74277bc23b3219b8e64d14
MD5 a52c20fa430ccfbe96ce534a6a628e39
BLAKE2b-256 d28fe7efa0ab87e1baccf4a3b0b766360d9c600b001066c07cf36e82ace62721

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page