mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Increase tensorflow max size
This commit is contained in:
@@ -29,7 +29,7 @@ module.exports = class Tensorflow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async detectFaces(imgData) {
|
async detectFaces(imgData) {
|
||||||
if (Buffer.byteLength(imgData) >= 4e+6) return 'size';
|
if (Buffer.byteLength(imgData) >= 8e+6) return 'size';
|
||||||
tfnode.setBackend('tensorflow');
|
tfnode.setBackend('tensorflow');
|
||||||
const image = tfnode.node.decodeImage(imgData, 3);
|
const image = tfnode.node.decodeImage(imgData, 3);
|
||||||
tfnode.setBackend('cpu');
|
tfnode.setBackend('cpu');
|
||||||
|
|||||||
Reference in New Issue
Block a user