Code Monkey home page Code Monkey logo

steam-clip's Introduction

Steam CLIP: match Steam Banners with OpenAI's CLIP

This repository contains Python code to retrieve Steam games with similar store banners, using OpenAI's CLIP.

Image similarity is assessed by the cosine similarity between image features encoded by CLIP.

Similar vertical banners

Requirements

  • Install the latest version of Python 3.X.
  • Install the required packages:
python -m pip install --upgrade pip
pip install -r requirements.txt

Data

Data is available in download-steam-banners-data/.

The most recent data snapshot was downloaded with this Colab notebook on January 9, 2021. Open In Colab

This snapshot is shared as an archive (original_vertical_steam_banners.tar, 1.5 GB) on Google Drive.

It consists of vertical Steam banners (300x450 resolution), available for 29982 out of 48792 games, i.e. 61.4% of games.

Resized images are provided in the same repository for resolutions 256, 224, 128, 64, etc.

The list of appIDs (before any potential filtering) is from steam-store-snapshots.

Filtering out

Information is also provided in .txt logs about a possible filtering out of images based on:

  • image size (before resizing images):
    • there is 1 image with resolution 600x900,
    • this is not a big issue as the image ratio is equal to the expected ratio for 300x450 images,
  • image channels (before and after resizing images):
    • most images are 'RGB' (for true color images) ; total: 29642 images,
    • a few images are 'L' ('luminance' for greyscale images) ; total: 306 images,
    • very few images are 'CMYK' (for pre-press images) ; total: 34 images,
  • blank images:
    • there are 2 images either totally black (appID: 603280) or totally white (appID: 1076060),
    • these specific images are not reported about since they already appear in the log w.r.t. image channels.

It is up to the reader to filter out the dataset based on these logs. Logs can be reproduced with this Colab notebook. Open In Colab

Usage

Run match_steam_banners_with_CLIP.ipynb. Open In Colab

This will:

  • compute and store the 512 features corresponding to each banner,
  • find the 10 most similar store banners to curated query appIDs,
  • find the one most similar store banner to all appIDs available on the store, then display the most unique games.

NB: by default, query appIDs consist of:

  • the top 100 most played games during the past two weeks, according to SteamSpy,
  • a few manually curated games.

NB: unique games are ones which are the most dissimilar (low similarity score) to others to their first neighbor.

Web apps

Results can be interactively explored with web apps:

Results

The CLIP embedding for the ~30k banners is shared on Google Drive.

Results obtained with OpenAI's CLIP are shown on the Wiki.

The linked pages contain a lot of images and might be slow to load depending on your Internet bandwidth.

Similar games

Direct links to similarity results are available below:

For instance: Similar vertical banners

Unique games

Direct links to similarity results are available below:

For instance: Unique vertical banners

References

steam-clip's People

Contributors

woctezuma avatar

Watchers

 avatar  avatar

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.