Skip to content

Commit

Permalink
修复拼写错误等
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminwan committed Oct 28, 2022
1 parent 1340d65 commit 037bf4c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/AngleNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Angle AngleNet::getAngle(cv::Mat &src) {
std::vector<const char *> inputNames = {inputNamesPtr.data()->get()};
std::vector<const char *> outputNames = {outputNamesPtr.data()->get()};
auto outputTensor = session->Run(Ort::RunOptions{nullptr}, inputNames.data(), &inputTensor,
inputNamesPtr.size(), outputNames.data(), outputNamesPtr.size());
inputNames.size(), outputNames.data(), outputNames.size());
assert(outputTensor.size() == 1 && outputTensor.front().IsTensor());
std::vector<int64_t> outputShape = outputTensor[0].GetTensorTypeAndShapeInfo().GetShape();
int64_t outputCount = std::accumulate(outputShape.begin(), outputShape.end(), 1,
Expand Down
2 changes: 1 addition & 1 deletion src/CrnnNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ TextLine CrnnNet::getTextLine(const cv::Mat &src) {
std::vector<const char *> inputNames = {inputNamesPtr.data()->get()};
std::vector<const char *> outputNames = {outputNamesPtr.data()->get()};
auto outputTensor = session->Run(Ort::RunOptions{nullptr}, inputNames.data(), &inputTensor,
inputNamesPtr.size(), outputNames.data(), outputNamesPtr.size());
inputNames.size(), outputNames.data(), outputNames.size());
assert(outputTensor.size() == 1 && outputTensor.front().IsTensor());
std::vector<int64_t> outputShape = outputTensor[0].GetTensorTypeAndShapeInfo().GetShape();
int64_t outputCount = std::accumulate(outputShape.begin(), outputShape.end(), 1,
Expand Down
2 changes: 1 addition & 1 deletion src/DbNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 *> outputNames = {outputNamesPtr.data()->get()};
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());
std::vector<int64_t> outputShape = outputTensor[0].GetTensorTypeAndShapeInfo().GetShape();
int64_t outputCount = std::accumulate(outputShape.begin(), outputShape.end(), 1,
Expand Down
4 changes: 2 additions & 2 deletions src/OcrUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
for (auto & textBoxe : textBoxes) {
drawTextBox(boxImg, textBoxe.boxPoint, thickness);
for (auto & textBox : textBoxes) {
drawTextBox(boxImg, textBox.boxPoint, thickness);
}
}

Expand Down

0 comments on commit 037bf4c

Please sign in to comment.