"examples/reinforcement_learning/run_diffuser_locomotion.py" did not exist on "1d7b4b60b7b7e19a0347da5a04ec76c045d8dbf0"
Unverified Commit fbf0fab5 authored by dyning's avatar dyning Committed by GitHub
Browse files

Merge pull request #346 from LDOUBLEV/fixocr

Support to recognize space text
parents fbed0a02 4274652a
...@@ -235,9 +235,9 @@ RunDetModel(std::shared_ptr<PaddlePredictor> predictor, cv::Mat img, ...@@ -235,9 +235,9 @@ RunDetModel(std::shared_ptr<PaddlePredictor> predictor, cv::Mat img,
} }
cv::Mat cbuf_map(shape_out[2], shape_out[3], CV_8UC1, cv::Mat cbuf_map(shape_out[2], shape_out[3], CV_8UC1,
reinterpret_cast<unsigned char *> cbuf); reinterpret_cast<unsigned char *>(cbuf));
cv::Mat pred_map(shape_out[2], shape_out[3], CV_32F, cv::Mat pred_map(shape_out[2], shape_out[3], CV_32F,
reinterpret_cast<float *> pred); reinterpret_cast<float *>(pred));
const double threshold = double(Config["det_db_thresh"]) * 255; const double threshold = double(Config["det_db_thresh"]) * 255;
const double maxvalue = 255; const double maxvalue = 255;
...@@ -335,6 +335,7 @@ int main(int argc, char **argv) { ...@@ -335,6 +335,7 @@ int main(int argc, char **argv) {
auto rec_predictor = loadModel(rec_model_file); auto rec_predictor = loadModel(rec_model_file);
auto charactor_dict = ReadDict(dict_path); auto charactor_dict = ReadDict(dict_path);
charactor_dict.push_back(" ");
cv::Mat srcimg = cv::imread(img_path, cv::IMREAD_COLOR); cv::Mat srcimg = cv::imread(img_path, cv::IMREAD_COLOR);
auto boxes = RunDetModel(det_predictor, srcimg, Config); auto boxes = RunDetModel(det_predictor, srcimg, Config);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment