Skip to content

Commit 15c180d

Browse files
committed
Fix another 2 issues causing ocr crash
1 parent 04811c4 commit 15c180d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

projects/PaddleOCR/Sdcb.OpenVINO.PaddleOCR/PaddleOcrClassifier.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public Ocr180DegreeClsResult[] ShouldRotate180(Mat[] srcs)
101101

102102
private Ocr180DegreeClsResult[] BatchedShouldRotate180(Mat[] srcs)
103103
{
104-
Mat final = PrepareAndStackImages(srcs);
104+
using Mat final = PrepareAndStackImages(srcs);
105105

106106
using (Tensor input = final.StackedAsTensor(srcs.Length))
107107
{

projects/PaddleOCR/Sdcb.OpenVINO.PaddleOCR/PaddleOcrRecognizer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ private unsafe PaddleOcrRecognizerResult[] BatchedRun(Mat[] srcs)
135135
return padded;
136136
}));
137137

138-
Mat final = PrepareAndStackImages(srcs, modelHeight, maxWidth);
138+
using Mat final = PrepareAndStackImages(srcs, modelHeight, maxWidth);
139139

140140
using (Tensor input = final.StackedAsTensor(srcs.Length))
141141
{

0 commit comments

Comments
 (0)