Closed danyhiol closed 1 year ago
Expected Behavior The API should be able to handle base64 images directly.
why would you expect that library should be able to handle base64 images directly?
library cannot be expected to "just know" how to handle every possible input type.
and base64
does not even contain information about image encoding - is it rgb pixel-data, or rgba, or jpeg, or png.
i'm afraid you'll have to decode it yourself before using faceapi
btw, note that fetchImage
is just a wrapper around platform fetch
followed by filling resulting blob
to image
element using FileReader
- so no chance that would work even if fileReader
was implemented differently for nodejs.
Issue Description Apply face recognition on a 2 base64 string. Steps to Reproduce Apply face recognition using a 2 base64 string. Expected Behavior The API should be able to handle base64 images directly. **Environment macOS M1
"@vladmandic/face-api": "^1.7.7"
const imgSourceRef = await faceapi.fetchImage(source);
Wheresource
is abase64
string. This produces the above errorjs
,esm
,esm-nobundle
)?Additional
package.json