Incorrect persons displayed for images with similar filenames #4327

Closed
opened 2026-02-05 10:09:00 +03:00 by OVERLORD · 8 comments
Owner

Originally created by @yuks on GitHub (Sep 14, 2024).

The bug

When opening an image in Immich, incorrect persons are displayed. This issue does not occur with every image but appears to be linked to images whose filenames begin with the same string. Specifically, the incorrect persons displayed belong to another image that has a similar filename.

For example, in my Immich library, I have IMG_6952_1.JPG and IMG_6952.HEIC. The image IMG_6952_1.JPG was added first, and IMG_6952.HEIC was added a couple of months later. Now, I see the persons from IMG_6952_1.JPG shown for IMG_6952.HEIC. I am using only external libraries, so I am unsure if this issue also occurs with internal libraries.

I have attached an example screenshot to illustrate the issue. I have many images like this.

Thank you for creating such a nice project!

immich-bug

The OS that Immich Server is running on

Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-119-generic x86_64)

Version of Immich Server

v1.115.0

Version of Immich Mobile App

v1.115.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    ports:
      - 2283:3001
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /media/hddusb1/filebrowser/data/Photos:/media/hddusb1/filebrowser/data/Photos:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always
  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always
  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - ${PG_DATA_LOCATION}:/var/lib/postgresql/data
    restart: always
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

# The location where your uploaded files are stored
UPLOAD_LOCATION=/media/hddusb1/immich/uploads
PG_DATA_LOCATION=/home/xxx/immich/pgdata

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

# Connection secrets for postgres and typesense. You should change these to random passwords
TYPESENSE_API_KEY=XXX
DB_PASSWORD=XXX

# 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. Add an image with a filename like IMG_6952_1.JPG to an external library in Immich.
  2. Wait until all processing, including face recognition, is complete.
  3. Add another image with a similar filename, such as IMG_6952.HEIC, to the same external library.
  4. Open the second image (IMG_6952.HEIC) in Immich.
  5. Observe that the persons displayed are from the first image (IMG_6952_1.JPG).

Relevant log output

No response

Additional information

No response

Originally created by @yuks on GitHub (Sep 14, 2024). ### The bug When opening an image in Immich, incorrect persons are displayed. This issue does not occur with every image but appears to be linked to images whose filenames begin with the same string. Specifically, the incorrect persons displayed belong to another image that has a similar filename. For example, in my Immich library, I have `IMG_6952_1.JPG` and `IMG_6952.HEIC`. The image `IMG_6952_1.JPG` was added first, and `IMG_6952.HEIC` was added a couple of months later. Now, I see the persons from `IMG_6952_1.JPG` shown for `IMG_6952.HEIC`. I am using only external libraries, so I am unsure if this issue also occurs with internal libraries. I have attached an example screenshot to illustrate the issue. I have many images like this. Thank you for creating such a nice project! ![immich-bug](https://github.com/user-attachments/assets/fe09e3b1-62c5-4f05-ac1f-969b949f7771) ### The OS that Immich Server is running on Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-119-generic x86_64) ### Version of Immich Server v1.115.0 ### Version of Immich Mobile App v1.115.0 ### Platform with the issue - [X] Server - [X] Web - [X] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} ports: - 2283:3001 volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /media/hddusb1/filebrowser/data/Photos:/media/hddusb1/filebrowser/data/Photos:ro env_file: - .env depends_on: - redis - database restart: always immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - model-cache:/cache env_file: - .env restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 restart: always database: container_name: immich_postgres image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - ${PG_DATA_LOCATION}:/var/lib/postgresql/data restart: always 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 # The location where your uploaded files are stored UPLOAD_LOCATION=/media/hddusb1/immich/uploads PG_DATA_LOCATION=/home/xxx/immich/pgdata # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secrets for postgres and typesense. You should change these to random passwords TYPESENSE_API_KEY=XXX DB_PASSWORD=XXX # 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. Add an image with a filename like IMG_6952_1.JPG to an external library in Immich. 2. Wait until all processing, including face recognition, is complete. 3. Add another image with a similar filename, such as IMG_6952.HEIC, to the same external library. 4. Open the second image (IMG_6952.HEIC) in Immich. 5. Observe that the persons displayed are from the first image (IMG_6952_1.JPG). ### Relevant log output _No response_ ### Additional information _No response_
Author
Owner

