Skip to content
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

Persons: Wrong images appear while scanning and processing external library #17168

Open
2 of 4 tasks
Micha10 opened this issue Mar 27, 2025 · 14 comments
Open
2 of 4 tasks

Comments

@Micha10
Copy link

Micha10 commented Mar 27, 2025

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

  • Yes

The bug

While jobs are running (GENERATE THUMBNAILS, EXTRACT METADATA, FACE DETECTION, FACIAL RECOGNITION) go to immich/people and select a random person. Now you see the images as before, but

here is the bug:
new pictures which have nothing to do with the person suddenly appears as they are scanned by the background jobs.
If you refresh the page, they are gone - so you see the correct ones - and immediately the new scanned photos appear.

The OS that Immich Server is running on

Synology DS915

Version of Immich Server

1.130.2

Version of Immich Mobile App

--

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

# N A S  N A S  N A S  N A S  N A S  N A S  
#
# 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}
    volumes:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      # - mein-share2:/mnt/nas:ro
      - "/volume1/photo:/mnt/nas:ro"

        
    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}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cuda # 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
    ports:
      - 3003:3003
    healthcheck:
      disable: false
  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:148bb5411c184abd288d9aaed139c98123eeb8824c5d3fce03cf721db58066d8
    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:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/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
  pgadmin:
      image: dpage/pgadmin4
      container_name: pgadmin4_container
      restart: always
      ports:
        - "8888:80"
      environment:
        PGADMIN_DEFAULT_EMAIL: xxx
        PGADMIN_DEFAULT_PASSWORD: xxx
      volumes:
        - pgadmin-data:/var/lib/pgadmin

volumes:
  pgadmin-data:

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=./library
# The location where your database files are stored
DB_DATA_LOCATION=./postgres

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
# TZ=Etc/UTC

# 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
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=xxx

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=xxx
DB_DATABASE_NAME=xxx
POSTGRES_PASSWORD=xxx
NVIDIA_VISIBLE_DEVICES=all

Reproduction steps

  1. start background processing i.e on a new added external library
  2. open Web-immich
  3. go to people
  4. select a random person...
  5. you see the correct person-images, but immediately new scanned images which have nothing to do with the person - even scenery images - appear.

Relevant log output

Additional information

No response

@alextran1502
Copy link
Contributor

Can you somehow explain the bug clearer? I don’t follow. Perhaps screenshot or screen capture would be better

@Micha10
Copy link
Author

Micha10 commented Mar 27, 2025

The second row are the right pictures. These show the selected person.
Meanwhile the background-process is indexing images from 2016. These are shown in the current person-page but the images does not have anything to do with the person. After a few minutes, there are hundred images shown on that page, but the images are just processed by the backgroundjob but have nothing to do with the person

After a refresh (f5) these images are gone but immediately new indexed ones appear

Image

Timeline.1.mp4

In the video you can see that under water pictures appear. If you go to another person the same occurs with the new indexed images. This happens with all people-assets

I didn't noticed this in version 1.129

@Micha10
Copy link
Author

Micha10 commented Mar 27, 2025

If this is important:
Since my NAS is slow, i'm using docker on my windows machine with the immich_machine_learning image. In the (NAS) settings I'm using the ip of my win-pc to use it for faster processing

Image

@alextran1502
Copy link
Contributor

alextran1502 commented Mar 27, 2025

Thank you! Just to confirm, did you also pull new machine-learning images that run on a remote device?

Are those images come from external libraries?

@Micha10
Copy link
Author

Micha10 commented Mar 27, 2025

I'll immediately check the version of the machine_learning image
Yes, all images are just from external libaries

@Micha10
Copy link
Author

Micha10 commented Mar 27, 2025

Yes the image was not the latest version. I've updated it but the bug is still present.

After a while (! 2 minutes) the red bordered images appears. These are for sure no faces. And after F5-refresh they vanishes

Image

This happens to all open browser tabs (route people). So if you open 10 tabs with different people, the same wrong images are shown in each tab in addition to the correct faces

@alextran1502
Copy link
Contributor

If you click on those photos that wrongly appear, do you see any face data in them in the detail panel?

@joe128
Copy link

joe128 commented Mar 27, 2025

i am noticed the Same behaviour in the Album View.

@Micha10
Copy link
Author

Micha10 commented Mar 27, 2025

I can click on them an they are displayed normally. There are no people on that images.

Image

I've seen some wrongly displayed images with faces, too, but at that moment when they are added they have no recognized face on it. I think, they are displayed immediately when scanned but they are put later on the machine-learning-list.

Some images just have the (+) icon and some have additionally the pen/edit-icon. Every person is "unassigned"

@Micha10
Copy link
Author

Micha10 commented Mar 27, 2025

i am noticed the Same behaviour in the Album View.

Until now I haven't had any album, but now I created one and I can confirm that I can see new images appear on the new album as I've seen them in the person view

@alextran1502
Copy link
Contributor

@Micha10 Thanks, do you know if there is any scan job running while that happens?

@Micha10
Copy link
Author

Micha10 commented Mar 27, 2025

@Micha10 Thanks, do you know if there is any scan job running while that happens?

Yes of course. That is what I meant with "running background job". There are jobs that scans the external library and generating thumbnails, extracting meta data and so on

If I stop that jobs the described issue does not happen

@alextran1502
Copy link
Contributor

Ah I think I know what happened, the timeline was configured to react to new assets uploaded, hence it just show those assets on any view. We will open a fix for this

@Micha10
Copy link
Author

Micha10 commented Mar 27, 2025

Ah I think I know what happened, the timeline was configured to react to new assets uploaded, hence it just show those assets on any view. We will open a fix for this

Every day a new version ;-) BTW. Thank you all so much for immich. It's fun working with it. Great UI. Great features. I love it.

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

3 participants