Facial Recognition - PersonService Face Not Found #2640

Closed
opened 2026-02-05 06:27:51 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @werkkrew on GitHub (Mar 21, 2024).

The bug

When the facial recognition job runs on my system the immich microservices container log is filled with many of the following message:

[Nest] 7  - 03/21/2024, 8:43:02 AM    WARN [PersonService] Face bbb4f29a-8e64-4f2f-9c06-5740aff6787d not found
[Nest] 7  - 03/21/2024, 8:43:02 AM    WARN [PersonService] Face a4686cab-9fbb-4eb6-a728-c9364b98af5e not found
[Nest] 7  - 03/21/2024, 8:43:02 AM    WARN [PersonService] Face 6de33bee-944c-4fe8-98d2-eb1c3cfdeaf4 not found
[Nest] 7  - 03/21/2024, 8:43:03 AM    WARN [PersonService] Face 9a7099aa-09c2-47d9-b61b-afe658da8ee8 not found

The OS that Immich Server is running on

Unraid 6.12.8

Version of Immich Server

1.99.0

Version of Immich Mobile App

1.99.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: '3.8'

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: ['start.sh', 'immich']
    user: 99:100
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    command: ['start.sh', 'microservices']
    user: 99:100
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5
    restart: always

  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

  backup:
    container_name: immich_db_dumper
    image: prodrigestivill/postgres-backup-local
    env_file:
      - .env
    environment:
      POSTGRES_HOST: database
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      SCHEDULE: "@daily"
      BACKUP_DIR: /db_dumps
    user: 99:100
    volumes:
      - ${BACKUP_LOCATION}:/db_dumps
    depends_on:
      - database

volumes:
  pgdata:
  model-cache:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
TZ=America/New_York

# The location where your uploaded files are stored
UPLOAD_LOCATION=/mnt/user/data/media/immich
BACKUP_LOCATION=/mnt/user/appdata/immich/backups

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=xxxxxxxxx

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. Have facial recognition enabled and working
2. Go through correcting incorrect matches and hide people you don't care about in the Web UI

These are the only activities I have done with respect to facial recognition. No outside tools or api calls, no manual mucking around in the database or filesystem. Default facial recognition model, never changed it.

I did spend a lot of time going through faces in the gui and I would correct / merge people and hide people but I didn't do anything that the gui did not directly support me doing.

Additional information

This is a relatively fresh install, over 40,000 images ~ 500gb of photos.

Originally created by @werkkrew on GitHub (Mar 21, 2024). ### The bug When the facial recognition job runs on my system the immich microservices container log is filled with many of the following message: ``` [Nest] 7 - 03/21/2024, 8:43:02 AM WARN [PersonService] Face bbb4f29a-8e64-4f2f-9c06-5740aff6787d not found [Nest] 7 - 03/21/2024, 8:43:02 AM WARN [PersonService] Face a4686cab-9fbb-4eb6-a728-c9364b98af5e not found [Nest] 7 - 03/21/2024, 8:43:02 AM WARN [PersonService] Face 6de33bee-944c-4fe8-98d2-eb1c3cfdeaf4 not found [Nest] 7 - 03/21/2024, 8:43:03 AM WARN [PersonService] Face 9a7099aa-09c2-47d9-b61b-afe658da8ee8 not found ``` ### The OS that Immich Server is running on Unraid 6.12.8 ### Version of Immich Server 1.99.0 ### Version of Immich Mobile App 1.99.0 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML version: '3.8' # # WARNING: Make sure to use the docker-compose.yml of the current release: # # https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml # # The compose file on main may not be compatible with the latest release. # name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: ['start.sh', 'immich'] user: 99:100 volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - .env ports: - 2283:3001 depends_on: - redis - database restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding # file: hwaccel.transcoding.yml # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding command: ['start.sh', 'microservices'] user: 99:100 volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - .env depends_on: - redis - database restart: always immich-machine-learning: container_name: immich_machine_learning # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag. # Example tag: ${IMMICH_VERSION:-release}-cuda image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration # file: hwaccel.ml.yml # service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable volumes: - model-cache:/cache env_file: - .env restart: always redis: container_name: immich_redis image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5 restart: always database: container_name: immich_postgres image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always backup: container_name: immich_db_dumper image: prodrigestivill/postgres-backup-local env_file: - .env environment: POSTGRES_HOST: database POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_USER: ${DB_USERNAME} POSTGRES_PASSWORD: ${DB_PASSWORD} SCHEDULE: "@daily" BACKUP_DIR: /db_dumps user: 99:100 volumes: - ${BACKUP_LOCATION}:/db_dumps depends_on: - database volumes: pgdata: model-cache: ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables TZ=America/New_York # The location where your uploaded files are stored UPLOAD_LOCATION=/mnt/user/data/media/immich BACKUP_LOCATION=/mnt/user/appdata/immich/backups # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secret for postgres. You should change it to a random password DB_PASSWORD=xxxxxxxxx # The values below this line do not need to be changed ################################################################################### DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis ``` ### Reproduction steps ```bash 1. Have facial recognition enabled and working 2. Go through correcting incorrect matches and hide people you don't care about in the Web UI These are the only activities I have done with respect to facial recognition. No outside tools or api calls, no manual mucking around in the database or filesystem. Default facial recognition model, never changed it. I did spend a lot of time going through faces in the gui and I would correct / merge people and hide people but I didn't do anything that the gui did not directly support me doing. ``` ### Additional information This is a relatively fresh install, over 40,000 images ~ 500gb of photos.
Author
Owner

@aviv926 commented on GitHub (Mar 26, 2024):

I've actually never come across this, I think it happens when correcting incorrect matches

@mertalev Do you think this is a bug? I have never encountered such a problem.

@aviv926 commented on GitHub (Mar 26, 2024): I've actually never come across this, I think it happens when correcting incorrect matches @mertalev Do you think this is a bug? I have never encountered such a problem.
Author
Owner

@mertalev commented on GitHub (Apr 1, 2024):

I don't think merging people would cause this since it wouldn't get rid of the face itself.

The error specifically means that when fetching the face, it either didn't find any face, or the face it found wasn't associated with any non-deleted asset. I think this would mainly happen for trashed assets that haven't been permanently deleted yet: they'd still be in the DB so the faces associated with them wouldn't be deleted, but the query wouldn't fetch them since it excludes trashed assets.

@mertalev commented on GitHub (Apr 1, 2024): I don't think merging people would cause this since it wouldn't get rid of the face itself. The error specifically means that when fetching the face, it either didn't find any face, or the face it found wasn't associated with any non-deleted asset. I think this would mainly happen for trashed assets that haven't been permanently deleted yet: they'd still be in the DB so the faces associated with them wouldn't be deleted, but the query wouldn't fetch them since it excludes trashed assets.
Author
Owner

@mertalev commented on GitHub (Apr 1, 2024):

Closing since I don't think this is a bug.

@mertalev commented on GitHub (Apr 1, 2024): Closing since I don't think this is a bug.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2640