Closed zzyzx-dc closed 1 year ago
Hello :wave:
Thank you for taking the time to open this issue with recognize. I know it's frustrating when software causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at and if possible solved. I try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it. Until then, please be patient. Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can collaborate to make this software better. For everyone. Thus, if you can, you could also look at other issues to see whether you can help other people with your knowledge and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and try to fix the odd bug yourself. Everyone will be thankful for extra helping hands! One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum, to twitter or somewhere else. But this is a technical issue tracker, so please make sure to focus on the tech and keep your opinions to yourself. (Also see our Code of Conduct. Really.)
I look forward to working with you on this issue Cheers :blue_heart:
Responding to myself after doing some more searching:
The Linuxserver.io container which I am using for Nextcloud evidently uses musl, not glibc, so it's using an version of C incompatible with tensorflow?
See: https://github.com/nextcloud/recognize/issues/453#issuecomment-1303972673 https://github.com/nextcloud/recognize/issues/838#issuecomment-1576548021
Similar user having an issue: https://github.com/nextcloud/recognize/discussions/1009
There appears to be a project porting tensorflow to musl:
https://github.com/deliveroo/libtensorflow-musl
but that's beyond my ability to know how to integrate it with recognize.
Edit: enabling WASM mode resolved the error message in the occ recognize:classify
process that is running. (I am watching it with occ -it
.) The scan seems to be working faster now too.
Also, now the Recognize Settings page says:
Node.js v14.18.2 binary was installed successfully. Tensorflow WASM was loaded successfully into Node.js.
The Settings page still says: Could not check whether your machine supports native TensorFlow operation. Make sure your OS has GNU lib C, your CPU supports AVX instructions and you are running on x86. If one of these things is not the case, you will need to run in WASM mode.
I'm curious if the CPU isn't being passed through to the docker container.
Perhaps my post here can be moved to Discussions as it is not a bug or an issue specific to Recognize.
Closing issue since upon further reading of the docs it appears that new features/compatibilities are unlikely to be added
Hello @zzyzx-dc Sorry for the delay. Your conclusion is correct. When used in a musl environment recognize cannot make use of your CPUs AVX and will only run in WASM mode. It was working before enabling WASM mode because it automatically falls back.
Which version of recognize are you using?
5.0.3
Enabled Modes
Face recognition
TensorFlow mode
Normal mode
Downstream App
Memories App
Which Nextcloud version do you have installed?
Nextcloud Hub 6 (27.1.3)
Which Operating system do you have installed?
Ubuntu Server 20.02
Which database are you running Nextcloud on?
Mariadb
Which Docker container are you using to run Nextcloud? (if applicable)
Linuxserver.io SWAG with Nextcloud
How much RAM does your server have?
32GiB
What processor Architecture does your CPU have?
x86_64 Intel Core i7-4770 CPU
Describe the Bug
Initial face scans did not run at all and there were no results in the Memories or Photos app. This went on for a few days until I realized it was not running any background jobs. (It said the last background scan was several days ago.)
I ran:
(I elected to run recognize:classify rather than recognize:recrawl so I could watch the scan as it proceeded, per the Terminal commands at the bottom of the Recognize settings page)
This scan is working, and faces are being resulted in the Memories app. However, I am seeing the below error repeatedly.
Is it due to my CPU not supporting tensorflow? It appears to support AVX instructions, per Intel docs.
Is it because I do not have libtensorflow installed somewhere that my Nextcloud instance can see it?
Error:
Additionally, in the Recognize settings, I see these warnings:
Tensorflow WASM mode Could not check whether your machine supports native TensorFlow operation. Make sure your OS has GNU lib C, your CPU supports AVX instructions and you are running on x86. If one of these things is not the case, you will need to run in WASM mode.
Enable WASM mode is OFF
Tensorflow GPU mode - Enable GPU mode is OFF (this machine does not have a GPU)
Node.js Node.js v14.18.2 binary was installed successfully. Could not load libtensorflow in Node.js. You can try to manually install libtensorflow or run in WASM mode.
Expected Behavior
Recognize would tie in with tensorflow to scan faces/objects on a Haswell CPU.
To Reproduce
Run:
Debug log
No response