未验证 提交 43874ba9 编写于 作者: D dyning 提交者: GitHub

Merge pull request #847 from WenmuZhou/fix_cls_android_demo

set cls image_shape to 3,48,192
......@@ -20,7 +20,7 @@
#include <iostream>
#include <vector>
const std::vector<int> CLS_IMAGE_SHAPE = {3, 32, 100};
const std::vector<int> CLS_IMAGE_SHAPE = {3, 48, 192};
cv::Mat cls_resize_img(const cv::Mat &img) {
int imgC = CLS_IMAGE_SHAPE[0];
......
......@@ -98,7 +98,7 @@ private:
* @param origin
* @return
*/
cv::Mat infer_cls(const cv::Mat &origin, float thresh = 0.5);
cv::Mat infer_cls(const cv::Mat &origin, float thresh = 0.9);
/**
* Postprocess or sencod model to extract text
......
......@@ -17,7 +17,7 @@
#include <memory>
#include <string>
const std::vector<int> rec_image_shape{3, 32, 100};
const std::vector<int> rec_image_shape{3, 48, 192};
cv::Mat ClsResizeImg(cv::Mat img) {
int imgC, imgH, imgW;
......
......@@ -107,7 +107,7 @@ cv::Mat DetResizeImg(const cv::Mat img, int max_size_len,
}
cv::Mat RunClsModel(cv::Mat img, std::shared_ptr<PaddlePredictor> predictor_cls,
const float thresh = 0.5) {
const float thresh = 0.9) {
std::vector<float> mean = {0.5f, 0.5f, 0.5f};
std::vector<float> scale = {1 / 0.5f, 1 / 0.5f, 1 / 0.5f};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册