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
gaoqiong
RapidOCR
Commits
037bf4ca
Commit
037bf4ca
authored
Oct 28, 2022
by
benjaminwan
Browse files
修复拼写错误等
parent
1340d655
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
src/AngleNet.cpp
src/AngleNet.cpp
+1
-1
src/CrnnNet.cpp
src/CrnnNet.cpp
+1
-1
src/DbNet.cpp
src/DbNet.cpp
+1
-1
src/OcrUtils.cpp
src/OcrUtils.cpp
+2
-2
No files found.
src/AngleNet.cpp
View file @
037bf4ca
...
@@ -82,7 +82,7 @@ Angle AngleNet::getAngle(cv::Mat &src) {
...
@@ -82,7 +82,7 @@ Angle AngleNet::getAngle(cv::Mat &src) {
std
::
vector
<
const
char
*>
inputNames
=
{
inputNamesPtr
.
data
()
->
get
()};
std
::
vector
<
const
char
*>
inputNames
=
{
inputNamesPtr
.
data
()
->
get
()};
std
::
vector
<
const
char
*>
outputNames
=
{
outputNamesPtr
.
data
()
->
get
()};
std
::
vector
<
const
char
*>
outputNames
=
{
outputNamesPtr
.
data
()
->
get
()};
auto
outputTensor
=
session
->
Run
(
Ort
::
RunOptions
{
nullptr
},
inputNames
.
data
(),
&
inputTensor
,
auto
outputTensor
=
session
->
Run
(
Ort
::
RunOptions
{
nullptr
},
inputNames
.
data
(),
&
inputTensor
,
inputNames
Ptr
.
size
(),
outputNames
.
data
(),
outputNames
Ptr
.
size
());
inputNames
.
size
(),
outputNames
.
data
(),
outputNames
.
size
());
assert
(
outputTensor
.
size
()
==
1
&&
outputTensor
.
front
().
IsTensor
());
assert
(
outputTensor
.
size
()
==
1
&&
outputTensor
.
front
().
IsTensor
());
std
::
vector
<
int64_t
>
outputShape
=
outputTensor
[
0
].
GetTensorTypeAndShapeInfo
().
GetShape
();
std
::
vector
<
int64_t
>
outputShape
=
outputTensor
[
0
].
GetTensorTypeAndShapeInfo
().
GetShape
();
int64_t
outputCount
=
std
::
accumulate
(
outputShape
.
begin
(),
outputShape
.
end
(),
1
,
int64_t
outputCount
=
std
::
accumulate
(
outputShape
.
begin
(),
outputShape
.
end
(),
1
,
...
...
src/CrnnNet.cpp
View file @
037bf4ca
...
@@ -122,7 +122,7 @@ TextLine CrnnNet::getTextLine(const cv::Mat &src) {
...
@@ -122,7 +122,7 @@ TextLine CrnnNet::getTextLine(const cv::Mat &src) {
std
::
vector
<
const
char
*>
inputNames
=
{
inputNamesPtr
.
data
()
->
get
()};
std
::
vector
<
const
char
*>
inputNames
=
{
inputNamesPtr
.
data
()
->
get
()};
std
::
vector
<
const
char
*>
outputNames
=
{
outputNamesPtr
.
data
()
->
get
()};
std
::
vector
<
const
char
*>
outputNames
=
{
outputNamesPtr
.
data
()
->
get
()};
auto
outputTensor
=
session
->
Run
(
Ort
::
RunOptions
{
nullptr
},
inputNames
.
data
(),
&
inputTensor
,
auto
outputTensor
=
session
->
Run
(
Ort
::
RunOptions
{
nullptr
},
inputNames
.
data
(),
&
inputTensor
,
inputNames
Ptr
.
size
(),
outputNames
.
data
(),
outputNames
Ptr
.
size
());
inputNames
.
size
(),
outputNames
.
data
(),
outputNames
.
size
());
assert
(
outputTensor
.
size
()
==
1
&&
outputTensor
.
front
().
IsTensor
());
assert
(
outputTensor
.
size
()
==
1
&&
outputTensor
.
front
().
IsTensor
());
std
::
vector
<
int64_t
>
outputShape
=
outputTensor
[
0
].
GetTensorTypeAndShapeInfo
().
GetShape
();
std
::
vector
<
int64_t
>
outputShape
=
outputTensor
[
0
].
GetTensorTypeAndShapeInfo
().
GetShape
();
int64_t
outputCount
=
std
::
accumulate
(
outputShape
.
begin
(),
outputShape
.
end
(),
1
,
int64_t
outputCount
=
std
::
accumulate
(
outputShape
.
begin
(),
outputShape
.
end
(),
1
,
...
...
src/DbNet.cpp
View file @
037bf4ca
...
@@ -131,7 +131,7 @@ DbNet::getTextBoxes(cv::Mat &src, ScaleParam &s, float boxScoreThresh, float box
...
@@ -131,7 +131,7 @@ DbNet::getTextBoxes(cv::Mat &src, ScaleParam &s, float boxScoreThresh, float box
std
::
vector
<
const
char
*>
inputNames
=
{
inputNamesPtr
.
data
()
->
get
()};
std
::
vector
<
const
char
*>
inputNames
=
{
inputNamesPtr
.
data
()
->
get
()};
std
::
vector
<
const
char
*>
outputNames
=
{
outputNamesPtr
.
data
()
->
get
()};
std
::
vector
<
const
char
*>
outputNames
=
{
outputNamesPtr
.
data
()
->
get
()};
auto
outputTensor
=
session
->
Run
(
Ort
::
RunOptions
{
nullptr
},
inputNames
.
data
(),
&
inputTensor
,
auto
outputTensor
=
session
->
Run
(
Ort
::
RunOptions
{
nullptr
},
inputNames
.
data
(),
&
inputTensor
,
inputNames
.
size
(),
outputNames
.
data
(),
1
);
inputNames
.
size
(),
outputNames
.
data
(),
outputNames
.
size
()
);
assert
(
outputTensor
.
size
()
==
1
&&
outputTensor
.
front
().
IsTensor
());
assert
(
outputTensor
.
size
()
==
1
&&
outputTensor
.
front
().
IsTensor
());
std
::
vector
<
int64_t
>
outputShape
=
outputTensor
[
0
].
GetTensorTypeAndShapeInfo
().
GetShape
();
std
::
vector
<
int64_t
>
outputShape
=
outputTensor
[
0
].
GetTensorTypeAndShapeInfo
().
GetShape
();
int64_t
outputCount
=
std
::
accumulate
(
outputShape
.
begin
(),
outputShape
.
end
(),
1
,
int64_t
outputCount
=
std
::
accumulate
(
outputShape
.
begin
(),
outputShape
.
end
(),
1
,
...
...
src/OcrUtils.cpp
View file @
037bf4ca
...
@@ -93,8 +93,8 @@ void drawTextBox(cv::Mat &boxImg, const std::vector<cv::Point> &box, int thickne
...
@@ -93,8 +93,8 @@ void drawTextBox(cv::Mat &boxImg, const std::vector<cv::Point> &box, int thickne
}
}
void
drawTextBoxes
(
cv
::
Mat
&
boxImg
,
std
::
vector
<
TextBox
>
&
textBoxes
,
int
thickness
)
{
void
drawTextBoxes
(
cv
::
Mat
&
boxImg
,
std
::
vector
<
TextBox
>
&
textBoxes
,
int
thickness
)
{
for
(
auto
&
textBox
e
:
textBoxes
)
{
for
(
auto
&
textBox
:
textBoxes
)
{
drawTextBox
(
boxImg
,
textBox
e
.
boxPoint
,
thickness
);
drawTextBox
(
boxImg
,
textBox
.
boxPoint
,
thickness
);
}
}
}
}
...
...
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