matiasdelellis / facerecognition

Nextcloud app that implement a basic facial recognition system.
GNU Affero General Public License v3.0
510 stars 46 forks source link

Newly added pictures not getting scanned properly #585

Open Kh3nsu opened 2 years ago

Kh3nsu commented 2 years ago

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

New added pictures after initial scan agetting marked as scanned after cronjob was executed properly. Maybe with some faces or not a person detected at all. Or that I can assign it by myself.

Actual behaviour

Newly added pictures are not getting marked as scanned. No faces or anything detected. Can't assign them manually, also not showing up in there are faces to group. Nonetheless when I access stats it says it got everything scanned properly. And when I add a picture it is getting queued and analyzed after the cronjob executed. I disabled a few apps, does Face Recognition depend on another default app?

Steps to reproduce

  1. Upload Pictures and let them being scanned by the background_job

Server configuration

6GB RAM (4GB for image processing) AMD Ryzen 7 2700X

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) ... ```
ps1x commented 2 years ago

I experience something like above, i added new folder manually, then run occ files:scan --all, then tried to run background task but nothing happens, no new files or faces added. On the other hand, if i add photos through GUI it is picked up and scanned on next occ person:background_task.

Kh3nsu commented 2 years ago

@ps1x After your pictures got scanned, are the showing up as scanned in photos and in their face group? In my case everything gets detected faces etc but not getting added to he corresponding face group/cluster just saying it is not scanned yet even tho it got scanned.

ps1x commented 2 years ago

@WolfsWelpe in my case they show up in photos, but they never show up in faces and are not picked up by background job. In other words this counter only changes when you add photos via GUI:

The analysis is finished - 6394 images were analyzed
Kh3nsu commented 2 years ago

@ps1x Ok then we have the same issue as far as I understood it. So in conclusion face recognition is currently broken? Are you using the same versions as I do?

ps1x commented 2 years ago

0.9.5 face recognition 24.0.2 nextcloud

I dont think face recognition is broken, i think it just does not pick up images added manually via occ files:scan-all

mostofthetime commented 2 years ago

@ps1x try "occ user:setting USER_ID facerecognition full_image_scan_done false". I think it will help.

ps1x commented 2 years ago

@ps1x try "occ user:setting USER_ID facerecognition full_image_scan_done false". I think it will help.

Will it lead to full rescan of all images? Because i already have about 10k images scanned...

ps1x commented 2 years ago

Self answer: it works and does not lead to full rescan of all images. Thank you!

matiasdelellis commented 2 years ago

Hi both, 99% of these types of errors are due to the fact that we do not group the faces at all execution of the command, because it is a slow process, and if you are adding many photos, we hope to maximize this task.

Remembre that the application is intended for continuous execution and after two hours from the last clustering, (and just if there are any ungrouped face).. will take the last faces and show them in the fronted..

MMM We should probably add a "--force" option

SKB-CGN commented 1 year ago

Hi, just came across nearly the same issue.

I have done a full scan, which was recognizing 10k pictures. Now I added around 65 from Christmas and new year.

The pictures were putted in the queue, and the finishing time says around 11 minutes - this was yesterday. So, it seems the scan just doesn't go forward anyhow.

llucax commented 1 year ago

FYI, I just had this issue after adding a bunch of photos by copying them to the nextcloud data folder and triggering a files:scan. Also running the face:background_job did nothing but the trick to mark the user as not fully scanned with occ user:setting USER_ID facerecognition full_image_scan_done false worked for me, after that the background job started analyzing files again and clustering happened as usual.

A background_job option to do the dirty marking (instead of having to resort to an obscure user setting) could be easier and more intuitive to use in these cases.

36grad commented 5 months ago

It looks like the "force" option mentioned by @matiasdelellis has been implemented by now. From looking at the source, the command occ face:background_job ----crawl-missing should have the same effect as the previously suggested workaround occ user:setting USER_ID facerecognition full_image_scan_done false

--> issue can be closed.