Home

Awesome

Download Steam Screenshots

Build status Code coverage Code Quality

This repository contains Python code to retrieve Steam games with similar store screenshots.

Similar screenshots

Requirements

pip install -r requirements.txt

Data

A data snapshot from April 2019 is available in download-steam-screenshots-data/.

Otherwise, you would have to:

  1. download app details with steam-api,
  2. parse app details to find the sceenshot URL of each game,
  3. download the screenshots with download_steam_banners.py.

Usage

Store screenshots are first center-cropped and then resized to 128x128 with batch_resize_images.py.

To retrieve Steam games with similar store screenshots, image features are:

  1. extracted by a neural net with build_feature_index.py,
  2. either concatenated, or merged via a pooling process (average or maximum pooling),
  3. compared based on cosine similarity with retrieve_similar_features.py.

Caveat

To avoid messing features for banners and screenshots, edit the code in download-steam-banners as follows.

Edit build_feature_index.py

Ensure get_features_folder_name() does not point to the output folder already used for banners.

def get_features_folder_name():
    features_folder_name = 'features_for_screenshots/' # <--- here
    pathlib.Path(features_folder_name).mkdir(exist_ok=True)
    return features_folder_name

Ensure build_feature_index() is called with argument:

if __name__ == '__main__':
    build_feature_index(save_keras_output=True,
                        include_top=False,
                        data_folder='128x128/') # <--- here

Edit retrieve_similar_features.py

Ensure batch_retrieve_similar_features() is called with arguments:

if __name__ == '__main__':
    for pooling in [None, 'max', 'avg']:
        batch_retrieve_similar_features(pooling,
                                        data_folder='128x128/', # <--- here
                                        images_are_store_banners=False) # <--- here

Results

Similar games

Results are shown on the Wiki.

An in-depth commentary is provided on the Wiki.

Unique games

It is possible to highlight games with unique store screenshots, by applying a threshold to similarity values output by the algorithm. This is done in find_unique_games.py:

Results are shown here.

References

<!-- Definitions -->