#Facial Recognition Not Working - People Not Populating

1 messages · Page 1 of 1 (latest)

lofty moon
#

I have successfully deployed a working instance of Immich on an Asustor Lockerstore 2 AS6704T - but facial recognition does not seem to be working, and no people are being populated. My images were uploaded using an iPhone with iOS.

Steps taken to try to fix the problem:

  • Ran several tasks: generated thumbnails, extracted metadata, performed sidecar metadata, ran Smart Search, ran Duplicate Detection, and ran Face Detection.
  • Ran “sudo docker logs immich_machine_learning” to see if there were any errors. There were none.

.env variables:

UPLOAD_LOCATION=/share/Immich/Pictures
DB_DATA_LOCATION=/share/Immich/Database
IMMICH_VERSION=release
DB_PASSWORD=[redacted]
DB_USERNAME=[redacted]
DB_DATABASE_NAME=Immich
IMMICH_MACHINE_LEARNING_URL=true

wanton larkBOT
#

:wave: Hey @lofty moon,

Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich immich.

References

#

Checklist

I have...

  1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: read applicable release notes.
  3. :ballot_box_with_check: reviewed the FAQs for known issues.
  4. :ballot_box_with_check: reviewed Github for known issues.
  5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
  6. :ballot_box_with_check: uploaded the relevant information (see below).
  7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable

(an item can be marked as "complete" by reacting with the appropriate number)

Information

In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:

  • Your docker-compose.yml and .env files.
  • Logs from all the containers and their status (see above).
  • All the troubleshooting steps you've tried so far.
  • Any recent changes you've made to Immich or your system.
  • Details about your system (both software/OS and hardware).
  • Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h).
  • The version of the Immich server, mobile app, and other relevant pieces.
  • Any other information that you think might be relevant.

Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

wanton larkBOT
lofty moon
#

Okay, now I'm seeing an option to manually tag photos based on one family member that I viewed three unique photos of.

#

Also getting an error in the search bar that says "Failed to search smart" - could this also have to do with the machine-learning container?

lofty moon
flat spruce
#

Can you set the log level to verbose, do a search, and then post the full logs? Also from the ml container

#

Oh wait I think I already see the issue lol

#

IMMICH_MACHINE_LEARNING_URL=true

#

Why do you have that set like that?

lofty moon
#

Will do right away

#

Older versions that worked on Asustors (anecdotally) had it set to false. When I reinitialized with the most recent yml properly, instead of removing it I just set it to true.

But I can remove it.

flat spruce
#

That env var is for a url, not for a boolean

#

Setting false might happen to disable it, but setting true certainly doesn't make it work

lofty moon
#

Will remove

#

Removed the environment variable, still receiving the same error in the search bar.

#

I'll retrieve log(s)

#

Set to verbose and searching again

#

Okay, where do I find the log you're looking for?

#

I have my "Database" folder link in my environment variables - is it in there?

#

Uhh.. this is off topic, but there aren't any photos in my Pictures folder. Where did they all get uploaded to?

#

If I run "sudo docker logs immich-machine-learning", I get this:

#

redacted@redacted:/volume1/.@plugins/AppCentral/python3/bin $ sudo docker logs immich_machine_learning
Initializing Immich ML v1.128.0
[03/01/25 12:52:59] INFO Starting gunicorn 23.0.0
[03/01/25 12:52:59] INFO Listening at: http://[::]:3003 (8)
[03/01/25 12:52:59] INFO Using worker: app.config.CustomUvicornWorker
[03/01/25 12:52:59] INFO Booting worker with pid: 9
[03/01/25 12:53:07] INFO Started server process [9]
[03/01/25 12:53:07] INFO Waiting for application startup.
[03/01/25 12:53:07] INFO Created in-memory cache with unloading after 300s
of inactivity.
[03/01/25 12:53:07] INFO Initialized request thread pool with 4 threads.
[03/01/25 12:53:07] INFO Application startup complete.

#

Let me try running the search now and see what it reports, if the verbosity is increased like it should be

#

No change on my end from what I'm trying

#

Let me try running that runs longer than a search - like maybe Duplicate Detection or something.

#

Still no errors in the log while that's running

#

It just keeps ending with "Application startup complete".

flat spruce
#

Check the server logs

flat spruce
lofty moon
#

There is a share/Immich folder, but I don't see my photos in it.

#

This is repeating if I check the server logs

#

