facerecognition icon indicating copy to clipboard operation
facerecognition copied to clipboard

Click on "review people found" button takes really long now

Open axeljerabek opened this issue 1 year ago • 7 comments
trafficstars

Hey, Thanks for reporting issues back to Nextcloud Face Recognition. Please, try to complete this report in detail so we can help you easier. :smile:

Make sure you read all the documentation, and the FAQ, and that the issue has not been reported before. :wink:

Expected behaviour

Click and it shows detected people

Actual behaviour

A click takes over one hour on a non-high-end machine, with 100k pictures.

Tell us what happens instead

Steps to reproduce

  1. click on "review people found button"

Server configuration

  • Operating system:

  • Ubuntu 24.04

  • Pdlib version:

  • newest

  • How is DLib installed: Make sure it is working correctly with this tool

  • How is PDlib installed: Make sure it is working correctly with this tool

  • PHP version:

  • 8.3 latest

  • Web server:

  • Apache2 latest

  • Database:

  • mariadb latest

  • Nextcloud version: from 28-30, latest

Client configuration

  • Browser: Google Chrome

  • Operating system: Any

Logs

Background task log with debug.

sudo -u apache php occ -vvv face:background_job
Insert your background log here

Web server error log

Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Nextcloud log
Insert your Nextcloud log here

Browser log

Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

axeljerabek avatar Aug 04 '24 09:08 axeljerabek

I am facing the same problem. I set up facerecognize on existing dataset with 92918 images. The background_job finished successfully. In the settings > Facerecognize, when I click "Review people found", the API call to clusters endpoint fails with Gateway timeout error. There are 73109 faces with 33746 clusters.

For another user with 15253 images, 13354 faces and 5911 clusters, the API is able to respond in time.

I am using dockerize nextcloud. I have manually set up PDLIB. Here's the reference to docker image: https://github.com/mrishab/anton-apps/blob/master/nextcloud/Dockerfile.

mrishab avatar Aug 16 '24 19:08 mrishab

I am facing the same problem. I set up facerecognize on existing dataset with 92918 images. The background_job finished successfully. In the settings > Facerecognize, when I click "Review people found", the API call to clusters endpoint fails with Gateway timeout error. There are 73109 faces with 33746 clusters.

For another user with 15253 images, 13354 faces and 5911 clusters, the API is able to respond in time.

I am using dockerize nextcloud. I have manually set up PDLIB. Here's the reference to docker image: https://github.com/mrishab/anton-apps/blob/master/nextcloud/Dockerfile.

I was actually able to resolve by increasing the timeout setting on my reverse proxy. The request does take about a minute to respond but it's still workable.

mrishab avatar Aug 16 '24 21:08 mrishab

Hi, The code for this function is somewhat archaic. Since I hope to recommend Memories, I haven't spent enough time on it yet. I still ask you, did you try memories? It is important because if it is more responsive it should do a similar implementation

matiasdelellis avatar Aug 21 '24 22:08 matiasdelellis

Well, "responsive" is maybe something else. But it is way faster at least. The problem is not to show the persons, but the button itself takes ages to show the clusters. And the "review people found" button does not exist in memories. The problem also did not occur in the older versions with about the same amount of persons/clusters. It exists mostly since the introduction of those two buttons on top, with the ignored persons.

axeljerabek avatar Aug 29 '24 17:08 axeljerabek

Just leave it here for reference..

SELECT person, COUNT(*) AS FacesCount
FROM `oc_facerecog_faces` AS Faces
INNER JOIN `oc_facerecog_images` AS Images ON Images.id = Faces.image AND  person IS NOT NULL
INNER JOIN `oc_facerecog_persons` AS Persons ON Persons.id = Faces.person AND  name IS NULL
WHERE Persons.user = 'test'
GROUP BY person
HAVING FacesCount > 3
ORDER BY FacesCount DESC
LIMIT 50

I would have to implement a similar sentence, but for me it is still slow. 😞

matiasdelellis avatar Aug 30 '24 17:08 matiasdelellis

Now, it does not react anymore if the "review people found" button is clicked.

axeljerabek avatar Sep 18 '24 06:09 axeljerabek

Now, it does not react anymore if the "review people found" button is clicked.

Maybe your problem is related to #779

xegby avatar Oct 11 '24 08:10 xegby