1 Star 0 Fork 132

国家软件联盟 / cnocr

forked from captcha-ocr / cnocr 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

English README.

cnocr 使用交流QQ群

欢迎扫码加入QQ交流群:

QQ群二维码

Release Notes

Update 2020.04.21: 发布 cnocr V1.1.0

V1.1.0对代码做了很大改动,重写了大部分训练的代码,也生成了更多更难的训练和测试数据。训练好的模型相较于之前版本的模型精度有显著提升,尤其是针对英文单词的识别。

以下列出了主要的变更:

  • 更新了训练代码,使用mxnet的recordio首先把数据转换成二进制格式,提升后续的训练效率。训练时支持对图片做实时数据增强。也加入了更多可传入的参数。

  • 允许训练集中的文字数量不同,目前是中文10个字,英文20个字母。

  • 提供了更多的模型选择,允许大家按需训练多种不同大小的识别模型。

  • 内置了各种训练好的模型,最小的模型只有之前模型的1/5大小。所有模型都可免费使用。

  • 相较于之前版本的模型,新的模型精度有显著提升,尤其是针对英文单词的识别。新模型已经可以识别英文单词间的空格。

  • 支持文字识别只在给定字符集中进行。 对于一些纯数字或者纯英文字母的应用场景可以带来识别率提升。

  • 优化了对黑底白字多行文字图片的支持。

  • mxnet依赖升级到更新的版本了。很多人反馈mxnet 1.4.1经常找不到没法装,现在升级到>=1.5.0,<1.7.0

Update 2019.07.25: 发布 cnocr V1.0.0

cnocr发布了预测效率更高的新版本v1.0.0。新版本的模型跟以前版本的模型不兼容。所以如果大家是升级的话,需要重新下载最新的模型文件。具体说明见下面(流程和原来相同)。

主要改动如下:

  • crnn模型支持可变长预测,提升预测效率
  • 支持利用特定数据对现有模型进行精调(继续训练)
  • 修复bugs,如训练时accuracy一直为0
  • 依赖的 mxnet 版本从1.3.1更新至 1.4.1

cnocr

cnocr是用来做中文OCR的Python 3包。cnocr自带了训练好的识别模型,安装后即可直接使用。

cnocr主要针对的是排版简单的印刷体文字图片,如截图图片,扫描件等。cnocr目前内置的文字检测和分行模块无法处理复杂的文字排版定位。如果要用于场景文字图片的识别,需要结合其他的场景文字检测引擎使用。

本项目起源于我们自己 (爱因互动 Ein+) 内部的项目需求,所以非常感谢公司的支持。

示例

图片 OCR结果
examples/helloworld.jpg Hello World!你好世界
examples/chn-00199989.jpg 铑泡胭释邑疫反隽寥缔
examples/chn-00199980.jpg 拇箬遭才柄腾戮胖惬炫
examples/chn-00199984.jpg 寿猿嗅髓孢刀谎弓供捣
examples/chn-00199985.jpg 马靼蘑熨距额猬要藕萼
examples/chn-00199981.jpg 掉江悟厉励.谌查门蠕坑
examples/00199975.jpg nd-chips fructed ast
examples/00199978.jpg zouna unpayably Raqu
examples/00199979.jpg ape fissioning Senat
examples/00199971.jpg ling oughtlins near
examples/multi-line_cn1.png 网络支付并无本质的区别,因为
每一个手机号码和邮件地址背后
都会对应着一个账户--这个账
户可以是信用卡账户、借记卡账
户,也包括邮局汇款、手机代
收、电话代收、预付费卡和点卡
等多种形式。
examples/multi-line_cn2.png 当然,在媒介越来越多的情形下,
意味着传播方式的变化。过去主流
的是大众传播,现在互动性和定制
性带来了新的挑战——如何让品牌
与消费者更加互动。
examples/multi-line_en_white.png This chapter is currently only available in this web version. ebook and print will follow.
Convolutional neural networks learn abstract features and concepts from raw image pixels. Feature
Visualization visualizes the learned features by activation maximization. Network Dissection labels
neural network units (e.g. channels) with human concepts.
examples/multi-line_en_black.png transforms the image many times. First, the image goes through many convolutional layers. In those
convolutional layers, the network learns new and increasingly complex features in its layers. Then the
transformed image information goes through the fully connected layers and turns into a classification
or prediction.

安装

嗯,安装真的很简单。

pip install cnocr

注意:请使用Python3 (3.4, 3.5, 3.6以及之后版本应该都行),没测过Python2下是否ok。

