delete debug code

This commit is contained in:
LDOUBLEV 2021-05-26 06:50:02 +00:00
parent 4ae833c519
commit 2ab0ba91e4
1 changed files with 87 additions and 92 deletions

View File

@ -88,14 +88,9 @@ void CRNNRecognizer::Run(std::vector<std::vector<std::vector<int>>> boxes,
std::cout << str_res[i];
}
std::cout << "\tscore: " << score << std::endl;
auto box = boxes[i];
std::cout << "box: " << box[0][0] << " " << box[0][1] << " " << box[1][0]
<< " " << box[1][1] << " " << box[2][0] << " " << box[2][1]
<< " " << box[3][0] << " " << box[3][1] << " " << std::endl;
}
}
void CRNNRecognizer::LoadModel(const std::string &model_dir) {
void CRNNRecognizer::LoadModel(const std::string &model_dir) {
// AnalysisConfig config;
paddle_infer::Config config;
config.SetModel(model_dir + "/inference.pdmodel",
@ -130,10 +125,10 @@ void CRNNRecognizer::LoadModel(const std::string &model_dir) {
config.DisableGlogInfo();
this->predictor_ = CreatePredictor(config);
}
}
cv::Mat CRNNRecognizer::GetRotateCropImage(const cv::Mat &srcimage,
std::vector<std::vector<int>> box) {
cv::Mat CRNNRecognizer::GetRotateCropImage(
const cv::Mat &srcimage, std::vector<std::vector<int>> box) {
cv::Mat image;
srcimage.copyTo(image);
std::vector<std::vector<int>> points = box;
@ -185,6 +180,6 @@ cv::Mat CRNNRecognizer::GetRotateCropImage(const cv::Mat &srcimage,
} else {
return dst_img;
}
}
}
} // namespace PaddleOCR