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

Error message: Could not generate person thumbnail when Enable face import is on #14993

Open
1 of 3 tasks
kbarter opened this issue Dec 30, 2024 · 0 comments
Open
1 of 3 tasks

Comments

@kbarter
Copy link

kbarter commented Dec 30, 2024

The bug

I have many photos that I want to import into Immich that have already been tagged with faces using Digikam. To get these into Immich, I initially tried to do it with just this setting changed:

image

The result is that there are no person thumbnails that are generated. Instead of a face thumbnail, this is displayed:
image

The OS that Immich Server is running on

Manjaro

Version of Immich Server

Latest image pulled 2024-12-29

Version of Immich Mobile App

Not relevant

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

#
# 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}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    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
      - /home/kevin/Pictures:/mnt/Pictures:ro
    env_file:
      - .env
    group_add:
      - video
    deploy:
      resources:
        reservations:
          devices:
             - capabilities: [gpu]
    runtime: nvidia
    devices:
      - /dev/nvidia0:/dev/nvidia0
      - /dev/nvidiactl:/dev/nvidiactl
      - /dev/nvidia-uvm:/dev/nvidia-uvm
      - /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools
    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, openvino] 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:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:eaba718fecd1196d88533de7ba49bf903ad33664a92debb24660a922ecd9cac8
    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:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    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: unless-stopped

volumes:
  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=./immich_data
# The location where your database files are stored
DB_DATA_LOCATION=./postgres_data

# 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=America/Denver

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

# Added for NVidia
# See https://github.com/immich-app/immich/discussions/12544#discussioncomment-10603023
NVIDIA_VISIBLE_DEVICES=all
NVIDIA_DRIVER_CAPABILITIES=all

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=xxxxxx
DB_DATABASE_NAME=immich

Reproduction steps

  1. docker compose up
  2. complete the onboarding
  3. go to the Administration page
  4. change the metadata option image
  5. change the machine learning option (optional). Same result regardless of this setting.image
  6. add an external library that contains images with facial data. This data is stored in the image, and in an XMP sidecar
  7. scan the external library
  8. View the people thumbnails. They will have the person's name, but no image
    image

...

Relevant log output

immich_server            | [Nest] 7  - 12/30/2024, 9:49:49 AM   ERROR [Microservices:PersonService] Could not generate person thumbnail: person 65cad71a-c579-41dd-9be8-d5f62d28e59a has no face asset
immich_server            | [Nest] 7  - 12/30/2024, 9:49:49 AM   ERROR [Microservices:PersonService] Could not generate person thumbnail: person dfce822a-72f3-4b5e-a651-46e91d057225 has no face asset
immich_server            | [Nest] 7  - 12/30/2024, 9:49:50 AM   ERROR [Microservices:PersonService] Could not generate person thumbnail: person e8f84012-7f1a-45c0-a9ba-b9449175394f has no face asset
immich_server            | [Nest] 7  - 12/30/2024, 9:49:50 AM   ERROR [Microservices:PersonService] Could not generate person thumbnail: person 28c50b40-89be-427d-b8d6-82e54ad813b4 has no face asset
immich_server            | [Nest] 7  - 12/30/2024, 9:49:50 AM   ERROR [Microservices:PersonService] Could not generate person thumbnail: person 48d0d1b0-d4d4-4c69-b19b-c906b62387dd has no face asset
immich_server            | [Nest] 7  - 12/30/2024, 9:49:51 AM   ERROR [Microservices:PersonService] Could not generate person thumbnail: person ab335181-f63d-4bb3-a4f2-ec583bd4efb3 has no face asset

Additional information

I have also tried it with CUDA enabled/disabled in docker-compose, and I have tried it with Machine Learning enabled and disabled. The results are the same.

As a workaround, I can run it with Machine Learning enabled, and then go and merge the faces together. This is not a great solution as there are hundreds of unique people.

Sample XMP file

<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""
    xmlns:exif="http://ns.adobe.com/exif/1.0/"
    xmlns:xmp="http://ns.adobe.com/xap/1.0/"
    xmlns:MY="http://ns.mylollc.com/MyloEdit/"
    xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
    xmlns:digiKam="http://www.digikam.org/ns/1.0/"
    xmlns:tiff="http://ns.adobe.com/tiff/1.0/"
    xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/"
    xmlns:MicrosoftPhoto="http://ns.microsoft.com/photo/1.0/"
    xmlns:lr="http://ns.adobe.com/lightroom/1.0/"
    xmlns:mediapro="http://ns.iview-multimedia.com/mediapro/1.0/"
    xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
    xmlns:MP="http://ns.microsoft.com/photo/1.2/"
    xmlns:MPRI="http://ns.microsoft.com/photo/1.2/t/RegionInfo#"
    xmlns:MPReg="http://ns.microsoft.com/photo/1.2/t/Region#"
    xmlns:mwg-rs="http://www.metadataworkinggroup.com/schemas/regions/"
    xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#"
    xmlns:stArea="http://ns.adobe.com/xmp/sType/Area#"
    xmlns:acdsee="http://ns.acdsee.com/iptc/1.0/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
   exif:DateTimeOriginal="2019-10-08T06:59:43"
   exif:ModifyDate="2019-10-08T12:59:43.710Z"
   exif:SubSecTime="710"
   exif:SubSecTimeOriginal="710"
   exif:SubSecTimeDigitized="710"
   exif:ExifVersion="0220"
   exif:FlashpixVersion="0100"
   exif:ColorSpace="1"
   exif:PixelXDimension="4032"
   exif:PixelYDimension="1960"
   exif:ExposureTime="1/17"
   exif:FNumber="150/100"
   exif:ExposureProgram="2"
   exif:ShutterSpeedValue="4059/1000"
   exif:ApertureValue="116/100"
   exif:BrightnessValue="-139/100"
   exif:ExposureBiasValue="0/10"
   exif:MaxApertureValue="116/100"
   exif:MeteringMode="2"
   exif:FocalLength="4300/1000"
   exif:SensingMethod="1"
   exif:SceneType="1"
   exif:ExposureMode="0"
   exif:WhiteBalance="0"
   exif:FocalLengthIn35mmFilm="26"
   exif:SceneCaptureType="0"
   exif:ImageUniqueID="I12QSKF00SM I12QSKL01VA"
   exif:GPSVersionID="2.0.0.0"
   exif:GPSLatitude="48,50.4743980N"
   exif:GPSLongitude="2,0.0000000E"
   exif:GPSAltitudeRef="0"
   exif:GPSAltitude="488995/5000"
   exif:GPSMapDatum="WGS-84"
   xmp:MetadataDate="2019-10-08T06:59:43"
   xmp:CreateDate="2019-10-08T06:59:43"
   xmp:ModifyDate="2019-10-08T06:59:43"
   MY:flag="false"
   MY:processVersion="1"
   MY:MetadataDate="2020-08-29T19:42:05.438Z"
   MY:DateRangeStart="2019-10-08T12:59:43.710Z"
   MY:DateRangeEnd="2019-10-08T12:59:43.710Z"
   MY:DateRangeScope=""
   MY:Undated="false"
   xmpMM:DocumentID="C1E4B70A-8B71-489C-829D-7122E010690B"
   xmpMM:OriginalDocumentID="C1E4B70A-8B71-489C-829D-7122E010690B"
   xmpMM:InstanceID="xmp.iid:98B36DC2-DF8F-4153-8F4D-267B7D5B8FF2"
   digiKam:ColorLabel="0"
   tiff:DateTime="2019-10-08T06:59:43"
   tiff:ImageWidth="4032"
   tiff:ImageLength="1960"
   tiff:Orientation="1"
   tiff:YCbCrPositioning="1"
   tiff:XResolution="72/1"
   tiff:YResolution="72/1"
   tiff:ResolutionUnit="2"
   tiff:Make="samsung"
   tiff:Model="SM-G965W"
   tiff:Software="G965WVLS6CSI1"
   photoshop:DateCreated="2019-10-08T06:59:43"
   photoshop:Urgency="0"
   acdsee:categories="&lt;Categories&gt;&lt;Category Assigned=&quot;0&quot;&gt;People&lt;Category Assigned=&quot;1&quot;&gt;FirstName LastName&lt;/Category&gt;&lt;/Category&gt;&lt;Category Assigned=&quot;0&quot;&gt;Places&lt;Category Assigned=&quot;1&quot;&gt;France&lt;/Category&gt;&lt;/Category&gt;&lt;/Categories&gt;">
   <exif:Flash
    exif:Fired="False"
    exif:Return="0"
    exif:Mode="0"
    exif:Function="False"
    exif:RedEyeMode="False"/>
   <exif:ComponentsConfiguration>
    <rdf:Seq>
     <rdf:li>1</rdf:li>
     <rdf:li>2</rdf:li>
     <rdf:li>3</rdf:li>
     <rdf:li>0</rdf:li>
    </rdf:Seq>
   </exif:ComponentsConfiguration>
   <exif:ISOSpeedRatings>
    <rdf:Seq>
     <rdf:li>250</rdf:li>
    </rdf:Seq>
   </exif:ISOSpeedRatings>
   <digiKam:TagsList>
    <rdf:Seq>
     <rdf:li>People/FirstName LastName</rdf:li>
     <rdf:li>Places/France</rdf:li>
    </rdf:Seq>
   </digiKam:TagsList>
   <Iptc4xmpExt:PersonInImage>
    <rdf:Seq>
     <rdf:li>FirstName LastName</rdf:li>
    </rdf:Seq>
   </Iptc4xmpExt:PersonInImage>
   <MicrosoftPhoto:LastKeywordXMP>
    <rdf:Bag>
     <rdf:li>People/FirstName LastName</rdf:li>
     <rdf:li>Places/France</rdf:li>
    </rdf:Bag>
   </MicrosoftPhoto:LastKeywordXMP>
   <lr:hierarchicalSubject>
    <rdf:Bag>
     <rdf:li>People|FirstName LastName</rdf:li>
     <rdf:li>Places|France</rdf:li>
    </rdf:Bag>
   </lr:hierarchicalSubject>
   <mediapro:CatalogSets>
    <rdf:Bag>
     <rdf:li>People|FirstName LastName</rdf:li>
     <rdf:li>Places|France</rdf:li>
    </rdf:Bag>
   </mediapro:CatalogSets>
   <MP:RegionInfo rdf:parseType="Resource">
    <MPRI:Regions>
     <rdf:Bag>
      <rdf:li
       MPReg:PersonDisplayName="FirstName LastName"
       MPReg:Rectangle="0.398313, 0.255102, 0.134921, 0.37551"/>
     </rdf:Bag>
    </MPRI:Regions>
   </MP:RegionInfo>
   <mwg-rs:Regions rdf:parseType="Resource">
    <mwg-rs:AppliedToDimensions
     stDim:w="4032"
     stDim:h="1960"
     stDim:unit="pixel"/>
    <mwg-rs:RegionList>
     <rdf:Bag>
      <rdf:li>
       <rdf:Description
        mwg-rs:Name="FirstName LastName"
        mwg-rs:Type="Face">
       <mwg-rs:Area
        stArea:x="0.465774"
        stArea:y="0.442857"
        stArea:w="0.134921"
        stArea:h="0.37551"
        stArea:unit="normalized"/>
       </rdf:Description>
      </rdf:li>
     </rdf:Bag>
    </mwg-rs:RegionList>
   </mwg-rs:Regions>
   <dc:subject>
    <rdf:Bag>
     <rdf:li>FirstName LastName</rdf:li>
     <rdf:li>France</rdf:li>
    </rdf:Bag>
   </dc:subject>
  </rdf:Description>
 </rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>

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