可直接使用的模型

cnocr的ocr模型可以分为两阶段:第一阶段是获得ocr图片的局部编码向量,第二部分是对局部编码向量进行序列学习,获得序列编码向量。目前两个阶段分别包含以下的模型:

  1. 局部编码模型(emb model)
    • conv:多层的卷积网络;
    • conv-lite:更小的多层卷积网络;
    • densenet:一个小型的densenet网络;
    • densenet-lite:一个更小的densenet网络。
  2. 序列编码模型(seq model)
    • lstm:两层的LSTM网络;
    • gru:两层的GRU网络;
    • fc:两层的全连接网络。

cnocr目前包含以下可直接使用的模型,训练好的模型都放在 cnocr-models 项目中,可免费下载使用:

模型名称 局部编码模型 序列编码模型 模型大小 迭代次数 测试集准确率 测试集中的图片预测速度
(秒/张)
conv-lstm conv lstm 36M 50 98.5% 0.015924
conv-lite-lstm conv-lite lstm 23M 45 98.6% 0.033749
conv-lite-fc conv-lite fc 20M 27 98.6% 0.033837
densenet-lite-lstm densenet-lite lstm 8.6M 42 98.6% 0.013124
densenet-lite-fc densenet-lite fc 6.8M 32 97% 0.012652

模型名称是由局部编码模型和序列编码模型名称拼接而成。

图片预测速度是在多核CPU机器上做的测试, 绝对值依赖机器资源,意义不大;但不同模型之间的相对值是可以参考的。

虽然上表中给出的多个模型在测试集上的准确率都是 98.6%,但从实际使用经验看,综合中英文的识别效果,conv-lite-fc是效果最好的,其次是 densenet-lite-lstmconv-lite-lstm。对于中文识别且识别困难(如文字比较模糊)的场景,建议尝试模型 conv-lite-lstm。对于简单的中文识别场景,可以使用模型 densenet-lite-lstmdensenet-lite-fc ,或者利用自己的训练数据对它们进行精调。

模型 conv-lstm把图片长度压缩到 1/8再做预测,其他模型是压缩到1/4再做预测,所以 conv-lstm 虽然比 conv-lite-lstm 有更多参数,但预测速度却快了一倍。

特色

本项目的初期代码fork自 crnn-mxnet-chinese-text-recognition,感谢作者。

但源项目使用起来不够方便,所以我在此基础上做了一些封装和重构。主要变化如下:

  • 不再使用需要额外安装的MXNet WarpCTC Loss,改用原生的 MXNet CTC Loss。所以安装极简!

  • 自带训练好的中文OCR识别模型。不再需要额外训练!

  • 增加了预测(或推断)接口。所以使用方便!

使用方法

首次使用cnocr时,系统会自动从 cnocr-models 下载zip格式的模型压缩文件,并存于 ~/.cnocr目录。 下载后的zip文件代码会自动对其解压,然后把解压后的模型相关目录放于~/.cnocr/1.1.0目录中。

如果系统不能自动从 cnocr-models 成功下载zip文件,则需要手动下载此zip文件并把它放于 ~/.cnocr/1.1.0目录。如果Github下载太慢,也可以从 百度云盘 下载, 提取码为 ri27

放置好zip文件后,后面的事代码就会自动执行了。

图片预测

CnOcr是OCR的主类,包含了三个函数针对不同场景进行文字识别。类CnOcr的初始化函数如下:

class CnOcr(object):
    def __init__(
        self,
        model_name='conv-lite-fc',
        model_epoch=None,
        cand_alphabet=None,
        root=data_dir(),
    ):

其中的几个参数含义如下:

  • model_name: 模型名称,即上面表格第一列中的值。默认为 conv-lite-fc
  • model_epoch: 模型迭代次数。默认为 None,表示使用默认的迭代次数值。对于模型名称 conv-lite-fc就是 27
  • cand_alphabet: 待识别字符所在的候选集合。默认为 None,表示不限定识别字符范围。cnocr.consts中内置了两个候选集合:(1) 数字和标点 NUMBERS;(2) 英文字母、数字和标点 ENG_LETTERS
    • 例如对于图片 examples/hybrid.png ,不做约束时识别结果为 o12345678;如果加入数字约束时(ocr = CnOcr(cand_alphabet=NUMBERS)),识别结果为 012345678
  • root: 模型文件所在的根目录。
    • Linux/Mac下默认值为 ~/.cnocr,表示模型文件所处文件夹类似 ~/.cnocr/1.1.0/conv-lite-fc
    • Windows下默认值为 C:\Users\<username>\AppData\Roaming\cnocr

