Awesome
Steam Face Detection
<img alt="Input" src="https://raw.githubusercontent.com/wiki/woctezuma/steam-face-detection/img/cover-input.jpg" width="375"> -> <img alt="Output" src="https://raw.githubusercontent.com/wiki/woctezuma/steam-face-detection/img/cover-output.jpg" width="375">
This repository contains Python code to detect faces on Steam store/library images.
Usage
- Acquire the data, e.g. as a snapshot called
256x256.zip
in one of my data repositories (here or there), - Run
detect_faces_on_steam_banners.ipynb
to detect (and count) faces.
NB: In order to try and adjust parameters, I suggest that you experiment with benchmark_face_detection.ipynb
.
Data
The dataset consists of 14k vertical images, resized from 300x450 to 256x256 resolution, used by the Steam library.
Images were downloaded with download_steam_banners.ipynb
.
Images were then filtered (duplicates, outliers, etc.) with remove_duplicates.ipynb
.
Recommendations
I have used 3 tools for face detection:
dlib
, which I used in another one of my projects,face-alignment
,retinaface
, available on PyPI.
Overall, I would recommend to use face-alignment
over dlib
as:
- it detects more faces on Steam images, which feature difficult faces (hand-drawings, anime, 3D models, etc.),
- it is about 3.5 times faster.
RetinaFace can detect even more faces, but it is slower than face-alignment
.
Results
Overall, most images do not feature any detected face. Among images with faces, most images feature a single face. The more detected faces, the fewer images.
Here are a few face detection results:
Keep in mind that the algorithm is not foolproof!
References
- To download images:
download_steam_banners.ipynb
inwoctezuma/google-colab
- To filter out duplicates, etc.:
- for PNG logos:
remove_duplicates.ipynb
inwoctezuma/google-colab
- for JPG banners:
remove_duplicates.ipynb
inwoctezuma/steam-stylegan2-ada
- for PNG logos:
- Python packages for face detection:
- Data stored on Google Drive:
- filtered images:
woctezuma/download-steam-banners-data
- filtered images, with less aggressive filters:
woctezuma/steam-filtered-image-data
- the Steam-OneFace dataset:
Steam-OneFace
- filtered images: