From c7fe31931a26a941ca2adf002e40b47a049a604c Mon Sep 17 00:00:00 2001 From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674> Date: 星期四, 27 四月 2017 11:07:57 +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