-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The same ppocrV4 model returns inconsistent results #95
Comments
PaddleOCRSharp this project enlarged the image source in code level, if you enlarge the source image 2 times or 3 times, it should be exactly the same. |
Is it like this when the length and width of the original image are magnified twice?I‘ll have a try |
I loaded my own training AI model, found that the picture increased, and there is no effect, the same model, the output of the two libraries are not the same |
Identify the incorrect image, no matter how many times the magnification, the return value is the same, the wrong is always wrong, but change another library, the return value is correct, the loaded image is the picture of the training Dataset |
using Sdcb.PaddleOCR.Models.Local;
using Sdcb.PaddleOCR;
using Sdcb.PaddleOCR.Models;
using Sdcb.PaddleInference;
using OpenCvSharp;
var img = Cv2.ImRead("D:\\dataset\\test\\23.jpg");
var modelPath = @"D:\OcrModel";
var keyPath = @"D:\OcrModel\ppocr_keys.txt";
int scale = 30;
FullOcrModel model = FullOcrModel.FromDirectory(modelPath, keyPath, ModelVersion.V4);
var ocr = new PaddleOcrRecognizer(model.RecognizationModel, PaddleDevice.Gpu());
using var dst = new Mat();
Cv2.Resize(img, dst, new Size() { Width = img.Width * scale, Height = img.Height * scale });
Cv2.ImShow("dst",dst);
Cv2.WaitKey();
for (int i = 0; i < 10000; i++)
{
var a = ocr.Run(dst);
Console.WriteLine($"{i}:"+a.Text);
}
Console.ReadKey(); |
Describe the bug
The path to another library:https://gitee.com/raoyutian/PaddleOCRSharp
The running speed of another library is only one tenth of yours
I just tested the REC model
“”“”c#
public class PaddleOCR
{
}
“”“”
Steps to reproduce the bug
Bug titleI used two libraries to call the same V4 model, but the returned results were different. It seems that many of the returned values from your library are empty
img.zip
OCRModel.zip
Expected behavior
No response
Screenshots
No response
Release version
No response
IDE
No response
OS version
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: