From a54e2c8ed81ec720f45470292cdd97e3fc86d8e9 Mon Sep 17 00:00:00 2001
From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期二, 25 四月 2017 15:34:10 +0800
Subject: [PATCH]
---
FaceServer/STFaceCache.cpp | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/FaceServer/STFaceCache.cpp b/FaceServer/STFaceCache.cpp
index 82f18e3..6190f82 100644
--- a/FaceServer/STFaceCache.cpp
+++ b/FaceServer/STFaceCache.cpp
@@ -9,6 +9,8 @@
#include "sample_face_search.h"
#include <cv_face.h>
+#define ENABLE_AUTO_CREATE_STFACEDB
+
struct STFaceCacheContext
{
cv_handle_t handle_verify;
@@ -152,6 +154,8 @@
bool ret = ctx.init_db(cacheContext);
LOG_INFO << "init stface db dbid=" << ctx.dbid << ", ret=" << ret << LOG_ENDL;
}
+
+ return true;
}
void STFaceCache::close_dbs()
@@ -222,6 +226,8 @@
}
stface_ctx_map_t::iterator iterCtx = dbContext.find(img.db_id);
+
+#ifdef ENABLE_AUTO_CREATE_STFACEDB
if (iterCtx == dbContext.end())
{
// create db
@@ -247,6 +253,7 @@
dbContext.insert(std::make_pair(ctx.dbid, ctx));
iterCtx = dbContext.find(img.db_id);
}
+#endif
if (iterCtx == dbContext.end())
{
--
Gitblit v1.8.0