matiasdelellis / facerecognition

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

Always stuck in step5 [5/8 - Executing task CreateClustersTask (Create new persons or update existing persons)] #712

Open 3038922 opened 7 months ago

3038922 commented 7 months ago

I use external decoding and then he always gets stuck.Why is that?And my nextcloud's memory keeps taking up until it's full.My decoding VM sets up model 3.

 ⚡ root@nextcloud  ~  sudo -u www-data php /var/www/nextcloud/occ face:background_job
1/8 - Executing task CheckRequirementsTask (Check all requirements)
2/8 - Executing task CheckCronTask (Check that service is started from either cron or from command)
3/8 - Executing task DisabledUserRemovalTask (Purge all the information of a user when disable the analysis.)
4/8 - Executing task StaleImagesRemovalTask (Crawl for stale images (either missing in filesystem or under .nomedia) and remove them from DB)
5/8 - Executing task CreateClustersTask (Create new persons or update existing persons)
        Skipping cluster creation, not enough data (yet) collected. For cluster creation, you need either one of the following:
        * have 1000 faces already processed
        * or you need to have 95% of you images processed
        Use stats command to track progress
        Skipping cluster creation, not enough data (yet) collected. For cluster creation, you need either one of the following:
        * have 1000 faces already processed
        * or you need to have 95% of you images processed
        Use stats command to track progress
        Skipping cluster creation, not enough data (yet) collected. For cluster creation, you need either one of the following:
        * have 1000 faces already processed
        * or you need to have 95% of you images processed
        Use stats command to track progress
        Skipping cluster creation, not enough data (yet) collected. For cluster creation, you need either one of the following:
        * have 1000 faces already processed
        * or you need to have 95% of you images processed
        Use stats command to track progress
        Skipping cluster creation, not enough data (yet) collected. For cluster creation, you need either one of the following:
        * have 1000 faces already processed
        * or you need to have 95% of you images processed
        Use stats command to track progress
        Face clustering will be created for the first time.
        0 faces found for clustering
        0 clusters found after clustering
        Skipping cluster creation, not enough data (yet) collected. For cluster creation, you need either one of the following:
        * have 1000 faces already processed
        * or you need to have 95% of you images processed
        Use stats command to track progress
        Face clustering will be created for the first time.
matiasdelellis commented 6 months ago

Hi @3038922 I understand that you have many images analyzed, and many faces to clustering.. It is strange that you run out of resources, but it is a very demanding task. Can you use the face:stats command to contextualize?

If you are really running out of ram, you can add SWAP, and increase the php_limits

p.s: sorry for delay. I'm very busy. 😞

vwbusguy commented 1 month ago

I ran into this recently and it just took a very long time, but eventually made it through step 5. I had to run it outside of cron without the timeout since it was timing out on this step within 20 minutes before working on faces.

matiasdelellis commented 1 month ago

Hi both, You can try applying the latest commit to your installation. They should help you a lot.

https://github.com/matiasdelellis/facerecognition/commit/58e3e0ea9dda0b4fa96c9913fc34254d2a8697f4