nextcloud / nextcloud/recognize

Assigning unknown face causes high CPU usage

Open
#1,104 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug priority: normal
Dominant language
PHP
Stars
699
Forks
68
Avg merge
1d 4h
Merged PRs (30d)
5

Description

Which version of recognize are you using?

5.0.3

Enabled Modes

Object recognition, Face recognition, Video recognition, Music recognition

TensorFlow mode

Normal mode

Downstream App

Memories App

Which Nextcloud version do you have installed?

27.1.6

Which Operating system do you have installed?

Docker running in Debian 12

Which database are you running Nextcloud on?

Postgresql 16

Which Docker container are you using to run Nextcloud? (if applicable)

nextcloud:27-fpm

How much RAM does your server have?

4GiB

What processor Architecture does your CPU have?

x86_64

Describe the Bug

When I go to the unassigned faces (e.g. with id NULL) and I try to assign a face to a person (either existing or not). The CPU spikes to 100% for a long time and memory usage goes up a lot. This gets worse the more faces I add. Usually with 6-10 faces it takes almost 7 minutes to get back to normal and sometimes linux's OOM killer kicks in.

Expected Behavior

A face is assigned without much resource consumption.

To Reproduce
  1. Scan some images and have unrecognized faces
  2. Go to unknown faces
  3. Assign one of the images to a face.
  4. Either check task manager or wait a bit as the system becomes unresponsive.
Debug log

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the unknown-face assignment steps in the reported Recognize 5.0.3, Nextcloud 27.1.6, Docker and PostgreSQL environment, while profiling CPU and memory use. Trace the face-assignment flow and compare assigning one face with assigning several; done means assignments complete without prolonged resource spikes or OOM-killer failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, php, postgresql, tensorflow
Domain
backend, databases, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.