长沙网站自己制作,网站后台里有网页代码没,wordpress远程图片不能,wordpress固定导航PaddleOCR.Onnx一款基于Paddle的OCR#xff0c;项目使用ONNX模型#xff0c;速度更快。本项目同时支持X64和X86的CPU上使用。本项目是一个基于PaddleOCR的C代码修改并封装的.NET的工具类库。包含文本识别、文本检测、基于文本检测结果的统计分析的表格识别功能#xff0c;同… PaddleOCR.Onnx一款基于Paddle的OCR项目使用ONNX模型速度更快。本项目同时支持X64和X86的CPU上使用。本项目是一个基于PaddleOCR的C代码修改并封装的.NET的工具类库。包含文本识别、文本检测、基于文本检测结果的统计分析的表格识别功能同时针对小图识别不准的情况下做了优化提高识别准确率。包含总模型仅8.6M的超轻量级中文OCR单模型支持中英文数字组合识别、竖排文本识别、长文本识别。同时支持多种文本检测。项目封装极其简化实际调用仅几行代码极大的方便了中下游开发者的使用和降低了PaddleOCR的使用入门级别同时提供不同的.NET框架使用方便各个行业应用开发与部署。Nuget包即装即用可以离线部署不需要网络就可以识别的高精度中英文OCR。目前不支持win7及以下操作系统。本项目目前支持以下NET框架net461;net462;net47;net471;net48;
netstandard2.0;netcoreapp3.1;
net5.0;net6.0;OCR识别模型库支持官方所有的模型也支持自己训练的模型。本项目部署自带的一种轻量版8.6M模型库、服务器版模型库更准确需要自行下载可以自行更改模型库适用实际需求。PaddleOCR模型下载地址模型需要转成ONNX格式才能被本项目所使用。如果需要修改成服务器版模型库参考代码如下(假设服务器版模型库在运行目录的文件夹inferenceserver下)OpenFileDialog ofd new OpenFileDialog();
ofd.Filter *.*|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png;
if (ofd.ShowDialog() ! DialogResult.OK) return;
var imagebyte File.ReadAllBytes(ofd.FileName);Bitmap bitmap new Bitmap(new MemoryStream(imagebyte));//自带轻量版中英文模型// OCRModelConfig config null;//服务器中英文模型//OCRModelConfig config new OCRModelConfig();//string root Environment.CurrentDirectory;//string modelPathroot root \inferenceserver;//config.det_infer modelPathroot \ch_ppocr_server_v2.0_det_infer.onnx;//config.cls_infer modelPathroot \ch_ppocr_mobile_v2.0_cls_infer.onnx;//config.rec_infer modelPathroot \ch_ppocr_server_v2.0_rec_infer.onnx;//config.keys modelPathroot \ppocr_keys.txt;//英文和数字模型OCRModelConfig config new OCRModelConfig();string root Environment.CurrentDirectory;string modelPathroot root \en;config.det_infer modelPathroot \ch_PP-OCRv2_det_infer;config.cls_infer modelPathroot \ch_ppocr_mobile_v2.0_cls_infer.onnx;config.rec_infer modelPathroot \en_number_mobile_v2.0_rec_infer.onnx;config.keys modelPathroot \en_dict.txt;OCRParameter oCRParameter new OCRParameter ();OCRResult ocrResult new OCRResult();//建议程序全局初始化一次即可不必每次识别都初始化容易报错。PaddleOCREngine engine new PaddleOCREngine(config, oCRParameter);{ocrResult engine.DetectText(bitmap );}if (ocrResult ! null){MessageBox.Show(ocrResult.Text,识别结果);}//不再用OCR时请把PaddleOCREngine释放.NET使用示例OpenFileDialog ofd new OpenFileDialog();ofd.Filter *.*|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png;if (ofd.ShowDialog() ! DialogResult.OK) return;var imagebyte File.ReadAllBytes(ofd.FileName);Bitmap bitmap new Bitmap(new MemoryStream(imagebyte));OCRModelConfig config null;OCRParameter oCRParameter new OCRParameter ();OCRResult ocrResult new OCRResult();//建议程序全局初始化一次即可不必每次识别都初始化容易报错。PaddleOCREngine engine new PaddleOCREngine(config, oCRParameter);{ocrResult engine.DetectText(bitmap );}if (ocrResult ! null){MessageBox.Show(ocrResult.Text,识别结果);}//不再用OCR时请把PaddleOCREngine释放QQ交流群818391797318860399有问题可以加QQ群咨询。