update inference model name
This commit is contained in:
parent
19d66e6209
commit
4fd696ccdf
|
@ -81,7 +81,8 @@ cv::Mat Classifier::Run(cv::Mat &img) {
|
||||||
|
|
||||||
void Classifier::LoadModel(const std::string &model_dir) {
|
void Classifier::LoadModel(const std::string &model_dir) {
|
||||||
AnalysisConfig config;
|
AnalysisConfig config;
|
||||||
config.SetModel(model_dir + "/cls.pdmodel", model_dir + "/cls.pdiparams");
|
config.SetModel(model_dir + "/inference.pdmodel",
|
||||||
|
model_dir + "/inference.pdiparams");
|
||||||
|
|
||||||
if (this->use_gpu_) {
|
if (this->use_gpu_) {
|
||||||
config.EnableUseGpu(this->gpu_mem_, this->gpu_id_);
|
config.EnableUseGpu(this->gpu_mem_, this->gpu_id_);
|
||||||
|
|
|
@ -18,7 +18,8 @@ namespace PaddleOCR {
|
||||||
|
|
||||||
void DBDetector::LoadModel(const std::string &model_dir) {
|
void DBDetector::LoadModel(const std::string &model_dir) {
|
||||||
AnalysisConfig config;
|
AnalysisConfig config;
|
||||||
config.SetModel(model_dir + "/det.pdmodel", model_dir + "/det.pdiparams");
|
config.SetModel(model_dir + "/inference.pdmodel",
|
||||||
|
model_dir + "/inference.pdiparams");
|
||||||
|
|
||||||
if (this->use_gpu_) {
|
if (this->use_gpu_) {
|
||||||
config.EnableUseGpu(this->gpu_mem_, this->gpu_id_);
|
config.EnableUseGpu(this->gpu_mem_, this->gpu_id_);
|
||||||
|
|
|
@ -103,7 +103,8 @@ void CRNNRecognizer::Run(std::vector<std::vector<std::vector<int>>> boxes,
|
||||||
|
|
||||||
void CRNNRecognizer::LoadModel(const std::string &model_dir) {
|
void CRNNRecognizer::LoadModel(const std::string &model_dir) {
|
||||||
AnalysisConfig config;
|
AnalysisConfig config;
|
||||||
config.SetModel(model_dir + "/rec.pdmodel", model_dir + "/rec.pdiparams");
|
config.SetModel(model_dir + "/inference.pdmodel",
|
||||||
|
model_dir + "/inference.pdiparams");
|
||||||
|
|
||||||
if (this->use_gpu_) {
|
if (this->use_gpu_) {
|
||||||
config.EnableUseGpu(this->gpu_mem_, this->gpu_id_);
|
config.EnableUseGpu(this->gpu_mem_, this->gpu_id_);
|
||||||
|
|
|
@ -100,8 +100,8 @@ def create_predictor(args, mode, logger):
|
||||||
if model_dir is None:
|
if model_dir is None:
|
||||||
logger.info("not find {} model file path {}".format(mode, model_dir))
|
logger.info("not find {} model file path {}".format(mode, model_dir))
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
model_file_path = model_dir + ".pdmodel"
|
model_file_path = model_dir + "/inference.pdmodel"
|
||||||
params_file_path = model_dir + ".pdiparams"
|
params_file_path = model_dir + "/inference.pdiparams"
|
||||||
if not os.path.exists(model_file_path):
|
if not os.path.exists(model_file_path):
|
||||||
logger.info("not find model file path {}".format(model_file_path))
|
logger.info("not find model file path {}".format(model_file_path))
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
Loading…
Reference in New Issue