{"id":669,"date":"2023-11-22T17:06:13","date_gmt":"2023-11-22T09:06:13","guid":{"rendered":"http:\/\/ai.gitpp.com\/?p=669"},"modified":"2023-11-22T17:06:13","modified_gmt":"2023-11-22T09:06:13","slug":"%e5%9f%ba%e4%ba%8epython%e8%af%ad%e8%a8%80%e7%9a%84%e5%8d%b3%e7%94%a8%e5%9e%8b-ocr%ef%bc%8c%e6%94%af%e6%8c%81-40-%e5%a4%9a%e7%a7%8d%e8%af%ad%e8%a8%80%e7%9a%84%e5%bc%80%e6%ba%90%e9%a1%b9%e7%9b%aeeasyoc","status":"publish","type":"post","link":"http:\/\/ai.gitpp.com\/index.php\/2023\/11\/22\/%e5%9f%ba%e4%ba%8epython%e8%af%ad%e8%a8%80%e7%9a%84%e5%8d%b3%e7%94%a8%e5%9e%8b-ocr%ef%bc%8c%e6%94%af%e6%8c%81-40-%e5%a4%9a%e7%a7%8d%e8%af%ad%e8%a8%80%e7%9a%84%e5%bc%80%e6%ba%90%e9%a1%b9%e7%9b%aeeasyoc\/","title":{"rendered":"\u57fa\u4e8epython\u8bed\u8a00\u7684\u5373\u7528\u578b OCR\uff0c\u652f\u6301 40 \u591a\u79cd\u8bed\u8a00\u7684\u5f00\u6e90\u9879\u76eeEasyOCR"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u57fa\u4e8epython\u8bed\u8a00\u7684\u5373\u7528\u578b OCR\uff0c\u652f\u6301 40 \u591a\u79cd\u8bed\u8a00\u7684\u5f00\u6e90\u9879\u76eeEasyOCR\uff0c <\/p>\n\n\n\n<p>github\u5730\u5740 <a href=\"https:\/\/github.com\/JaidedAI\/EasyOCR\">https:\/\/github.com\/JaidedAI\/EasyOCR<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>EasyOCR \u662f\u4e00\u4e2a\u57fa\u4e8e Python \u8bed\u8a00\u7684\u5373\u7528\u578b OCR \u5e93\uff0c\u652f\u6301 40 \u591a\u79cd\u8bed\u8a00\uff0c\u65e8\u5728\u63d0\u4f9b\u7b80\u5355\u3001\u5feb\u901f\u7684\u5b57\u7b26\u8bc6\u522b\u529f\u80fd\u3002EasyOCR \u96c6\u6210\u4e86\u591a\u79cd OCR \u5f15\u64ce\uff0c\u5305\u62ec Tesseract\u3001CuneiForm\u3001GOCR \u7b49\uff0c\u8ba9\u4f60\u80fd\u591f\u8f7b\u677e\u5730\u5c06\u5176\u5e94\u7528\u4e8e\u5404\u79cd\u573a\u666f\u3002\u8be5\u9879\u76ee\u5728 GitHub\u4e0a\u7684\u5730\u5740\u662f\uff1ahttps:\/\/github.com\/JaidedAI\/EasyOCR<br>EasyOCR \u4e3b\u8981\u7279\u70b9\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u652f\u6301\u591a\u79cd OCR \u5f15\u64ce\uff1aTesseract\u3001CuneiForm\u3001GOCR \u7b49\u3002<\/li>\n\n\n\n<li>\u652f\u6301 40 \u591a\u79cd\u8bed\u8a00\uff0c\u5305\u62ec\u4e2d\u6587\u3001\u82f1\u8bed\u3001\u6cd5\u8bed\u7b49\u3002<\/li>\n\n\n\n<li>\u63d0\u4f9b\u7b80\u5355\u6613\u7528\u7684 API\uff0c\u65b9\u4fbf\u96c6\u6210\u5230\u5176\u4ed6 Python \u9879\u76ee\u4e2d\u3002<\/li>\n\n\n\n<li>\u652f\u6301\u6279\u91cf\u8bc6\u522b\u591a\u79cd\u6587\u4ef6\u683c\u5f0f\uff0c\u5982 PNG\u3001JPG\u3001BMP \u7b49\u3002<\/li>\n\n\n\n<li>\u5f00\u6e90\u3001\u514d\u8d39\uff0c\u9002\u7528\u4e8e\u4e2a\u4eba\u548c\u5546\u4e1a\u9879\u76ee\u3002<br>\u4f7f\u7528 EasyOCR \u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/li>\n\n\n\n<li>\u5b89\u88c5 EasyOCR \u5e93\uff1a<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install EasyOCR<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>\u5bfc\u5165 EasyOCR \u5e93\u5230 Python \u9879\u76ee\uff1a<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>from easyocr import EasyOCR<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>\u521b\u5efa OCR \u5bf9\u8c61\uff0c\u5e76\u6307\u5b9a\u8bc6\u522b\u5f15\u64ce\uff1a<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>ocr = EasyOCR(lang=\"ch\")<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li>\u5bf9\u56fe\u50cf\u8fdb\u884c\u8bc6\u522b\uff1a<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>result = ocr.ocr(\"path\/to\/your\/image.png\")<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\">\n<li>\u83b7\u53d6\u8bc6\u522b\u7ed3\u679c\uff1a<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>print(result)<\/code><\/pre>\n\n\n\n<p>\u8fd9\u6837\uff0c\u4f60\u5c31\u53ef\u4ee5\u4f7f\u7528 EasyOCR \u8fdb\u884c OCR \u8bc6\u522b\u4e86\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u6839\u636e\u56fe\u50cf\u8d28\u91cf\u548c\u8bed\u8a00\u590d\u6742\u5ea6\uff0c\u8bc6\u522b\u7ed3\u679c\u53ef\u80fd\u4f1a\u6709\u8f7b\u5fae\u7684\u8bef\u5dee\u3002\u4f60\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u8c03\u6574\u53c2\u6570\u4ee5\u83b7\u5f97\u66f4\u597d\u7684\u8bc6\u522b\u6548\u679c\u3002<br>EasyOCR \u662f\u4e00\u4e2a\u5b9e\u7528\u7684\u5f00\u6e90\u9879\u76ee\uff0c\u9002\u7528\u4e8e\u8bb8\u591a Python \u5e94\u7528\u573a\u666f\u3002\u5982\u679c\u4f60\u9700\u8981\u8fdb\u884c OCR \u8bc6\u522b\uff0c\u4e0d\u59a8\u8bd5\u8bd5\u8fd9\u4e2a\u5e93\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u57fa\u4e8epython\u8bed\u8a00\u7684\u5373\u7528\u578b OCR\uff0c\u652f\u6301 40 \u591a\u79cd\u8bed\u8a00\u7684\u5f00\u6e90\u9879\u76eeEasyOCR\uff0c github\u5730\u5740 htt [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[],"class_list":["post-669","post","type-post","status-publish","format-standard","hentry","category-github"],"blocksy_meta":"","_links":{"self":[{"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/posts\/669","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/comments?post=669"}],"version-history":[{"count":1,"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/posts\/669\/revisions"}],"predecessor-version":[{"id":670,"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/posts\/669\/revisions\/670"}],"wp:attachment":[{"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/media?parent=669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/categories?post=669"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ai.gitpp.com\/index.php\/wp-json\/wp\/v2\/tags?post=669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}