This commit is contained in:
Dragon Fire
2024-03-24 11:01:13 -04:00
parent 5a1c1ba19f
commit a9cf2efc8d
+1 -1
View File
@@ -94,7 +94,7 @@ module.exports = class XiaoClient extends CommandClient {
async detectFaces(imgData) {
if (Buffer.byteLength(imgData) >= 4e+6) return 'size';
tfnode.setBackend('tensorflow');
const image = tfnode.node.decodeImage(imgData);
const image = tfnode.node.decodeImage(imgData, 3);
tfnode.setBackend('cpu');
const faces = await this.faceDetector.estimateFaces(image);
tfnode.setBackend('tensorflow');