nextcloud / recognize

👁 👂 Smart media tagging for Nextcloud: recognizes faces, objects, landscapes, music genres
https://apps.nextcloud.com/apps/recognize
GNU Affero General Public License v3.0
539 stars 45 forks source link

`occ recognize:classify` : "Could not find file" using S3 as main storage #987

Open Aeris1One opened 11 months ago

Aeris1One commented 11 months ago

Which version of recognize are you using?

4.3.2

Enabled Modes

Face recognition

TensorFlow mode

WASM mode

Downstream App

other, please specify below

Which Nextcloud version do you have installed?

27.0.2

Which Operating system do you have installed?

Debian 11

Which database are you running Nextcloud on?

MariaDB

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?

ARM64

Describe the Bug

It seems that when using S3 as main storage, recognize can't access the files. When using occ recognize:classify just after enabling face recognition, it spams Could not find file and removing 123456 from faces queue because it couldn't be found and only succeed to run on images hosted on my SFTP external storage, not on files hosted on S3 main storage.

I've ~600 photos.

It seems to work when using regular background job though, only occ recognize:classify seems to have this problem.

Expected Behavior

It should detect faces also on S3 main storage.

To Reproduce

Debug log

https://paste.evolix.org/?e24017eeb4db4b87#9N4X5b5Sm1YM6n7t6gQmJDC1pe1Sku6K3etSQG51N1vR

Aeris1One commented 11 months ago

It also outputs a bunch of warning in Admin > Logging, though it seems to work at least for some files when using the regular background job image

marcelklehr commented 10 months ago

S3 main storage

This means you've mounted your S3 storage as a local file system right? So, for Nextcloud the S3 storage looks like a normal fs?

marcelklehr commented 10 months ago

That exception means a local file cannot be generated, likely because it isn't available. I cannot tell you much more than that.

Aeris1One commented 10 months ago

No, S3 isn't mounted as a local filesystem. I use the native objectstore configuration in Nextcloud that allow to use S3 as primary storage. Here's the doc about that feature : https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html

Aeris1One commented 10 months ago

You left the "waiting for more information" tag, which information do you need ?