Skip to content

Using Immich Face Recognition via API #15826

Closed Answered by Zefau
Zefau asked this question in Q&A

You must be logged in to vote

For people coming across this in future: The Immich API does not support face recognition for "external" images (images not known by Immich as an asset).

As a workaround, you may query the postgres database yourself to overcome this and use Immich and all the faces in Immich as your face recognition.

  1. Run face detection via HTTP-POST request to http://immich-machine-learning:3003/predict (see payload in example below)
  2. Use the embedding returned by the request to query the database looking for faces / persons close to the embedding

EXAMPLE

Remark: Fill in your database connection details as well as URL for the machine learning instance.

/*
 * set sql query
 */
const query = `
    WITH "ct…

Replies: 3 comments

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies
Answer selected by Zefau

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants