Skip to content

Commit

Permalink
Fix another 2 issues causing ocr crash
Browse files Browse the repository at this point in the history
  • Loading branch information
sdcb committed Oct 27, 2023
1 parent 04811c4 commit 15c180d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public Ocr180DegreeClsResult[] ShouldRotate180(Mat[] srcs)

private Ocr180DegreeClsResult[] BatchedShouldRotate180(Mat[] srcs)
{
Mat final = PrepareAndStackImages(srcs);
using Mat final = PrepareAndStackImages(srcs);

using (Tensor input = final.StackedAsTensor(srcs.Length))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private unsafe PaddleOcrRecognizerResult[] BatchedRun(Mat[] srcs)
return padded;
}));

Mat final = PrepareAndStackImages(srcs, modelHeight, maxWidth);
using Mat final = PrepareAndStackImages(srcs, modelHeight, maxWidth);

using (Tensor input = final.StackedAsTensor(srcs.Length))
{
Expand Down

0 comments on commit 15c180d

Please sign in to comment.