Face finder web app powered by DeepFace
Docker Hub: https://hub.docker.com/r/deniskrumko/deepface-finder
Features:
- Supports range of ML models to use (see DeepFace docs)
- Has nice desktop and mobile web UI 💅
- UI is translated to both English and Russian (can be configured)
- Supports many image formats (like
.heicfrom iPhones) - Uses AWS S3 (or compatible storages) as images/embeddings storage
- Works both on CPU/GPU
- You take a lot of photos (on your birthday party or any huge event)
- Preprocess files locally using provided scripts once. Read "How to prepare images" section
- Upload original/resized/embedding files to cloud storage (currently, only AWS S3 is supported)
- Run deepface-finder as a web server. Read "How to run service" section
- Upload 1 to 5 files (e.g. your selfies) and instantly find your photos 👌
This service needs some configuration and files processing before you can use it:
-
Clone deepface-finder repository
gh repo clone deniskrumko/deepface-finder
-
Create Python 3.12 virtual environment (I like virtualenv-wrapper with pyenv)
mkvirtualenv deepface-finder -p ~/.pyenv/versions/3.12.4/bin/python -
Prepare config file. See "Configuration" section bellow. For example, it will be
my_config.toml -
Locate directory with your photos, for example
photos/original -
First, run resizing script
PYTHONPATH=src py src/scripts/prepare_images.py \ --src photos/original \ --dst photos/resized
-
Second, run embedding script
PYTHONPATH=src py src/scripts/prepare_embeddings.py \ --src photos/original \ --dst photos/embeddings \ --config my_config.toml
-
And the last step, run uploading script
PYTHONPATH=src py src/scripts/upload_to_s3.py \ --config my_config.toml \ --original photos/original \ --resized photos/resized \ --embeddings photos/embeddings
-
That's it! Now you can run the service. See "How to run service" section
[ui]
language = "en" # en/ru supported
branding_title = "My Face Finder"
branding_image = "https://media1.tenor.com/m/x8v1oNUOmg4AAAAd/rickroll-roll.gif"
branding_text = """
<p>Welcome to <span class="highlight">My Face Finder</span></p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec dapibus nibh mollis viverra interdum. Donec tortor urna, fringilla quis mattis in, vehicula quis ipsum. Duis ut ligula nec massa pretium viverra. Duis tortor odio, finibus sit amet libero quis, sodales pulvinar quam<p>
"""
[deepface]
model_name = "Facenet"
detector_backend = "yolov8"
[s3]
region = "us-east-1"
endpoint = "YOUR_ENDPOINT"
key = "YOUR_ACCESS_KEY"
secret = "YOUR_SECRET_KEY"
[proxy]
url = "https://my-images-proxy.com/"
[images]
bucket = "deepface-images"
original = "my_birthday_party/original/"
resized = "my_birthday_party/resized/"
embeddings = "my_birthday_party/embeddings/"With this configuration UI will look like...
NOTE: See "CUDA support" section bellow to use CUDA-based Docker image.
-
Locally using virtual env:
PYTHONPATH=src APP_CONFIG=my_config.toml python3 -m uvicorn app.main:app --host 0.0.0.0 --port 8080
-
Using
docker-compose.ymlservices: deepface-finder: image: deniskrumko/deepface-finder:latest volumes: - ./my_config.toml:/config.toml:ro ports: - 8080:8080 -
Using Docker
docker run -p 8080:8080 -v ./my_config.toml:/config.toml deniskrumko/deepface-finder:latest
You can build your custom Docker image with preloaded model and detector backend. It will significantly speedup processing because typically model/detector are loaded only after first request to deepface-finder.
Example Dockerfile with build args:
FROM deniskrumko/deepface-finder:latest
# Preload models
ARG model_name
ARG detector_backend
RUN python3 -m scripts.prepare_models --model-name ${model_name} --detector-backend ${detector_backend}Then run:
docker build -t deepface-finder:facenet-yolov8 . \
--build-arg model_name=Facenet \
--build-arg detector_backend=yolov8There is a separate Dockerfile that uses CUDA versions of Torch and TorchVision.
Currently there is no CUDA image in DockerHub due to Github Actions CPU/RAM limitations. Best way to use CUDA image is to clone this repository and build own image. Sorry for inconveniences...
- Powered by Python 3.12, FastAPI and Jinja2
- DeepFace library
- Fonts/icons from Google fonts


