Giter VIP home page Giter VIP logo

download-steam-screenshots's Introduction

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

  • Install the latest version of Python 3.X. For CNTK, you will need Python 3.6.
  • Install the required packages:
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:

  • data_folder pointing to the input folder for screenshots.
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:

  • data_folder as above,
  • images_are_store_banners=False.
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:

  • cosine similarity is used to compare features,
  • a game is unique if the similarity score between a query game and its most similar game (other than itself) is lower than or equal to an arbitrary threshold.

Results are shown here.

References

download-steam-screenshots's People

Contributors

dependabot[bot] avatar pyup-bot avatar renovate[bot] avatar woctezuma avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

download-steam-screenshots's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/python-package.yml
  • actions/checkout v4
  • actions/setup-python v5
  • codecov/codecov-action v4
pip_requirements
requirements.txt
  • aiohttp ==3.9.3
  • aiofiles ==23.2.1
  • opencv-contrib-python ==4.9.0.80
  • imagehash ==4.3.1
  • matplotlib ==3.8.3
  • cntk ==2.7.post2
  • keras ==2.10.0
  • pillow ==10.2.0
  • scikit-learn ==1.4.1.post1
  • steamspypi ==1.1.1

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.