|
@@ -1,11 +1,14 @@
|
|
package com.iden.common.facetool.pool;
|
|
package com.iden.common.facetool.pool;
|
|
|
|
|
|
import com.face.monitor.FaceMonitor;
|
|
import com.face.monitor.FaceMonitor;
|
|
|
|
+
|
|
|
|
+import org.apache.logging.log4j.LogManager;
|
|
|
|
+import org.apache.logging.log4j.Logger;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
|
|
|
|
|
public class MyFaceMonitor {
|
|
public class MyFaceMonitor {
|
|
-
|
|
|
|
|
|
+ private static final Logger logger = LogManager.getLogger(MyFaceMonitor.class);
|
|
private FaceMonitor faceMonitor;
|
|
private FaceMonitor faceMonitor;
|
|
|
|
|
|
@Value("${iden.root:#{null}}")
|
|
@Value("${iden.root:#{null}}")
|
|
@@ -15,6 +18,7 @@ public class MyFaceMonitor {
|
|
synchronized (this) {
|
|
synchronized (this) {
|
|
if( this.faceMonitor == null) {
|
|
if( this.faceMonitor == null) {
|
|
//初始化引擎
|
|
//初始化引擎
|
|
|
|
+ logger.info("init one FaceMonitor");
|
|
this.faceMonitor = new FaceMonitor();
|
|
this.faceMonitor = new FaceMonitor();
|
|
faceMonitor.init(idenRoot + "face/model", 0);
|
|
faceMonitor.init(idenRoot + "face/model", 0);
|
|
}
|
|
}
|