Awesome
Download Steam Banners
This repository contains Python code to retrieve Steam games with similar store banners.
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
On Windows, the most recent version of OpenCV can also be downloaded from this repository. To install it:
pip install opencv_python-4.0.1-cp36-cp36m-win_amd64.whl
Data
A data snapshot from February 2019 is available in download-steam-banners-data/
.
Otherwise, you would have to:
- download app details with
steam-api
, - parse app details to find the banner URL of each game,
- download the banners with
download_steam_banners.py
.
Alternatively, run this IPython notebook. A list of of appIDs (tied to games) is first downloaded via SteamSpy API. Then banner URLs are directly inferred from appIDs, without relying on app details.
Usage
Store banners are resized to 128x128 with batch_resize_images.py
.
To retrieve Steam games with similar store banners, image features are:
- extracted by a neural net with
build_feature_index.py
, - either concatenated, or merged via a pooling process (average or maximum pooling),
- compared based on cosine similarity or Minkowski distance with
retrieve_similar_features.py
.
Alternatively:
- image hashes could be computed with
build_search_index.py
andretrieve_similar_banners.py
, - different image features could be computed, e.g. ORB descriptors with
build_feature_index.py
andretrieve_similar_features.py
.
Caveat
Fill-in the path to steam-api/data/appdetails/
in download_steam_banners.py
.
If you use PyCharm on Windows, you could just mention your Windows username as follows:
def get_user_name():
user_name = 'Woctezuma' # <--- here
return user_name
Results
Similar games
Results obtained with a neural net (MobileNet) are shown on the Wiki.
Results obtained with alternative methods are not shown:
- image hashes are mostly useful to detect duplicates,
- ORB descriptors seem less relevant than the features obtained with MobileNet.
An in-depth commentary is provided on the Wiki. Overall, I would suggest to match features with:
- cosine similarity, to avoid having to deal with weird matches of feature vectors with a norm close to zero,
- either concatenation or average pooling: with concatenation, the banner layout greatly constrains the matching.
Unique games
It is possible to highlight games with unique store banners, 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
match-steam-banners
: retrieve Steam games with similar store banners using MobileNet v3,download-steam-screenshots
: retrieve Steam games with similar store screenshots,- Zhang, Richard, et al. "The unreasonable effectiveness of deep features as a perceptual metric." Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2018.
- Image hashes
- Another Github repository about image similarity