每个参数都有默认取值,所以可以不传入任何参数值进行初始化:ocr = CnOcr()

CnOcr主要包含三个函数,下面分别说明。

1. 函数CnOcr.ocr(img_fp)

函数CnOcr.ocr(img_fp)可以对包含多行文字(或单行)的图片进行文字识别。

函数说明

  • 输入参数 img_fp: 可以是需要识别的图片文件路径(如上例);或者是已经从图片文件中读入的数组,类型可以为mx.nd.NDArraynp.ndarray,取值应该是[0,255]的整数,维数应该是(height, width, 3),第三个维度是channel,它应该是RGB格式的。
  • 返回值:为一个嵌套的list,类似这样[['第', '一', '行'], ['第', '二', '行'], ['第', '三', '行']]

调用示例

from cnocr import CnOcr
ocr = CnOcr()
res = ocr.ocr('examples/multi-line_cn1.png')
print("Predicted Chars:", res)

或:

import mxnet as mx
from cnocr import CnOcr
ocr = CnOcr()
img_fp = 'examples/multi-line_cn1.png'
img = mx.image.imread(img_fp, 1)
res = ocr.ocr(img)
print("Predicted Chars:", res)

上面使用的图片文件 examples/multi-line_cn1.png内容如下:

examples/multi-line_cn1.png

上面预测代码段的返回结果如下:

Predicted Chars: [['网', '络', '支', '付', '并', '无', '本', '质', '的', '区', '别', ',', '因', '为'],
                  ['每', '一', '个', '手', '机', '号', '码', '和', '邮', '件', '地', '址', '背', '后'],
                  ['都', '会', '对', '应', '着', '一', '个', '账', '户', '一', '―', '这', '个', '账'],
                  ['户', '可', '以', '是', '信', '用', '卡', '账', '户', '、', '借', '记', '卡', '账'],
                  ['户', ',', '也', '包', '括', '邮', '局', '汇', '款', '、', '手', '机', '代'],
                  ['收', '、', '电', '话', '代', '收', '、', '预', '付', '费', '卡', '和', '点', '卡'],
                  ['等', '多', '种', '形', '式', '。']]

2. 函数CnOcr.ocr_for_single_line(img_fp)

如果明确知道要预测的图片中只包含了单行文字,可以使用函数CnOcr.ocr_for_single_line(img_fp)进行识别。和 CnOcr.ocr()相比,CnOcr.ocr_for_single_line()结果可靠性更强,因为它不需要做额外的分行处理。

函数说明

  • 输入参数 img_fp: 可以是需要识别的单行文字图片文件路径(如上例);或者是已经从图片文件中读入的数组,类型可以为mx.nd.NDArraynp.ndarray,取值应该是[0,255]的整数,维数应该是(height, width)(height, width, channel)。如果没有channel,表示传入的就是灰度图片。第三个维度channel可以是1(灰度图片)或者3(彩色图片)。如果是彩色图片,它应该是RGB格式的。
  • 返回值:为一个list,类似这样['你', '好']

调用示例

from cnocr import CnOcr
ocr = CnOcr()
res = ocr.ocr_for_single_line('examples/rand_cn1.png')
print("Predicted Chars:", res)

或:

import mxnet as mx
from cnocr import CnOcr
ocr = CnOcr()
img_fp = 'examples/rand_cn1.png'
img = mx.image.imread(img_fp, 1)
res = ocr.ocr_for_single_line(img)
print("Predicted Chars:", res)

对图片文件 examples/rand_cn1.png

examples/rand_cn1.png

的预测结果如下:

Predicted Chars: ['笠', '淡', '嘿', '骅', '谧', '鼎', '皋', '姚', '歼', '蠢', '驼', '耳', '胬', '挝', '涯', '狗', '蒽', '子', '犷'] 

3. 函数CnOcr.ocr_for_single_lines(img_list)

函数CnOcr.ocr_for_single_lines(img_list)可以对多个单行文字图片进行批量预测。函数CnOcr.ocr(img_fp)CnOcr.ocr_for_single_line(img_fp)内部其实都是调用的函数CnOcr.ocr_for_single_lines(img_list)