@bo0tzz commented on GitHub (Sep 14, 2024):

For both of those assets, can you replace /photos/ in the url with /api/assets/ and post the JSON responses you get?

@bo0tzz commented on GitHub (Sep 14, 2024): For both of those assets, can you replace `/photos/` in the url with `/api/assets/` and post the JSON responses you get?
Author
Owner

@yuks commented on GitHub (Sep 14, 2024):

For both of those assets, can you replace /photos/ in the url with /api/assets/ and post the JSON responses you get?

Response for IMG_6952_1.JPG:

{
   "id":"e595c4d6-03fc-48ac-a758-a07af47f7049",
   "deviceAssetId":"IMG_6952_1.JPG",
   "ownerId":"959529f5-3f2b-423e-878f-9a6ca43cf29e",
   "owner":{
      "id":"959529f5-3f2b-423e-878f-9a6ca43cf29e",
      "email":"xxx@xxx.com",
      "name":"XXX",
      "profileImagePath":"",
      "avatarColor":"yellow"
   },
   "deviceId":"Library Import",
   "libraryId":"2ab4abcc-1a5c-457f-93f8-593a7f559b4d",
   "type":"IMAGE",
   "originalPath":"/media/hddusb1/filebrowser/data/Photos/31-07-2021-iphone-7-plus/Yuks (2)/Zuletzt/3/1/IMG_6952_1.JPG",
   "originalFileName":"IMG_6952_1.JPG",
   "originalMimeType":"image/jpeg",
   "thumbhash":"YQgKDQK3hn+XlniHh4iYiJmfc/M5",
   "fileCreatedAt":"2018-10-02T16:44:02.586Z",
   "fileModifiedAt":"2021-07-31T07:42:34.133Z",
   "localDateTime":"2018-10-02T18:44:02.586Z",
   "updatedAt":"2024-06-21T16:32:34.191Z",
   "isFavorite":false,
   "isArchived":false,
   "isTrashed":false,
   "duration":"0:00:00.00000",
   "exifInfo":{
      "make":"Apple",
      "model":"iPhone 7 Plus",
      "exifImageWidth":4032,
      "exifImageHeight":3024,
      "fileSizeInByte":2824522,
      "orientation":"6",
      "dateTimeOriginal":"2018-10-02T16:44:02.586Z",
      "modifyDate":"2018-10-02T16:44:02.000Z",
      "timeZone":"Europe/Rome",
      "lensModel":"iPhone 7 Plus back dual camera 3.99mm f/1.8",
      "fNumber":1.8,
      "focalLength":3.99,
      "iso":32,
      "exposureTime":"1/33",
      "latitude":41.8953222222222,
      "longitude":12.4834583333333,
      "city":"Rome",
      "state":"Città metropolitana di Roma Capitale, Lazio",
      "country":"Italy",
      "description":"",
      "projectionType":null,
      "rating":null
   },
   "smartInfo":{
      "tags":[
         
      ],
      "objects":null
   },
   "livePhotoVideoId":null,
   "tags":[
      
   ],
   "people":[
      {
         "id":"1d3f47d3-9c09-479c-98b3-668949b93a35",
         "name":"",
         "birthDate":null,
         "thumbnailPath":"upload/thumbs/959529f5-3f2b-423e-878f-9a6ca43cf29e/1d/3f/1d3f47d3-9c09-479c-98b3-668949b93a35.jpeg",
         "isHidden":false,
         "updatedAt":"2024-02-20T21:53:26.544Z",
         "faces":[
            {
               "id":"687c83f2-6990-4349-9da6-0acc36f63dad",
               "imageHeight":1920,
               "imageWidth":1440,
               "boundingBoxX1":584,
               "boundingBoxX2":806,
               "boundingBoxY1":942,
               "boundingBoxY2":1223,
               "sourceType":"machine-learning"
            }
         ]
      },
      {
         "id":"7d50f643-aeef-4812-9e1e-2a57c6cbac29",
         "name":"",
         "birthDate":null,
         "thumbnailPath":"upload/thumbs/959529f5-3f2b-423e-878f-9a6ca43cf29e/7d/50/7d50f643-aeef-4812-9e1e-2a57c6cbac29.jpeg",
         "isHidden":false,
         "updatedAt":"2024-02-21T09:54:19.603Z",
         "faces":[
            {
               "id":"fb42a8a0-d360-4a05-8494-81e41be6af91",
               "imageHeight":1920,
               "imageWidth":1440,
               "boundingBoxX1":770,
               "boundingBoxX2":846,
               "boundingBoxY1":160,
               "boundingBoxY2":272,
               "sourceType":"machine-learning"
            }
         ]
      }
   ],
   "unassignedFaces":[
      
   ],
   "checksum":"mb7jWbj5CJ4Ll+cYBfF14tHEUwI=",
   "stack":null,
   "isOffline":false,
   "hasMetadata":true,
   "duplicateId":null,
   "resized":true
}

