matiasdelellis / facerecognition

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

No Persons After Analysis #533

Open pavelkryl opened 2 years ago

pavelkryl commented 2 years ago

Expected behaviour

I have set up a test account with 15 photos. Some of them contain faces, some of them not. The resulting statistics say there is 15 photos and 19 faces. I would expect there are some persons - based on the detected faces.

Actual behaviour

I am however getting '0' persons:

root@silverbox data]# occ -v face:stats -u test_user
+-----------+--------+-------+---------+
| User      | Images | Faces | Persons |
+-----------+--------+-------+---------+
| test_user | 15     | 19    | 0       |
+-----------+--------+-------+---------+

Server configuration

I am running facerecognition in the latest nextcloud.

Client configuration

Logs

Background task log with debug.

occ -vvv face:background_job -u test_user ``` [root@silverbox nextcloud]# occ -vvv face:background_job -u test_user 1/10 - Executing task CheckRequirementsTask (Check all requirements) System: Linux System memory: 16686256128 PHP Memory Limit: 4294967296 2/10 - Executing task CheckCronTask (Check that service is started from either cron or from command) 3/10 - Executing task LockTask (Acquire lock so that only one background task can run) 4/10 - Executing task DisabledUserRemovalTask (Purge all the information of a user when disable the analysis.) yielding 5/10 - Executing task StaleImagesRemovalTask (Crawl for stale images (either missing in filesystem or under .nomedia) and remove them from DB) Skipping stale images removal for user test_user as there is no need for it 6/10 - 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 yielding 7/10 - Executing task AddMissingImagesTask (Crawl for missing images for each user and insert them in DB) Finding missing images for user test_user Found /test_user/files/Photos/IMG_20211003_150948.jpg Found /test_user/files/Photos/IMG_20211003_151454.jpg Found /test_user/files/Photos/IMG_20211003_153926.jpg Found /test_user/files/Photos/IMG_20211003_153947.jpg Found /test_user/files/Photos/IMG_20211003_154043.jpg Found /test_user/files/Photos/IMG_20211003_154116.jpg Found /test_user/files/Photos/IMG_20211003_161119.jpg Found /test_user/files/Photos/IMG_20211015_134603.jpg Found /test_user/files/Photos/IMG_20211017_154432.jpg Found /test_user/files/Photos/IMG_20211017_161515.jpg Found /test_user/files/Photos/IMG_20211017_161540.jpg Found /test_user/files/Photos/IMG_20211031_105824.jpg Found /test_user/files/Photos/IMG_20211031_110450.jpg Found /test_user/files/Photos/IMG_20211031_112117.jpg Found /test_user/files/Photos/IMG_20211031_112120.jpg yielding 8/10 - Executing task EnumerateImagesMissingFacesTask (Find all images which don't have faces generated for them) yielding 9/10 - Executing task ImageProcessingTask (Process all images to extract faces) NOTE: Starting face recognition. If you experience random crashes after this point, please look FAQ at https://github.com/matiasdelellis/facerecognition/wiki/FAQ yielding Processing image /var/lib/nextcloud/data/test_user/files/Photos/IMG_20211015_134603.jpg Faces found: 1 yielding Processing image /var/lib/nextcloud/data/test_user/files/Photos/IMG_20211031_112120.jpg Faces found: 5 yielding Processing image /var/lib/nextcloud/data/test_user/files/Photos/IMG_20211003_151454.jpg Faces found: 0 yielding Processing image /var/lib/nextcloud/data/test_user/files/Photos/IMG_20211003_154043.jpg Faces found: 2 yielding Processing image /var/lib/nextcloud/data/test_user/files/Photos/IMG_20211031_110450.jpg Faces found: 2 yielding Processing image /var/lib/nextcloud/data/test_user/files/Photos/IMG_20211003_154116.jpg Faces found: 0 yielding Processing image /var/lib/nextcloud/data/test_user/files/Photos/IMG_20211003_161119.jpg Faces found: 2 yielding Processing image /var/lib/nextcloud/data/test_user/files/Photos/IMG_20211003_153947.jpg Faces found: 0 yielding Processing image /var/lib/nextcloud/data/test_user/files/Photos/IMG_20211031_112117.jpg Faces found: 5 yielding Processing image /var/lib/nextcloud/data/test_user/files/Photos/IMG_20211017_154432.jpg Faces found: 0 yielding Processing image /var/lib/nextcloud/data/test_user/files/Photos/IMG_20211003_150948.jpg Faces found: 1 yielding Processing image /var/lib/nextcloud/data/test_user/files/Photos/IMG_20211003_153926.jpg Faces found: 0 yielding Processing image /var/lib/nextcloud/data/test_user/files/Photos/IMG_20211017_161540.jpg Faces found: 0 yielding Processing image /var/lib/nextcloud/data/test_user/files/Photos/IMG_20211031_105824.jpg Faces found: 1 yielding Processing image /var/lib/nextcloud/data/test_user/files/Photos/IMG_20211017_161515.jpg Faces found: 0 10/10 - Executing task UnlockTask (Release obtained lock) [root@silverbox nextcloud]# occ -v face:stats -u test_user +-----------+--------+-------+---------+ | User | Images | Faces | Persons | +-----------+--------+-------+---------+ | test_user | 15 | 19 | 0 | +-----------+--------+-------+---------+ [root@silverbox nextcloud]# ```

Error logs

Quite a few lines like this in nextcloud.info-access_log:

192.168.0.1 - - [24/Nov/2021:12:17:57 +0100] "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 -
192.168.0.1 - - [24/Nov/2021:12:17:57 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 92
192.168.0.1 - - [24/Nov/2021:12:18:03 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 92
192.168.0.1 - - [24/Nov/2021:12:18:07 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
192.168.0.1 - - [24/Nov/2021:12:18:12 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
192.168.0.1 - - [24/Nov/2021:12:18:13 +0100] "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 -
192.168.0.1 - - [24/Nov/2021:12:18:17 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
192.168.0.1 - - [24/Nov/2021:12:18:22 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
192.168.0.1 - - [24/Nov/2021:12:18:27 +0100] "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 -
192.168.0.1 - - [24/Nov/2021:12:18:27 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
192.168.0.1 - - [24/Nov/2021:12:18:32 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
192.168.0.1 - - [24/Nov/2021:12:18:37 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
192.168.0.1 - - [24/Nov/2021:12:18:42 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
192.168.0.1 - - [24/Nov/2021:12:18:43 +0100] "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 -
192.168.0.1 - - [24/Nov/2021:12:18:47 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
192.168.0.1 - - [24/Nov/2021:12:18:52 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
192.168.0.1 - - [24/Nov/2021:12:18:57 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
192.168.0.1 - - [24/Nov/2021:12:18:57 +0100] "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 -
192.168.0.1 - - [24/Nov/2021:12:19:02 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
192.168.0.1 - - [24/Nov/2021:12:19:07 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
192.168.0.1 - - [24/Nov/2021:12:19:10 +0100] "PUT /nextcloud/index.php/apps/user_status/heartbeat HTTP/1.1" 200 114
192.168.0.1 - - [24/Nov/2021:12:19:12 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
192.168.0.1 - - [24/Nov/2021:12:19:13 +0100] "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 -
192.168.0.1 - - [24/Nov/2021:12:19:17 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
192.168.0.1 - - [24/Nov/2021:12:19:22 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
192.168.0.1 - - [24/Nov/2021:12:19:27 +0100] "GET /nextcloud/index.php/apps/facerecognition/process HTTP/1.1" 200 91
Web server error log Nothing interesting in web server error log. #### Nextcloud log (data/nextcloud.log)
Nextcloud log Nothing in nextcloud.log
matiasdelellis commented 2 years ago

Hi @pavelkryl Just you must add more faces... The persons are created as a grouping of similar faces. For the process it does not make sense to group so few faces since then when adding more faces, the groups will change a lot and you will lose the names

matiasdelellis commented 2 years ago

p.s: I have to document it well in the FAQ

Migacz85 commented 2 years ago

+----------+--------+-------+---------+ | User | Images | Faces | Persons | +----------+--------+-------+---------+ | amer | 0 | 0 | 0 | | marlena | 0 | 0 | 0 | | migacz | 466 | 288 | 0 | | migaczyk | 0 | 0 | 0 | +----------+--------+-------+---------+

Migacz85 commented 2 years ago

I have also 0 persons after analysis. And I doubt that 466 photos is not enough data.

Migacz85 commented 2 years ago

Got it.... I run exactly the same command again. After it finished once. And after then the script added persons

pavelkryl commented 2 years ago

I had around 15 thousands of photos. No way of running the multi-day process again. So after the initial response from @matiasdelellis I decided to abandon nextcloud photo gallery and go for photoprism.

On Fri, Jan 7, 2022 at 7:29 PM Marcin Mrugacz @.***> wrote:

Got it.... I run exactly the same command again. After it finished once. And after then the script added persons

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>

martadinata666 commented 2 years ago

So i got many over 13k photos and 9817 faces, but no persons detected.

debian@03787d597490:/var/www/html$ ./occ face:stats
+-------------+--------+-------+---------+
| User        | Images | Faces | Persons |
+-------------+--------+-------+---------+
| dedyms      | 13055  | 9817  | 0       |
| rasdemririn | 0      | 0     | 0       |
| root        | 0      | 0     | 0       |
+-------------+--------+-------+---------+

And there is no 'person' tab as stated in photos / files, maybe it need to detect person first. Can't really sure how this determine person.

martadinata666 commented 2 years ago

Got it.... I run exactly the same command again. After it finished once. And after then the script added persons

So run ./occ face:background_job twice?

htielr commented 2 years ago

Did anybody have any luck with this issue ? I have +-------------+--------+-------+---------+---------+ | User | Images | Faces | Cluster | Persons | +-------------+--------+-------+---------+---------+ | b | 0 | 0 | 0 | 0 | | k | 6301 | 8600 | 2170 | 0 | | m | 0 | 0 | 0 | 0 | | s | 0 | 0 | 0 | 0 | | test | 0 | 0 | 0 | 0 | +-------------+--------+-------+---------+---------+

Still no persons.

onkelenno commented 2 years ago

The same here:

$ occ face:background_job: 6/10 - 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:

$ occ face:stats: +------+--------+-------+---------+---------+ | User | Images | Faces | Cluster | Persons | +------+--------+-------+---------+---------+ | c | 0 | 0 | 0 | 0 | | e | 16614 | 5246 | 3173 | 0 | +------+--------+-------+---------+---------+

Face Recognition 0.9.5

EDIT: In the stats there are 0 Persons show, because you will first have to assign Names to the persons. Go to settings -> face recognition and WAIT until the button "Recognize persons found". For me it took a while until the button appeared.

warriorzz commented 1 year ago

@onkelenno What does a while mean? I am still trying to figure out why there are 0 persons, I've run the command multiple times no and have been waiting a few minutes but no button has appeared yet