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

Incorrect persons displayed for images with similar filenames #12668

Open
3 tasks done
yuks opened this issue Sep 14, 2024 · 2 comments
Open
3 tasks done

Incorrect persons displayed for images with similar filenames #12668

yuks opened this issue Sep 14, 2024 · 2 comments

Comments

@yuks
Copy link

yuks commented 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

@bo0tzz
Copy link
Member

bo0tzz commented 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?

@yuks
Copy link
Author

yuks commented 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":"[email protected]",
      "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":"[email protected]",
      "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
}

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

2 participants