# MT Photos InsightFace API

MT Photos InsightFace API is an unofficial Docker image that runs InsightFace models to provide face detection and feature extraction to the MT Photos self-hosted media app, with the default buffalo_l model pre-baked. It is open source and self-hosted, installable on Docker Hub and Unraid.

Canonical page: https://ourlocalhost.com/app/1316/mt-photos-insightface-api

## Description

MT Photos InsightFace API is an unofficial Docker image that runs InsightFace models to provide face detection and feature extraction to the MT Photos self-hosted media app, with the default buffalo_l model pre-baked in the image.

## Platform availability

Available on 1 of 9 platforms: Unraid.

## Health score

40/100 (Fair), based on 3 of 4 factors.
- Maintained: 63 (last commit 123 days ago)
- Popular: 20 (9 GitHub stars)
- Easy to install: 20 (1 install platform, Docker image)

## Links

- GitHub: https://github.com/dev-fox-101/mt-photos-insightface-unofficial
- Documentation: https://mtmt.tech/docs/ai/mac
- Docker Hub: https://hub.docker.com/r/devfox101/mt-photos-insightface-unofficial
- Unraid: https://ca.unraid.net/apps/mtphotos-insightface-api-0yrqurj0q78v6r?q=mtphotos-insightface-api

## Common questions

### Where are the recognized face results stored if I back up only this container?

MT Photos saves the recognition results in its own database; this API only returns detected people data to the MT Photos server. So backing up only the InsightFace container will not preserve the face recognition data.

### Does the container need internet access to download the InsightFace model?

No, the image already bundles the default buffalo_l model files. This is included to avoid model download failures caused by network issues.

### What hardware acceleration options does the face API support?

It supports Intel iGPU acceleration using OpenVINO, NVIDIA GPU acceleration using CUDA images, and RKNN NPU acceleration. Choose the image or acceleration mode that matches your hardware.

### Can I run this API on a separate computer and later switch back to the NAS?

Yes, install the API on a faster machine and point MT Photos at its IP and actual API port for the first full scan. After all photos are processed, switch the interface address back to the NAS-mounted API, but only between endpoints using the same face recognition model.

### What thresholds should I set in MT Photos for this face API?

The documentation recommends a face confidence threshold of 0.65 and a face match difference threshold of 0.5. Enter these values in the MT Photos face recognition API settings.

---
Source: Our Local Host (https://ourlocalhost.com/app/1316/mt-photos-insightface-api), the self-hosted and open-source app directory.
