Skip to content

Wrong face thumbnails with NEF files #17851

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 of 4 tasks
ixengts opened this issue Apr 24, 2025 · 0 comments
Open
3 of 4 tasks

Wrong face thumbnails with NEF files #17851

ixengts opened this issue Apr 24, 2025 · 0 comments

Comments

@ixengts
Copy link

ixengts commented Apr 24, 2025

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

  • Yes

The bug

Yesterday I have created a new external library (on v1.131.3) and scanned ~50k photos (mix of jpg, tiff and nef files). For a lot of detected people I see some random part of the image as their face - usually some part of the background.
Similar thing happen when I change the face with "Select featured photo" and select any NEF file. The face thumbnail is replaced with some random part of image. When I select jpg file instead - the face is updated properly.

The problem applies to all NEF files that I have. There is no issue with jpg files.

I've also tested the behavior on v1.132.0 and the same thing happens.

As I can't attach a sample nef file here, it can be downloaded here - it's only a painting, but works quite well with face detection.

Bug seems to be closely related to #13049

The OS that Immich Server is running on

Debian 12

Version of Immich Server

v1.132.0

Version of Immich Mobile App

irrelevant

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    extends:
      file: hwaccel.transcoding.yml
      service: nvenc
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - ${EXTERNAL_PATH_PHOTOS}:/usr/src/app/external/photos
      - ${EXTERNAL_PATH_MOVIES}:/usr/src/app/external/movies
    env_file:
      - .env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

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

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:8-bookworm@sha256:42cba146593a5ea9a622002c1b7cba5da7be248650cbb64ecb9c6c33d29794b1
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:739cdd626151ff1f796dc95a6591b55a714f341c737e27f045019ceabf8e8c52
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      - ./data/pgsql:/var/lib/postgresql/data
    healthcheck:
      test: >-
        pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1; Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --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
    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
    restart: always

  nginx:
    image: nginx:latest
    ports:
      - "8283:8000"
    volumes:
      - ./data/nginx/nginx.conf:/etc/nginx/nginx.conf

Your .env content

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

# The location where your uploaded files are stored
UPLOAD_LOCATION=./data/library

# 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=<redacted>

# 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

EXTERNAL_PATH_PHOTOS=/mnt/media/zdjecia
EXTERNAL_PATH_MOVIES=/mnt/media/rodzinne/filmy

Reproduction steps

  1. Scan external library containing nef files with various faces.
  2. Proceed with face detection.
  3. Watch people thumbnails does not contain faces.

or

  1. In properly scanned external library - select one of the people.
  2. Choose "Select featured photo" and select any of the NEF images.
  3. Observe that the thumbnail is updated to a random part of picture.

Relevant log output

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant