Recognize maintenance routine unnecessarily redownloads Tensorflow CPU and GPU models every time
@marcelklehr is already working on this.
Since Apr 1, 2026.
Assessment
This issue has not been assessed yet.
Description
Which version of recognize are you using?
11.0.1
Enabled Modes
Face recognition
TensorFlow mode
Normal mode
Downstream App
Memories App
Which Nextcloud version do you have installed?
33.0.1
Which Operating system do you have installed?
Debian 13
Which database are you running Nextcloud on?
MariaDB 11.8.6
Which Docker container are you using to run Nextcloud? (if applicable)
N/A
How much RAM does your server have?
4GiB
What processor Architecture does your CPU have?
x86_64
Describe the Bug
While running occ maintenance:repair I noticed that the Recognize step took a bit of time the command is run. After a bit of debugging, it appears that Recognize is explicitly forcing a re-download of both the CPU (tfjs-node) and GPU (tfjs-node-gpu) models every time which seems completely unnecessary. It also does this regardless of whether occ maintenance:repair included the --include-expensive option.
Expected Behavior
The Recognize maintenance step should only perform necessary maintenance and not re-download ~150 MB of dependencies.
To Reproduce
Run occ maintenance:repair
Debug log
No response
- Dominant language
- PHP
- Stars
- 699
- Forks
- 68
- Avg merge
- 18h 34m
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nextcloud/recognize
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
insertDeletion looks up recognize_fs_deletions by node_id alone, which no index covers — bulk removals scan the whole table per filePossibly taken @marcelklehr claimed this 7 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 38/100
All issues in nextcloud/recognize
Similar issues
-
customer-support needs-triage Platform(Default)
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
grokability/snipe-it#19767 ·
Maintainers usually reply within 1 day
-
[Code Quality] SfxDownloader extract path has no destination-writability pre-check for cached zipsOpenpriority:low type:refactor
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
crazy-goat/workerman-bundle#1052 ·
Maintainers usually reply within 1 day
-
sync-en
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
sync-en
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 3 days