{"id":97256,"date":"2026-08-29T08:36:07","date_gmt":"2026-08-29T00:36:07","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/97256.html"},"modified":"2026-08-29T08:36:07","modified_gmt":"2026-08-29T00:36:07","slug":"%e4%b8%8d%e7%94%a8-onnx-runtime%ef%bc%8c%e4%b9%9f%e4%b8%8d%e7%94%a8-opencv%ef%bc%9a%e6%88%91%e7%94%a8%e7%ba%af-c-%e5%81%9a%e4%ba%86%e4%b8%80%e4%b8%aa-pp-ocr-%e4%b8%93%e7%94%a8%e6%8e%a8%e7%90%86-runtim","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/97256.html","title":{"rendered":"\u4e0d\u7528 ONNX Runtime\uff0c\u4e5f\u4e0d\u7528 OpenCV\uff1a\u6211\u7528\u7eaf C \u505a\u4e86\u4e00\u4e2a PP-OCR \u4e13\u7528\u63a8\u7406 Runtime"},"content":{"rendered":"<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"%E4%B8%80%E3%80%81%E4%B8%BA%E4%BB%80%E4%B9%88%E8%BF%98%E8%A6%81%E8%87%AA%E5%B7%B1%E5%86%99%E4%B8%80%E4%B8%AA%20OCR%20Runtime%EF%BC%9F-toc\" style=\"margin-left:0px\">\u4e00\u3001\u4e3a\u4ec0\u4e48\u8fd8\u8981\u81ea\u5df1\u5199\u4e00\u4e2a OCR Runtime&#xff1f;<\/p>\n<p id=\"%E4%BA%8C%E3%80%81%E6%9C%80%E5%85%B3%E9%94%AE%E7%9A%84%E4%B8%80%E6%AD%A5%EF%BC%9A%E9%83%A8%E7%BD%B2%E7%AB%AF%E5%B9%B2%E8%84%86%E4%B8%8D%E8%A7%A3%E6%9E%90%20ONNX-toc\" style=\"margin-left:0px\">\u4e8c\u3001\u6700\u5173\u952e\u7684\u4e00\u6b65&#xff1a;\u90e8\u7f72\u7aef\u5e72\u8106\u4e0d\u89e3\u6790 ONNX<\/p>\n<p id=\"LWM%20%E2%80%94%E2%80%94%20LightWeight%20Model-toc\" style=\"margin-left:0px\">LWM \u2014\u2014 LightWeight Model<\/p>\n<p id=\"%E4%B8%89%E3%80%81LWM%20%E4%B8%8D%E6%98%AF%E2%80%9C%E6%8D%A2%E4%B8%AA%E5%90%8E%E7%BC%80%E7%9A%84%20ONNX%E2%80%9D-toc\" style=\"margin-left:0px\">\u4e09\u3001LWM \u4e0d\u662f\u201c\u6362\u4e2a\u540e\u7f00\u7684 ONNX\u201d<\/p>\n<p id=\"%E5%9B%9B%E3%80%81%E4%BB%8E%20REC%20%E5%BC%80%E5%A7%8B%EF%BC%8C%E6%9C%80%E5%90%8E%E5%81%9A%E5%88%B0%E4%BA%86%20DET%20%E2%86%92%20CLS%20%E2%86%92%20REC-toc\" style=\"margin-left:0px\">\u56db\u3001\u4ece REC \u5f00\u59cb&#xff0c;\u6700\u540e\u505a\u5230\u4e86 DET \u2192 CLS \u2192 REC<\/p>\n<p id=\"%E4%BA%94%E3%80%81%E8%BF%9E%E9%80%8F%E8%A7%86%E8%A3%81%E5%89%AA%E9%83%BD%E6%B2%A1%E6%9C%89%E4%BE%9D%E8%B5%96%20OpenCV-toc\" style=\"margin-left:0px\">\u4e94\u3001\u8fde\u900f\u89c6\u88c1\u526a\u90fd\u6ca1\u6709\u4f9d\u8d56 OpenCV<\/p>\n<p id=\"%E5%85%AD%E3%80%81%E5%85%AC%E5%85%B1%E6%8E%A5%E5%8F%A3%E4%B8%8D%E6%98%AF%E7%AE%80%E5%8D%95%E5%9C%B0%C2%A0char*%20ocr(...)-toc\" style=\"margin-left:0px\">\u516d\u3001\u516c\u5171\u63a5\u53e3\u4e0d\u662f\u7b80\u5355\u5730\u00a0char* ocr(&#8230;)<\/p>\n<p id=\"1.%20%E4%B8%8D%E8%B7%A8%20ABI%20%E9%87%8A%E6%94%BE%E5%86%85%E5%AD%98-toc\" style=\"margin-left:40px\">1. \u4e0d\u8de8 ABI \u91ca\u653e\u5185\u5b58<\/p>\n<p id=\"2.%20%E5%85%AC%E5%85%B1%E7%BB%93%E6%9E%84%E9%83%BD%E6%9C%89%C2%A0struct_size-toc\" style=\"margin-left:40px\">2. \u516c\u5171\u7ed3\u6784\u90fd\u6709\u00a0struct_size<\/p>\n<p id=\"3.%20%E9%94%99%E8%AF%AF%E4%B8%8D%E6%98%AF%E5%8F%AA%E8%BF%94%E5%9B%9E%E4%B8%80%E5%8F%A5%E5%AD%97%E7%AC%A6%E4%B8%B2-toc\" style=\"margin-left:40px\">3. \u9519\u8bef\u4e0d\u662f\u53ea\u8fd4\u56de\u4e00\u53e5\u5b57\u7b26\u4e32<\/p>\n<p id=\"%E4%B8%83%E3%80%81%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6%E4%B9%9F%E6%8C%89%E7%85%A7%E2%80%9C%E4%B8%8D%E5%8F%AF%E4%BF%A1%E8%BE%93%E5%85%A5%E2%80%9D%E5%A4%84%E7%90%86-toc\" style=\"margin-left:0px\">\u4e03\u3001\u6a21\u578b\u6587\u4ef6\u4e5f\u6309\u7167\u201c\u4e0d\u53ef\u4fe1\u8f93\u5165\u201d\u5904\u7406<\/p>\n<p id=\"%E5%85%AB%E3%80%81%E7%8E%B0%E5%9C%A8%E5%88%B0%E5%BA%95%E6%94%AF%E6%8C%81%E5%93%AA%E4%BA%9B%E6%A8%A1%E5%9E%8B%EF%BC%9F-toc\" style=\"margin-left:0px\">\u516b\u3001\u73b0\u5728\u5230\u5e95\u652f\u6301\u54ea\u4e9b\u6a21\u578b&#xff1f;<\/p>\n<p id=\"%E4%B9%9D%E3%80%81%E6%9C%80%E6%9C%89%E6%84%8F%E6%80%9D%E7%9A%84%E4%B8%80%E6%AE%B5%EF%BC%9A%E4%BB%8E%20570%20ms%20%E4%BC%98%E5%8C%96%E5%88%B0%E4%BA%86%2018.865%20ms-toc\" style=\"margin-left:0px\">\u4e5d\u3001\u6700\u6709\u610f\u601d\u7684\u4e00\u6bb5&#xff1a;\u4ece 570 ms \u4f18\u5316\u5230\u4e86 18.865 ms<\/p>\n<p id=\"%E5%8D%81%E3%80%81%E4%B8%BA%E4%BB%80%E4%B9%88%E4%B8%93%E7%94%A8%20Runtime%20%E5%8F%AF%E8%83%BD%E6%9C%89%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96%E7%A9%BA%E9%97%B4%EF%BC%9F-toc\" style=\"margin-left:0px\">\u5341\u3001\u4e3a\u4ec0\u4e48\u4e13\u7528 Runtime \u53ef\u80fd\u6709\u6027\u80fd\u4f18\u5316\u7a7a\u95f4&#xff1f;<\/p>\n<p id=\"%E5%8D%81%E4%B8%80%E3%80%81%E5%AE%8C%E6%95%B4%20OCR%20%E4%B8%8D%E5%8F%AA%E8%BF%94%E5%9B%9E%E6%96%87%E5%AD%97%EF%BC%8C%E8%BF%98%E4%BF%9D%E7%95%99%E5%9D%90%E6%A0%87%E5%92%8C%E5%90%84%E9%98%B6%E6%AE%B5%E4%BF%A1%E6%81%AF-toc\" style=\"margin-left:0px\">\u5341\u4e00\u3001\u5b8c\u6574 OCR \u4e0d\u53ea\u8fd4\u56de\u6587\u5b57&#xff0c;\u8fd8\u4fdd\u7559\u5750\u6807\u548c\u5404\u9636\u6bb5\u4fe1\u606f<\/p>\n<p id=\"%E5%8D%81%E4%BA%8C%E3%80%81%E6%A0%B8%E5%BF%83%E5%BA%93%E4%B8%8D%E8%B4%9F%E8%B4%A3%20JPEG%20%2F%20PNG%20%E8%A7%A3%E7%A0%81%EF%BC%8C%E8%BF%99%E6%98%AF%E6%95%85%E6%84%8F%E7%9A%84-toc\" style=\"margin-left:0px\">\u5341\u4e8c\u3001\u6838\u5fc3\u5e93\u4e0d\u8d1f\u8d23 JPEG \/ PNG \u89e3\u7801&#xff0c;\u8fd9\u662f\u6545\u610f\u7684<\/p>\n<p id=\"%E5%8D%81%E4%B8%89%E3%80%81%E6%9C%80%E6%9C%B4%E7%B4%A0%E7%9A%84%20C%20Demo%EF%BC%9A%E4%B8%8D%E7%94%A8%E5%9B%BE%E7%89%87%E5%BA%93%E4%B9%9F%E8%83%BD%E8%B7%91-toc\" style=\"margin-left:0px\">\u5341\u4e09\u3001\u6700\u6734\u7d20\u7684 C Demo&#xff1a;\u4e0d\u7528\u56fe\u7247\u5e93\u4e5f\u80fd\u8dd1<\/p>\n<p id=\"%E5%8D%81%E5%9B%9B%E3%80%81C%23%20WinForms%20Demo%EF%BC%9A%E7%9B%B4%E6%8E%A5%20P%2FInvoke-toc\" style=\"margin-left:0px\">\u5341\u56db\u3001C# WinForms Demo&#xff1a;\u76f4\u63a5 P\/Invoke<\/p>\n<p id=\"%E5%8D%81%E4%BA%94%E3%80%81%E8%BF%98%E6%9C%89%E4%B8%80%E4%B8%AA%E5%8E%9F%E7%94%9F%20HTTP%20%2F%20Web%20Demo-toc\" style=\"margin-left:0px\">\u5341\u4e94\u3001\u8fd8\u6709\u4e00\u4e2a\u539f\u751f HTTP \/ Web Demo<\/p>\n<p id=\"%E5%8D%81%E5%85%AD%E3%80%81%E7%8E%B0%E5%9C%A8%E7%9A%84%E8%B7%A8%E5%B9%B3%E5%8F%B0%E7%8A%B6%E6%80%81%E5%88%B0%E5%BA%95%E6%80%8E%E4%B9%88%E6%A0%B7%EF%BC%9F-toc\" style=\"margin-left:0px\">\u5341\u516d\u3001\u73b0\u5728\u7684\u8de8\u5e73\u53f0\u72b6\u6001\u5230\u5e95\u600e\u4e48\u6837&#xff1f;<\/p>\n<p id=\"CI%20%E9%AA%8C%E8%AF%81%20%E2%89%A0%20%E6%89%80%E6%9C%89%E6%9C%BA%E5%99%A8%E5%AE%9E%E6%9C%BA%E9%AA%8C%E8%AF%81-toc\" style=\"margin-left:80px\">CI \u9a8c\u8bc1 \u2260 \u6240\u6709\u673a\u5668\u5b9e\u673a\u9a8c\u8bc1<\/p>\n<p id=\"%E5%8D%81%E4%B8%83%E3%80%8132%20%E4%BD%8D%E4%B8%BA%E4%BB%80%E4%B9%88%E8%BF%98%E5%80%BC%E5%BE%97%E4%BF%9D%E7%95%99%EF%BC%9F-toc\" style=\"margin-left:0px\">\u5341\u4e03\u300132 \u4f4d\u4e3a\u4ec0\u4e48\u8fd8\u503c\u5f97\u4fdd\u7559&#xff1f;<\/p>\n<p id=\"%E5%8D%81%E5%85%AB%E3%80%81%E5%AE%83%E9%80%82%E5%90%88%E4%BB%80%E4%B9%88%E5%9C%BA%E6%99%AF%EF%BC%9F-toc\" style=\"margin-left:0px\">\u5341\u516b\u3001\u5b83\u9002\u5408\u4ec0\u4e48\u573a\u666f&#xff1f;<\/p>\n<p id=\"1.%20%E6%A1%8C%E9%9D%A2%E8%BD%AF%E4%BB%B6%E5%B5%8C%E5%85%A5%20OCR-toc\" style=\"margin-left:40px\">1. \u684c\u9762\u8f6f\u4ef6\u5d4c\u5165 OCR<\/p>\n<p id=\"2.%20%E5%B7%A5%E4%B8%9A%E7%8E%B0%E5%9C%BA%E5%92%8C%E7%A6%BB%E7%BA%BF%E8%AE%BE%E5%A4%87-toc\" style=\"margin-left:40px\">2. \u5de5\u4e1a\u73b0\u573a\u548c\u79bb\u7ebf\u8bbe\u5907<\/p>\n<p id=\"3.%20%E5%B5%8C%E5%85%A5%E5%BC%8F%20Linux-toc\" style=\"margin-left:40px\">3. \u5d4c\u5165\u5f0f Linux<\/p>\n<p id=\"4.%20%E5%AD%A6%E4%B9%A0%E4%B8%80%E4%B8%AA%E5%B0%8F%E5%9E%8B%E7%A5%9E%E7%BB%8F%E7%BD%91%E7%BB%9C%20Runtime%20%E6%98%AF%E6%80%8E%E4%B9%88%E5%B7%A5%E4%BD%9C%E7%9A%84-toc\" style=\"margin-left:40px\">4. \u5b66\u4e60\u4e00\u4e2a\u5c0f\u578b\u795e\u7ecf\u7f51\u7edc Runtime \u662f\u600e\u4e48\u5de5\u4f5c\u7684<\/p>\n<p id=\"%E5%8D%81%E4%B9%9D%E3%80%81%E5%AE%83%E4%B8%8D%E9%80%82%E5%90%88%E4%BB%80%E4%B9%88%E5%9C%BA%E6%99%AF%EF%BC%9F-toc\" style=\"margin-left:0px\">\u5341\u4e5d\u3001\u5b83\u4e0d\u9002\u5408\u4ec0\u4e48\u573a\u666f&#xff1f;<\/p>\n<p id=\"%E4%BA%8C%E5%8D%81%E3%80%81%E5%BD%93%E5%89%8D%E4%BB%8D%E7%84%B6%E5%AD%98%E5%9C%A8%E7%9A%84%E9%99%90%E5%88%B6-toc\" style=\"margin-left:0px\">\u4e8c\u5341\u3001\u5f53\u524d\u4ecd\u7136\u5b58\u5728\u7684\u9650\u5236<\/p>\n<p id=\"LWM%20v0.1%20%E8%BF%98%E6%B2%A1%E6%9C%89%E5%86%BB%E7%BB%93-toc\" style=\"margin-left:40px\">LWM v0.1 \u8fd8\u6ca1\u6709\u51bb\u7ed3<\/p>\n<p id=\"%E5%BD%93%E5%89%8D%E4%B8%BB%E8%A6%81%E6%98%AF%20FP32%20CPU-toc\" style=\"margin-left:40px\">\u5f53\u524d\u4e3b\u8981\u662f FP32 CPU<\/p>\n<p id=\"ARM64%20%2F%20NEON%20%E8%BF%98%E6%B2%A1%E6%9C%89%E5%AE%8C%E6%88%90-toc\" style=\"margin-left:40px\">ARM64 \/ NEON \u8fd8\u6ca1\u6709\u5b8c\u6210<\/p>\n<p id=\"Windows%207%20%E8%BF%98%E9%9C%80%E8%A6%81%E5%AE%9E%E4%BD%93%E6%9C%BA%E9%AA%8C%E8%AF%81-toc\" style=\"margin-left:40px\">Windows 7 \u8fd8\u9700\u8981\u5b9e\u4f53\u673a\u9a8c\u8bc1<\/p>\n<p id=\"%E4%B8%80%E4%B8%AA%20OCR%20Handle%20%E4%B8%8D%E8%AE%BE%E8%AE%A1%E4%B8%BA%E5%B9%B6%E5%8F%91%E8%B0%83%E7%94%A8-toc\" style=\"margin-left:40px\">\u4e00\u4e2a OCR Handle \u4e0d\u8bbe\u8ba1\u4e3a\u5e76\u53d1\u8c03\u7528<\/p>\n<p id=\"%E8%BF%98%E9%9C%80%E8%A6%81%E6%9B%B4%E5%A4%A7%E7%9A%84%E7%9C%9F%E5%AE%9E%E5%9B%BE%E7%89%87%E5%9B%9E%E5%BD%92%E9%9B%86-toc\" style=\"margin-left:40px\">\u8fd8\u9700\u8981\u66f4\u5927\u7684\u771f\u5b9e\u56fe\u7247\u56de\u5f52\u96c6<\/p>\n<p id=\"%E4%BA%8C%E5%8D%81%E4%B8%80%E3%80%81%E6%88%91%E8%A7%89%E5%BE%97%E4%B8%8B%E4%B8%80%E6%AD%A5%E6%9C%80%E5%80%BC%E5%BE%97%E5%81%9A%E4%BB%80%E4%B9%88%EF%BC%9F-toc\" style=\"margin-left:0px\">\u4e8c\u5341\u4e00\u3001\u6211\u89c9\u5f97\u4e0b\u4e00\u6b65\u6700\u503c\u5f97\u505a\u4ec0\u4e48&#xff1f;<\/p>\n<p id=\"Full%20OCR%20Benchmark-toc\" style=\"margin-left:0px\">Full OCR Benchmark<\/p>\n<p id=\"%E4%BA%8C%E5%8D%81%E4%BA%8C%E3%80%81%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E4%BB%8D%E7%84%B6%E6%83%B3%E6%8A%8A%E8%BF%99%E4%B8%AA%E9%A1%B9%E7%9B%AE%E5%BC%80%E6%BA%90%E5%87%BA%E6%9D%A5%EF%BC%9F-toc\" style=\"margin-left:0px\">\u4e8c\u5341\u4e8c\u3001\u4e3a\u4ec0\u4e48\u6211\u4ecd\u7136\u60f3\u628a\u8fd9\u4e2a\u9879\u76ee\u5f00\u6e90\u51fa\u6765&#xff1f;<\/p>\n<p id=\"%E4%BA%8C%E5%8D%81%E4%B8%89%E3%80%81%E5%A6%82%E6%9E%9C%E4%BD%A0%E6%83%B3%E8%AF%95%E4%B8%80%E4%B8%8B-toc\" style=\"margin-left:0px\">\u4e8c\u5341\u4e09\u3001\u5982\u679c\u4f60\u60f3\u8bd5\u4e00\u4e0b<\/p>\n<p id=\"%E7%BB%93%E8%AF%AD-toc\" style=\"margin-left:0px\">\u7ed3\u8bed<\/p>\n<hr id=\"hr-toc\" \/>\n<p>\u9879\u76ee&#xff1a;lw.PPOCR.C GitHub&#xff1a;https:\/\/github.com\/lxw112190\/lw.PPOCR.C<\/p>\n<p>\u4e00\u4e2a\u9762\u5411 PP-OCR \u7684\u8f7b\u91cf\u7ea7\u7eaf C \u63a8\u7406\u8fd0\u884c\u65f6&#xff1a;\u5f00\u53d1\u9636\u6bb5\u628a ONNX \u8f6c\u6362\u6210\u81ea\u5b9a\u4e49 LWM \u6a21\u578b&#xff0c;\u90e8\u7f72\u7aef\u53ea\u4fdd\u7559 C11 Runtime&#xff0c;\u5b8c\u6210 DET \u2192 CLS \u2192 REC \u5168\u94fe\u8def OCR\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u56fe\u7247\" height=\"608\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829003605-6a922975cd2da.png\" width=\"1080\" \/><\/p>\n<hr \/>\n<p>\u505a OCR \u63a8\u7406&#xff0c;\u4eca\u5929\u5df2\u7ecf\u4e0d\u7b97\u4ec0\u4e48\u65b0\u9c9c\u4e8b\u4e86\u3002<\/p>\n<p>Python\u3001PaddleOCR\u3001ONNX Runtime\u3001OpenVINO\u3001TensorRT\u2026\u2026\u4efb\u9009\u4e00\u5957\u6210\u719f\u6846\u67b6&#xff0c;\u8dd1\u8d77\u6765\u5e76\u4e0d\u56f0\u96be\u3002<\/p>\n<p>\u771f\u6b63\u9ebb\u70e6\u7684&#xff0c;\u5f80\u5f80\u662f\u90e8\u7f72\u3002<\/p>\n<p>\u5c24\u5176\u5f53\u76ee\u6807\u73af\u5883\u4e0d\u662f\u4e00\u53f0\u914d\u7f6e\u5145\u8db3\u7684\u670d\u52a1\u5668&#xff0c;\u800c\u662f\u5de5\u4e1a\u73b0\u573a\u7684\u4e00\u53f0 Windows \u5de5\u63a7\u673a\u3001\u4e00\u5957\u9700\u8981\u957f\u671f\u7ef4\u62a4\u7684\u684c\u9762\u8f6f\u4ef6\u3001\u4e00\u4e2a\u5d4c\u5165\u5f0f Linux \u8bbe\u5907&#xff0c;\u751a\u81f3\u8fd8\u8981\u517c\u987e 32 \u4f4d\u7a0b\u5e8f\u65f6&#xff0c;\u95ee\u9898\u5f88\u5feb\u5c31\u4f1a\u4ece&#xff1a;<\/p>\n<p>\u201c\u6a21\u578b\u80fd\u4e0d\u80fd\u8bc6\u522b&#xff1f;\u201d<\/p>\n<p>\u53d8\u6210&#xff1a;<\/p>\n<p>\u201c\u4e3a\u4e86\u8bc6\u522b\u51e0\u884c\u5b57&#xff0c;\u6211\u5230\u5e95\u8981\u5e26\u591a\u5c11\u4e1c\u897f&#xff1f;\u201d<\/p>\n<p>\u8fd9\u4e5f\u662f\u6211\u505a\u00a0lw.PPOCR.C\u00a0\u7684\u51fa\u53d1\u70b9\u3002<\/p>\n<p>\u6211\u60f3\u5c1d\u8bd5\u4e00\u4ef6\u770b\u8d77\u6765\u6709\u70b9\u201c\u53cd\u6f6e\u6d41\u201d\u7684\u4e8b\u60c5&#xff1a;<\/p>\n<p>\u4e0d\u5728\u90e8\u7f72\u7aef\u52a0\u8f7d ONNX&#xff0c;\u4e0d\u4f9d\u8d56 ONNX Runtime&#xff0c;\u4e0d\u4f9d\u8d56 OpenCV&#xff0c;\u4e0d\u4f9d\u8d56 OpenVINO&#xff0c;\u4e5f\u4e0d\u4f9d\u8d56 TensorRT&#xff0c;\u81ea\u5df1\u7528\u7eaf C \u5199\u4e00\u4e2a\u53ea\u670d\u52a1\u4e8e PP-OCR \u7684\u4e13\u7528\u63a8\u7406 Runtime\u3002<\/p>\n<p>\u5b83\u4e0d\u8ffd\u6c42\u6210\u4e3a\u4e0b\u4e00\u4e2a\u901a\u7528 AI \u6846\u67b6\u3002<\/p>\n<p>\u6070\u6070\u76f8\u53cd&#xff0c;\u5b83\u4ece\u4e00\u5f00\u59cb\u5c31\u4e3b\u52a8\u6536\u7f29\u8fb9\u754c&#xff1a;<\/p>\n<p>\u53ea\u89e3\u51b3 PP-OCR \u7684\u90e8\u7f72\u95ee\u9898&#xff0c;\u5e76\u5c3d\u53ef\u80fd\u628a\u8fd9\u4ef6\u4e8b\u505a\u5c0f\u3001\u505a\u7a33\u3001\u505a\u6e05\u695a\u3002<\/p>\n<p>\u4e8e\u662f\u6709\u4e86&#xff1a;<\/p>\n<p>lw.PPOCR.C<\/p>\n<hr \/>\n<h2 id=\"%E4%B8%80%E3%80%81%E4%B8%BA%E4%BB%80%E4%B9%88%E8%BF%98%E8%A6%81%E8%87%AA%E5%B7%B1%E5%86%99%E4%B8%80%E4%B8%AA%20OCR%20Runtime%EF%BC%9F\">\u4e00\u3001\u4e3a\u4ec0\u4e48\u8fd8\u8981\u81ea\u5df1\u5199\u4e00\u4e2a OCR Runtime&#xff1f;<\/h2>\n<p>\u5148\u8bf4\u7ed3\u8bba&#xff1a;<\/p>\n<p>\u5982\u679c\u4f60\u7684\u90e8\u7f72\u73af\u5883\u5b8c\u5168\u4e0d\u5728\u610f\u4f9d\u8d56\u4f53\u79ef&#xff0c;\u4e5f\u4e0d\u9700\u8981\u517c\u987e\u65e7\u7cfb\u7edf&#xff0c;\u66f4\u4e0d\u5173\u5fc3\u8fd0\u884c\u65f6\u5185\u90e8\u5230\u5e95\u53d1\u751f\u4e86\u4ec0\u4e48&#xff0c;\u90a3\u4e48\u6210\u719f\u6846\u67b6\u901a\u5e38\u4ecd\u7136\u662f\u66f4\u7701\u4e8b\u7684\u9009\u62e9\u3002<\/p>\n<p>lw.PPOCR.C\u00a0\u5e76\u4e0d\u662f\u4e3a\u4e86\u8bc1\u660e\u201c\u81ea\u5df1\u9020\u8f6e\u5b50\u4e00\u5b9a\u6bd4\u6210\u719f\u6846\u67b6\u597d\u201d\u3002<\/p>\n<p>\u5b83\u89e3\u51b3\u7684\u662f\u53e6\u4e00\u7c7b\u95ee\u9898\u3002<\/p>\n<p>\u6bd4\u5982&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u4e00\u4e2a C\/C&#043;&#043; \u684c\u9762\u8f6f\u4ef6&#xff0c;\u53ea\u60f3\u5d4c\u5165 OCR&#xff0c;\u4e0d\u60f3\u518d\u9644\u5e26\u4e00\u6574\u5957\u63a8\u7406\u6846\u67b6&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u4e00\u4e2a C# \u5de5\u4e1a\u8f6f\u4ef6&#xff0c;\u5e0c\u671b\u901a\u8fc7\u7a33\u5b9a\u7684 C ABI \u76f4\u63a5\u8c03\u7528 OCR&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u4e00\u4e2a\u8001\u9879\u76ee\u4ecd\u7136\u9700\u8981\u517c\u987e 32 \u4f4d\u7a0b\u5e8f&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u4e00\u53f0\u79bb\u7ebf\u8bbe\u5907\u9700\u8981\u5c3d\u53ef\u80fd\u7b80\u5355\u7684\u90e8\u7f72\u76ee\u5f55&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u5de5\u4e1a\u73b0\u573a\u66f4\u5728\u610f\u53ef\u63a7\u3001\u53ef\u5ba1\u8ba1\u3001\u53ef\u957f\u671f\u7ef4\u62a4&#xff0c;\u800c\u4e0d\u662f\u6a21\u578b\u6846\u67b6\u529f\u80fd\u6709\u591a\u4e30\u5bcc&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u5d4c\u5165\u5f0f Linux \u4e0a&#xff0c;\u5e0c\u671b\u5c06\u6765\u53ef\u4ee5\u53ea\u9488\u5bf9 CPU\/NEON \u505a\u4f18\u5316&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u4e1a\u52a1\u6a21\u578b\u975e\u5e38\u660e\u786e&#xff0c;\u5c31\u662f PP-OCR&#xff0c;\u5e76\u4e0d\u9700\u8981\u6267\u884c\u4efb\u610f ONNX \u7f51\u7edc\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u5728\u8fd9\u4e9b\u573a\u666f\u91cc&#xff0c;\u4e00\u4e2a\u901a\u7528 Runtime \u7684\u201c\u5f3a\u5927\u201d&#xff0c;\u6709\u65f6\u5019\u4e5f\u610f\u5473\u7740\u4f60\u5fc5\u987b\u4e00\u8d77\u627f\u62c5\u5b83\u7684\u590d\u6742\u5ea6\u3002<\/p>\n<p>\u800c\u00a0lw.PPOCR.C\u00a0\u9009\u62e9\u4e86\u53e6\u5916\u4e00\u6761\u8def&#xff1a;<\/p>\n<p>PP-OCR ONNX<br \/>\n\u00a0 \u00a0 \u00a0 \u2502<br \/>\n\u00a0 \u00a0 \u00a0 \u25bc<br \/>\n\u5f00\u53d1\u671f Converter<br \/>\n\u00a0 \u00a0 \u00a0 \u2502<br \/>\n\u00a0 \u00a0 \u00a0 \u25bc<br \/>\n\u5e73\u53f0\u65e0\u5173 LWM \u6a21\u578b<br \/>\n\u00a0 \u00a0 \u00a0 \u2502<br \/>\n\u00a0 \u00a0 \u00a0 \u25bc<br \/>\n\u7eaf C Runtime<br \/>\n\u00a0 \u00a0 \u00a0 \u2502<br \/>\n\u00a0 \u00a0 \u00a0 \u251c\u2500\u2500 DET \u6587\u5b57\u68c0\u6d4b<br \/>\n\u00a0 \u00a0 \u00a0 \u251c\u2500\u2500 CLS \u65b9\u5411\u5206\u7c7b<br \/>\n\u00a0 \u00a0 \u00a0 \u2514\u2500\u2500 REC \u6587\u5b57\u8bc6\u522b<\/p>\n<p>\u4e00\u53e5\u8bdd\u6982\u62ec&#xff1a;<\/p>\n<p>\u628a\u590d\u6742\u5de5\u4f5c\u5c3d\u53ef\u80fd\u653e\u5230\u5f00\u53d1\u9636\u6bb5&#xff0c;\u628a\u90e8\u7f72\u9636\u6bb5\u538b\u7f29\u6210\u4e00\u4e2a\u4e13\u7528\u6267\u884c\u5668\u3002<\/p>\n<p>\u8fd9\u4e5f\u662f\u6574\u4e2a\u9879\u76ee\u6700\u6838\u5fc3\u7684\u8bbe\u8ba1\u601d\u60f3\u3002<\/p>\n<hr \/>\n<h2 id=\"%E4%BA%8C%E3%80%81%E6%9C%80%E5%85%B3%E9%94%AE%E7%9A%84%E4%B8%80%E6%AD%A5%EF%BC%9A%E9%83%A8%E7%BD%B2%E7%AB%AF%E5%B9%B2%E8%84%86%E4%B8%8D%E8%A7%A3%E6%9E%90%20ONNX\">\u4e8c\u3001\u6700\u5173\u952e\u7684\u4e00\u6b65&#xff1a;\u90e8\u7f72\u7aef\u5e72\u8106\u4e0d\u89e3\u6790 ONNX<\/h2>\n<p>\u8fd9\u662f\u00a0lw.PPOCR.C\u00a0\u548c\u5f88\u591a\u201cC\/C&#043;&#043; OCR \u5c01\u88c5\u9879\u76ee\u201d\u6700\u5927\u7684\u533a\u522b\u3002<\/p>\n<p>\u5e38\u89c1\u65b9\u6848\u5927\u81f4\u662f&#xff1a;<\/p>\n<p>\u5e94\u7528\u7a0b\u5e8f<br \/>\n\u00a0 \u00a0 \u2193<br \/>\nONNX Runtime \/ OpenVINO \/ TensorRT \/ OpenCV DNN<br \/>\n\u00a0 \u00a0 \u2193<br \/>\nONNX \u6a21\u578b<\/p>\n<p>\u800c\u00a0lw.PPOCR.C\u00a0\u662f&#xff1a;<\/p>\n<p>\u5f00\u53d1\u73af\u5883&#xff1a;<\/p>\n<p>PP-OCR.onnx<br \/>\n\u00a0 \u00a0 \u2193<br \/>\nModel Converter<br \/>\n\u00a0 \u00a0 \u2193<br \/>\n*.lwm<\/p>\n<p>\u90e8\u7f72\u73af\u5883&#xff1a;<\/p>\n<p>*.lwm<br \/>\n\u00a0 \u00a0 \u2193<br \/>\nlw.PPOCR.C<br \/>\n\u00a0 \u00a0 \u2193<br \/>\nInference<\/p>\n<p>\u4e3a\u4ec0\u4e48\u8fd9\u4e48\u505a&#xff1f;<\/p>\n<p>\u56e0\u4e3a ONNX \u9996\u5148\u662f\u4e00\u4e2a\u4f18\u79c0\u7684\u6a21\u578b\u4ea4\u6362\u683c\u5f0f&#xff0c;\u4f46\u5b83\u4e0d\u4e00\u5b9a\u662f\u4e00\u4e2a\u201c\u6781\u7b80\u4e13\u7528 Runtime\u201d\u6700\u5408\u9002\u7684\u76f4\u63a5\u6267\u884c\u683c\u5f0f\u3002<\/p>\n<p>\u5982\u679c\u90e8\u7f72\u7aef\u76f4\u63a5\u89e3\u6790 ONNX&#xff0c;\u5c31\u610f\u5473\u7740 Runtime \u8fd8\u9700\u8981\u9762\u5bf9\u5f88\u591a\u539f\u672c\u53ef\u4ee5\u63d0\u524d\u5b8c\u6210\u7684\u5de5\u4f5c&#xff0c;\u4f8b\u5982&#xff1a;<\/p>\n<p>protobuf<br \/>\nModelProto \/ GraphProto<br \/>\nNodeProto \/ TensorProto<br \/>\nAttributeProto<br \/>\nopset \u517c\u5bb9<br \/>\nShape \u63a8\u5bfc<br \/>\n\u5e38\u91cf\u5904\u7406<br \/>\n\u56fe\u7ed3\u6784\u89e3\u6790<br \/>\n\u7b97\u5b50\u5c5e\u6027\u5f52\u4e00\u5316<br \/>\n\u6a21\u578b\u5408\u6cd5\u6027\u68c0\u67e5<br \/>\n\u5185\u5b58\u89c4\u5212<\/p>\n<p>\u5982\u679c\u76ee\u6807\u662f\u201c\u652f\u6301\u4efb\u610f ONNX\u201d&#xff0c;\u8fd9\u4e9b\u590d\u6742\u5ea6\u6ca1\u6709\u529e\u6cd5\u7ed5\u5f00\u3002<\/p>\n<p>\u4f46\u00a0lw.PPOCR.C\u00a0\u6839\u672c\u4e0d\u51c6\u5907\u652f\u6301\u4efb\u610f ONNX\u3002<\/p>\n<p>\u5b83\u53ea\u8fd0\u884c\u7ecf\u8fc7\u9a8c\u8bc1\u7684 PP-OCR \u6a21\u578b\u3002<\/p>\n<p>\u90a3\u4e48\u4e00\u4e2a\u81ea\u7136\u7684\u95ee\u9898\u5c31\u51fa\u73b0\u4e86&#xff1a;<\/p>\n<p>\u4e3a\u4ec0\u4e48\u4e0d\u5728\u5f00\u53d1\u673a\u4e0a\u628a\u8fd9\u4e9b\u4e8b\u60c5\u63d0\u524d\u505a\u5b8c&#xff1f;<\/p>\n<p>\u4e8e\u662f\u9879\u76ee\u5f15\u5165\u4e86\u81ea\u5df1\u7684\u6a21\u578b\u683c\u5f0f&#xff1a;<\/p>\n<h2 id=\"LWM%20%E2%80%94%E2%80%94%20LightWeight%20Model\">LWM \u2014\u2014 LightWeight Model<\/h2>\n<p>\u5f53\u524d\u7248\u672c\u662f\u5b9e\u9a8c\u6027\u7684\u00a0LWM v0.1\u3002<\/p>\n<p>Converter \u53ef\u4ee5\u4f7f\u7528 Python\u3001ONNX\u3001NumPy\u3001protobuf&#xff0c;\u56e0\u4e3a\u5b83\u53ea\u5b58\u5728\u4e8e\u5f00\u53d1\u73af\u5883\u3002<\/p>\n<p>\u4f46\u751f\u6210\u00a0.lwm\u00a0\u540e&#xff0c;\u90e8\u7f72\u7aef\u5c31\u4e0d\u518d\u9700\u8981\u8fd9\u4e9b\u4e1c\u897f\u3002<\/p>\n<p>\u8fd9\u79cd\u601d\u8def\u6709\u70b9\u50cf\u4e00\u4e2a\u5f88\u5c0f\u7684&#xff1a;<\/p>\n<p>Model Compiler &#043; Runtime<\/p>\n<p>\u800c\u4e0d\u662f&#xff1a;<\/p>\n<p>Runtime \u73b0\u573a\u89e3\u6790\u4e00\u4e2a\u590d\u6742\u7684\u6a21\u578b\u4ea4\u6362\u683c\u5f0f\u3002<\/p>\n<hr \/>\n<h2 id=\"%E4%B8%89%E3%80%81LWM%20%E4%B8%8D%E6%98%AF%E2%80%9C%E6%8D%A2%E4%B8%AA%E5%90%8E%E7%BC%80%E7%9A%84%20ONNX%E2%80%9D\">\u4e09\u3001LWM \u4e0d\u662f\u201c\u6362\u4e2a\u540e\u7f00\u7684 ONNX\u201d<\/h2>\n<p>LWM \u5e76\u4e0d\u662f\u628a ONNX \u5185\u5bb9\u539f\u6837\u585e\u8fdb\u53e6\u5916\u4e00\u4e2a\u6587\u4ef6\u3002<\/p>\n<p>\u5b83\u6709\u81ea\u5df1\u660e\u786e\u7684\u4e8c\u8fdb\u5236\u5e03\u5c40\u3002<\/p>\n<p>\u5f53\u524d LWM v0.1 \u4f7f\u7528&#xff1a;<\/p>\n<ul>\n<li>\n<p>little-endian \u56fa\u5b9a\u5bbd\u5ea6\u6574\u6570&#xff1b;<\/p>\n<\/li>\n<li>\n<p>IEEE-754 FP32&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u4e0d\u4fdd\u5b58\u539f\u751f\u6307\u9488&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u4e0d\u4fdd\u5b58\u00a0size_t\u3001long\u00a0\u7b49\u5e73\u53f0\u76f8\u5173\u7c7b\u578b&#xff1b;<\/p>\n<\/li>\n<li>\n<p>Section \u4f7f\u7528\u7edd\u5bf9\u504f\u79fb&#xff1b;<\/p>\n<\/li>\n<li>\n<p>Section \u6309 8 \u5b57\u8282\u5bf9\u9f50&#xff1b;<\/p>\n<\/li>\n<li>\n<p>Tensor \u548c Node \u4f7f\u7528\u56fa\u5b9a\u8bb0\u5f55\u7ed3\u6784&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u6a21\u578b\u52a0\u8f7d\u524d\u5fc5\u987b\u5b8c\u6210\u8fb9\u754c\u3001\u7ed3\u6784\u548c checksum \u6821\u9a8c\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u6838\u5fc3\u6587\u4ef6\u7ed3\u6784\u5927\u81f4\u53ef\u4ee5\u7406\u89e3\u4e3a&#xff1a;<\/p>\n<p>\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502 Header \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u2502<br \/>\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524<br \/>\n\u2502 Graph Input \/ Output Table \u00a0 \u2502<br \/>\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524<br \/>\n\u2502 Tensor Table \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u2502<br \/>\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524<br \/>\n\u2502 Node Table \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u2502<br \/>\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524<br \/>\n\u2502 Operator Parameters \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u2502<br \/>\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524<br \/>\n\u2502 String Section \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u2502<br \/>\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524<br \/>\n\u2502 FP32 Weight Blob \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<\/p>\n<p>\u5f53\u524d\u683c\u5f0f\u5b9a\u4e49\u4e86 21 \u4e2a Runtime Operator ID&#xff0c;\u5305\u62ec&#xff1a;<\/p>\n<p>Conv<br \/>\nAdd<br \/>\nMul<br \/>\nDiv<br \/>\nErf<br \/>\nHardSigmoid<br \/>\nBatchNormalization<br \/>\nReduceMean<br \/>\nRelu<br \/>\nAveragePool<br \/>\nSqueeze<br \/>\nTranspose<br \/>\nUnsqueeze<br \/>\nMatMul<br \/>\nSoftmax<br \/>\nReshape<br \/>\nConcat<br \/>\nConvTranspose<br \/>\nMaxPool<br \/>\nResize<br \/>\nSigmoid<\/p>\n<p>\u6ce8\u610f&#xff0c;\u8fd9\u5e76\u4e0d\u610f\u5473\u7740&#xff1a;<\/p>\n<p>\u201c\u73b0\u5728\u5df2\u7ecf\u652f\u6301\u6240\u6709\u5305\u542b\u8fd9 21 \u4e2a\u7b97\u5b50\u7684 ONNX \u6a21\u578b\u3002\u201d<\/p>\n<p>\u5e76\u4e0d\u662f\u3002<\/p>\n<p>\u9879\u76ee\u7684\u539f\u5219\u6070\u6070\u76f8\u53cd&#xff1a;<\/p>\n<p>\u652f\u6301\u7684\u662f\u7ecf\u8fc7 Converter \u548c\u5b8c\u6574\u6d4b\u8bd5\u9a8c\u8bc1\u7684\u5177\u4f53 PP-OCR \u56fe&#xff0c;\u800c\u4e0d\u662f\u770b\u5230\u67d0\u4e2a\u7b97\u5b50\u540d\u5b57\u76f8\u540c\u5c31\u8ba4\u4e3a\u4efb\u610f\u7f51\u7edc\u90fd\u80fd\u8fd0\u884c\u3002<\/p>\n<p>\u8fd9\u662f\u4e00\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u8fb9\u754c\u3002<\/p>\n<hr \/>\n<h2 id=\"%E5%9B%9B%E3%80%81%E4%BB%8E%20REC%20%E5%BC%80%E5%A7%8B%EF%BC%8C%E6%9C%80%E5%90%8E%E5%81%9A%E5%88%B0%E4%BA%86%20DET%20%E2%86%92%20CLS%20%E2%86%92%20REC\">\u56db\u3001\u4ece REC \u5f00\u59cb&#xff0c;\u6700\u540e\u505a\u5230\u4e86 DET \u2192 CLS \u2192 REC<\/h2>\n<p>\u9879\u76ee\u6700\u521d\u5e76\u6ca1\u6709\u4e00\u4e0a\u6765\u5c31\u505a\u5b8c\u6574 OCR\u3002<\/p>\n<p>\u7b2c\u4e00\u9636\u6bb5\u53ea\u505a\u4e86\u4e00\u4ef6\u4e8b&#xff1a;<\/p>\n<p>PP-OCRv6 tiny REC\u3002<\/p>\n<p>\u4e5f\u5c31\u662f\u8f93\u5165\u4e00\u5f20\u5df2\u7ecf\u88c1\u526a\u597d\u7684\u6587\u672c\u884c\u56fe\u7247&#xff1a;<\/p>\n<p>text crop<br \/>\n\u00a0 \u00a0\u2193<br \/>\nresize \/ normalize<br \/>\n\u00a0 \u00a0\u2193<br \/>\nREC graph<br \/>\n\u00a0 \u00a0\u2193<br \/>\nlogits<br \/>\n\u00a0 \u00a0\u2193<br \/>\nCTC Decode<br \/>\n\u00a0 \u00a0\u2193<br \/>\nUTF-8 text<\/p>\n<p>\u8fd9\u4e2a\u9636\u6bb5\u771f\u6b63\u8dd1\u901a\u4ee5\u540e&#xff0c;\u624d\u7ee7\u7eed\u5411\u5916\u6269\u5c55&#xff1a;<\/p>\n<p>REC<br \/>\n\u00a0\u2193<br \/>\nCLS<br \/>\n\u00a0\u2193<br \/>\nDET<br \/>\n\u00a0\u2193<br \/>\nPerspective Crop<br \/>\n\u00a0\u2193<br \/>\nFull OCR<\/p>\n<p>\u73b0\u5728\u5b8c\u6574\u6d41\u7a0b\u5df2\u7ecf\u662f&#xff1a;<\/p>\n<p>BGR8 Image<br \/>\n\u00a0 \u00a0\u2502<br \/>\n\u00a0 \u00a0\u25bc<br \/>\nDET Resize \/ Normalize<br \/>\n\u00a0 \u00a0\u2502<br \/>\n\u00a0 \u00a0\u25bc<br \/>\nDET Graph<br \/>\n\u00a0 \u00a0\u2502<br \/>\n\u00a0 \u00a0\u25bc<br \/>\nDB-style Postprocess<br \/>\n\u00a0 \u00a0\u2502<br \/>\n\u00a0 \u00a0\u25bc<br \/>\nReading-order Quadrilaterals<br \/>\n\u00a0 \u00a0\u2502<br \/>\n\u00a0 \u00a0\u25bc<br \/>\nPure-C Perspective Crop<br \/>\n\u00a0 \u00a0\u2502<br \/>\n\u00a0 \u00a0\u251c\u2500\u2500 Tall text \u2192 90\u00b0 correction<br \/>\n\u00a0 \u00a0\u2502<br \/>\n\u00a0 \u00a0\u25bc<br \/>\nOptional CLS<br \/>\n\u00a0 \u00a0\u2502<br \/>\n\u00a0 \u00a0\u251c\u2500\u2500 0\u00b0<br \/>\n\u00a0 \u00a0\u2502<br \/>\n\u00a0 \u00a0\u2514\u2500\u2500 180\u00b0<br \/>\n\u00a0 \u00a0\u2502<br \/>\n\u00a0 \u00a0\u25bc<br \/>\nREC<br \/>\n\u00a0 \u00a0\u2502<br \/>\n\u00a0 \u00a0\u25bc<br \/>\nCTC Decode<br \/>\n\u00a0 \u00a0\u2502<br \/>\n\u00a0 \u00a0\u25bc<br \/>\nUTF-8 Text Lines<\/p>\n<p>\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u76ee\u524d\u5df2\u7ecf\u4e0d\u662f\u201c\u7eaf C \u8dd1\u4e00\u4e2a\u8bc6\u522b\u6a21\u578b\u201d\u7684\u5b9e\u9a8c\u4ee3\u7801&#xff0c;\u800c\u662f\u628a OCR \u7684\u6838\u5fc3\u94fe\u8def\u4e32\u4e86\u8d77\u6765&#xff1a;<\/p>\n<p>\u68c0\u6d4b\u3001\u65b9\u5411\u5206\u7c7b\u3001\u900f\u89c6\u88c1\u526a\u3001\u6587\u5b57\u8bc6\u522b\u3001CTC \u89e3\u7801\u3001\u5750\u6807\u6062\u590d\u3001\u9605\u8bfb\u987a\u5e8f\u8f93\u51fa\u3002<\/p>\n<hr \/>\n<h2 id=\"%E4%BA%94%E3%80%81%E8%BF%9E%E9%80%8F%E8%A7%86%E8%A3%81%E5%89%AA%E9%83%BD%E6%B2%A1%E6%9C%89%E4%BE%9D%E8%B5%96%20OpenCV\">\u4e94\u3001\u8fde\u900f\u89c6\u88c1\u526a\u90fd\u6ca1\u6709\u4f9d\u8d56 OpenCV<\/h2>\n<p>\u8fd9\u4e00\u70b9\u6211\u4e2a\u4eba\u5f88\u5728\u610f\u3002<\/p>\n<p>\u56e0\u4e3a\u5982\u679c\u6240\u8c13\u201c\u7eaf C OCR Runtime\u201d\u6700\u540e\u5728\u5173\u952e\u8def\u5f84\u4e0a\u8fd8\u662f\u9700\u8981 OpenCV \u505a&#xff1a;<\/p>\n<p>warpPerspective<br \/>\nrotate<br \/>\nresize<\/p>\n<p>\u90a3\u4e48\u90e8\u7f72\u8fb9\u754c\u5176\u5b9e\u8fd8\u662f\u6ca1\u6709\u771f\u6b63\u6536\u5e72\u51c0\u3002<\/p>\n<p>\u6240\u4ee5\u00a0lw.PPOCR.C\u00a0\u7684\u5b8c\u6574 OCR \u8def\u5f84\u81ea\u5df1\u5b9e\u73b0\u4e86\u900f\u89c6\u88c1\u526a\u4e0e\u53cc\u7ebf\u6027\u91c7\u6837\u3002<\/p>\n<p>\u68c0\u6d4b\u5f97\u5230\u56db\u8fb9\u5f62\u540e&#xff0c;\u6839\u636e\u51e0\u4f55\u5173\u7cfb\u6784\u9020\u76ee\u6807\u533a\u57df&#xff0c;\u518d\u5b8c\u6210&#xff1a;<\/p>\n<p>\u56db\u70b9\u5750\u6807<br \/>\n\u00a0 \u00a0\u2193<br \/>\nHomography<br \/>\n\u00a0 \u00a0\u2193<br \/>\nBilinear Sampling<br \/>\n\u00a0 \u00a0\u2193<br \/>\nText Crop<\/p>\n<p>\u9047\u5230\u9ad8\u5927\u4e8e\u5bbd\u5f88\u591a\u7684\u7ad6\u5411\u6587\u672c\u533a\u57df&#xff0c;\u8fd8\u4f1a\u6309\u7b56\u7565\u8fdb\u884c 90\u00b0 \u65cb\u8f6c&#xff0c;\u518d\u8fdb\u5165 CLS\/REC\u3002<\/p>\n<p>\u90a3\u600e\u4e48\u786e\u8ba4\u81ea\u5df1\u5199\u7684\u88c1\u526a\u6ca1\u6709\u6084\u6084\u5199\u9519&#xff1f;<\/p>\n<p>\u6d4b\u8bd5\u4e2d\u4ecd\u7136\u4f1a\u4f7f\u7528 OpenCV \u4f5c\u4e3a\u72ec\u7acb\u53c2\u8003\u5b9e\u73b0\u3002<\/p>\n<p>\u4e5f\u5c31\u662f\u8bf4&#xff1a;<\/p>\n<p>OpenCV \u53ef\u4ee5\u51fa\u73b0\u5728\u5f00\u53d1\u6d4b\u8bd5\u73af\u5883\u4e2d&#xff0c;\u4f46\u4e0d\u8fdb\u5165\u6b63\u5f0f Runtime\u3002<\/p>\n<p>\u6d4b\u8bd5\u4f1a\u5c06\u7eaf C \u900f\u89c6\u88c1\u526a\u7ed3\u679c\u4e0e OpenCV\u00a0warpPerspective\u00a0\/\u00a0rotate\u00a0\u7684\u7ed3\u679c\u8fdb\u884c\u50cf\u7d20\u8bef\u5dee\u6bd4\u8f83&#xff0c;\u540c\u65f6\u5b8c\u6574 OCR \u8fd8\u8981\u7ecf\u8fc7\u771f\u5b9e\u56fe\u7247\u7684 Golden Test\u3002<\/p>\n<p>\u8fd9\u79cd\u201c\u6d4b\u8bd5\u53ef\u4ee5\u4f9d\u8d56\u6210\u719f\u5de5\u5177&#xff0c;\u90e8\u7f72\u6838\u5fc3\u4e0d\u4f9d\u8d56\u201d\u7684\u8fb9\u754c&#xff0c;\u662f\u9879\u76ee\u4e00\u76f4\u5728\u575a\u6301\u7684\u539f\u5219\u3002<\/p>\n<hr \/>\n<h2 id=\"%E5%85%AD%E3%80%81%E5%85%AC%E5%85%B1%E6%8E%A5%E5%8F%A3%E4%B8%8D%E6%98%AF%E7%AE%80%E5%8D%95%E5%9C%B0%C2%A0char*%20ocr(...)\">\u516d\u3001\u516c\u5171\u63a5\u53e3\u4e0d\u662f\u7b80\u5355\u5730\u00a0char* ocr(&#8230;)<\/h2>\n<p>\u65e2\u7136\u8981\u505a DLL\u3001C#\u3001Win32\u3001Linux \u751a\u81f3\u4ee5\u540e ARM&#xff0c;\u90a3\u4e48 ABI \u8bbe\u8ba1\u5fc5\u987b\u8ba4\u771f\u3002<\/p>\n<p>\u5f53\u524d\u516c\u5f00\u5934\u6587\u4ef6\u53ea\u6709\u4e00\u4e2a\u6838\u5fc3\u5165\u53e3&#xff1a;<\/p>\n<p>include\/lw_infer.h<\/p>\n<p>\u5206\u522b\u63d0\u4f9b&#xff1a;<\/p>\n<p>lw_model<br \/>\nlw_session<\/p>\n<p>lw_detector<br \/>\nlw_classifier<br \/>\nlw_recognizer<br \/>\nlw_ocr<\/p>\n<p>\u8fd9\u4e9b\u5bf9\u8c61\u5bf9\u8c03\u7528\u8005\u90fd\u662f\u00a0opaque handle\u3002<\/p>\n<p>\u5178\u578b\u8c03\u7528\u65b9\u5f0f\u7c7b\u4f3c&#xff1a;<\/p>\n<p>lw_ocr* ocr &#061; NULL;<br \/>\nlw_error error;<\/p>\n<p>lw_error_init(&amp;error);<\/p>\n<p>lw_status status &#061; lw_ocr_create(<br \/>\n\u00a0 \u00a0 &#034;det.lwm&#034;,<br \/>\n\u00a0 \u00a0 &#034;cls.lwm&#034;,<br \/>\n\u00a0 \u00a0 &#034;rec.lwm&#034;,<br \/>\n\u00a0 \u00a0 &#034;ppocr_keys.txt&#034;,<br \/>\n\u00a0 \u00a0 &amp;options,<br \/>\n\u00a0 \u00a0 &amp;ocr,<br \/>\n\u00a0 \u00a0 &amp;error<br \/>\n);<\/p>\n<p>\u6267\u884c\u5b8c\u6574 OCR&#xff1a;<\/p>\n<p>lw_ocr_run_bgr_u8(<br \/>\n\u00a0 \u00a0 ocr,<br \/>\n\u00a0 \u00a0 image,<br \/>\n\u00a0 \u00a0 image_bytes,<br \/>\n\u00a0 \u00a0 width,<br \/>\n\u00a0 \u00a0 height,<br \/>\n\u00a0 \u00a0 stride,<br \/>\n\u00a0 \u00a0 lines,<br \/>\n\u00a0 \u00a0 line_capacity,<br \/>\n\u00a0 \u00a0 text_buffer,<br \/>\n\u00a0 \u00a0 text_capacity,<br \/>\n\u00a0 \u00a0 &amp;result,<br \/>\n\u00a0 \u00a0 &amp;error<br \/>\n);<\/p>\n<p>\u8fd9\u91cc\u6709\u51e0\u4e2a\u770b\u8d77\u6765\u4e0d\u8d77\u773c&#xff0c;\u4f46\u5bf9 DLL \u5de5\u7a0b\u975e\u5e38\u91cd\u8981\u7684\u7ec6\u8282\u3002<\/p>\n<h3 id=\"1.%20%E4%B8%8D%E8%B7%A8%20ABI%20%E9%87%8A%E6%94%BE%E5%86%85%E5%AD%98\">1. \u4e0d\u8de8 ABI \u91ca\u653e\u5185\u5b58<\/h3>\n<p>\u8f93\u5165\u548c\u8f93\u51fa Buffer \u90fd\u7531\u8c03\u7528\u65b9\u62e5\u6709\u3002<\/p>\n<p>Runtime \u4e0d\u4f1a&#xff1a;<\/p>\n<p>DLL \u5185 malloc<br \/>\nEXE \u5916 free<\/p>\n<p>\u4e5f\u4e0d\u4f1a\u8981\u6c42\u4e0d\u540c\u7f16\u8bd1\u5668\u3001\u4e0d\u540c CRT \u4e4b\u95f4\u4e92\u76f8\u91ca\u653e\u5bf9\u8c61\u3002<\/p>\n<hr \/>\n<h3 id=\"2.%20%E5%85%AC%E5%85%B1%E7%BB%93%E6%9E%84%E9%83%BD%E6%9C%89%C2%A0struct_size\">2. \u516c\u5171\u7ed3\u6784\u90fd\u6709\u00a0struct_size<\/h3>\n<p>\u4f8b\u5982&#xff1a;<\/p>\n<p>typedef struct lw_error {<br \/>\n\u00a0 \u00a0 uint32_t struct_size;<br \/>\n\u00a0 \u00a0 int32_t code;<br \/>\n\u00a0 \u00a0 char message[256];<br \/>\n} lw_error;<\/p>\n<p>\u521d\u59cb\u5316\u51fd\u6570\u4f1a\u586b\u5199\u7ed3\u6784\u5927\u5c0f\u5e76\u6e05\u96f6\u4fdd\u7559\u5b57\u6bb5\u3002<\/p>\n<p>\u8fd9\u6837\u505a\u7684\u76ee\u7684&#xff0c;\u662f\u7ed9\u672a\u6765 ABI \u6f14\u8fdb\u7559\u4e0b\u7a7a\u95f4\u3002<\/p>\n<hr \/>\n<h3 id=\"3.%20%E9%94%99%E8%AF%AF%E4%B8%8D%E6%98%AF%E5%8F%AA%E8%BF%94%E5%9B%9E%E4%B8%80%E5%8F%A5%E5%AD%97%E7%AC%A6%E4%B8%B2\">3. \u9519\u8bef\u4e0d\u662f\u53ea\u8fd4\u56de\u4e00\u53e5\u5b57\u7b26\u4e32<\/h3>\n<p>API \u6709\u7a33\u5b9a\u7684\u00a0lw_status&#xff1a;<\/p>\n<p>OK<br \/>\nINVALID_ARGUMENT<br \/>\nIO_ERROR<br \/>\nOUT_OF_MEMORY<br \/>\nINVALID_FORMAT<br \/>\nUNSUPPORTED_VERSION<br \/>\nOUT_OF_BOUNDS<br \/>\nCHECKSUM_MISMATCH<br \/>\nUNSUPPORTED<br \/>\nINVALID_SHAPE<br \/>\nMEMORY_LIMIT<\/p>\n<p>\u81ea\u7136\u8bed\u8a00\u9519\u8bef\u6d88\u606f\u4e3b\u8981\u7528\u4e8e\u8bca\u65ad&#xff0c;\u800c\u4e0d\u662f\u8ba9\u4e1a\u52a1\u7a0b\u5e8f\u53bb\u89e3\u6790\u5b57\u7b26\u4e32\u3002<\/p>\n<hr \/>\n<h2 id=\"%E4%B8%83%E3%80%81%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6%E4%B9%9F%E6%8C%89%E7%85%A7%E2%80%9C%E4%B8%8D%E5%8F%AF%E4%BF%A1%E8%BE%93%E5%85%A5%E2%80%9D%E5%A4%84%E7%90%86\">\u4e03\u3001\u6a21\u578b\u6587\u4ef6\u4e5f\u6309\u7167\u201c\u4e0d\u53ef\u4fe1\u8f93\u5165\u201d\u5904\u7406<\/h2>\n<p>\u4e00\u4e2a\u63a8\u7406 Runtime \u6700\u5bb9\u6613\u88ab\u5ffd\u7565\u7684\u95ee\u9898\u4e4b\u4e00&#xff0c;\u5c31\u662f&#xff1a;<\/p>\n<p>\u6a21\u578b\u6587\u4ef6\u672c\u8eab\u4e5f\u662f\u8f93\u5165\u3002<\/p>\n<p>LWM Loader \u4e0d\u4f1a\u56e0\u4e3a\u6587\u4ef6\u6269\u5c55\u540d\u53eb\u00a0.lwm\u00a0\u5c31\u76f4\u63a5\u4fe1\u4efb\u5b83\u3002<\/p>\n<p>\u52a0\u8f7d\u8fc7\u7a0b\u4f1a\u68c0\u67e5&#xff1a;<\/p>\n<ul>\n<li>\n<p>magic&#xff1b;<\/p>\n<\/li>\n<li>\n<p>format version&#xff1b;<\/p>\n<\/li>\n<li>\n<p>header size&#xff1b;<\/p>\n<\/li>\n<li>\n<p>reserved fields&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u6587\u4ef6\u5b9e\u9645\u5927\u5c0f&#xff1b;<\/p>\n<\/li>\n<li>\n<p>section offset&#xff1b;<\/p>\n<\/li>\n<li>\n<p>section size&#xff1b;<\/p>\n<\/li>\n<li>\n<p>alignment&#xff1b;<\/p>\n<\/li>\n<li>\n<p>section \u662f\u5426\u91cd\u53e0&#xff1b;<\/p>\n<\/li>\n<li>\n<p>tensor rank&#xff1b;<\/p>\n<\/li>\n<li>\n<p>tensor dtype&#xff1b;<\/p>\n<\/li>\n<li>\n<p>shape \u4e58\u6cd5\u662f\u5426\u6ea2\u51fa&#xff1b;<\/p>\n<\/li>\n<li>\n<p>weight \u8303\u56f4&#xff1b;<\/p>\n<\/li>\n<li>\n<p>node input\/output index&#xff1b;<\/p>\n<\/li>\n<li>\n<p>operator ID&#xff1b;<\/p>\n<\/li>\n<li>\n<p>parameter version&#xff1b;<\/p>\n<\/li>\n<li>\n<p>checksum&#xff1b;<\/p>\n<\/li>\n<li>\n<p>workspace \u7ea6\u675f\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u4efb\u4f55\u683c\u5f0f\u9519\u8bef\u90fd\u5e94\u8be5\u8fd4\u56de\u7a33\u5b9a\u9519\u8bef\u7801&#xff0c;\u800c\u4e0d\u662f&#xff1a;<\/p>\n<p>assert<br \/>\nabort<br \/>\nexit<\/p>\n<p>\u5f53\u524d checksum \u4f7f\u7528\u7684\u662f FNV-1a 64\u3002<\/p>\n<p>\u9879\u76ee\u6587\u6863\u4e5f\u660e\u786e\u8bf4\u660e&#xff1a;<\/p>\n<p>\u5b83\u53ea\u662f\u635f\u574f\u68c0\u6d4b&#xff0c;\u4e0d\u662f\u5bc6\u7801\u5b66\u7b7e\u540d\u3002<\/p>\n<p>\u5982\u679c\u9700\u8981\u6a21\u578b\u771f\u5b9e\u6027\u6821\u9a8c&#xff0c;\u4ecd\u7136\u5e94\u8be5\u4f9d\u9760\u53ef\u4fe1\u53d1\u5e03\u6e20\u9053\u548c SHA-256\u3002<\/p>\n<p>\u8fd9\u4e00\u70b9\u6211\u89c9\u5f97\u5f88\u91cd\u8981&#xff0c;\u56e0\u4e3a\u201c\u505a\u4e00\u4e2a\u4e8c\u8fdb\u5236\u6a21\u578b\u683c\u5f0f\u201d\u5bb9\u6613&#xff0c;\u628a\u5b83\u5f53\u4f5c\u9700\u8981\u9632\u5fa1\u6027\u89e3\u6790\u7684\u6587\u4ef6\u683c\u5f0f\u6765\u8bbe\u8ba1&#xff0c;\u624d\u662f\u771f\u6b63\u8fdb\u5165\u5de5\u7a0b\u9636\u6bb5\u3002<\/p>\n<hr \/>\n<h2 id=\"%E5%85%AB%E3%80%81%E7%8E%B0%E5%9C%A8%E5%88%B0%E5%BA%95%E6%94%AF%E6%8C%81%E5%93%AA%E4%BA%9B%E6%A8%A1%E5%9E%8B%EF%BC%9F\">\u516b\u3001\u73b0\u5728\u5230\u5e95\u652f\u6301\u54ea\u4e9b\u6a21\u578b&#xff1f;<\/h2>\n<p>\u76ee\u524d\u9879\u76ee\u660e\u786e\u805a\u7126\u4e8e&#xff1a;<\/p>\n<p>PP-OCRv6 tiny<\/p>\n<p>\u5305\u62ec&#xff1a;<\/p>\n<\/p>\n<table>\n<tr>\n<p>\u6a21\u578b<\/p>\n<p>\u7528\u9014<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>PP-OCRv6 tiny DET<\/p>\n<\/td>\n<td>\n<p>\u6587\u5b57\u68c0\u6d4b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>PP-OCRv6 tiny CLS<\/p>\n<\/td>\n<td>\n<p>0\u00b0 \/ 180\u00b0 \u65b9\u5411\u5206\u7c7b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>PP-OCRv6 tiny REC<\/p>\n<\/td>\n<td>\n<p>\u6587\u5b57\u8bc6\u522b<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5f53\u524d\u7cbe\u5ea6&#xff1a;<\/p>\n<p>FP32<\/p>\n<p>\u5f53\u524d\u8bbe\u5907&#xff1a;<\/p>\n<p>CPU<\/p>\n<p>\u5f53\u524d x86 SIMD&#xff1a;<\/p>\n<p>Scalar<br \/>\nSSE2<br \/>\nAVX2<\/p>\n<p>\u5f53\u524d LWM v0.1 \u8f6c\u6362\u51fa\u7684\u6a21\u578b\u6587\u4ef6\u5927\u7ea6\u4e3a&#xff1a;<\/p>\n<\/p>\n<table>\n<tr>\n<p>\u6a21\u578b<\/p>\n<p>LWM \u5927\u5c0f<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>REC<\/p>\n<\/td>\n<td>\n<p>4.46 MB<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>CLS<\/p>\n<\/td>\n<td>\n<p>1.02 MB<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>DET<\/p>\n<\/td>\n<td>\n<p>1.77 MB<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8fd9\u4e9b\u6570\u5b57\u53ea\u662f\u5f53\u524d\u683c\u5f0f\u548c\u5f53\u524d\u8f6c\u6362\u7b56\u7565\u7684\u7ed3\u679c\u3002<\/p>\n<p>LWM v0.1 \u5c1a\u672a\u51bb\u7ed3&#xff0c;\u540e\u7eed\u5982\u679c\u52a0\u5165\u6743\u91cd\u91cd\u6392\u3001Fusion\u3001INT8 \u6216\u65b0\u7684\u5185\u5b58\u8ba1\u5212&#xff0c;\u6587\u4ef6 Hash \u548c\u5927\u5c0f\u90fd\u53ef\u80fd\u53d8\u5316\u3002<\/p>\n<hr \/>\n<h2 id=\"%E4%B9%9D%E3%80%81%E6%9C%80%E6%9C%89%E6%84%8F%E6%80%9D%E7%9A%84%E4%B8%80%E6%AE%B5%EF%BC%9A%E4%BB%8E%20570%20ms%20%E4%BC%98%E5%8C%96%E5%88%B0%E4%BA%86%2018.865%20ms\">\u4e5d\u3001\u6700\u6709\u610f\u601d\u7684\u4e00\u6bb5&#xff1a;\u4ece 570 ms \u4f18\u5316\u5230\u4e86 18.865 ms<\/h2>\n<p>\u5982\u679c\u53ea\u770b\u529f\u80fd&#xff0c;\u81ea\u5df1\u5b9e\u73b0\u4e00\u4e2a Runtime \u5176\u5b9e\u8fd8\u4e0d\u591f\u3002<\/p>\n<p>\u56e0\u4e3a\u4e00\u4e2a\u6700\u76f4\u63a5\u7684\u95ee\u9898\u4e00\u5b9a\u4f1a\u51fa\u73b0&#xff1a;<\/p>\n<p>\u201c\u80fd\u8dd1\u662f\u80fd\u8dd1&#xff0c;\u4f46\u4f1a\u4e0d\u4f1a\u6162\u5f97\u6ca1\u6cd5\u7528&#xff1f;\u201d<\/p>\n<p>\u9879\u76ee\u91cc\u76ee\u524d\u8bb0\u5f55\u5f97\u6700\u5b8c\u6574\u7684\u662f REC \u5355\u884c\u6587\u5b57\u8bc6\u522b Benchmark\u3002<\/p>\n<p>\u5148\u628a\u6d4b\u8bd5\u6761\u4ef6\u8bf4\u6e05\u695a&#xff1a;<\/p>\n<p>CPU&#xff1a;AMD Ryzen 7 7735H<br \/>\nOS&#xff1a;Windows 10 x64<br \/>\nCompiler&#xff1a;MSVC 19.40<br \/>\nBuild&#xff1a;Release \/O2<br \/>\nPrecision&#xff1a;FP32<br \/>\nThread&#xff1a;single-thread<br \/>\n\u6d4b\u8bd5\u56fe\u7247&#xff1a;295 \u00d7 46 \u6587\u672c\u88c1\u526a\u56fe<br \/>\n\u6a21\u578b&#xff1a;PP-OCRv6 tiny REC<\/p>\n<p>\u6240\u4ee5&#xff0c;\u4e0b\u9762\u7684\u6570\u636e&#xff1a;<\/p>\n<p>\u4e0d\u662f\u4efb\u610f\u7535\u8111\u7684\u6027\u80fd\u627f\u8bfa&#xff0c;\u4e5f\u4e0d\u662f\u6574\u5f20\u56fe\u7247\u7684 Full OCR \u5ef6\u8fdf\u3002<\/p>\n<p>\u5b83\u53ea\u662f\u540c\u4e00\u6d4b\u8bd5\u73af\u5883\u4e0b\u7528\u6765\u89c2\u5bdf Runtime \u4f18\u5316\u6548\u679c\u7684\u4e00\u7ec4\u53ef\u590d\u73b0\u5b9e\u9a8c\u6570\u636e\u3002<\/p>\n<p>\u6700\u521d\u7eaf Scalar \u7248\u672c&#xff1a;<\/p>\n<\/p>\n<table>\n<tr>\n<p>\u5e73\u53f0<\/p>\n<p>REC \u5e73\u5747\u8017\u65f6<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>Windows x64<\/p>\n<\/td>\n<td>\n<p>570.752 ms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Windows x86<\/p>\n<\/td>\n<td>\n<p>1416.520 ms<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8fd9\u4e2a\u901f\u5ea6\u663e\u7136\u8fd8\u4e0d\u591f\u7406\u60f3\u3002<\/p>\n<p>\u4e8e\u662f\u9879\u76ee\u6ca1\u6709\u76f4\u63a5\u5f00\u59cb\u201c\u51ed\u611f\u89c9\u4e0a SIMD\u201d&#xff0c;\u800c\u662f\u5148\u505a Profile\u3002<\/p>\n<p>\u7b2c\u4e00\u8f6e\u4f18\u5316 Scalar Conv&#xff1a;<\/p>\n<p>x64: 570.752 \u2192 381.206 ms<br \/>\nx86: 1416.520 \u2192 669.329 ms<\/p>\n<p>\u63a5\u4e0b\u6765\u53d1\u73b0 Pointwise Conv \u5360\u636e\u5927\u91cf Conv \u65f6\u95f4&#xff0c;\u4e8e\u662f\u4e3a 1\u00d71 Conv \u5355\u72ec\u8bbe\u8ba1 cache-contiguous path&#xff1a;<\/p>\n<p>x64: 381.206 \u2192 51.495 ms<br \/>\nx86: 669.329 \u2192 139.297 ms<\/p>\n<p>\u8fd9\u4e00\u6b65\u975e\u5e38\u5173\u952e\u3002<\/p>\n<p>\u5b83\u8bf4\u660e\u5728\u4e13\u7528 Runtime \u91cc&#xff0c;\u6700\u5927\u7684\u4f18\u52bf\u6709\u65f6\u5019\u5e76\u4e0d\u662f\u201c\u6211\u4f1a\u4e0d\u4f1a\u5199 AVX2\u201d&#xff0c;\u800c\u662f&#xff1a;<\/p>\n<p>\u6211\u77e5\u9053\u81ea\u5df1\u53ea\u9700\u8981\u8dd1\u54ea\u4e00\u5f20\u56fe&#xff0c;\u6240\u4ee5\u53ef\u4ee5\u56f4\u7ed5\u771f\u5b9e\u6a21\u578b\u7684\u6570\u636e\u8bbf\u95ee\u6a21\u5f0f\u505a\u4f18\u5316\u3002<\/p>\n<p>\u968f\u540e\u53c8\u7ee7\u7eed\u4f18\u5316&#xff1a;<\/p>\n<p>3\u00d73 stride-2 Conv<br \/>\nMatMul<br \/>\nSSE2 MatMul<br \/>\nAVX2 MatMul<br \/>\nSIMD Pointwise Conv<br \/>\nFlat Binary SIMD<br \/>\nBroadcast SIMD<br \/>\nDepthwise 3\u00d73 SIMD<br \/>\nStride-2 3\u00d73 SIMD<\/p>\n<p>\u6700\u7ec8\u5f53\u524d\u8bb0\u5f55\u7684\u7ed3\u679c\u662f&#xff1a;<\/p>\n<\/p>\n<table>\n<tr>\n<p>\u5e73\u53f0<\/p>\n<p>\u521d\u59cb Scalar<\/p>\n<p>\u5f53\u524d\u7ed3\u679c<\/p>\n<p>\u76f8\u5bf9\u521d\u59cb<\/p>\n<\/tr>\n<tbody>\n<tr>\n<td>\n<p>Windows x64<\/p>\n<\/td>\n<td>\n<p>570.752 ms<\/p>\n<\/td>\n<td>18.865 ms<\/td>\n<td>30.255\u00d7<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Windows x86<\/p>\n<\/td>\n<td>\n<p>1416.520 ms<\/p>\n<\/td>\n<td>38.833 ms<\/td>\n<td>36.477\u00d7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Windows x64 \u5728\u8fd9\u7ec4\u6d4b\u8bd5\u4e2d\u7684\u541e\u5410\u8fbe\u5230&#xff1a;<\/p>\n<p>53.010 \u6b21 REC \/ \u79d2<\/p>\n<p>\u800c\u4e14\u4f18\u5316\u8fc7\u7a0b\u4e2d\u6709\u4e00\u4e2a\u8981\u6c42\u59cb\u7ec8\u6ca1\u6709\u653e\u677e&#xff1a;<\/p>\n<p>Golden \u7ed3\u679c\u4e0d\u80fd\u56e0\u4e3a\u6027\u80fd\u4f18\u5316\u800c\u53d8\u5316\u3002<\/p>\n<p>\u6027\u80fd Benchmark \u4e0d\u53ea\u662f\u8bb0\u5f55 mean latency&#xff0c;\u8fd8\u4f1a\u8bb0\u5f55&#xff1a;<\/p>\n<p>Median<br \/>\nP95<br \/>\nMin \/ Max<br \/>\nThroughput<br \/>\nWorkspace<br \/>\nRSS after warm-up<br \/>\nFinal RSS<br \/>\nRSS growth<br \/>\nPeak RSS<br \/>\nBackend<\/p>\n<p>\u5728\u6587\u6863\u8bb0\u5f55\u7684\u4f18\u5316\u6d4b\u8bd5\u91cc&#xff0c;\u7ed3\u679c\u6587\u672c\u4fdd\u6301\u4e00\u81f4&#xff0c;\u6d4b\u91cf\u9636\u6bb5 RSS growth \u4e3a 0\u3002<\/p>\n<p>\u8fd9\u91cc\u4e5f\u5fc5\u987b\u518d\u6b21\u5f3a\u8c03&#xff1a;<\/p>\n<p>18.865 ms \u662f\u4e00\u5f20 295\u00d746 \u6587\u5b57\u88c1\u526a\u56fe\u7684 REC \u6570\u636e&#xff0c;\u4e0d\u662f DET &#043; \u591a\u884c REC \u7684\u6574\u56fe OCR \u6570\u636e\u3002<\/p>\n<p>\u5b8c\u6574 OCR \u7684\u6700\u7ec8\u5ef6\u8fdf\u8fd8\u4f1a\u53d7\u5230&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u539f\u56fe\u5206\u8fa8\u7387&#xff1b;<\/p>\n<\/li>\n<li>\n<p>DET&#xff1b;<\/p>\n<\/li>\n<li>\n<p>DB \u540e\u5904\u7406&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u6587\u672c\u6846\u6570\u91cf&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u6bcf\u4e2a\u6587\u672c\u6846\u5bbd\u5ea6&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u662f\u5426\u542f\u7528 CLS&#xff1b;<\/p>\n<\/li>\n<\/ul>\n<p>\u7b49\u56e0\u7d20\u5f71\u54cd\u3002<\/p>\n<p>\u9879\u76ee\u540e\u7eed\u4e5f\u5f88\u6709\u5fc5\u8981\u589e\u52a0\u6b63\u5f0f\u7684 Full OCR Benchmark\u3002<\/p>\n<hr \/>\n<h2 id=\"%E5%8D%81%E3%80%81%E4%B8%BA%E4%BB%80%E4%B9%88%E4%B8%93%E7%94%A8%20Runtime%20%E5%8F%AF%E8%83%BD%E6%9C%89%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96%E7%A9%BA%E9%97%B4%EF%BC%9F\">\u5341\u3001\u4e3a\u4ec0\u4e48\u4e13\u7528 Runtime \u53ef\u80fd\u6709\u6027\u80fd\u4f18\u5316\u7a7a\u95f4&#xff1f;<\/h2>\n<p>\u901a\u7528 Runtime \u5fc5\u987b\u8003\u8651&#xff1a;<\/p>\n<p>\u5f88\u591a\u6a21\u578b<br \/>\n\u5f88\u591a Shape<br \/>\n\u5f88\u591a Operator<br \/>\n\u5f88\u591a\u786c\u4ef6<br \/>\n\u5f88\u591a\u8fb9\u754c\u6761\u4ef6<\/p>\n<p>\u800c\u00a0lw.PPOCR.C\u00a0\u7684\u601d\u8def\u662f&#xff1a;<\/p>\n<p>\u6211\u77e5\u9053\u6a21\u578b\u662f\u8c01<br \/>\n\u6211\u77e5\u9053\u54ea\u4e9b\u7b97\u5b50\u771f\u7684\u4f1a\u51fa\u73b0<br \/>\n\u6211\u77e5\u9053\u70ed\u70b9\u8282\u70b9\u5728\u54ea\u91cc<br \/>\n\u6211\u77e5\u9053\u54ea\u4e9b Shape \u6a21\u5f0f\u6700\u5e38\u89c1<\/p>\n<p>\u4e8e\u662f\u53ef\u4ee5\u9488\u5bf9\u771f\u5b9e PP-OCR \u56fe\u505a\u4e00\u4e9b\u975e\u5e38\u660e\u786e\u7684 fast path\u3002<\/p>\n<p>\u4f8b\u5982&#xff1a;<\/p>\n<ul>\n<li>\n<p>1\u00d71 Pointwise Conv&#xff1b;<\/p>\n<\/li>\n<li>\n<p>3\u00d73 Depthwise Conv&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u7279\u5b9a stride-2 Conv&#xff1b;<\/p>\n<\/li>\n<li>\n<p>MatMul \u884c\u8bbf\u95ee&#xff1b;<\/p>\n<\/li>\n<li>\n<p>flat Add\/Mul\/Div&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u5355\u8f74 Broadcast&#xff1b;<\/p>\n<\/li>\n<li>\n<p>SSE2 \/ AVX2 runtime dispatch\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u540c\u65f6\u4ecd\u7136\u4fdd\u7559&#xff1a;<\/p>\n<p>Scalar fallback<\/p>\n<p>CPU \u68c0\u6d4b\u4e0d\u4f1a\u7b80\u5355\u5730\u56e0\u4e3a\u201c\u7f16\u8bd1\u4e86 AVX2 \u6587\u4ef6\u201d\u5c31\u5047\u8bbe\u8fd0\u884c\u673a\u5668\u652f\u6301 AVX2\u3002<\/p>\n<p>x86\/x64 \u4e0b\u4f1a\u68c0\u67e5&#xff1a;<\/p>\n<p>CPUID<br \/>\nOSXSAVE<br \/>\nXGETBV<br \/>\nAVX2<\/p>\n<p>\u5982\u679c\u4e0d\u6ee1\u8db3\u6761\u4ef6&#xff0c;\u4f1a\u81ea\u52a8\u56de\u843d\u5230 SSE2 \u6216 Scalar\u3002<\/p>\n<p>\u8fd9\u5bf9\u4e8e\u9700\u8981\u5728\u4e0d\u540c\u5e74\u4ee3 CPU \u4e0a\u90e8\u7f72\u7684\u8f6f\u4ef6\u5f88\u91cd\u8981\u3002<\/p>\n<hr \/>\n<h2 id=\"%E5%8D%81%E4%B8%80%E3%80%81%E5%AE%8C%E6%95%B4%20OCR%20%E4%B8%8D%E5%8F%AA%E8%BF%94%E5%9B%9E%E6%96%87%E5%AD%97%EF%BC%8C%E8%BF%98%E4%BF%9D%E7%95%99%E5%9D%90%E6%A0%87%E5%92%8C%E5%90%84%E9%98%B6%E6%AE%B5%E4%BF%A1%E6%81%AF\">\u5341\u4e00\u3001\u5b8c\u6574 OCR \u4e0d\u53ea\u8fd4\u56de\u6587\u5b57&#xff0c;\u8fd8\u4fdd\u7559\u5750\u6807\u548c\u5404\u9636\u6bb5\u4fe1\u606f<\/h2>\n<p>\u5b8c\u6574\u63a5\u53e3\u6700\u7ec8\u8fd4\u56de\u6309\u9605\u8bfb\u987a\u5e8f\u6392\u5217\u7684\u6587\u672c\u884c\u3002<\/p>\n<p>\u6bcf\u4e00\u884c\u5305\u542b&#xff1a;<\/p>\n<p>\u56db\u70b9\u68c0\u6d4b\u5750\u6807<br \/>\nDET score<br \/>\nREC score<br \/>\nCLS score<br \/>\nCLS label<br \/>\n\u5b9e\u9645\u5e94\u7528\u7684\u65cb\u8f6c\u89d2\u5ea6<br \/>\nCTC emitted count<br \/>\nUTF-8 text offset<br \/>\nUTF-8 text length<\/p>\n<p>\u8fd9\u6837\u8c03\u7528\u65b9\u4e0d\u4ec5\u53ef\u4ee5\u5f97\u5230&#xff1a;<\/p>\n<p>\u201c\u8bc6\u522b\u51fa\u4e86\u4ec0\u4e48\u201d<\/p>\n<p>\u8fd8\u53ef\u4ee5\u5f97\u5230&#xff1a;<\/p>\n<p>\u201c\u6587\u5b57\u5728\u54ea\u91cc\u201d<br \/>\n\u201c\u68c0\u6d4b\u6709\u591a\u53ef\u4fe1\u201d<br \/>\n\u201c\u8bc6\u522b\u6709\u591a\u53ef\u4fe1\u201d<br \/>\n\u201c\u662f\u5426\u53d1\u751f\u65b9\u5411\u7ea0\u6b63\u201d<\/p>\n<p>\u8fd9\u5bf9\u5f88\u591a\u5b9e\u9645\u9879\u76ee\u975e\u5e38\u6709\u7528&#xff0c;\u6bd4\u5982&#xff1a;<\/p>\n<ul>\n<li>\n<p>OCR \u7ed3\u679c\u53e0\u52a0\u663e\u793a&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u6587\u6863\u7ed3\u6784\u5206\u6790\u7684\u524d\u7f6e\u5904\u7406&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u5de5\u4e1a\u5b57\u7b26\u8bfb\u53d6&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u7968\u636e\u5b57\u6bb5\u5b9a\u4f4d&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u8bc1\u7167\u4fe1\u606f\u63d0\u53d6&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u56fe\u7247\u641c\u7d22&#xff1b;<\/p>\n<\/li>\n<li>\n<p>OCR \u670d\u52a1 API\u3002<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<h2 id=\"%E5%8D%81%E4%BA%8C%E3%80%81%E6%A0%B8%E5%BF%83%E5%BA%93%E4%B8%8D%E8%B4%9F%E8%B4%A3%20JPEG%20%2F%20PNG%20%E8%A7%A3%E7%A0%81%EF%BC%8C%E8%BF%99%E6%98%AF%E6%95%85%E6%84%8F%E7%9A%84\">\u5341\u4e8c\u3001\u6838\u5fc3\u5e93\u4e0d\u8d1f\u8d23 JPEG \/ PNG \u89e3\u7801&#xff0c;\u8fd9\u662f\u6545\u610f\u7684<\/h2>\n<p>\u5f88\u591a\u4eba\u7b2c\u4e00\u6b21\u770b\u5230 API \u8f93\u5165\u662f&#xff1a;<\/p>\n<p>BGR8 pixels<\/p>\n<p>\u53ef\u80fd\u4f1a\u95ee&#xff1a;<\/p>\n<p>\u201c\u4e3a\u4ec0\u4e48\u4e0d\u76f4\u63a5\u7ed9\u6211\u4e00\u4e2a jpg \u6587\u4ef6\u8def\u5f84&#xff1f;\u201d<\/p>\n<p>\u56e0\u4e3a\u56fe\u7247\u89e3\u7801\u4e5f\u662f\u4e00\u79cd\u4f9d\u8d56\u7b56\u7565\u3002<\/p>\n<p>\u5982\u679c\u6838\u5fc3 Runtime \u81ea\u5df1\u652f\u6301&#xff1a;<\/p>\n<p>JPEG<br \/>\nPNG<br \/>\nBMP<br \/>\nTIFF<br \/>\nGIF<br \/>\nWebP<br \/>\n&#8230;<\/p>\n<p>\u90a3\u4e48\u4f60\u9a6c\u4e0a\u53c8\u9700\u8981\u9009\u62e9\u4e00\u5957\u56fe\u7247\u5e93&#xff0c;\u5e76\u8ba9\u5b83\u8fdb\u5165\u6838\u5fc3\u90e8\u7f72\u8fb9\u754c\u3002<\/p>\n<p>lw.PPOCR.C\u00a0\u7684\u505a\u6cd5\u662f&#xff1a;<\/p>\n<p>\u6838\u5fc3\u53ea\u63a5\u53d7\u8c03\u7528\u65b9\u5df2\u7ecf\u89e3\u7801\u597d\u7684 BGR8\u3002<\/p>\n<p>\u6240\u4ee5&#xff1a;<\/p>\n<p>Camera Frame<br \/>\nOpenCV Mat<br \/>\nSystem.Drawing Bitmap<br \/>\nstb_image<br \/>\nFFmpeg Frame<br \/>\n\u6d4f\u89c8\u5668 Canvas<br \/>\n\u81ea\u7814\u56fe\u50cf SDK<\/p>\n<p>\u90fd\u53ef\u4ee5\u6210\u4e3a\u5b83\u7684\u4e0a\u6e38\u3002<\/p>\n<p>\u8fd9\u8ba9 Runtime \u4e0d\u5fc5\u7ed1\u5b9a\u67d0\u4e00\u79cd\u56fe\u7247\u751f\u6001\u3002<\/p>\n<p>\u4e3a\u4e86\u8bc1\u660e\u8fd9\u4ef6\u4e8b\u786e\u5b9e\u5bb9\u6613\u96c6\u6210&#xff0c;\u4ed3\u5e93\u91cc\u76ee\u524d\u5df2\u7ecf\u63d0\u4f9b\u4e86\u4e09\u7c7b\u4f7f\u7528\u65b9\u5f0f\u3002<\/p>\n<hr \/>\n<h2 id=\"%E5%8D%81%E4%B8%89%E3%80%81%E6%9C%80%E6%9C%B4%E7%B4%A0%E7%9A%84%20C%20Demo%EF%BC%9A%E4%B8%8D%E7%94%A8%E5%9B%BE%E7%89%87%E5%BA%93%E4%B9%9F%E8%83%BD%E8%B7%91\">\u5341\u4e09\u3001\u6700\u6734\u7d20\u7684 C Demo&#xff1a;\u4e0d\u7528\u56fe\u7247\u5e93\u4e5f\u80fd\u8dd1<\/h2>\n<p>\u4e3a\u4e86\u8bc1\u660e\u6838\u5fc3\u5e93\u672c\u8eab\u4e0d\u4f9d\u8d56\u56fe\u7247\u89e3\u7801\u7ec4\u4ef6&#xff0c;\u539f\u751f C Demo \u76f4\u63a5\u4f7f\u7528\u975e\u5e38\u7b80\u5355\u7684&#xff1a;<\/p>\n<p>P6 PPM<\/p>\n<p>\u4f8b\u5982\u5b8c\u6574 OCR&#xff1a;<\/p>\n<p>.\\\\bin\\\\lw-ocr-ppm.exe &#096;<br \/>\n\u00a0 .\\\\models\\\\det.lwm &#096;<br \/>\n\u00a0 .\\\\models\\\\cls.lwm &#096;<br \/>\n\u00a0 .\\\\models\\\\rec.lwm &#096;<br \/>\n\u00a0 .\\\\models\\\\ppocr_keys.txt &#096;<br \/>\n\u00a0 .\\\\models\\\\sample.ppm<\/p>\n<p>\u5b83\u4f1a\u8f93\u51fa&#xff1a;<\/p>\n<ul>\n<li>\n<p>UTF-8 \u6587\u5b57&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u68c0\u6d4b\u6846\u56db\u70b9\u5750\u6807&#xff1b;<\/p>\n<\/li>\n<li>\n<p>DET \/ CLS \/ REC \u5206\u6570&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u65b9\u5411\u5206\u7c7b&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u5e94\u7528\u65cb\u8f6c\u3002<\/p>\n<\/li>\n<\/ul>\n<p>PPM \u5f53\u7136\u4e0d\u662f\u4e3a\u4e86\u8ba9\u7528\u6237\u4ee5\u540e\u90fd\u6539\u7528 PPM\u3002<\/p>\n<p>\u5b83\u7684\u610f\u4e49\u662f&#xff1a;<\/p>\n<p>\u7528\u4e00\u4e2a\u51e0\u4e4e\u4e0d\u9700\u8981\u989d\u5916\u89e3\u7801\u5e93\u7684\u683c\u5f0f&#xff0c;\u8bc1\u660e\u7eaf C API \u4ece\u6a21\u578b\u52a0\u8f7d\u5230\u6700\u7ec8 OCR \u662f\u5b8c\u6574\u53ef\u8fd0\u884c\u7684\u3002<\/p>\n<hr \/>\n<h2 id=\"%E5%8D%81%E5%9B%9B%E3%80%81C%23%20WinForms%20Demo%EF%BC%9A%E7%9B%B4%E6%8E%A5%20P%2FInvoke\">\u5341\u56db\u3001C# WinForms Demo&#xff1a;\u76f4\u63a5 P\/Invoke<\/h2>\n<p>\u5982\u679c\u4f60\u5199\u7684\u662f Windows \u5de5\u4e1a\u8f6f\u4ef6&#xff0c;\u90a3\u4e48 C# \u53ef\u80fd\u6bd4 C\/C&#043;&#043; \u66f4\u5e38\u89c1\u3002<\/p>\n<p>\u9879\u76ee\u63d0\u4f9b\u4e86\u4e00\u4e2a&#xff1a;<\/p>\n<p>.NET Framework 3.5<br \/>\nWinForms<\/p>\n<p>Demo\u3002<\/p>\n<p>\u8c03\u7528\u94fe\u662f&#xff1a;<\/p>\n<p>System.Drawing<br \/>\n\u00a0 \u00a0 \u2193<br \/>\nBGR pixels<br \/>\n\u00a0 \u00a0 \u2193<br \/>\nP\/Invoke<br \/>\n\u00a0 \u00a0 \u2193<br \/>\nlw_ocr_run_bgr_u8<\/p>\n<p>Demo \u53ef\u4ee5&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u6253\u5f00\u5e38\u89c1\u56fe\u7247&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u540e\u53f0\u6267\u884c OCR&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u5728\u539f\u56fe\u7ed8\u5236\u56db\u8fb9\u5f62&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u663e\u793a\u9010\u884c\u6587\u5b57&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u663e\u793a\u5404\u9636\u6bb5 score&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u663e\u793a\u65cb\u8f6c\u4fe1\u606f&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u8f93\u51fa\u5b8c\u6574 JSON\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u8fd9\u91cc\u9009\u62e9\u00a0.NET Framework 3.5\u00a0\u4e5f\u4e0d\u662f\u56e0\u4e3a\u201c\u8d8a\u8001\u8d8a\u597d\u201d\u3002<\/p>\n<p>\u5b83\u4e3b\u8981\u662f\u4e3a\u4e86\u9a8c\u8bc1&#xff1a;<\/p>\n<p>\u516c\u5171 C ABI \u53ef\u4ee5\u88ab\u8f83\u8001\u7684 Windows\/.NET \u5e94\u7528\u4ee5\u975e\u5e38\u4f20\u7edf\u3001\u7a33\u5b9a\u7684 P\/Invoke \u65b9\u5f0f\u8c03\u7528\u3002<\/p>\n<p>\u4f46\u9700\u8981\u6ce8\u610f&#xff1a;<\/p>\n<p>\u8fd9\u4e0d\u7b49\u4ef7\u4e8e\u5df2\u7ecf\u5b8c\u6210 Windows 7 \u5b9e\u673a\u8ba4\u8bc1\u3002<\/p>\n<p>\u5f53\u524d Win7 x86 \u4ecd\u7136\u662f\u517c\u5bb9\u76ee\u6807&#xff0c;\u6b63\u5f0f\u58f0\u660e\u4e4b\u524d\u8fd8\u9700\u8981\u5b9e\u4f53\u673a\u9a8c\u8bc1\u3002<\/p>\n<hr \/>\n<h2 id=\"%E5%8D%81%E4%BA%94%E3%80%81%E8%BF%98%E6%9C%89%E4%B8%80%E4%B8%AA%E5%8E%9F%E7%94%9F%20HTTP%20%2F%20Web%20Demo\">\u5341\u4e94\u3001\u8fd8\u6709\u4e00\u4e2a\u539f\u751f HTTP \/ Web Demo<\/h2>\n<p>\u53e6\u4e00\u79cd\u5f88\u76f4\u89c2\u7684\u4f53\u9a8c\u65b9\u5f0f&#xff0c;\u662f\u76f4\u63a5\u542f\u52a8&#xff1a;<\/p>\n<p>lw.PPOCR.C.HttpServer<\/p>\n<p>\u9ed8\u8ba4\u76d1\u542c&#xff1a;<\/p>\n<p>http:\/\/127.0.0.1:8787\/<\/p>\n<p>\u7136\u540e\u7528\u6d4f\u89c8\u5668\u9009\u62e9\u56fe\u7247\u3002<\/p>\n<p>\u6d4f\u89c8\u5668\u901a\u8fc7 Canvas \u5b8c\u6210\u5e38\u89c1\u56fe\u7247\u89e3\u7801&#xff0c;\u518d\u8f6c\u6210 P6 PPM \u4e0a\u4f20\u3002<\/p>\n<p>\u670d\u52a1\u7aef&#xff1a;<\/p>\n<p>HTTP Request<br \/>\n\u00a0 \u00a0 \u2193<br \/>\nPPM validation<br \/>\n\u00a0 \u00a0 \u2193<br \/>\nRGB \u2192 BGR<br \/>\n\u00a0 \u00a0 \u2193<br \/>\nlw_ocr_run_bgr_u8<br \/>\n\u00a0 \u00a0 \u2193<br \/>\nJSON<\/p>\n<p>\u9875\u9762\u4f1a\u628a OCR \u6587\u5b57\u548c\u56db\u8fb9\u5f62\u6846\u91cd\u65b0\u7ed8\u5236\u51fa\u6765\u3002<\/p>\n<p>\u63a5\u53e3\u63d0\u4f9b&#xff1a;<\/p>\n<p>GET \/health<\/p>\n<p>\u4ee5\u53ca&#xff1a;<\/p>\n<p>POST \/api\/ocr<\/p>\n<p>\u652f\u6301\u4e8c\u8fdb\u5236 P6 PPM&#xff0c;\u4e5f\u652f\u6301 JSON &#043; Base64 PPM\u3002<\/p>\n<p>\u9700\u8981\u7279\u522b\u8bf4\u660e&#xff1a;<\/p>\n<p>\u8fd9\u4e2a HTTP Server \u662f\u6d4b\u8bd5\u548c\u672c\u5730\u96c6\u6210 Demo\u3002<\/p>\n<p>\u5b83\u9ed8\u8ba4\u6ca1\u6709&#xff1a;<\/p>\n<p>TLS<br \/>\nAuthentication<br \/>\nRate Limit<br \/>\nCORS Policy<br \/>\n\u751f\u4ea7\u7ea7 Access Log<\/p>\n<p>\u6240\u4ee5\u9879\u76ee\u6587\u6863\u660e\u786e\u5efa\u8bae&#xff1a;<\/p>\n<p>\u5982\u679c\u771f\u7684\u66b4\u9732\u5230\u516c\u7f51&#xff0c;\u5e94\u653e\u5728\u5e26 HTTPS\u3001\u8ba4\u8bc1\u3001\u9650\u6d41\u548c\u8bf7\u6c42\u5927\u5c0f\u63a7\u5236\u7684\u53cd\u5411\u4ee3\u7406\u540e\u9762\u3002<\/p>\n<p>\u4e00\u4e2a Demo \u5982\u679c\u613f\u610f\u628a\u201c\u4e0d\u9002\u5408\u76f4\u63a5\u4e0a\u516c\u7f51\u201d\u5199\u6e05\u695a&#xff0c;\u6211\u53cd\u800c\u66f4\u613f\u610f\u76f8\u4fe1\u5b83\u7684\u5de5\u7a0b\u8fb9\u754c\u3002<\/p>\n<hr \/>\n<h2 id=\"%E5%8D%81%E5%85%AD%E3%80%81%E7%8E%B0%E5%9C%A8%E7%9A%84%E8%B7%A8%E5%B9%B3%E5%8F%B0%E7%8A%B6%E6%80%81%E5%88%B0%E5%BA%95%E6%80%8E%E4%B9%88%E6%A0%B7%EF%BC%9F\">\u5341\u516d\u3001\u73b0\u5728\u7684\u8de8\u5e73\u53f0\u72b6\u6001\u5230\u5e95\u600e\u4e48\u6837&#xff1f;<\/h2>\n<p>\u76ee\u524d\u9879\u76ee\u7684\u4e3b\u76ee\u6807\u5e73\u53f0\u5305\u62ec&#xff1a;<\/p>\n<p>Windows x64<br \/>\nLinux x64<\/p>\n<p>\u517c\u5bb9\u76ee\u6807\u5305\u62ec&#xff1a;<\/p>\n<p>Windows 7 SP1 x86<\/p>\n<p>\u540e\u7eed\u8ba1\u5212&#xff1a;<\/p>\n<p>Linux ARM64<\/p>\n<p>\u6700\u8fd1 GitHub Actions \u5df2\u7ecf\u5b8c\u6210&#xff1a;<\/p>\n<p>Windows Server 2022 &#043; Visual Studio 2022 x64<br \/>\nUbuntu 22.04 &#043; GCC\/Ninja<\/p>\n<p>\u4e24\u5957\u73af\u5883\u7684\u5b8c\u6574 CI\u3002<\/p>\n<p>CI \u4e0d\u53ea\u662f\u7f16\u8bd1 Runtime&#xff0c;\u800c\u662f\u7ee7\u7eed\u6267\u884c&#xff1a;<\/p>\n<p>Converter dependencies<br \/>\nModel conversion<br \/>\nRuntime build<br \/>\nModel analysis regeneration<br \/>\nCTest<br \/>\nCPack<br \/>\nGenerated-report consistency check<br \/>\nArtifact upload<\/p>\n<p>\u6700\u7ec8\u5206\u522b\u751f\u6210&#xff1a;<\/p>\n<p>Windows x64 development package<br \/>\nLinux x64 development package<\/p>\n<p>\u8fd9\u610f\u5473\u7740 Linux x64 \u5df2\u7ecf\u4e0d\u662f\u201c\u4ee3\u7801\u7406\u8bba\u4e0a\u5e94\u8be5\u80fd\u7f16\u8bd1\u201d\u7684\u72b6\u6001&#xff0c;\u800c\u662f\u5b9e\u9645\u8fdb\u5165\u8fdc\u7a0b CI \u6784\u5efa\u3001\u6d4b\u8bd5\u548c\u6253\u5305\u94fe\u8def\u3002<\/p>\n<p>\u4e0d\u8fc7\u4ecd\u7136\u9700\u8981\u533a\u5206&#xff1a;<\/p>\n<h4 id=\"CI%20%E9%AA%8C%E8%AF%81%20%E2%89%A0%20%E6%89%80%E6%9C%89%E6%9C%BA%E5%99%A8%E5%AE%9E%E6%9C%BA%E9%AA%8C%E8%AF%81\">CI \u9a8c\u8bc1 \u2260 \u6240\u6709\u673a\u5668\u5b9e\u673a\u9a8c\u8bc1<\/h4>\n<p>\u4f8b\u5982&#xff1a;<\/p>\n<p>Windows Server 2022 CI success<\/p>\n<p>\u5e76\u4e0d\u80fd\u81ea\u52a8\u63a8\u5bfc\u51fa&#xff1a;<\/p>\n<p>\u6240\u6709 Windows 10 \/ 11 \u673a\u5668\u90fd\u5df2\u7ecf\u9a8c\u8bc1<\/p>\n<p>\u66f4\u4e0d\u80fd\u63a8\u5bfc\u51fa&#xff1a;<\/p>\n<p>Windows 7 x86 \u5df2\u7ecf\u9a8c\u8bc1<\/p>\n<p>\u9879\u76ee\u5f53\u524d\u4ecd\u7136\u628a&#xff1a;<\/p>\n<p>\u6e90\u7801\u76ee\u6807<br \/>\nCI \u9a8c\u8bc1<br \/>\n\u5b9e\u4f53\u673a\u9a8c\u8bc1<\/p>\n<p>\u4f5c\u4e3a\u4e0d\u540c\u5c42\u7ea7\u3002<\/p>\n<p>\u8fd9\u79cd\u8868\u8ff0\u53ef\u80fd\u6ca1\u6709\u4e00\u53e5\u201c\u5168\u5e73\u53f0\u652f\u6301\u201d\u90a3\u4e48\u5438\u775b&#xff0c;\u4f46\u66f4\u63a5\u8fd1\u771f\u5b9e\u7684\u8f6f\u4ef6\u5de5\u7a0b\u3002<\/p>\n<hr \/>\n<h2 id=\"%E5%8D%81%E4%B8%83%E3%80%8132%20%E4%BD%8D%E4%B8%BA%E4%BB%80%E4%B9%88%E8%BF%98%E5%80%BC%E5%BE%97%E4%BF%9D%E7%95%99%EF%BC%9F\">\u5341\u4e03\u300132 \u4f4d\u4e3a\u4ec0\u4e48\u8fd8\u503c\u5f97\u4fdd\u7559&#xff1f;<\/h2>\n<p>2026 \u5e74\u518d\u8ba8\u8bba x86 32 \u4f4d&#xff0c;\u542c\u8d77\u6765\u4f3c\u4e4e\u6709\u70b9\u201c\u8003\u53e4\u201d\u3002<\/p>\n<p>\u4f46\u5de5\u4e1a\u8f6f\u4ef6\u548c\u666e\u901a\u6d88\u8d39\u8f6f\u4ef6\u7684\u751f\u547d\u5468\u671f\u5e76\u4e0d\u4e00\u6837\u3002<\/p>\n<p>\u73b0\u5b9e\u4e2d\u4ecd\u7136\u6709\u4e00\u4e9b\u8bbe\u5907&#xff1a;<\/p>\n<ul>\n<li>\n<p>Windows 7 32 \u4f4d&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u8001\u5de5\u63a7\u673a&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u5df2\u7ecf\u51bb\u7ed3\u5f00\u53d1\u73af\u5883\u7684\u884c\u4e1a\u8f6f\u4ef6&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u65e0\u6cd5\u968f\u610f\u5347\u7ea7 OS \u7684\u73b0\u573a\u7cfb\u7edf&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u7b2c\u4e09\u65b9 SDK \u53ea\u80fd\u63d0\u4f9b Win32 DLL \u7684\u65e7\u9879\u76ee\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u56e0\u6b64\u00a0lw.PPOCR.C\u00a0\u4ece\u8bbe\u8ba1\u9636\u6bb5\u5c31\u5c3d\u91cf\u907f\u514d&#xff1a;<\/p>\n<p>\u628a 64 \u4f4d\u6307\u9488\u5199\u8fdb\u6a21\u578b<br \/>\n\u9ed8\u8ba4 size_t \u6c38\u8fdc\u662f 64 \u4f4d<br \/>\n\u9ed8\u8ba4\u5730\u5740\u7a7a\u95f4\u65e0\u9650<br \/>\n\u516c\u5171 ABI \u66b4\u9732\u5e73\u53f0\u539f\u751f\u7ed3\u6784<\/p>\n<p>Windows x86 \u5df2\u7ecf\u8fdb\u884c\u8fc7\u672c\u673a\u6784\u5efa\u3001ABI\u3001Runtime \u548c Demo \u6d4b\u8bd5\u3002<\/p>\n<p>\u4f46 Windows 7 SP1 x86 \u4ecd\u7136\u53ea\u662f\u517c\u5bb9\u76ee\u6807\u3002<\/p>\n<p>\u540e\u9762\u771f\u6b63\u503c\u5f97\u505a\u7684\u662f&#xff1a;<\/p>\n<p>\u7528\u6700\u7ec8\u53d1\u5e03\u5305\u5728\u5b9e\u4f53 Windows 7 SP1 32 \u4f4d\u673a\u5668\u4e0a\u5b8c\u6210\u5b8c\u6574 OCR\u3001DLL\u3001C Demo\u3001C# Demo \u548c\u4f9d\u8d56\u68c0\u67e5\u3002<\/p>\n<p>\u5982\u679c\u8fd9\u4e00\u6b65\u6700\u7ec8\u8dd1\u901a&#xff0c;\u5b83\u4f1a\u6210\u4e3a\u8fd9\u4e2a\u9879\u76ee\u4e00\u4e2a\u975e\u5e38\u6709\u8fa8\u8bc6\u5ea6\u7684\u7279\u70b9\u3002<\/p>\n<hr \/>\n<h2 id=\"%E5%8D%81%E5%85%AB%E3%80%81%E5%AE%83%E9%80%82%E5%90%88%E4%BB%80%E4%B9%88%E5%9C%BA%E6%99%AF%EF%BC%9F\">\u5341\u516b\u3001\u5b83\u9002\u5408\u4ec0\u4e48\u573a\u666f&#xff1f;<\/h2>\n<p>\u6211\u8ba4\u4e3a\u00a0lw.PPOCR.C\u00a0\u6bd4\u8f83\u9002\u5408\u4e0b\u9762\u51e0\u7c7b\u7528\u6237\u3002<\/p>\n<h3 id=\"1.%20%E6%A1%8C%E9%9D%A2%E8%BD%AF%E4%BB%B6%E5%B5%8C%E5%85%A5%20OCR\">1. \u684c\u9762\u8f6f\u4ef6\u5d4c\u5165 OCR<\/h3>\n<p>\u5982\u679c\u4f60\u7684\u7a0b\u5e8f\u672c\u6765\u5c31\u662f&#xff1a;<\/p>\n<p>C<br \/>\nC&#043;&#043;<br \/>\nC#<\/p>\n<p>\u53ea\u9700\u8981\u4e00\u4e2a\u7a33\u5b9a C API \u5b8c\u6210 OCR&#xff0c;\u4e0d\u60f3\u628a\u4e1a\u52a1\u4ee3\u7801\u7ed1\u5b9a\u5230\u67d0\u4e2a\u5927\u578b\u63a8\u7406\u6846\u67b6&#xff0c;\u4e13\u7528 Runtime \u4f1a\u6bd4\u8f83\u8212\u670d\u3002<\/p>\n<hr \/>\n<h3 id=\"2.%20%E5%B7%A5%E4%B8%9A%E7%8E%B0%E5%9C%BA%E5%92%8C%E7%A6%BB%E7%BA%BF%E8%AE%BE%E5%A4%87\">2. \u5de5\u4e1a\u73b0\u573a\u548c\u79bb\u7ebf\u8bbe\u5907<\/h3>\n<p>\u8fd9\u7c7b\u9879\u76ee\u5f80\u5f80\u66f4\u91cd\u89c6&#xff1a;<\/p>\n<p>\u5c11\u4f9d\u8d56<br \/>\n\u53ef\u590d\u5236\u90e8\u7f72<br \/>\n\u7a33\u5b9a ABI<br \/>\n\u957f\u671f\u7ef4\u62a4<br \/>\n\u660e\u786e\u8d44\u6e90\u4e0a\u9650<\/p>\n<p>\u800c\u4e0d\u662f\u9700\u8981\u652f\u6301\u51e0\u5341\u79cd AI \u7f51\u7edc\u3002<\/p>\n<hr \/>\n<h3 id=\"3.%20%E5%B5%8C%E5%85%A5%E5%BC%8F%20Linux\">3. \u5d4c\u5165\u5f0f Linux<\/h3>\n<p>\u76ee\u524d Linux x64 \u5df2\u7ecf\u8fdb\u5165 CI\u3002<\/p>\n<p>Linux ARM64 \/ NEON \u4ecd\u5728\u89c4\u5212\u4e2d\u3002<\/p>\n<p>\u5982\u679c\u540e\u7eed\u5b8c\u6210 ARM64 &#043; NEON&#xff0c;\u8fd9\u5957\u201c\u540c\u4e00\u79cd LWM &#043; \u4e0d\u540c CPU Kernel Backend\u201d\u7684\u67b6\u6784\u4f1a\u66f4\u6709\u4ef7\u503c\u3002<\/p>\n<hr \/>\n<h3 id=\"4.%20%E5%AD%A6%E4%B9%A0%E4%B8%80%E4%B8%AA%E5%B0%8F%E5%9E%8B%E7%A5%9E%E7%BB%8F%E7%BD%91%E7%BB%9C%20Runtime%20%E6%98%AF%E6%80%8E%E4%B9%88%E5%B7%A5%E4%BD%9C%E7%9A%84\">4. \u5b66\u4e60\u4e00\u4e2a\u5c0f\u578b\u795e\u7ecf\u7f51\u7edc Runtime \u662f\u600e\u4e48\u5de5\u4f5c\u7684<\/h3>\n<p>\u5982\u679c\u4f60\u4e00\u76f4\u60f3\u77e5\u9053&#xff1a;<\/p>\n<p>\u6a21\u578b\u6587\u4ef6\u600e\u4e48\u8bbe\u8ba1&#xff1f;<br \/>\nONNX \u600e\u4e48\u8f6c\u6362&#xff1f;<br \/>\nShape \u600e\u4e48\u4f20\u64ad&#xff1f;<br \/>\nTensor \u751f\u547d\u5468\u671f\u600e\u4e48\u7b97&#xff1f;<br \/>\nWorkspace \u600e\u4e48\u89c4\u5212&#xff1f;<br \/>\nGraph Executor \u600e\u4e48\u8c03 Kernel&#xff1f;<br \/>\nConv \u4e3a\u4ec0\u4e48\u6162&#xff1f;<br \/>\nSIMD \u5230\u5e95\u5e94\u8be5\u4f18\u5316\u54ea\u91cc&#xff1f;<br \/>\nC ABI \u600e\u4e48\u8bbe\u8ba1&#xff1f;<\/p>\n<p>\u8fd9\u4e2a\u9879\u76ee\u4e5f\u53ef\u4ee5\u4f5c\u4e3a\u4e00\u4e2a\u76f8\u5bf9\u805a\u7126\u7684\u7814\u7a76\u5bf9\u8c61\u3002<\/p>\n<p>\u56e0\u4e3a\u5b83\u6ca1\u6709\u8bd5\u56fe\u628a\u6240\u6709 AI \u95ee\u9898\u90fd\u585e\u8fdb\u6765\u3002<\/p>\n<p>\u6a21\u578b\u8303\u56f4\u5c0f&#xff0c;\u53cd\u800c\u66f4\u5bb9\u6613\u6cbf\u7740\u4e00\u6761\u5b8c\u6574\u94fe\u8def\u770b\u5230&#xff1a;<\/p>\n<p>ONNX \u2192 Converter \u2192 Model Format \u2192 Loader \u2192 Shape \u2192 Memory \u2192 Executor \u2192 Kernel \u2192 OCR Pipeline \u2192 API<\/p>\n<hr \/>\n<h2 id=\"%E5%8D%81%E4%B9%9D%E3%80%81%E5%AE%83%E4%B8%8D%E9%80%82%E5%90%88%E4%BB%80%E4%B9%88%E5%9C%BA%E6%99%AF%EF%BC%9F\">\u5341\u4e5d\u3001\u5b83\u4e0d\u9002\u5408\u4ec0\u4e48\u573a\u666f&#xff1f;<\/h2>\n<p>\u8fd9\u4e00\u90e8\u5206\u4e5f\u5fc5\u987b\u8bf4\u6e05\u695a\u3002<\/p>\n<p>\u5982\u679c\u4f60\u7684\u76ee\u6807\u662f&#xff1a;<\/p>\n<p>\u4efb\u610f ONNX<br \/>\nYOLO<br \/>\nLLM<br \/>\n\u8bed\u97f3\u6a21\u578b<br \/>\n\u591a\u6a21\u578b\u6df7\u8dd1<br \/>\nGPU \u9ad8\u541e\u5410<br \/>\nCUDA<br \/>\nTensorRT<br \/>\n\u5927 Batch<br \/>\n\u81ea\u52a8\u56fe\u4f18\u5316<br \/>\n\u8bad\u7ec3<\/p>\n<p>\u90a3\u4e48\u00a0lw.PPOCR.C\u00a0\u4e0d\u662f\u6b63\u786e\u5de5\u5177\u3002<\/p>\n<p>\u5f53\u524d\u5b83\u660e\u786e\u4e0d\u662f&#xff1a;<\/p>\n<p>\u901a\u7528 ONNX Runtime\u3002<\/p>\n<p>\u4e5f\u4e0d\u662f&#xff1a;<\/p>\n<p>Paddle Inference \u7684\u66ff\u4ee3\u54c1\u3002<\/p>\n<p>\u66f4\u4e0d\u662f&#xff1a;<\/p>\n<p>TensorRT \u7684 CPU \u7248\u7ade\u4e89\u5bf9\u624b\u3002<\/p>\n<p>\u5b83\u73b0\u5728\u7684\u8303\u56f4\u5c31\u662f&#xff1a;<\/p>\n<p>PP-OCRv6 tiny<br \/>\nFP32<br \/>\nCPU<br \/>\nDET \/ CLS \/ REC<\/p>\n<p>\u8fd9\u6837\u7684\u8fb9\u754c\u867d\u7136\u8ba9\u9879\u76ee\u201c\u770b\u8d77\u6765\u6ca1\u90a3\u4e48\u4e07\u80fd\u201d&#xff0c;\u5374\u4e5f\u662f\u5b83\u80fd\u591f\u4fdd\u6301 Runtime \u7b80\u5355\u7684\u524d\u63d0\u3002<\/p>\n<hr \/>\n<h2 id=\"%E4%BA%8C%E5%8D%81%E3%80%81%E5%BD%93%E5%89%8D%E4%BB%8D%E7%84%B6%E5%AD%98%E5%9C%A8%E7%9A%84%E9%99%90%E5%88%B6\">\u4e8c\u5341\u3001\u5f53\u524d\u4ecd\u7136\u5b58\u5728\u7684\u9650\u5236<\/h2>\n<p>\u9879\u76ee\u73b0\u5728\u5df2\u7ecf\u53ef\u4ee5\u8dd1\u5b8c\u6574 OCR&#xff0c;\u4f46\u8ddd\u79bb\u201c\u6210\u719f\u7a33\u5b9a\u7248\u201d\u8fd8\u6709\u4e0d\u5c11\u5de5\u4f5c\u3002<\/p>\n<p>\u76ee\u524d\u6bd4\u8f83\u660e\u786e\u7684\u8fb9\u754c\u5305\u62ec&#xff1a;<\/p>\n<h3 id=\"LWM%20v0.1%20%E8%BF%98%E6%B2%A1%E6%9C%89%E5%86%BB%E7%BB%93\">LWM v0.1 \u8fd8\u6ca1\u6709\u51bb\u7ed3<\/h3>\n<p>\u4e5f\u5c31\u662f\u8bf4&#xff1a;<\/p>\n<p>\u6587\u4ef6\u683c\u5f0f<br \/>\n\u6a21\u578b Hash<br \/>\nABI<\/p>\n<p>\u5728 1.0 \u4e4b\u524d\u4ecd\u53ef\u80fd\u8c03\u6574\u3002<\/p>\n<hr \/>\n<h3 id=\"%E5%BD%93%E5%89%8D%E4%B8%BB%E8%A6%81%E6%98%AF%20FP32%20CPU\">\u5f53\u524d\u4e3b\u8981\u662f FP32 CPU<\/h3>\n<p>\u8fd8\u6ca1\u6709&#xff1a;<\/p>\n<p>INT8<br \/>\nFP16<br \/>\nGPU<br \/>\nNPU<\/p>\n<hr \/>\n<h3 id=\"ARM64%20%2F%20NEON%20%E8%BF%98%E6%B2%A1%E6%9C%89%E5%AE%8C%E6%88%90\">ARM64 \/ NEON \u8fd8\u6ca1\u6709\u5b8c\u6210<\/h3>\n<p>Linux ARM64 \u662f\u660e\u786e\u7684\u540e\u7eed\u65b9\u5411&#xff0c;\u4f46\u4e0d\u80fd\u63d0\u524d\u5199\u6210\u201c\u5df2\u7ecf\u652f\u6301\u201d\u3002<\/p>\n<hr \/>\n<h3 id=\"Windows%207%20%E8%BF%98%E9%9C%80%E8%A6%81%E5%AE%9E%E4%BD%93%E6%9C%BA%E9%AA%8C%E8%AF%81\">Windows 7 \u8fd8\u9700\u8981\u5b9e\u4f53\u673a\u9a8c\u8bc1<\/h3>\n<p>\u8bbe\u8ba1\u76ee\u6807\u548c\u771f\u6b63\u517c\u5bb9\u9a8c\u8bc1\u662f\u4e24\u56de\u4e8b\u3002<\/p>\n<hr \/>\n<h3 id=\"%E4%B8%80%E4%B8%AA%20OCR%20Handle%20%E4%B8%8D%E8%AE%BE%E8%AE%A1%E4%B8%BA%E5%B9%B6%E5%8F%91%E8%B0%83%E7%94%A8\">\u4e00\u4e2a OCR Handle \u4e0d\u8bbe\u8ba1\u4e3a\u5e76\u53d1\u8c03\u7528<\/h3>\n<p>\u5355\u4e2a Handle \u5e94\u7531\u8c03\u7528\u65b9\u4e32\u884c\u4f7f\u7528\u3002<\/p>\n<p>\u5982\u679c\u5e94\u7528\u9700\u8981\u5e76\u53d1&#xff0c;\u53ef\u4ee5\u521b\u5efa\u591a\u4e2a Handle&#xff0c;\u7531\u4e0a\u5c42\u505a Worker \u8c03\u5ea6\u3002<\/p>\n<hr \/>\n<h3 id=\"%E8%BF%98%E9%9C%80%E8%A6%81%E6%9B%B4%E5%A4%A7%E7%9A%84%E7%9C%9F%E5%AE%9E%E5%9B%BE%E7%89%87%E5%9B%9E%E5%BD%92%E9%9B%86\">\u8fd8\u9700\u8981\u66f4\u5927\u7684\u771f\u5b9e\u56fe\u7247\u56de\u5f52\u96c6<\/h3>\n<p>\u73b0\u6709\u6d4b\u8bd5\u5df2\u7ecf\u5305\u542b\u771f\u5b9e\u56fe\u7247 Golden\u3001REC corpus\u3001\u56fe\u8f93\u51fa\u5bf9\u6bd4\u548c\u5b8c\u6574 OCR \u68c0\u67e5\u3002<\/p>\n<p>\u4f46\u66f4\u591a\u5b57\u4f53\u3001\u8bed\u8a00\u3001\u62cd\u6444\u89d2\u5ea6\u3001\u4f4e\u5bf9\u6bd4\u5ea6\u3001\u6a21\u7cca\u3001\u590d\u6742\u80cc\u666f\u7b49\u771f\u5b9e\u573a\u666f\u4ecd\u7136\u9700\u8981\u7ee7\u7eed\u6269\u5145\u3002<\/p>\n<hr \/>\n<h2 id=\"%E4%BA%8C%E5%8D%81%E4%B8%80%E3%80%81%E6%88%91%E8%A7%89%E5%BE%97%E4%B8%8B%E4%B8%80%E6%AD%A5%E6%9C%80%E5%80%BC%E5%BE%97%E5%81%9A%E4%BB%80%E4%B9%88%EF%BC%9F\">\u4e8c\u5341\u4e00\u3001\u6211\u89c9\u5f97\u4e0b\u4e00\u6b65\u6700\u503c\u5f97\u505a\u4ec0\u4e48&#xff1f;<\/h2>\n<p>\u73b0\u5728\u9879\u76ee\u5df2\u7ecf\u8de8\u8fc7\u4e86\u201c\u8bc1\u660e\u53ef\u884c\u201d\u7684\u9636\u6bb5\u3002<\/p>\n<p>\u540e\u7eed\u6211\u53cd\u800c\u4e0d\u5efa\u8bae\u9a6c\u4e0a\u6269\u6210\u901a\u7528 AI Runtime\u3002<\/p>\n<p>\u66f4\u503c\u5f97\u505a\u7684\u662f\u628a\u73b0\u6709\u8303\u56f4\u7ee7\u7eed\u505a\u786c\u3002<\/p>\n<p>\u6211\u4e2a\u4eba\u6bd4\u8f83\u5173\u6ce8\u8fd9\u4e9b\u65b9\u5411&#xff1a;<\/p>\n<p>1. Full OCR Benchmark<br \/>\n2. \u66f4\u5927\u7684 Golden Corpus<br \/>\n3. ASan \/ UBSan<br \/>\n4. Windows x86 \u6301\u7eed\u6784\u5efa<br \/>\n5. Windows 7 SP1 x86 \u5b9e\u673a\u9a8c\u8bc1<br \/>\n6. Linux ARM64<br \/>\n7. ARM NEON<br \/>\n8. INT8<\/p>\n<p>\u5c24\u5176\u662f&#xff1a;<\/p>\n<h2 id=\"Full%20OCR%20Benchmark\">Full OCR Benchmark<\/h2>\n<p>\u73b0\u5728 REC Benchmark \u5df2\u7ecf\u53ef\u4ee5\u6e05\u695a\u5730\u770b\u5230\u6bcf\u4e00\u6b21\u4f18\u5316\u5e26\u6765\u7684\u53d8\u5316\u3002<\/p>\n<p>\u4e0b\u4e00\u6b65\u5e94\u8be5\u628a\u6574\u56fe OCR \u62c6\u5f00\u7edf\u8ba1&#xff1a;<\/p>\n<p>DET<br \/>\nDB Postprocess<br \/>\nCrop<br \/>\nCLS<br \/>\nREC<br \/>\nTotal<\/p>\n<p>\u8fd9\u6837\u4f7f\u7528\u8005\u624d\u53ef\u4ee5\u771f\u6b63\u56de\u7b54&#xff1a;<\/p>\n<p>\u201c\u6211\u7684\u4e00\u5f20 1280\u00d7720 \u56fe\u7247\u3001\u6709 N \u884c\u6587\u5b57\u65f6&#xff0c;\u5927\u6982\u9700\u8981\u591a\u5c11\u65f6\u95f4&#xff1f;\u201d<\/p>\n<p>\u800c\u4e0d\u662f\u53ea\u77e5\u9053\u5355\u884c REC \u7684\u901f\u5ea6\u3002<\/p>\n<hr \/>\n<h2 id=\"%E4%BA%8C%E5%8D%81%E4%BA%8C%E3%80%81%E4%B8%BA%E4%BB%80%E4%B9%88%E6%88%91%E4%BB%8D%E7%84%B6%E6%83%B3%E6%8A%8A%E8%BF%99%E4%B8%AA%E9%A1%B9%E7%9B%AE%E5%BC%80%E6%BA%90%E5%87%BA%E6%9D%A5%EF%BC%9F\">\u4e8c\u5341\u4e8c\u3001\u4e3a\u4ec0\u4e48\u6211\u4ecd\u7136\u60f3\u628a\u8fd9\u4e2a\u9879\u76ee\u5f00\u6e90\u51fa\u6765&#xff1f;<\/h2>\n<p>\u56e0\u4e3a\u8fd9\u4e2a\u9879\u76ee\u771f\u6b63\u6709\u610f\u601d\u7684\u5730\u65b9&#xff0c;\u53ef\u80fd\u4e0d\u53ea\u662f\u201c\u591a\u4e86\u4e00\u4e2a OCR \u5e93\u201d\u3002<\/p>\n<p>\u5b83\u5176\u5b9e\u662f\u5728\u5c1d\u8bd5\u56de\u7b54\u4e00\u4e2a\u66f4\u5e95\u5c42\u7684\u95ee\u9898&#xff1a;<\/p>\n<p>\u5f53\u6a21\u578b\u8303\u56f4\u8db3\u591f\u660e\u786e\u65f6&#xff0c;\u6211\u4eec\u5230\u5e95\u9700\u4e0d\u9700\u8981\u628a\u4e00\u4e2a\u901a\u7528 AI Runtime \u4e00\u8d77\u5e26\u5230\u6bcf\u4e00\u53f0\u7ec8\u7aef\u8bbe\u5907\u4e0a&#xff1f;<\/p>\n<p>\u6211\u7684\u7b54\u6848\u4e0d\u662f&#xff1a;<\/p>\n<p>\u201c\u6c38\u8fdc\u4e0d\u9700\u8981\u3002\u201d<\/p>\n<p>\u800c\u662f&#xff1a;<\/p>\n<p>\u6709\u4e9b\u573a\u666f\u91cc&#xff0c;\u786e\u5b9e\u53ef\u4ee5\u6709\u53e6\u5916\u4e00\u79cd\u9009\u62e9\u3002<\/p>\n<p>\u628a\u590d\u6742\u5ea6\u653e\u5230\u5f00\u53d1\u9636\u6bb5&#xff1a;<\/p>\n<p>ONNX<br \/>\n\u00a0\u2193<br \/>\nConverter<br \/>\n\u00a0\u2193<br \/>\nLWM<\/p>\n<p>\u628a\u90e8\u7f72\u7aef\u63a7\u5236\u5728&#xff1a;<\/p>\n<p>Loader<br \/>\nShape \/ Memory<br \/>\nExecutor<br \/>\nCPU Kernels<br \/>\nPP-OCR Pipeline<br \/>\nC ABI<\/p>\n<p>\u7136\u540e\u53ea\u4e3a\u81ea\u5df1\u771f\u6b63\u9700\u8981\u7684\u7f51\u7edc\u505a\u6d4b\u8bd5\u548c\u4f18\u5316\u3002<\/p>\n<p>\u8fd9\u6761\u8def\u80af\u5b9a\u6ca1\u6709\u6210\u719f\u901a\u7528 Runtime \u7701\u5f00\u53d1\u65f6\u95f4\u3002<\/p>\n<p>\u4f46\u5b83\u6362\u56de\u6765\u7684\u662f&#xff1a;<\/p>\n<p>\u66f4\u660e\u786e\u7684\u8fd0\u884c\u8fb9\u754c<br \/>\n\u66f4\u5c11\u7684\u5927\u578b\u90e8\u7f72\u4f9d\u8d56<br \/>\n\u66f4\u5bb9\u6613\u5ba1\u8ba1\u7684\u6267\u884c\u8def\u5f84<br \/>\n\u66f4\u76f4\u63a5\u7684 C ABI<br \/>\n\u66f4\u81ea\u7531\u7684\u65e7\u7cfb\u7edf \/ \u5d4c\u5165\u5f0f\u9002\u914d\u7a7a\u95f4<\/p>\n<p>\u5bf9\u4e00\u90e8\u5206\u8f6f\u4ef6\u6765\u8bf4&#xff0c;\u8fd9\u4e9b\u4e1c\u897f\u53ef\u80fd\u6bd4\u201c\u652f\u6301\u4efb\u610f ONNX\u201d\u66f4\u91cd\u8981\u3002<\/p>\n<hr \/>\n<h2 id=\"%E4%BA%8C%E5%8D%81%E4%B8%89%E3%80%81%E5%A6%82%E6%9E%9C%E4%BD%A0%E6%83%B3%E8%AF%95%E4%B8%80%E4%B8%8B\">\u4e8c\u5341\u4e09\u3001\u5982\u679c\u4f60\u60f3\u8bd5\u4e00\u4e0b<\/h2>\n<p>\u9879\u76ee\u5730\u5740&#xff1a;<\/p>\n<p>GitHub&#xff1a;<\/p>\n<p>https:\/\/github.com\/lxw112190\/lw.PPOCR.C<\/p>\n<p>\u5f53\u524d\u4ed3\u5e93\u5df2\u7ecf\u5305\u542b&#xff1a;<\/p>\n<p>\u7eaf C Runtime<br \/>\nONNX \u2192 LWM Converter<br \/>\nDET<br \/>\nCLS<br \/>\nREC<br \/>\nFull OCR<br \/>\nScalar \/ SSE2 \/ AVX2<br \/>\nC API<br \/>\nC Command-line Demo<br \/>\nC# WinForms Demo<br \/>\nNative HTTP\/Web Demo<br \/>\nTests<br \/>\nBenchmark<br \/>\nCPack Development Package<br \/>\nCI<\/p>\n<p>\u5982\u679c\u4f60\u5bf9\u4e0b\u9762\u4efb\u4f55\u4e00\u4e2a\u65b9\u5411\u611f\u5174\u8da3&#xff1a;<\/p>\n<ul>\n<li>\n<p>PP-OCR&#xff1b;<\/p>\n<\/li>\n<li>\n<p>C\/C&#043;&#043;&#xff1b;<\/p>\n<\/li>\n<li>\n<p>C# P\/Invoke&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u5c0f\u578b AI Runtime&#xff1b;<\/p>\n<\/li>\n<li>\n<p>ONNX \u6a21\u578b\u8f6c\u6362&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u81ea\u5b9a\u4e49\u6a21\u578b\u683c\u5f0f&#xff1b;<\/p>\n<\/li>\n<li>\n<p>SIMD&#xff1b;<\/p>\n<\/li>\n<li>\n<p>Windows 32 \u4f4d\u517c\u5bb9&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u5d4c\u5165\u5f0f Linux&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u5de5\u4e1a OCR&#xff1b;<\/p>\n<\/li>\n<\/ul>\n<p>\u90fd\u6b22\u8fce\u770b\u770b\u4ee3\u7801\u3001\u8dd1\u8dd1 Demo\u3001\u63d0 Issue&#xff0c;\u6216\u8005\u4e00\u8d77\u8ba8\u8bba\u3002<\/p>\n<hr \/>\n<h2 id=\"%E7%BB%93%E8%AF%AD\">\u7ed3\u8bed<\/h2>\n<p>\u8fd9\u51e0\u5e74 AI Runtime \u8d8a\u6765\u8d8a\u5f3a\u3002<\/p>\n<p>\u4e00\u4e2a\u6210\u719f\u6846\u67b6\u53ef\u4ee5\u66ff\u6211\u4eec\u89e3\u51b3\u6a21\u578b\u89e3\u6790\u3001\u56fe\u4f18\u5316\u3001\u786c\u4ef6\u8c03\u5ea6\u3001\u7b97\u5b50\u5b9e\u73b0\u3001\u91cf\u5316\u3001GPU \u7b49\u5927\u91cf\u590d\u6742\u95ee\u9898\u3002<\/p>\n<p>\u6240\u4ee5\u81ea\u5df1\u5199 Runtime&#xff0c;\u5e76\u4e0d\u662f\u4e00\u4ef6\u201c\u663e\u7136\u66f4\u5148\u8fdb\u201d\u7684\u4e8b\u60c5\u3002<\/p>\n<p>\u4f46\u6709\u65f6\u5019&#xff0c;\u5de5\u7a0b\u4e5f\u53ef\u4ee5\u53cd\u8fc7\u6765\u95ee&#xff1a;<\/p>\n<p>\u5982\u679c\u6211\u53ea\u9700\u8981 PP-OCR&#xff0c;\u6211\u5230\u5e95\u6700\u5c11\u9700\u8981\u4ec0\u4e48&#xff1f;<\/p>\n<p>lw.PPOCR.C\u00a0\u76ee\u524d\u7ed9\u51fa\u7684\u7b54\u6848\u662f&#xff1a;<\/p>\n<p>\u5f00\u53d1\u7aef&#xff1a;<\/p>\n<p>ONNX &#043; Converter<\/p>\n<p>\u90e8\u7f72\u7aef&#xff1a;<\/p>\n<p>LWM &#043; Pure C Runtime<\/p>\n<p>\u4ece\u6700\u521d\u4e00\u4e2a\u901f\u5ea6\u5e76\u4e0d\u7406\u60f3\u7684 Scalar REC&#xff0c;\u5230\u73b0\u5728 DET \/ CLS \/ REC \u5168\u94fe\u8def\u8dd1\u901a&#xff1b;\u4ece\u5355\u4e2a Kernel&#xff0c;\u5230 Graph Executor\u3001LWM Loader\u3001Memory Planner\u3001C ABI\u3001SIMD\u3001C# \u548c HTTP Demo&#xff1b;\u518d\u5230 Windows \/ Linux CI \u771f\u6b63\u8dd1\u8d77\u6765&#xff0c;\u8fd9\u4e2a\u9879\u76ee\u73b0\u5728\u5df2\u7ecf\u4e0d\u53ea\u662f\u4e00\u4e2a\u60f3\u6cd5\u3002<\/p>\n<p>\u5b83\u4ecd\u7136\u5e74\u8f7b\u3002<\/p>\n<p>LWM \u8fd8\u6ca1\u6709\u51bb\u7ed3&#xff0c;ARM64 \u8fd8\u6ca1\u6709\u5b8c\u6210&#xff0c;Win7 \u8fd8\u9700\u8981\u5b9e\u4f53\u673a\u9a8c\u8bc1&#xff0c;INT8 \u548c Full OCR Benchmark \u4e5f\u8fd8\u5728\u540e\u9762\u3002<\/p>\n<p>\u4f46\u81f3\u5c11\u6709\u4e00\u4ef6\u4e8b\u60c5\u5df2\u7ecf\u5f97\u5230\u4e86\u9a8c\u8bc1&#xff1a;<\/p>\n<p>\u4e3a\u4e00\u4e2a\u660e\u786e\u7684 OCR \u6a21\u578b\u65cf&#xff0c;\u505a\u4e00\u4e2a\u5c0f\u800c\u4e13\u7528\u7684\u7eaf C \u63a8\u7406 Runtime&#xff0c;\u662f\u53ef\u4ee5\u8d70\u901a\u7684\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\u8981\u505a\u7684&#xff0c;\u4e0d\u662f\u628a\u5b83\u53d8\u5f97\u201c\u4ec0\u4e48\u90fd\u80fd\u8dd1\u201d\u3002<\/p>\n<p>\u800c\u662f\u7ee7\u7eed\u628a\u5b83\u505a\u5f97&#xff1a;<\/p>\n<p>\u66f4\u7a33\u3001\u66f4\u5feb\u3001\u66f4\u5bb9\u6613\u90e8\u7f72\u3002<\/p>\n<p>\u5982\u679c\u4f60\u4e5f\u559c\u6b22\u8fd9\u79cd\u201c\u5c0f\u800c\u786c\u201d\u7684\u5de5\u7a0b\u8def\u7ebf&#xff0c;\u6b22\u8fce\u6765 GitHub \u770b\u770b&#xff1a;<\/p>\n<p>https:\/\/github.com\/lxw112190\/lw.PPOCR.C<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55<br \/>\n\u4e00\u3001\u4e3a\u4ec0\u4e48\u8fd8\u8981\u81ea\u5df1\u5199\u4e00\u4e2a OCR Runtime&#xff1f;<br \/>\n\u4e8c\u3001\u6700\u5173\u952e\u7684\u4e00\u6b65&#xff1a;\u90e8\u7f72\u7aef\u5e72\u8106\u4e0d\u89e3\u6790 ONNX<br \/>\nLWM \u2014\u2014 LightWeight Model<br \/>\n\u4e09\u3001LWM \u4e0d\u662f\u201c\u6362\u4e2a\u540e\u7f00\u7684 ONNX\u201d<br \/>\n\u56db\u3001\u4ece REC \u5f00\u59cb&#xff0c;\u6700\u540e\u505a\u5230\u4e86 DET \u2192 CLS \u2192 REC<br \/>\n\u4e94\u3001\u8fde\u900f\u89c6\u88c1\u526a\u90fd\u6ca1\u6709\u4f9d\u8d56 OpenCV<br \/>\n\u516d\u3001\u516c\u5171\u63a5\u53e3\u4e0d\u662f\u7b80\u5355\u5730\u00a0char* ocr(&#8230;)<br \/>\n1. \u4e0d\u8de8 ABI \u91ca\u653e\u5185\u5b58<br \/>\n2. \u516c\u5171\u7ed3\u6784\u90fd\u6709\u00a0struct_<\/p>\n","protected":false},"author":2,"featured_media":97253,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[174,756,1460],"topic":[],"class_list":["post-97256","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-c","tag-ocr","tag-opencv"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4e0d\u7528 ONNX Runtime\uff0c\u4e5f\u4e0d\u7528 OpenCV\uff1a\u6211\u7528\u7eaf C \u505a\u4e86\u4e00\u4e2a PP-OCR \u4e13\u7528\u63a8\u7406 Runtime - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/97256.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4e0d\u7528 ONNX Runtime\uff0c\u4e5f\u4e0d\u7528 OpenCV\uff1a\u6211\u7528\u7eaf C \u505a\u4e86\u4e00\u4e2a PP-OCR \u4e13\u7528\u63a8\u7406 Runtime - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u76ee\u5f55 \u4e00\u3001\u4e3a\u4ec0\u4e48\u8fd8\u8981\u81ea\u5df1\u5199\u4e00\u4e2a OCR Runtime&#xff1f; \u4e8c\u3001\u6700\u5173\u952e\u7684\u4e00\u6b65&#xff1a;\u90e8\u7f72\u7aef\u5e72\u8106\u4e0d\u89e3\u6790 ONNX LWM \u2014\u2014 LightWeight Model \u4e09\u3001LWM \u4e0d\u662f\u201c\u6362\u4e2a\u540e\u7f00\u7684 ONNX\u201d \u56db\u3001\u4ece REC \u5f00\u59cb&#xff0c;\u6700\u540e\u505a\u5230\u4e86 DET \u2192 CLS \u2192 REC \u4e94\u3001\u8fde\u900f\u89c6\u88c1\u526a\u90fd\u6ca1\u6709\u4f9d\u8d56 OpenCV \u516d\u3001\u516c\u5171\u63a5\u53e3\u4e0d\u662f\u7b80\u5355\u5730\u00a0char* ocr(...) 1. \u4e0d\u8de8 ABI \u91ca\u653e\u5185\u5b58 2. \u516c\u5171\u7ed3\u6784\u90fd\u6709\u00a0struct_\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/97256.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-29T00:36:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829003605-6a922975cd2da.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/97256.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/97256.html\",\"name\":\"\u4e0d\u7528 ONNX Runtime\uff0c\u4e5f\u4e0d\u7528 OpenCV\uff1a\u6211\u7528\u7eaf C \u505a\u4e86\u4e00\u4e2a PP-OCR \u4e13\u7528\u63a8\u7406 Runtime - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-29T00:36:07+00:00\",\"dateModified\":\"2026-08-29T00:36:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/97256.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/97256.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/97256.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4e0d\u7528 ONNX Runtime\uff0c\u4e5f\u4e0d\u7528 OpenCV\uff1a\u6211\u7528\u7eaf C \u505a\u4e86\u4e00\u4e2a PP-OCR \u4e13\u7528\u63a8\u7406 Runtime\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4e0d\u7528 ONNX Runtime\uff0c\u4e5f\u4e0d\u7528 OpenCV\uff1a\u6211\u7528\u7eaf C \u505a\u4e86\u4e00\u4e2a PP-OCR \u4e13\u7528\u63a8\u7406 Runtime - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/97256.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4e0d\u7528 ONNX Runtime\uff0c\u4e5f\u4e0d\u7528 OpenCV\uff1a\u6211\u7528\u7eaf C \u505a\u4e86\u4e00\u4e2a PP-OCR \u4e13\u7528\u63a8\u7406 Runtime - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u76ee\u5f55 \u4e00\u3001\u4e3a\u4ec0\u4e48\u8fd8\u8981\u81ea\u5df1\u5199\u4e00\u4e2a OCR Runtime&#xff1f; \u4e8c\u3001\u6700\u5173\u952e\u7684\u4e00\u6b65&#xff1a;\u90e8\u7f72\u7aef\u5e72\u8106\u4e0d\u89e3\u6790 ONNX LWM \u2014\u2014 LightWeight Model \u4e09\u3001LWM \u4e0d\u662f\u201c\u6362\u4e2a\u540e\u7f00\u7684 ONNX\u201d \u56db\u3001\u4ece REC \u5f00\u59cb&#xff0c;\u6700\u540e\u505a\u5230\u4e86 DET \u2192 CLS \u2192 REC \u4e94\u3001\u8fde\u900f\u89c6\u88c1\u526a\u90fd\u6ca1\u6709\u4f9d\u8d56 OpenCV \u516d\u3001\u516c\u5171\u63a5\u53e3\u4e0d\u662f\u7b80\u5355\u5730\u00a0char* ocr(...) 1. \u4e0d\u8de8 ABI \u91ca\u653e\u5185\u5b58 2. \u516c\u5171\u7ed3\u6784\u90fd\u6709\u00a0struct_","og_url":"https:\/\/www.wsisp.com\/helps\/97256.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-29T00:36:07+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260829003605-6a922975cd2da.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"10 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/97256.html","url":"https:\/\/www.wsisp.com\/helps\/97256.html","name":"\u4e0d\u7528 ONNX Runtime\uff0c\u4e5f\u4e0d\u7528 OpenCV\uff1a\u6211\u7528\u7eaf C \u505a\u4e86\u4e00\u4e2a PP-OCR \u4e13\u7528\u63a8\u7406 Runtime - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-29T00:36:07+00:00","dateModified":"2026-08-29T00:36:07+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/97256.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/97256.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/97256.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4e0d\u7528 ONNX Runtime\uff0c\u4e5f\u4e0d\u7528 OpenCV\uff1a\u6211\u7528\u7eaf C \u505a\u4e86\u4e00\u4e2a PP-OCR \u4e13\u7528\u63a8\u7406 Runtime"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/97256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=97256"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/97256\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/97253"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=97256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=97256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=97256"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=97256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}