This repository contains Python code to retrieve Steam games with similar store banners.
It is based on the best practices observed in my previous repository download-steam-banners
:
- features extracted by a neural network (MobileNet v1 previously ; v3 here),
- global average pooling of features, as in MobileNet papers and implementations,
- cosine similarity.
- Install the latest version of Python 3.X.
- Install the required packages:
python -m pip install --upgrade pip
pip install --upgrade cython
pip install -r requirements.txt -f https://download.pytorch.org/whl/torch_stable.html
NB: Tensorflow 2 supports Python 3.5–3.8, not 3.9.
- Install OpenAI's CLIP with pip:
pip install git+https://github.com/openai/CLIP.git
- Install Facebook's DINO with git:
git clone https://github.com/facebookresearch/dino.git
mv dino/vision_transformer.py .
mv dino/utils.py .
MobileNet is a convolutional neural network, trained for classification on ImageNet-1k (1.28M images with 1000 classes).
In this repository, the image encoder is MobileNetV3-Small
.
Data is available in download-steam-banners-data/
.
The most recent data snapshot was downloaded in August 2020 with this Colab notebook. It consists of 19,049 vertical Steam banners resized from 300x450 to 256x256 resolution.
NB: a Colab notebook is available in my colab
branch.
First, compute and store the 1024 features corresponding to each banner:
python build_feature_index.py
Find the 10 most similar store banners to curated query appIDs:
python retrieve_similar_features.py
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.
Find the one most similar store banner to all appIDs available on the store, then display the most unique games:
python find_unique_games.py
NB: unique games are ones which are the most dissimilar (low similarity score) to others to their first neighbor.
Optionally, export data and results for a web app:
python export_data_for_web_app.py
Results obtained with MobileNet v3 are shown on the Wiki.
The linked pages contain a lot of images and might be slow to load depending on your Internet bandwidth.
Direct links to similarity results are available below:
- for each game, find the 10 most similar games.
Direct links to similarity results are available below:
- for each unique game, display the 1 most similar game,
- a grid of unique games.
Unique games seem to have in common that their banner contains mostly a texture and a title, without any large character, item or shape.
download-steam-banners
: retrieve Steam games with similar store banners,download-steam-screenshots
: retrieve Steam games with similar store screenshots,