Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/woctezuma/match-steam-banners
Retrieve Steam games with similar store banners, with MobileNet v3.
https://github.com/woctezuma/match-steam-banners
discovery game games steam steam-game steam-games
Last synced: about 2 months ago
JSON representation
Retrieve Steam games with similar store banners, with MobileNet v3.
- Host: GitHub
- URL: https://github.com/woctezuma/match-steam-banners
- Owner: woctezuma
- License: mit
- Created: 2020-08-22T20:05:41.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-02T19:05:40.000Z (3 months ago)
- Last Synced: 2024-11-02T20:17:25.191Z (3 months ago)
- Topics: discovery, game, games, steam, steam-game, steam-games
- Language: Python
- Homepage:
- Size: 93.8 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Match Steam Banners
[![Build status with Github Action][build-image-action]][build-action]
[![Code coverage][codecov-image]][codecov]
[![Code Quality][codacy-image]][codacy]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`][my-previous-repository]:
- features extracted by a neural network (MobileNet v1 previously ; v3 here),
- global average pooling of features, as in MobileNet papers and [implementations][keras-mobilenet],
- cosine similarity.![Similar vertical banners](https://github.com/woctezuma/match-steam-banners/wiki/img/illustration.jpg)
## Requirements
- Install the latest version of [Python 3.X](https://www.python.org/downloads/).
- Install the required packages:```bash
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:
```bash
pip install git+https://github.com/openai/CLIP.git
```- Install Facebook's DINO with git:
```bash
git clone https://github.com/facebookresearch/dino.git
mv dino/vision_transformer.py .
mv dino/utils.py .
```## Model
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
Data is available in [`download-steam-banners-data/`](https://github.com/woctezuma/download-steam-banners-data).
The most recent data snapshot was downloaded in August 2020 with [this Colab notebook][download_steam_banners].
[![Open In Colab][colab-badge]][download_steam_banners]
It consists of 19,049 **vertical** Steam banners resized from 300x450 to 256x256 resolution.## Usage
NB: a [Colab notebook][match_steam_banners-notebook] is available in my [`colab`][colab-branch] branch.
[![Open In Colab][colab-badge]][match_steam_banners-notebook]### 1. Features
First, compute and store the 1024 features corresponding to each banner:
```bash
python build_feature_index.py
```### 2. Similar games
Find the **10** most similar store banners to curated query appIDs:
```bash
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][steamspy-api],
- a few manually curated games.### 3. Unique games
Find the **one** most similar store banner to all appIDs available on the store, then display the most unique games:
```bash
python find_unique_games.py
```NB: *unique* games are ones which are the most dissimilar (low similarity score) to others to their first neighbor.
### 4. Export data and results for a web app
Optionally, export data and results for [a web app][my-flask-API]:
```bash
python export_data_for_web_app.py
```## Results
Results obtained with [MobileNet v3][keras-mobilenet] are shown [on the Wiki][my-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 each game, find [the 10 most similar games](https://github.com/woctezuma/match-steam-banners/wiki/Benchmark-top100).For instance:
![Similar vertical (Call of Duty)](https://github.com/woctezuma/match-steam-banners/wiki/img/similar_cod.jpg)Or:
![Similar vertical banners (Half-Life)](https://github.com/woctezuma/match-steam-banners/wiki/img/similar_hl.jpg)### Unique games
Direct links to similarity results are available below:
- for each unique game, display [the 1 most similar game](https://github.com/woctezuma/match-steam-banners/wiki/Unique-Games),
- a [grid of unique games](https://github.com/woctezuma/match-steam-banners/wiki/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.
For instance:
![Unique vertical banners](https://github.com/woctezuma/match-steam-banners/wiki/img/unique_games.jpg)## References
- [`download-steam-banners`][my-previous-repository]: retrieve Steam games with similar store banners,
- [`download-steam-screenshots`][screenshot-repository]: retrieve Steam games with similar store screenshots,[build]:
[build-image]:[build-action]:
[build-image-action]:[pyup]:
[dependency-image]:
[python3-image]:[codecov]:
[codecov-image]:[codacy]:
[codacy-image]:[my-previous-repository]:
[keras-mobilenet]:
[download_steam_banners]:
[my-wiki]:
[screenshot-repository]:
[steamspy-api]:
[my-flask-API]:[colab-branch]:
[match_steam_banners-notebook]:[colab-badge]: