Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
fbf0fab5
Unverified
Commit
fbf0fab5
authored
Jul 15, 2020
by
dyning
Committed by
GitHub
Jul 15, 2020
Browse files
Merge pull request #346 from LDOUBLEV/fixocr
Support to recognize space text
parents
fbed0a02
4274652a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
deploy/lite/ocr_db_crnn.cc
deploy/lite/ocr_db_crnn.cc
+3
-2
No files found.
deploy/lite/ocr_db_crnn.cc
View file @
fbf0fab5
...
...
@@ -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
,
reinterpret_cast
<
unsigned
char
*>
cbuf
);
reinterpret_cast
<
unsigned
char
*>
(
cbuf
)
)
;
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
maxvalue
=
255
;
...
...
@@ -335,6 +335,7 @@ int main(int argc, char **argv) {
auto
rec_predictor
=
loadModel
(
rec_model_file
);
auto
charactor_dict
=
ReadDict
(
dict_path
);
charactor_dict
.
push_back
(
" "
);
cv
::
Mat
srcimg
=
cv
::
imread
(
img_path
,
cv
::
IMREAD_COLOR
);
auto
boxes
=
RunDetModel
(
det_predictor
,
srcimg
,
Config
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment