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
5aaf6f5b
"git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "bfdefbf6e773ebf2ee4cde536b67ef7196d37647"
Commit
5aaf6f5b
authored
Jun 28, 2022
by
shivabohemian
Browse files
fix compile bug
parent
c1eaa17a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
deploy/lite/crnn_process.cc
deploy/lite/crnn_process.cc
+2
-0
deploy/lite/ocr_db_crnn.cc
deploy/lite/ocr_db_crnn.cc
+1
-1
No files found.
deploy/lite/crnn_process.cc
View file @
5aaf6f5b
...
@@ -35,11 +35,13 @@ cv::Mat CrnnResizeImg(cv::Mat img, float wh_ratio, int rec_image_height) {
...
@@ -35,11 +35,13 @@ cv::Mat CrnnResizeImg(cv::Mat img, float wh_ratio, int rec_image_height) {
else
else
resize_w
=
int
(
ceilf
(
imgH
*
ratio
));
resize_w
=
int
(
ceilf
(
imgH
*
ratio
));
cv
::
Mat
resize_img
;
cv
::
resize
(
img
,
resize_img
,
cv
::
Size
(
resize_w
,
imgH
),
0.
f
,
0.
f
,
cv
::
resize
(
img
,
resize_img
,
cv
::
Size
(
resize_w
,
imgH
),
0.
f
,
0.
f
,
cv
::
INTER_LINEAR
);
cv
::
INTER_LINEAR
);
cv
::
copyMakeBorder
(
resize_img
,
resize_img
,
0
,
0
,
0
,
cv
::
copyMakeBorder
(
resize_img
,
resize_img
,
0
,
0
,
0
,
int
(
imgW
-
resize_img
.
cols
),
cv
::
BORDER_CONSTANT
,
int
(
imgW
-
resize_img
.
cols
),
cv
::
BORDER_CONSTANT
,
{
127
,
127
,
127
});
{
127
,
127
,
127
});
return
resize_img
;
}
}
std
::
vector
<
std
::
string
>
ReadDict
(
std
::
string
path
)
{
std
::
vector
<
std
::
string
>
ReadDict
(
std
::
string
path
)
{
...
...
deploy/lite/ocr_db_crnn.cc
View file @
5aaf6f5b
...
@@ -474,7 +474,7 @@ void system(char **argv){
...
@@ -474,7 +474,7 @@ void system(char **argv){
std
::
vector
<
double
>
rec_times
;
std
::
vector
<
double
>
rec_times
;
RunRecModel
(
boxes
,
srcimg
,
rec_predictor
,
rec_text
,
rec_text_score
,
RunRecModel
(
boxes
,
srcimg
,
rec_predictor
,
rec_text
,
rec_text_score
,
charactor_dict
,
cls_predictor
,
use_direction_classify
,
&
rec_times
);
charactor_dict
,
cls_predictor
,
use_direction_classify
,
&
rec_times
,
rec_image_height
);
//// visualization
//// visualization
auto
img_vis
=
Visualization
(
srcimg
,
boxes
);
auto
img_vis
=
Visualization
(
srcimg
,
boxes
);
...
...
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