Response for IMG_6952.HEIC:

{
   "id":"2f2404d8-36ec-475a-ac73-8db14b4e5ac0",
   "deviceAssetId":"IMG_6952.HEIC",
   "ownerId":"959529f5-3f2b-423e-878f-9a6ca43cf29e",
   "owner":{
      "id":"959529f5-3f2b-423e-878f-9a6ca43cf29e",
      "email":"xxx@xxx.com",
      "name":"XXX",
      "profileImagePath":"",
      "avatarColor":"yellow"
   },
   "deviceId":"Library Import",
   "libraryId":"2ab4abcc-1a5c-457f-93f8-593a7f559b4d",
   "type":"IMAGE",
   "originalPath":"/media/hddusb1/filebrowser/data/Photos/photosync-iphone/yuks/Zuletzt/IMG_6952.HEIC",
   "originalFileName":"IMG_6952.HEIC",
   "originalMimeType":"image/heic",
   "thumbhash":"XggKHQQ2dlpn95fHapdnaJiAdQlI",
   "fileCreatedAt":"2024-08-30T10:39:12.961Z",
   "fileModifiedAt":"2024-08-30T10:39:12.000Z",
   "localDateTime":"2024-08-30T13:39:12.961Z",
   "updatedAt":"2024-09-07T09:04:00.229Z",
   "isFavorite":false,
   "isArchived":false,
   "isTrashed":false,
   "duration":"0:00:00.00000",
   "exifInfo":{
      "make":"Apple",
      "model":"iPhone 14 Pro",
      "exifImageWidth":4032,
      "exifImageHeight":3024,
      "fileSizeInByte":3917714,
      "orientation":"6",
      "dateTimeOriginal":"2024-08-30T10:39:12.961Z",
      "modifyDate":"2024-08-30T10:39:12.000Z",
      "timeZone":"UTC+3",
      "lensModel":"iPhone 14 Pro back triple camera 6.86mm f/1.78",
      "fNumber":1.8,
      "focalLength":6.86,
      "iso":80,
      "exposureTime":"1/1949",
      "latitude":44.1026833333333,
      "longitude":27.2576138888889,
      "city":"Silistra",
      "state":"Silistra",
      "country":"Bulgaria",
      "description":"",
      "projectionType":null,
      "rating":null
   },
   "smartInfo":{
      "tags":[
         
      ],
      "objects":null
   },
   "livePhotoVideoId":null,
   "tags":[
      
   ],
   "people":[
      {
         "id":"1d3f47d3-9c09-479c-98b3-668949b93a35",
         "name":"",
         "birthDate":null,
         "thumbnailPath":"upload/thumbs/959529f5-3f2b-423e-878f-9a6ca43cf29e/1d/3f/1d3f47d3-9c09-479c-98b3-668949b93a35.jpeg",
         "isHidden":false,
         "updatedAt":"2024-02-20T21:53:26.544Z",
         "faces":[
            {
               "id":"61d5a831-2e8f-4bee-bf12-e35351372cdd",
               "imageHeight":1920,
               "imageWidth":1440,
               "boundingBoxX1":584,
               "boundingBoxX2":806,
               "boundingBoxY1":943,
               "boundingBoxY2":1223,
               "sourceType":"machine-learning"
            }
         ]
      },
      {
         "id":"7d50f643-aeef-4812-9e1e-2a57c6cbac29",
         "name":"",
         "birthDate":null,
         "thumbnailPath":"upload/thumbs/959529f5-3f2b-423e-878f-9a6ca43cf29e/7d/50/7d50f643-aeef-4812-9e1e-2a57c6cbac29.jpeg",
         "isHidden":false,
         "updatedAt":"2024-02-21T09:54:19.603Z",
         "faces":[
            {
               "id":"66c38aa6-c355-4ff3-ae78-bbd5aee566fe",
               "imageHeight":1920,
               "imageWidth":1440,
               "boundingBoxX1":769,
               "boundingBoxX2":846,
               "boundingBoxY1":160,
               "boundingBoxY2":273,
               "sourceType":"machine-learning"
            }
         ]
      }
   ],
   "unassignedFaces":[
      
   ],
   "checksum":"QKfDVxSbxUW/zl88CU5QLliMdks=",
   "stack":null,
   "isOffline":false,
   "hasMetadata":true,
   "duplicateId":null,
   "resized":true
}
@yuks commented on GitHub (Sep 14, 2024): > For both of those assets, can you replace `/photos/` in the url with `/api/assets/` and post the JSON responses you get? Response for IMG_6952_1.JPG: ``` { "id":"e595c4d6-03fc-48ac-a758-a07af47f7049", "deviceAssetId":"IMG_6952_1.JPG", "ownerId":"959529f5-3f2b-423e-878f-9a6ca43cf29e", "owner":{ "id":"959529f5-3f2b-423e-878f-9a6ca43cf29e", "email":"xxx@xxx.com", "name":"XXX", "profileImagePath":"", "avatarColor":"yellow" }, "deviceId":"Library Import", "libraryId":"2ab4abcc-1a5c-457f-93f8-593a7f559b4d", "type":"IMAGE", "originalPath":"/media/hddusb1/filebrowser/data/Photos/31-07-2021-iphone-7-plus/Yuks (2)/Zuletzt/3/1/IMG_6952_1.JPG", "originalFileName":"IMG_6952_1.JPG", "originalMimeType":"image/jpeg", "thumbhash":"YQgKDQK3hn+XlniHh4iYiJmfc/M5", "fileCreatedAt":"2018-10-02T16:44:02.586Z", "fileModifiedAt":"2021-07-31T07:42:34.133Z", "localDateTime":"2018-10-02T18:44:02.586Z", "updatedAt":"2024-06-21T16:32:34.191Z", "isFavorite":false, "isArchived":false, "isTrashed":false, "duration":"0:00:00.00000", "exifInfo":{ "make":"Apple", "model":"iPhone 7 Plus", "exifImageWidth":4032, "exifImageHeight":3024, "fileSizeInByte":2824522, "orientation":"6", "dateTimeOriginal":"2018-10-02T16:44:02.586Z", "modifyDate":"2018-10-02T16:44:02.000Z", "timeZone":"Europe/Rome", "lensModel":"iPhone 7 Plus back dual camera 3.99mm f/1.8", "fNumber":1.8, "focalLength":3.99, "iso":32, "exposureTime":"1/33", "latitude":41.8953222222222, "longitude":12.4834583333333, "city":"Rome", "state":"Città metropolitana di Roma Capitale, Lazio", "country":"Italy", "description":"", "projectionType":null, "rating":null }, "smartInfo":{ "tags":[ ], "objects":null }, "livePhotoVideoId":null, "tags":[ ], "people":[ { "id":"1d3f47d3-9c09-479c-98b3-668949b93a35", "name":"", "birthDate":null, "thumbnailPath":"upload/thumbs/959529f5-3f2b-423e-878f-9a6ca43cf29e/1d/3f/1d3f47d3-9c09-479c-98b3-668949b93a35.jpeg", "isHidden":false, "updatedAt":"2024-02-20T21:53:26.544Z", "faces":[ { "id":"687c83f2-6990-4349-9da6-0acc36f63dad", "imageHeight":1920, "imageWidth":1440, "boundingBoxX1":584, "boundingBoxX2":806, "boundingBoxY1":942, "boundingBoxY2":1223, "sourceType":"machine-learning" } ] }, { "id":"7d50f643-aeef-4812-9e1e-2a57c6cbac29", "name":"", "birthDate":null, "thumbnailPath":"upload/thumbs/959529f5-3f2b-423e-878f-9a6ca43cf29e/7d/50/7d50f643-aeef-4812-9e1e-2a57c6cbac29.jpeg", "isHidden":false, "updatedAt":"2024-02-21T09:54:19.603Z", "faces":[ { "id":"fb42a8a0-d360-4a05-8494-81e41be6af91", "imageHeight":1920, "imageWidth":1440, "boundingBoxX1":770, "boundingBoxX2":846, "boundingBoxY1":160, "boundingBoxY2":272, "sourceType":"machine-learning" } ] } ], "unassignedFaces":[ ], "checksum":"mb7jWbj5CJ4Ll+cYBfF14tHEUwI=", "stack":null, "isOffline":false, "hasMetadata":true, "duplicateId":null, "resized":true } ``` Response for IMG_6952.HEIC: ``` { "id":"2f2404d8-36ec-475a-ac73-8db14b4e5ac0", "deviceAssetId":"IMG_6952.HEIC", "ownerId":"959529f5-3f2b-423e-878f-9a6ca43cf29e", "owner":{ "id":"959529f5-3f2b-423e-878f-9a6ca43cf29e", "email":"xxx@xxx.com", "name":"XXX", "profileImagePath":"", "avatarColor":"yellow" }, "deviceId":"Library Import", "libraryId":"2ab4abcc-1a5c-457f-93f8-593a7f559b4d", "type":"IMAGE", "originalPath":"/media/hddusb1/filebrowser/data/Photos/photosync-iphone/yuks/Zuletzt/IMG_6952.HEIC", "originalFileName":"IMG_6952.HEIC", "originalMimeType":"image/heic", "thumbhash":"XggKHQQ2dlpn95fHapdnaJiAdQlI", "fileCreatedAt":"2024-08-30T10:39:12.961Z", "fileModifiedAt":"2024-08-30T10:39:12.000Z", "localDateTime":"2024-08-30T13:39:12.961Z", "updatedAt":"2024-09-07T09:04:00.229Z", "isFavorite":false, "isArchived":false, "isTrashed":false, "duration":"0:00:00.00000", "exifInfo":{ "make":"Apple", "model":"iPhone 14 Pro", "exifImageWidth":4032, "exifImageHeight":3024, "fileSizeInByte":3917714, "orientation":"6", "dateTimeOriginal":"2024-08-30T10:39:12.961Z", "modifyDate":"2024-08-30T10:39:12.000Z", "timeZone":"UTC+3", "lensModel":"iPhone 14 Pro back triple camera 6.86mm f/1.78", "fNumber":1.8, "focalLength":6.86, "iso":80, "exposureTime":"1/1949", "latitude":44.1026833333333, "longitude":27.2576138888889, "city":"Silistra", "state":"Silistra", "country":"Bulgaria", "description":"", "projectionType":null, "rating":null }, "smartInfo":{ "tags":[ ], "objects":null }, "livePhotoVideoId":null, "tags":[ ], "people":[ { "id":"1d3f47d3-9c09-479c-98b3-668949b93a35", "name":"", "birthDate":null, "thumbnailPath":"upload/thumbs/959529f5-3f2b-423e-878f-9a6ca43cf29e/1d/3f/1d3f47d3-9c09-479c-98b3-668949b93a35.jpeg", "isHidden":false, "updatedAt":"2024-02-20T21:53:26.544Z", "faces":[ { "id":"61d5a831-2e8f-4bee-bf12-e35351372cdd", "imageHeight":1920, "imageWidth":1440, "boundingBoxX1":584, "boundingBoxX2":806, "boundingBoxY1":943, "boundingBoxY2":1223, "sourceType":"machine-learning" } ] }, { "id":"7d50f643-aeef-4812-9e1e-2a57c6cbac29", "name":"", "birthDate":null, "thumbnailPath":"upload/thumbs/959529f5-3f2b-423e-878f-9a6ca43cf29e/7d/50/7d50f643-aeef-4812-9e1e-2a57c6cbac29.jpeg", "isHidden":false, "updatedAt":"2024-02-21T09:54:19.603Z", "faces":[ { "id":"66c38aa6-c355-4ff3-ae78-bbd5aee566fe", "imageHeight":1920, "imageWidth":1440, "boundingBoxX1":769, "boundingBoxX2":846, "boundingBoxY1":160, "boundingBoxY2":273, "sourceType":"machine-learning" } ] } ], "unassignedFaces":[ ], "checksum":"QKfDVxSbxUW/zl88CU5QLliMdks=", "stack":null, "isOffline":false, "hasMetadata":true, "duplicateId":null, "resized":true } ```
Author
Owner

@C-Otto commented on GitHub (Sep 21, 2024):

The face IDs are different and the bounding boxes are close, but not exactly the same. Based on this I think the face detection algorithm ran twice, possibly using the wrong input image once. Note that the people.updatedAt is identical, though.

@C-Otto commented on GitHub (Sep 21, 2024): The face IDs are different and the bounding boxes are close, but not exactly the same. Based on this I think the face detection algorithm ran twice, possibly using the wrong input image once. Note that the people.updatedAt is identical, though.
Author
Owner

@C-Otto commented on GitHub (Sep 21, 2024):

Do you know if this issue already existed when you ran the face detection job (20 Feb 2024)?

@C-Otto commented on GitHub (Sep 21, 2024): Do you know if this issue already existed when you ran the face detection job (20 Feb 2024)?
Author
Owner

@yuks commented on GitHub (Sep 21, 2024):

The issue only exists for newly added images. When I perform a full face detection, the images display the correct persons.

@yuks commented on GitHub (Sep 21, 2024): The issue only exists for newly added images. When I perform a full face detection, the images display the correct persons.
Author
Owner

@C-Otto commented on GitHub (Sep 21, 2024):

I can't reproduce this. I converted one JPEG photo of me to HEIC (same file name otherwise) and replaced my face with a red box. There's no detected face in the HEIC version of the file. Furthermore, I checked the code. The facial detection is based on the preview image, which included the asset ID at least since 2022. Did you change anything about how preview images ("*-preview.jpg" in the most recent version) are stored?