函数说明

  • 输入参数 img_list: 为一个list;其中每个元素是已经从图片文件中读入的数组,类型可以为mx.nd.NDArraynp.ndarray,取值应该是[0,255]的整数,维数应该是(height, width)(height, width, channel)。如果没有channel,表示传入的就是灰度图片。第三个维度channel可以是1(灰度图片)或者3(彩色图片)。如果是彩色图片,它应该是RGB格式的。
  • 返回值:为一个嵌套的list,类似这样[['第', '一', '行'], ['第', '二', '行'], ['第', '三', '行']]

调用示例

import mxnet as mx
from cnocr import CnOcr
ocr = CnOcr()
img_fp = 'examples/multi-line_cn1.png'
img = mx.image.imread(img_fp, 1).asnumpy()
line_imgs = line_split(img, blank=True)
line_img_list = [line_img for line_img, _ in line_imgs]
res = ocr.ocr_for_single_lines(line_img_list)
print("Predicted Chars:", res)

更详细的使用方法,可参考 tests/test_cnocr.py 中提供的测试用例。

脚本引用

也可以使用脚本模式预测:

python scripts/cnocr_predict.py --file examples/multi-line_cn1.png

返回结果同上面。

训练自己的模型

cnocr自带训练好的模型, 安装后即可直接使用。但如果你需要训练自己的模型,请参考下面的步骤。所有代码均可在文件 Makefile 中找到。

(一)转换图片数据格式

为了提升训练效率,在开始训练之前,需要使用mxnet的recordio首先把数据转换成二进制格式:

DATA_ROOT_DIR = data/sample-data
REC_DATA_ROOT_DIR = data/sample-data-lst

# `EMB_MODEL_TYPE` 可取值:['conv', 'conv-lite-rnn', 'densenet', 'densenet-lite']
EMB_MODEL_TYPE = densenet-lite
# `SEQ_MODEL_TYPE` 可取值:['lstm', 'gru', 'fc']
SEQ_MODEL_TYPE = fc
MODEL_NAME = $(EMB_MODEL_TYPE)-$(SEQ_MODEL_TYPE)

# 产生 *.lst 文件
gen-lst:
    python scripts/im2rec.py --list --num-label 20 --chunks 1 \
        --train-idx-fp $(DATA_ROOT_DIR)/train.txt --test-idx-fp $(DATA_ROOT_DIR)/test.txt --prefix $(REC_DATA_ROOT_DIR)/sample-data

# 利用 *.lst 文件产生 *.idx 和 *.rec 文件。
# 真正的图片文件存储在 `examples` 目录,可通过 `--root` 指定。
gen-rec:
    python scripts/im2rec.py --pack-label --color 1 --num-thread 1 --prefix $(REC_DATA_ROOT_DIR) --root examples

(二)训练模型

利用下面命令在CPU上训练模型:

# 训练模型
train:
    python scripts/cnocr_train.py --gpu 0 --emb_model_type $(EMB_MODEL_TYPE) --seq_model_type $(SEQ_MODEL_TYPE) \
        --optimizer adam --epoch 20 --lr 1e-4 \
        --train_file $(REC_DATA_ROOT_DIR)/sample-data_train --test_file $(REC_DATA_ROOT_DIR)/sample-data_test

如果需要在GPU上训练,把上面命令中的参数 --gpu 0改为--gpu <num_gpu>,其中的<num_gpu> 为使用的GPU数量。注意,使用GPU训练需要安装mxnet的GPU版本,如mxnet-cu101

(三)评估模型

评估模型的代码依赖一些额外的python包,使用下面命令安装这些额外的包:

pip install cnocr[dev]

训练好的模型,可以使用脚本 scripts/cnocr_evaluate.py 评估在测试集上的效果:

# 在测试集上评估模型,所有badcases的具体信息会存放到文件夹 `evaluate/$(MODEL_NAME)` 中
evaluate:
    python scripts/cnocr_evaluate.py --model-name $(MODEL_NAME) --model-epoch 1 -v -i $(DATA_ROOT_DIR)/test.txt \
        --image-prefix-dir examples --batch-size 128 -o evaluate/$(MODEL_NAME)

当然,也可以查看模型在单个文件上的预测效果:

predict:
    python scripts/cnocr_predict.py --model_name $(MODEL_NAME) --file examples/rand_cn1.png

上面所有代码均可在文件 Makefile 中找到。

