fix error
This commit is contained in:
parent
2ab0ba91e4
commit
947470a3b2
|
@ -89,8 +89,9 @@ void CRNNRecognizer::Run(std::vector<std::vector<std::vector<int>>> boxes,
|
||||||
}
|
}
|
||||||
std::cout << "\tscore: " << score << std::endl;
|
std::cout << "\tscore: " << score << std::endl;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CRNNRecognizer::LoadModel(const std::string &model_dir) {
|
void CRNNRecognizer::LoadModel(const std::string &model_dir) {
|
||||||
// AnalysisConfig config;
|
// AnalysisConfig config;
|
||||||
paddle_infer::Config config;
|
paddle_infer::Config config;
|
||||||
config.SetModel(model_dir + "/inference.pdmodel",
|
config.SetModel(model_dir + "/inference.pdmodel",
|
||||||
|
@ -125,10 +126,10 @@ void CRNNRecognizer::Run(std::vector<std::vector<std::vector<int>>> boxes,
|
||||||
config.DisableGlogInfo();
|
config.DisableGlogInfo();
|
||||||
|
|
||||||
this->predictor_ = CreatePredictor(config);
|
this->predictor_ = CreatePredictor(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
cv::Mat CRNNRecognizer::GetRotateCropImage(
|
cv::Mat CRNNRecognizer::GetRotateCropImage(const cv::Mat &srcimage,
|
||||||
const cv::Mat &srcimage, std::vector<std::vector<int>> box) {
|
std::vector<std::vector<int>> box) {
|
||||||
cv::Mat image;
|
cv::Mat image;
|
||||||
srcimage.copyTo(image);
|
srcimage.copyTo(image);
|
||||||
std::vector<std::vector<int>> points = box;
|
std::vector<std::vector<int>> points = box;
|
||||||
|
@ -180,6 +181,6 @@ void CRNNRecognizer::Run(std::vector<std::vector<std::vector<int>>> boxes,
|
||||||
} else {
|
} else {
|
||||||
return dst_img;
|
return dst_img;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace PaddleOCR
|
} // namespace PaddleOCR
|
||||||
|
|
Loading…
Reference in New Issue