@C-Otto commented on GitHub (Sep 21, 2024): I can't reproduce this. I converted one JPEG photo of me to HEIC (same file name otherwise) and replaced my face with a red box. There's no detected face in the HEIC version of the file. Furthermore, I checked the code. The facial detection is based on the preview image, which included the asset ID at least since 2022. Did you change anything about how preview images ("*-preview.jpg" in the most recent version) are stored?
Author
Owner

@C-Otto commented on GitHub (Sep 21, 2024):

There's a log message that might help:

this.logger.debug(`${faces.length} faces detected in ${previewFile.path}`);

This is in person.service.ts, which I think is part of the main Immich docker container. If you know how to enable debug logs (I don't), this output might help.

@C-Otto commented on GitHub (Sep 21, 2024): There's a log message that might help: ``` this.logger.debug(`${faces.length} faces detected in ${previewFile.path}`); ``` This is in `person.service.ts`, which I think is part of the main Immich docker container. If you know how to enable debug logs (I don't), this output might help.
Author
Owner

@C-Otto commented on GitHub (Sep 21, 2024):

If you can run SQL queries against Immich's DB, please get the files that are stored for the affected images.

This should give you an SQL prompt:

docker exec -it immich_postgres psql -U postgres immich

This is the query to run (replace xxx and yyy with the asset IDs):

select * from asset_files where "assetId" in ('xxx', yyy');
@C-Otto commented on GitHub (Sep 21, 2024): If you can run SQL queries against Immich's DB, please get the files that are stored for the affected images. This should give you an SQL prompt: ``` docker exec -it immich_postgres psql -U postgres immich ``` This is the query to run (replace xxx and yyy with the asset IDs): ``` select * from asset_files where "assetId" in ('xxx', yyy'); ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#4327