Open MitchellMonaghan opened 4 years ago
The thing is that utilizing node-canvas is more of "a hack" to make it work in nodejs, so you might have to cast to "any" here and there:
faceapi.env.monkeyPatch({
Canvas,
Image,
ImageData
} as any)
faceapi.detectAllFaces(img)
By the way tfjs-node provides the necessary utility to read and write images so you do not necessarily have to use node-canvas anymore.
The thing is that utilizing node-canvas is more of "a hack" to make it work in nodejs, so you might have to cast to "any" here and there:
faceapi.env.monkeyPatch({ Canvas, Image, ImageData } as any)
faceapi.detectAllFaces(img)
By the way tfjs-node provides the necessary utility to read and write images so you do not necessarily have to use node-canvas anymore.
Hi! I'm trying to read/write images with the tjfs-node utility but I got an error when I run it:
The error occurs between lines 90-91:
Amazing library, if you have any idea of that error and you can help me I would be grateful
The thing is that utilizing node-canvas is more of "a hack" to make it work in nodejs, so you might have to cast to "any" here and there:
faceapi.env.monkeyPatch({ Canvas, Image, ImageData } as any)
faceapi.detectAllFaces(img)
By the way tfjs-node provides the necessary utility to read and write images so you do not necessarily have to use node-canvas anymore.Hi! I'm trying to read/write images with the tjfs-node utility but I got an error when I run it:
The error occurs between lines 90-91:
Amazing library, if you have any idea of that error and you can help me I would be grateful
Solved. I just update the face api version ^0.22.2
Am I dumb or am I missing something? I followed the documentation for usage with node but this produces many typescript compiler errors even tho the code functions.
The following produces the errors below
Also
Why use typescript at all if I have to use // @ts-ignore everywhere to remove compiler errors? Or am I missing something? Thanks.
"typescript": "3.7.5"