Update Face plugin to incorporate TensorFlow GPU handling update

build-default-monitor-config-from-definitions
Moe 2020-04-26 12:09:06 -07:00
parent 474a3c599f
commit 49eb779f80
3 changed files with 4 additions and 1 deletions

2
plugins/face/.env Normal file
View File

@ -0,0 +1,2 @@
TF_FORCE_GPU_ALLOW_GROWTH=true
#CUDA_VISIBLE_DEVICES=0,2

View File

@ -10,7 +10,7 @@
"socket.io": "^2.0.4", "socket.io": "^2.0.4",
"face-api.js": "^0.22.2", "face-api.js": "^0.22.2",
"canvas": "^2.1.0", "canvas": "^2.1.0",
"@tensorflow/tfjs-node-gpu": "^0.1.21" "dotenv": "^8.2.0"
}, },
"devDependencies": {}, "devDependencies": {},
"scripts": { "scripts": {

View File

@ -10,6 +10,7 @@
// Base Init >> // Base Init >>
var fs = require('fs'); var fs = require('fs');
var config = require('./conf.json') var config = require('./conf.json')
var dotenv = require('dotenv').config()
var s var s
try{ try{
s = require('../pluginBase.js')(__dirname,config) s = require('../pluginBase.js')(__dirname,config)