[Nest] 20 - 03/01/2025, 1:17:30 PM DEBUG [Api:LoggingInterceptor~71hefudd] GET /api/server/ping 200 0.26ms ::ffff:127.0.0.1
[Nest] 20 - 03/01/2025, 1:17:31 PM DEBUG [Api:LoggingInterceptor~tathheig] GET /api/jobs 200 5.90ms ::ffff:192.168.30.189
[Nest] 20 - 03/01/2025, 1:17:36 PM DEBUG [Api:LoggingInterceptor~9w8q7jg9] GET /api/jobs 200 4.92ms ::ffff:192.168.30.189
[Nest] 20 - 03/01/2025, 1:17:42 PM DEBUG [Api:LoggingInterceptor~l6ixitsp] GET /api/jobs 200 4.93ms ::ffff:192.168.30.189
redacted@redacted:/volume1/.@plugins/AppCentral/python3/bin $ -8c1a-4daa-9494-ee44d89603e3
is missing embedding
[Nest] 8 - 03/01/2025, 1:15:00 PM DEBUG [Microservices:DuplicateService] Asset e20a459f-94ce-464c-9694-402ad8d75dc8 is missing embedding
[Nest] 8 - 03/01/2025, 1:15:00 PM DEBUG [Microservices:DuplicateService] Asset ba8b01de-8687-49ed-8ecf-e1225d5ad40a is missing embedding
[Nest] 8 - 03/01/2025, 1-sh: :15:00 PM DEBUG [Microservices:DuplicateService] Asset 1-8c1a-4daa-9494-ee44d89603e3: not found2b7662b-46ff-4e41-be33-76cd
0b48bc7f is missing embedding
redacted@redacted:/volume1/.@plugins/AppCentral/python3/bin $ [Nest] 8 - 03/01/2025, 1:15
:00 PM DEBUG [Microservices:DuplicateService] Asset 17b421e8-667d-49b9-8215-54be58702
577 is missing embedding
-sh: [Nest]: not found
redacted@redacted:/volume1/.@plugins/AppCentral/python3/bin $ [Nest] 8 - 03/01/2025, 1:15
:00 PM DEBUG [Microservices:DuplicateService] Asset 65e38c01-03c2-4098-a360-109b72799
282 is missing embedding
-sh: [Nest]: not found
redacted@redacted:/volume1/.@plugins/AppCentral/python3/bin $ [Nest] 8 - 03/01/2025, 1:15
:00 PM DEBUG [Microservices:DuplicateService] Asset 87edf592-2308-4fd1-943c-a1b4946de
ee8 is missing embedding
-sh: [Nest]: not found

flat spruce
#

What are the logs when you do a search?

#

redacted@redacted:/volume1/.@plugins/AppCentral/python3/bin
Is this in the logs verbatim? Cause that's very weird

lofty moon
#

/share/Immich/Pictures has a lot of subdirectories, but the library directory is empty.

flat spruce
lofty moon
#

Gotcha, that is populated - whew

#

Thank you

#

Let me try to run that search

#

[Nest] 20 - 03/01/2025, 1:23:48 PM DEBUG [Api:LoggingInterceptor~q38ju5yk] GET /api/jobs 200 4.95ms ::ffff:192.168.30.189
[Nest] 20 - 03/01/2025, 1:23:53 PM DEBUG [Api:LoggingInterceptor~jxshgxwl] GET /api/jobs 200 4.28ms ::ffff:192.168.30.189
[Nest] 20 - 03/01/2025, 1:23:57 PM WARN [Api:MachineLearningRepository~7a61bamg] Machine learning request to "172.22.0.3" failed: Invalid URL
[Nest] 20 - 03/01/2025, 1:23:57 PM ERROR [Api:ErrorInterceptor~7a61bamg] Unknown error: Error: Machine learning request '{"clip":{"textual":{"modelName":"ViT-B-32__openai"}}}' failed for all URLs
Error: Machine learning request '{"clip":{"textual":{"modelName":"ViT-B-32__openai"}}}' failed for all URLs
at MachineLearningRepository.predict (/usr/src/app/dist/repositories/machine-learning.repository.js:97:15)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async MachineLearningRepository.encodeText (/usr/src/app/dist/repositories/machine-learning.repository.js:120:26)
at async SearchService.searchSmart (/usr/src/app/dist/services/search.service.js:62:27)
[Nest] 20 - 03/01/2025, 1:23:57 PM DEBUG [Api:LoggingInterceptor~7a61bamg] POST /api/search/smart 200 10.63ms ::ffff:192.168.30.189
[Nest] 20 - 03/01/2025, 1:23:57 PM VERBOSE [Api:LoggingInterceptor~7a61bamg] {"page":1,"withExif":true,"isVisible":true,"query":"Ben"}
[Nest] 20 - 03/01/2025, 1:23:57 PM DEBUG [Api:GlobalExceptionFilter~7a61bamg] HttpException(500): {"message":"Failed to search smart","error":"Internal Server Error","statusCode":500}
[Nest] 20 - 03/01/2025, 1:24:00 PM DEBUG [Api:LoggingInterceptor~ksuuuqbk] GET /api/server/ping 200 0.28ms ::ffff:127.0.0.1
[Nest] 20 - 03/01/2025, 1:24:31 PM DEBUG [Api:LoggingInterceptor~lm7x83st] GET /api/server/ping 200 0.23ms ::ffff:127.0.0.1
[Nest] 20 - 03/01/2025, 1:24:35 PM WARN [Api:MachineLearningRepository~1q4ngc5i]

