immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
52.06k stars 2.76k forks source link

Face recognition fails with no warnings nor relevant logs #11444

Closed xfarrow closed 1 month ago

xfarrow commented 3 months ago

The bug

On my machine I successfully executed thumbnail, metadata, library, smart search and face detection jobs. When I try to perform face recognition, however, the job just seems to fail: it runs for a couple of seconds with zero awaiting processes before abruptly terminating.

I executed docker logs -f --tail 0 immich-machine-learning and docker logs -f --tail 0 immich-server but there is no relevant log (nothing more or equal than Log level).

I tried to see if the system kills the process because it uses too much resources, but there's no resource spike.

What could be causing the problem?

The OS that Immich Server is running on

Ubuntu 24.04 LTS x86_64

Version of Immich Server

v1.109.2

Version of Immich Mobile App

not using mobile app

Platform with the issue

Your docker-compose.yml content

name: big-bear-immich
services:
    database:
        cpu_shares: 10
        command: []
        container_name: immich-postgres
        deploy:
            resources:
                limits:
                    memory: "3987734528"
        environment:
            PG_DATA: /var/lib/postgresql/data
            POSTGRES_DB: immich
            POSTGRES_PASSWORD: casaos
            POSTGRES_USER: casaos
        hostname: immich-postgres
        image: tensorchord/pgvecto-rs:pg14-v0.2.0
        labels:
            icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/immich.png
        networks:
            big_bear_immich_network: null
        restart: unless-stopped
        volumes:
            - type: bind
              source: /DATA/AppData/big-bear-immich/pgdata
              target: /var/lib/postgresql/data
              bind:
                create_host_path: true
        x-casaos:
            envs:
                - container: POSTGRES_PASSWORD
                  description:
                    en_us: Database Password
                - container: POSTGRES_USER
                  description:
                    en_us: Database Username
                - container: POSTGRES_DB
                  description:
                    en_us: Database Name
                - container: PG_DATA
                  description:
                    en_us: 'Container Path: /var/lib/postgresql/data'
            volumes:
                - container: /var/lib/postgresql/data
                  description:
                    en_us: 'Container Path: /var/lib/postgresql/data'
    immich-machine-learning:
        cpu_shares: 10
        command: []
        container_name: immich-machine-learning
        deploy:
            resources:
                limits:
                    memory: "3987734528"
        environment:
            DB_DATABASE_NAME: casaos
            DB_HOSTNAME: immich-postgres
            DB_PASSWORD: casaos
            DB_PORT: "5432"
            DB_USERNAME: casaos
            REDIS_HOSTNAME: immich-redis
        hostname: immich-machine-learning
        image: ghcr.io/immich-app/immich-machine-learning:v1.109.2
        labels:
            icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/immich.png
        networks:
            big_bear_immich_network: null
        restart: unless-stopped
        volumes:
            - type: bind
              source: /DATA/AppData/big-bear-immich/model-cache
              target: /cache
              bind:
                create_host_path: true
        x-casaos:
            envs:
                - container: DB_HOSTNAME
                  description:
                    en_us: Database Hostname
                - container: DB_USERNAME
                  description:
                    en_us: Database Username
                - container: DB_PASSWORD
                  description:
                    en_us: Database Password
                - container: DB_DATABASE_NAME
                  description:
                    en_us: Database Name
                - container: DB_PORT
                  description:
                    en_us: Database Port
                - container: REDIS_HOSTNAME
                  description:
                    en_us: Redis Hostname
            volumes:
                - container: /cache
                  description:
                    en_us: 'Container Path: /cache'
    immich-server:
        cpu_shares: 10
        command: []
        container_name: immich-server
        depends_on:
            database:
                condition: service_started
                required: true
            redis:
                condition: service_started
                required: true
        deploy:
            resources:
                limits:
                    memory: "3987734528"
        environment:
            DB_DATABASE_NAME: immich
            DB_HOSTNAME: immich-postgres
            DB_PASSWORD: casaos
            DB_PORT: "5432"
            DB_USERNAME: casaos
            IMMICH_MACHINE_LEARNING_URL: http://immich-machine-learning:3003
            REDIS_HOSTNAME: immich-redis
        hostname: immich-server
        image: ghcr.io/immich-app/immich-server:v1.109.2
        labels:
            icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/immich.png
        networks:
            big_bear_immich_network: null
        ports:
            - mode: ingress
              target: 3001
              published: "2283"
              protocol: tcp
        restart: unless-stopped
        volumes:
            - type: bind
              source: /DATA/AppData/big-bear-immich/upload
              target: /usr/src/app/upload
              bind:
                create_host_path: true
            - type: bind
              source: /mnt/NAS
              target: /nas:ro
        x-casaos:
            envs:
                - container: DB_HOSTNAME
                  description:
                    en_us: Database Hostname
                - container: DB_USERNAME
                  description:
                    en_us: Database Username
                - container: DB_PASSWORD
                  description:
                    en_us: Database Password
                - container: DB_DATABASE_NAME
                  description:
                    en_us: Database Name
                - container: DB_PORT
                  description:
                    en_us: Database Port
                - container: REDIS_HOSTNAME
                  description:
                    en_us: Redis Hostname
                - container: IMMICH_MACHINE_LEARNING_URL
                  description:
                    en_us: Immich Machine Learning URL
            ports:
                - container: "3001"
                  description:
                    en_us: 'Container Port: 3001'
            volumes:
                - container: /usr/src/app/upload
                  description:
                    en_us: 'Container Path: /usr/src/app/upload'
    redis:
        cpu_shares: 10
        command: []
        container_name: immich-redis
        deploy:
            resources:
                limits:
                    memory: "3987734528"
        hostname: immich-redis
        image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
        labels:
            icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/immich.png
        networks:
            big_bear_immich_network: null
        restart: always
networks:
    big_bear_immich_network:
        name: big-bear-immich_big_bear_immich_network
        driver: bridge
    default:
        name: big-bear-immich_default
x-casaos:
    architectures:
        - amd64
        - arm64
    author: BigBearTechWorld
    category: BigBearCasaOS
    description:
        en_us: Self-hosted photo and video storage.
    developer: ""
    hostname: ""
    icon: https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/immich.png
    index: /
    is_uncontrolled: true
    main: immich-server
    port_map: "2283"
    scheme: http
    store_app_id: big-bear-immich
    tagline:
        en_us: Immich
    thumbnail: ""
    title:
        custom: ""
        en_us: Immich

Your .env content

No .env file

Reproduction steps

1. Go in administration settings
2. Try to perform face recognition

Relevant log output

No response

Additional information

No response

alextran1502 commented 3 months ago

If you try using the default docker-compose.yml does it work?

xfarrow commented 3 months ago

Hi @alextran1502 , thank you for your answer and for your excellent job. This is a CasaOS installation for easier management with its default settings; I wouldn't know how to make it work with the default docker-compose.yaml honestly. The strange thing is that the AI-powered object detection worked flawlessly.

alextran1502 commented 3 months ago

So, no face is being recognized, created I assume?

xfarrow commented 3 months ago

Edit: Yes, there is no created face The process "face detection" has completed successfully. The library I am working on is an external library (/nas:ro)

I am happy to give more information if required. Thank you again.

alextran1502 commented 3 months ago

Can you help update immich to the latest version and try again?