EasyOCR是一个用python编写的OCR三方库。git地址为:https://github.com/JaidedAI/EasyOCR。
由于笔者从事的是java开发,对python并不熟悉,所以实际上是从python开发环境安装开始的,如果读者对python比较熟悉,可以直接右上角。
类似于JDK,python开发也依赖于python环境,而因为python各版本之间差异很大,很多时候不同组件依赖的是不同的python版本,甚至小版本之间也存在兼容性问题,所以网上推荐使用的是Anaconda环境管理软件。Anaconda可以隔离出多个python环境,比如可以创建一个python3.6的环境同时再创建一个python3.7的环境,而在使用时进行选择。
安装地址:https://www.anaconda.com/products/individual
由于我们是在64位window 7下进行安装,我们选用64-Bit Graphical Installer (466 MB)。安装完成后,打开Anaconda Navigater。
默认的root环境里有1000多个类库,我们大多用不到,如果项目使用的是这个环境,那么用PyCharm打开的时候会加载很久。所以我们还是新建一个环境,命名为easyocr,使用pyhton3.7。
Note 1: for Windows, please install torch and torchvision first by following the official instruction here https://pytorch.org. On pytorch website, be sure to select the right CUDA version you have. If you intend to run on CPU mode only, select CUDA = None.
在EasyOCR官网的git上我们可以看到上述说明,因为我们是windows环境,我们需要首先安装torch
笔者一开始是用pip安装的,但是总是安装失败,后来发现可以用这个搜索找到,勾选后安装,由