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
947470a3
"example/01_gemm/gemm_dl_int4.cpp" did not exist on "e0d8806ca1cd8611d387f1fb441d3c9e92174ec5"
Commit
947470a3
authored
May 26, 2021
by
LDOUBLEV
Browse files
fix error
parent
2ab0ba91
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
84 deletions
+85
-84
deploy/cpp_infer/src/ocr_rec.cpp
deploy/cpp_infer/src/ocr_rec.cpp
+85
-84
No files found.
deploy/cpp_infer/src/ocr_rec.cpp
View file @
947470a3
...
...
@@ -89,8 +89,9 @@ void CRNNRecognizer::Run(std::vector<std::vector<std::vector<int>>> boxes,
}
std
::
cout
<<
"
\t
score: "
<<
score
<<
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"
,
...
...
@@ -125,10 +126,10 @@ void CRNNRecognizer::Run(std::vector<std::vector<std::vector<int>>> boxes,
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
;
...
...
@@ -180,6 +181,6 @@ void CRNNRecognizer::Run(std::vector<std::vector<std::vector<int>>> boxes,
}
else
{
return
dst_img
;
}
}
}
}
// namespace PaddleOCR
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