Skip to content

Facial recognition not working #17725

Description

@HipyCas

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

Since beginning with Immich (quite a long time ago) everything has worked without flaw, including facial recognition. Suddenly, I realized that since around January 22nd 2025, facial recognition stopped working. That didn't prevent manually adding faces when the feature was introduced, but for some reason it does not automatically recognize them neither for new nor old assets.

After looking into the logs, I thought that the problem might be with the upload & the metadata from the phone & tablet, but there are some photos uploaded through the web manually that did not get facial recognition either way.

The logs pasted look to me like they may be related, but I am not 100% sure of that. They are from the server container, the machine learning container does not output any logs other than the startup ones (which look like the server restarted this night, which may make sense as we have Watchtower configured for automatic updates).

(Even thought we have automatic updates with Watchtower, every morning I manually check the releases page if there has been an update to fix any possible breaking changes or similar)

The OS that Immich Server is running on

Debian

Version of Immich Server

v1.131.3

Version of Immich Mobile App

v1.131.1

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

immich-server:
    image: ghcr.io/immich-app/immich-server:release
    container_name: immich-server
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    environment:
      - NODE_ENV=production
      - DB_USERNAME=${DB_USERNAME:?immich server db username not set}
      - DB_PASSWORD=${DB_PASSWORD:?immich server db password not set}
      - DB_DATABASE_NAME=${DB_DATABASE_NAME:?server db name not set}
      - JWT_SECRET=${JWT_SECRET}
      - ENABLE_MAPBOX=${ENABLE_MAPBOX}
      - MAPBOX_KEY=${MAPBOX_KEY}
      - IMMICH_TELEMETRY_INCLUDE=all
    depends_on:
      - immich-redis
      - immich-database
    env_file:
      - .env
      - .immich.env
    ports:
      - ____:2283
      - ____:8081
      - ____:8082
    restart: unless-stopped
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

  immich-machine-learning:
    image: ghcr.io/immich-app/immich-machine-learning:release
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /____:/cache
    environment:
      - NODE_ENV=production
    env_file:
      - .env
      - .immich.env
    expose:
      - 3003
    restart: unless-stopped

  immich-redis:
    container_name: immich_redis
    image: redis:6.2
    healthcheck:
      test: redis-cli ping || exit 1
    restart: unless-stopped
    mem_limit: 2G
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

  immich-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}
      PG_DATA: /var/lib/postgresql/data
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    healthcheck:
      test: pg_isready --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
      interval: 5m
      start_interval: 30s
      start_period: 5m
    restart: unless-stopped
    command: ["postgres", "-c" ,"shared_preload_libraries=vectors.so", "-c", 'search_path="$$user", public, vectors', "-c", "logging_collector=on", "-c", "max_wal_size=2GB", "-c", "shared_buffers=512MB", "-c", "wal_compression=on"]
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

Your .env content

DB_HOSTNAME=immich_postgres
DB_USERNAME=____
DB_PASSWORD=____
DB_DATABASE_NAME=____

REDIS_HOSTNAME=immich_redis

UPLOAD_LOCATION=____

LOG_LEVEL=verbose

JWT_SECRET=____

ENABLE_MAPBOX=true
MAPBOX_KEY=____

TYPESENSE_API_KEY=____
# TYPESENSE_ENABLED=true

DISABLE_REVERSE_GEOCODING=false
REVERSE_GEOCODING_PRECISION=3

# IMMICH_WEB_URL=http://immich-web:3000
# IMMICH_SERVER_URL=http://immich-server:3001
# IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003

Reproduction steps

There is no specific reproduction steps sadly, simply happened after updating.

Relevant log output

Error: Asset 1da55e59-0a0a-4c9a-8f6c-2b240d7e30bf dimensions are unknown
immich-server  |     at PersonService.getInputDimensions (/usr/src/app/dist/services/person.service.js:520:19)
immich-server  |     at PersonService.handleGeneratePersonThumbnail (/usr/src/app/dist/services/person.service.js:445:57)
immich-server  |     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
immich-server  | [Nest] 7  - 04/20/2025, 12:00:35 AM   ERROR [Microservices:{"id":"0bfbf32d-37f3-4908-8933-ecd94fe35b1a"}] Unable to run job handler (thumbnailGeneration/generate-person-thumbnail): Error: Asset 369f39d8-00e1-44fc-9576-cc00f32c9f4f dimensions are unknown

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions