justadudewhohacks / face-api.js

JavaScript API for face detection and face recognition in the browser and nodejs with tensorflow.js
MIT License
16.63k stars 3.7k forks source link

Use with CPU without AVX support #828

Open dgaenko opened 2 years ago

dgaenko commented 2 years ago

Hello guys! How to use face-api.js with ubuntu 20.04 and CPU without AVX support for node.js? I found * .whl packages, but how to use them with face-api.js?

vladmandic commented 2 years ago

you found whl of what?
and this is not question for face-api.js, its for tfjs
if you get @tensorflow/tfjs-node working, then face-api.js will just work

however, there is no recent prepackaged version @tensorflow/tfjs-node available anymore that doesnt require AVX
you can try installing some ancient version (dont remember what is the latest version without AVX) or build your own (painful)

dgaenko commented 2 years ago

@tensorflow/tfjs-node lib compiled for CPU with support AVX instructions. I have server with CPU without AVX.

recommend to update tensor compiled without avx instructions. there are ready-made whl packages on the web with the assembled tensor, but for python for example, https://github.com/furas/tensorflow-no-avx etc

vladmandic commented 2 years ago

now that you have tensorflow without AVX, you need to build @tensorflow/tfjs-node package (it links to tensorflow). but that is anything but a clean process. search on tfjs git issues.