未来工作

  • 支持图片包含多行文字 (Done)
  • crnn模型支持可变长预测,提升灵活性 (since V1.0.0)
  • 完善测试用例 (Doing)
  • 修bugs(目前代码还比较凌乱。。) (Doing)
  • 支持空格识别(since V1.1.0
  • 尝试新模型,如 DenseNet,进一步提升识别准确率(since V1.1.0
  • 加入场景文本检测功能
  • 优化训练集,去掉不合理的样本;在此基础上,重新训练各个模型
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ====================================================================================== Apache MXNET (incubating) Subcomponents: The Apache MXNET (incubating) project contains subcomponents with separate copyright notices and license terms. Your use of the source code for the these subcomponents is subject to the terms and conditions of the following licenses. ======================================================================================= Apache-2.0 licenses ======================================================================================= The following components are provided under an Apache 2.0 license. 1. MXNet Cpp-package - For details, /cpp-package/LICENSE Copyright (c) 2015-2016 by Contributors 2. MXNet rcnn - For details, see, example/rcnn/LICENSE Copyright (c) 2014, 2015, The Regents of the University of California (Regents) 3. MXNet scala-package - For details, see, scala-package/LICENSE Copyright (c) 2014, 2015, the respective contributors 4. Warp-CTC - For details, see, 3rdparty/ctc_include/LICENSE Copyright 2015-2016, Baidu USA LLC. 5. 3rdparty/dlpack - For details, see, 3rdparty/dlpack/LICENSE Copyright 2017 by Contributors 6. 3rdparty/dmlc-core - For details, see, 3rdparty/dmlc-core/LICENSE Copyright (c) 2015 by Contributors Copyright 2015 by dmlc-core developers Copyright by Contributors 7. 3rdparty/mshadow - For details, see, 3rdparty/mshadow/LICENSE Copyright (c) 2014-2016 by Contributors Copyright by Contributors 8. 3rdparty/tvm - For details, see, 3rdparty/tvm/LICENSE Copyright (c) 2016-2018 by Contributors Copyright 2018 by Contributors Copyright (c) 2018 by Xilinx, Contributors 9. 3rdparty/tvm/dmlc-core - For details, see, 3rdparty/tvm/3rdparty/dmlc-core/LICENSE Copyright (c) 2015 by Contributors 10. 3rdparty/tvm/dlpack - For details, see, 3rdparty/tvm/3rdparty/dlpack/LICENSE Copyright (c) 2015-2017 by Contributors Copyright by Contributors 11. 3rdparty/ps-lite - For details, see, 3rdparty/ps-lite/LICENSE Copyright 2015 Carnegie Mellon University Copyright 2016, ps-lite developers Copyright (c) 2015-2016 by Contributors Copyright by Contributors 12. 3rdparty/mkldnn - For details, see, 3rdparty/mkldnn/LICENSE Copyright (c) 2017-2018 Intel Corporation Copyright 2016-2018 Intel Corporation Copyright 2018 YANDEX LLC 13. googlemock scripts/generator - For details, see, 3rdparty/googletest/googlemock/scripts/generator/LICENSE Copyright [2007-2009] Neal Norwitz Portions Copyright [2007-2009] Google Inc. 14. MXNet clojure-package - For details, see, contrib/clojure-package/LICENSE Copyright 2018 by Contributors 15. MXNet R-package - For details, see, R-package/LICENSE Copyright (c) 2015 by Contributors 16. ONNX-TensorRT benchmark package - For details, see, 3rdparty/onnx-tensorrt/third_party/onnx/third_party/benchmark/LICENSE Copyright 2015 Google Inc. All rights reserved. Copyright 2016 Ismael Jimenez Martinez. All rights reserved. Copyright 2017 Roman Lebedev. All rights reserved. 17. Dockerfiles - For details, see docker/Dockerfiles/License.md 18. MXNet Julia Package - For details, see julia/LICENSE.md Copyright (c) 2015-2018 by Chiyuan Zhang 19. Benchdnn - For details, see 3rdparty/mkldnn/tests/benchdnn/README.md Copyright 2017-2018 Intel Corporation 20. MXNet perl-package - For details, see perl-package/README 21. MXNet perl-package AI-MXNET - For details, see perl-package/AI-MXNet/README 22. MXNet perl-package AI-MXNET Gluon Contrib - For details, see perl-package/AI-MXNet-Gluon-Contrib/README 23. MXNet perl-package AI-MXNET Gluon ModelZoo - For details, see perl-package/AI-MXNet-Gluon-ModelZoo/README 24. MXNet perl-package AI-MXNETCAPI - For details, see perl-package/AI-MXNetCAPI/README 25. MXNet perl-package AI-NNVMCAPI - For details, see perl-package/AI-NNVMCAPI/README 26. Cephes Library Functions - For details, see src/operator/special_functions-inl.h Copyright (c) 2015 by Contributors Copyright 1984, 1987, 1992 by Stephen L. Moshier ======================================================================================= MIT licenses ======================================================================================= 1. Fast R-CNN - For details, see example/rcnn/LICENSE Copyright (c) Microsoft Corporation 2. Faster R-CNN - For details, see example/rcnn/LICENSE Copyright (c) 2015 Microsoft Corporation 3. tree_lstm - For details, see example/gluon/tree_lstm/LICENSE Copyright (c) 2017 Riddhiman Dasgupta, Sheng Zha 4. OpenMP - For details, see 3rdparty/openmp/LICENSE.txt Copyright (c) 1997-2016 Intel Corporation 6. HalideIR - For details, see 3rdparty/tvm/3rdparty/HalideIR/LICENSE Copyright (c) 2016 HalideIR contributors Copyright (c) 2012-2014 MIT CSAIL, Google Inc., and other contributors Copyright (c) 2016-2018 by Contributors 7. ONNX-TensorRT - For details, see 3rdparty/onnx-tensorrt/LICENSE Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. Copyright (c) 2018 Open Neural Network Exchange 8. ONNX-TensorRT - For details, see 3rdparty/onnx-tensorrt/third_party/onnx/LICENSE Copyright (c) Facebook, Inc. and Microsoft Corporation. 9. clipboard.js - Refer to https://zenorocha.github.io/clipboard.js Licensed MIT © Zeno Rocha 10. clipboard.min.js - Refer to https://zenorocha.github.io/clipboard.js Licensed MIT © Zeno Rocha ======================================================================================= 3-clause BSD licenses ======================================================================================= 1. Xbyak - For details, see 3rdparty/mkldnn/src/cpu/xbyak/COPYRIGHT Copyright (c) 2007 MITSUNARI Shigeo Copyright 2016-2018 Intel Corporation 2. gtest - For details, see, 3rdparty/mkldnn/tests/gtests/gtest/LICENSE Copyright 2005-2008, Google Inc. 3. Moderngpu - For details, see, 3rdparty/ctc_include/contrib/moderngpu/LICENSE Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved. 4. CUB Library - For details, see, 3rdparty/cub/LICENSE.TXT Copyright (c) 2010-2011, Duane Merrill. All rights reserved. Copyright (c) 2011-2016, NVIDIA CORPORATION. All rights reserved. 5. CUB mersenne.h - For details, see 3rdparty/cub/test/mersenne.h Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, 6. Googlemock - For details, see, 3rdparty/googletest/googlemock/LICENSE Copyright 2006-2015, Google Inc. 7. Googletest - For details, see, 3rdparty/googletest/googletest/LICENSE Copyright 2005-2015, Google Inc. 8. OpenMP Testsuite - For details, see, 3rdparty/openmp/testsuite/LICENSE Copyright (c) 2011, 2012 University of Houston System ======================================================================================= 2-clause BSD licenses ======================================================================================= 1. Sphinx JavaScript utilties for the full-text search - For details, see, docs/_static/searchtools_custom.js Copyright (c) 2007-2017 by the Sphinx team 2. blockingconcurrentqueue.h - For details, see, 3rdparty/dmlc-core/include/dmlc/blockingconcurrentqueue.h ©2015-2016 Cameron Desrochers 3. concurrentqueue.h - For details, see, 3rdparty/dmlc-core/include/dmlc/concurrentqueue.h Copyright (c) 2013-2016, Cameron Desrochers. 4. MSCOCO Toolbox - For details, see, example/ssd/dataset/pycocotools/coco.py Code written by Piotr Dollar and Tsung-Yi Lin, 2014. 5. PyBind11 FindEigen3.cmake - For details, see 3rdparty/onnx-tensorrt/third_party/onnx/third_party/pybind11/tools/FindEigen3.cmake Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org> Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr> Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com> 6. PyBind11 FindPythonLibsNew.cmake - For details, see 3rdparty/onnx-tensorrt/third_party/onnx/third_party/pybind11/tools/FindPythonLibsNew.cmake Copyright 2001-2009 Kitware, Inc. Copyright 2012 Continuum Analytics, Inc. ======================================================================================= Other Licenses ======================================================================================= 1. Caffe - For details, see, example/rcnn/LICENSE Copyright (c) 2014, 2015, The Regents of the University of California (Regents) Copyright (c) 2014, 2015, the respective contributors 2. pool.h - For details, see, src/operator/nn/pool.h Copyright (c) 2014-2017 The Regents of the University of California (Regents) Copyright (c) 2014-2017, the respective contributors 3. pool.cuh - For details, see, src/operator/nn/pool.cuh Copyright (c) 2014-2017 The Regents of the University of California (Regents) Copyright (c) 2014-2017, the respective contributors 4. im2col.h - For details, see, src/operator/nn/im2col.h Copyright (c) 2014-2017 The Regents of the University of California (Regents) Copyright (c) 2014-2017, the respective contributors 5. im2col.cuh - For details, see, src/operator/nn/im2col.cuh Copyright (c) 2014-2017 The Regents of the University of California (Regents) Copyright (c) 2014-2017, the respective contributors 6. deformable_im2col.h - For details, see, src/operator/contrib/nn/deformable_im2col.h Copyright (c) 2014-2017 The Regents of the University of California (Regents) Copyright (c) 2014-2017, the respective contributors 7. deformable_im2col.cuh - For details, see, src/operator/contrib/nn/deformable_im2col.cuh Copyright (c) 2014-2017 The Regents of the University of California (Regents) Copyright (c) 2014-2017, the respective contributors COPYRIGHT Caffe uses a shared copyright model: each contributor holds copyright over their contributions to Caffe. The project versioning records all such contribution and copyright details. If a contributor wants to further mark their specific copyright on a particular contribution, they should indicate their copyright solely in the commit message of the change when it is committed. LICENSE Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. CONTRIBUTION AGREEMENT By contributing to the BVLC/caffe repository through pull-request, comment, or otherwise, the contributor releases their content to the license and copyright terms herein. ======================================================================================= 8. MS COCO API For details, see, example/rcnn/LICENSE Copyright (c) 2014, Piotr Dollar and Tsung-Yi Lin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the FreeBSD Project. ======================================================================================= 9. Semaphore implementation in blockingconcurrentqueue.h This file uses a semaphore implementation under the terms of its separate zlib license. For details, see, 3rdparty/dmlc-core/include/dmlc/blockingconcurrentqueue.h Copyright Jeff Preshing ======================================================================================= 10. ONNX Export module For details, see, python/mxnet/contrib/onnx/mx2onnx/LICENSE # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Based on # https://github.com/NVIDIA/mxnet_to_onnx/blob/master/mx2onnx_converter/# # Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of NVIDIA CORPORATION nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ======================================================================================= 11. ONNX python bindings For details, see, 3rdparty/onnx-tensorrt/third_party/onnx/third_party/pybind11/LICENSE Copyright (c) 2015-2017 Wenzel Jakob <wenzel.jakob@epfl.ch>, All rights reserved. Copyright (c) 2016 Trent Houliston <trent@houliston.me> and Wenzel Jakob <wenzel.jakob@epfl.ch> Copyright (c) 2016-2017 Jason Rhinelander <jason@imaginary.ca> Copyright (c) 2016 Klemens Morgenstern <klemens.morgenstern@ed-chemnitz.de> and Wenzel Jakob <wenzel.jakob@epfl.ch> Copyright (c) 2017 Henry F. Schreiner Copyright (c) 2016 Sergey Lyskov and Wenzel Jakob Copyright (c) 2016 Ben North <ben@redfrontdoor.org> Copyright (c) 2016 Klemens D. Morgenstern Copyright (c) 2016 Pim Schellart <P.Schellart@princeton.edu> Copyright (c) 2016 Ivan Smirnov <i.s.smirnov@gmail.com> Copyright (c) 2016 Sergey Lyskov Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. You are under no obligation whatsoever to provide any bug fixes, patches, or upgrades to the features, functionality or performance of the source code ("Enhancements") to anyone; however, if you choose to make your Enhancements available either publicly, or directly to the author of this software, without imposing a separate written license agreement for such Enhancements, then you hereby grant the following license: a non-exclusive, royalty-free perpetual license to install, use, modify, prepare derivative works, incorporate into other computer software, distribute, and sublicense such enhancements or derivative works thereof, in binary and source code form. ======================================================================================= 12. Clang For details, see, 3rdparty/onnx-tensorrt/third_party/onnx/third_party/pybind11/tools/clang/LICENSE.TXT LLVM Release License University of Illinois/NCSA Open Source License Copyright (c) 2007-2012 University of Illinois at Urbana-Champaign. All rights reserved. Developed by: LLVM Team University of Illinois at Urbana-Champaign http://llvm.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution. * Neither the names of the LLVM Team, University of Illinois at Urbana-Champaign, nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. The LLVM software contains code written by third parties. Such software will have its own individual LICENSE.TXT file in the directory in which it appears. This file will describe the copyrights, license, and restrictions which apply to that code. The disclaimer of warranty in the University of Illinois Open Source License applies to all code in the LLVM Distribution, and nothing in any of the other licenses gives permission to use the names of the LLVM Team or the University of Illinois to endorse or promote products derived from this Software. The following pieces of software have additional or alternate copyrights, licenses, and/or restrictions: Program Directory ------- --------- <none yet> ======================================================================================= 13. MKL BLAS For details, see, [Intel® Simplified license](https://software.intel.com/en-us/license/intel-simplified-software-license) and MKLDNN_README.md Copyright (c) 2018 Intel Corporation. Use and Redistribution. You may use and redistribute the software (the “Software”), without modification, provided the following conditions are met: * Redistributions must reproduce the above copyright notice and the following terms of use in the Software and in the documentation and/or other materials provided with the distribution. * Neither the name of Intel nor the names of its suppliers may be used to endorse or promote products derived from this Software without specific prior written permission. * No reverse engineering, decompilation, or disassembly of this Software is permitted. Limited patent license. Intel grants you a world-wide, royalty-free, non-exclusive license under patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell (“Utilize”) this Software, but solely to the extent that any such patent is necessary to Utilize the Software alone. The patent license shall not apply to any combinations which include this software. No hardware per se is licensed hereunder. Third party and other Intel programs. “Third Party Programs” are the files listed in the “third-party-programs.txt” text file that is included with the Software and may include Intel programs under separate license terms. Third Party Programs, even if included with the distribution of the Materials, are governed by separate license terms and those license terms solely govern your use of those programs. DISCLAIMER. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT ARE DISCLAIMED. THIS SOFTWARE IS NOT INTENDED FOR USE IN SYSTEMS OR APPLICATIONS WHERE FAILURE OF THE SOFTWARE MAY CAUSE PERSONAL INJURY OR DEATH AND YOU AGREE THAT YOU ARE FULLY RESPONSIBLE FOR ANY CLAIMS, COSTS, DAMAGES, EXPENSES, AND ATTORNEYS’ FEES ARISING OUT OF ANY SUCH USE, EVEN IF ANY CLAIM ALLEGES THAT INTEL WAS NEGLIGENT REGARDING THE DESIGN OR MANUFACTURE OF THE MATERIALS. LIMITATION OF LIABILITY. IN NO EVENT WILL INTEL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. YOU AGREE TO INDEMNIFY AND HOLD INTEL HARMLESS AGAINST ANY CLAIMS AND EXPENSES RESULTING FROM YOUR USE OR UNAUTHORIZED USE OF THE SOFTWARE. No support. Intel may make changes to the Software, at any time without notice, and is not obligated to support, update or provide training for the Software. Termination. Intel may terminate your right to use the Software in the event of your breach of this Agreement and you fail to cure the breach within a reasonable period of time. Feedback. Should you provide Intel with comments, modifications, corrections, enhancements or other input (“Feedback”) related to the Software Intel will be free to use, disclose, reproduce, license or otherwise distribute or exploit the Feedback in its sole discretion without any obligations or restrictions of any kind, including without limitation, intellectual property rights or licensing obligations. Compliance with laws. You agree to comply with all relevant laws and regulations governing your use, transfer, import or export (or prohibition thereof) of the Software. Governing law. All disputes will be governed by the laws of the United States of America and the State of Delaware without reference to conflict of law principles and subject to the exclusive jurisdiction of the state or federal courts sitting in the State of Delaware, and each party agrees that it submits to the personal jurisdiction and venue of those courts and waives any objections. The United Nations Convention on Contracts for the International Sale of Goods (1980) is specifically excluded and will not apply to the Software. *Other names and brands may be claimed as the property of others. ======================================================================================= 14. FindJeMalloc.cmake For details, see, cmake/Modules/FindJeMalloc.cmake Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Copyright (c) 2014 Thomas Heller Copyright (c) 2007-2012 Hartmut Kaiser Copyright (c) 2010-2011 Matt Anderson Copyright (c) 2011 Bryce Lelbach Distributed under the Boost Software License, Version 1.0. Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

cnocr是用来做中文OCR的Python 3包。cnocr自带了训练好的识别模型,安装后即可直接使用 展开 收起
Python
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/national-software-alliance/cnocr.git
git@gitee.com:national-software-alliance/cnocr.git
national-software-alliance
cnocr
cnocr
master

搜索帮助