#

Machine learning request to "172.22.0.3" failed: Invalid URL
[Nest] 20 - 03/01/2025, 1:24:35 PM ERROR [Api:ErrorInterceptor~1q4ngc5i] Unknown error: Error: Machine learning request '{"clip":{"textual":{"modelName":"ViT-B-32__openai"}}}' failed for all URLs
Error: Machine learning request '{"clip":{"textual":{"modelName":"ViT-B-32__openai"}}}' failed for all URLs
at MachineLearningRepository.predict (/usr/src/app/dist/repositories/machine-learning.repository.js:97:15)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async MachineLearningRepository.encodeText (/usr/src/app/dist/repositories/machine-learning.repository.js:120:26)
at async SearchService.searchSmart (/usr/src/app/dist/services/search.service.js:62:27)
[Nest] 20 - 03/01/2025, 1:24:35 PM DEBUG [Api:LoggingInterceptor~1q4ngc5i] POST /api/search/smart 200 10.75ms ::ffff:192.168.30.189
[Nest] 20 - 03/01/2025, 1:24:35 PM VERBOSE [Api:LoggingInterceptor~1q4ngc5i] {"page":1,"withExif":true,"isVisible":true,"query":"Ben"}
[Nest] 20 - 03/01/2025, 1:24:35 PM DEBUG [Api:GlobalExceptionFilter~1q4ngc5i] HttpException(500): {"message":"Failed to search smart","error":"Internal Server Error","statusCode":500}

#

"Machine learning request to "172.22.0.3" failed: Invalid URL"

#

But Portainer shows it at that URL

#

Running

#

I opened port 3003 in my NAS's internal firewall

flat spruce
lofty moon
#

I need to remove Tailscale, because I gave up on it the second I got nginx-proxy-manager and Cloudflare working.

#

Any idea why there are so many sh "not found"s?

#

And "can't creates"?

#

My apps are all working as they should be

#

Sorry, forgot to share full environment

#

This is for the stack itself:

#

And in each Immich container, I added a "label"

#

"com.centurylinklabs.watchtower.enable=false"

#

To prevent Watchtower from touching Immich

flat spruce
#

Hmm, so where does that URL in the ML settings come from?

#

Did you set that manually in the UI?

lofty moon
#

I did not

flat spruce
#

Try resetting that to the default

lofty moon
#

The search is actually running now

#

Just looked at 3 pictures of myself, and now I see this

#

I don't know what to do with that, but it's progress

#

Okay, went into one of the pictures, saw myself tagged, and added an entry for myself.

#

And now I show up under people! I think we can potentially mark this solved.

#

I'm going to start running my ML jobs again, especially Face Detection refreshing.

#

Now all I need is to figure out my other issue.

#

Since it's (assumedly) running properly now, the Smart Search job is taking a long time. I have a feeling like I'll be updating these ML jobs for the remainder of my morning / day.

#

@flat spruce Is it best to just run them one at a time? That would be my general assumption. (Sorry to ping you.)

#

By my calculations, it should finish the Smart Search job for the remainder of my photos in (roughly) about 3 hours.

#

My daughter has a basketball game <t:1740845700:R>, so I'll plan on running Duplicate Detection when I get home from that.

#

I bumped the Smart Search concurrency from 2 to 3 - that seems to have (again, rough math) doubled my speed.

#

Any value higher than that doesn't seem to produce any greater speeds.

#

But now hopefully I can start Duplicate Detection before I have to leave the house.

#

Well, maybe I can't start it before the game, but I can remotely start it from the game.

lofty moon
#

Smart Search and Duplicate Detection seemed to run just fine.

Refreshing Face Detection now.