5 Star 49 Fork 12

breezedeus / CnSTD

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

Downloads Visitors license PyPI version forks stars last-releast last-commit Twitter

CnSTD

Update 2023.10.09:发布 V1.2.3.5

主要变更:

  • 支持基于环境变量 CNSTD_DOWNLOAD_SOURCE 的取值,来决定不同的模型下载路径,默认使用国内OSS地址。
  • LayoutAnalyzer 中增加了参数 model_categoriesmodel_arch_yaml,用于指定模型的类别名称列表和模型架构。

...

Update 2023.06.30:发布 V1.2.3

主要变更:

了解更多:RELEASE.md


CnSTDPython 3 下的场景文字检测Scene Text Detection,简称STD)工具包,支持中文英文等语言的文字检测,自带了多个训练好的检测模型,安装后即可直接使用。CnSTDV1.2.1 版本开始,加入了数学公式检测Mathematical Formula Detection,简称MFD)模型,并提供训练好的模型可直接用于检测图片中包含的数学公式(行内公式 embedding独立行公式 isolated )。

欢迎扫码加入微信交流群:

微信群二维码

作者也维护 知识星球 CnOCR/CnSTD/P2T私享群,欢迎加入。知识星球私享群会陆续发布一些CnOCR/CnSTD/P2T相关的私有资料,包括更详细的训练教程未公开的模型,使用过程中遇到的难题解答等。本群也会发布OCR/STD相关的最新研究资料。

V1.0.0 版本开始,CnSTD 从之前基于 MXNet 实现转为基于 PyTorch 实现。新模型的训练合并了 ICPR MTWI 2018ICDAR RCTW-17ICDAR2019-LSVT 三个数据集,包括了 46447 个训练样本,和 1534 个测试样本。

相较于之前版本, 新版本的变化主要包括:

  • 加入了对 PaddleOCR 检测模型的支持;
  • 部分调整了检测结果中 box 的表达方式,统一为 4 个点的坐标值;
  • 修复了已知bugs。

如需要识别文本框中的文字,可以结合 OCR 工具包 cnocr 一起使用。

示例

场景文字检测(STD)

STD效果

数学公式检测(MFD)

MFD 模型检测图片中包含的数学公式,其中行内的公式检测为 embedding 类别,独立行的公式检测为 isolated。模型训练使用了英文 IBEM 和中文 CnMFD_Dataset 两个数据集。

中文MFD效果
中文MFD效果
英文MFD效果

版面分析(Layout Analysis)

版面分析模型识别图片中的不同排版元素。模型训练使用的是 CDLA 数据集。可识别以下10中版面元素:

正文 标题 图片 图片标题 表格 表格标题 页眉 页脚 注释 公式
Text Title Figure Figure caption Table Table caption Header Footer Reference Equation
版面分析效果

安装

嗯,顺利的话很简单(bless)。

pip install cnstd

如果需要使用 ONNX 模型(model_backend=onnx),请使用以下命令安装:

  • CPU环境使用 ONNX 模型:
    pip install cnstd[ort-cpu]
  • GPU环境使用 ONNX 模型:
    pip install cnstd[ort-gpu]
    • 注意:如果当前环境已经安装了 onnxruntime 包,请先手动卸载(pip uninstall onnxruntime)后再运行上面的命令。

安装速度慢的话,可以指定国内的安装源,如使用豆瓣源:

pip install cnstd -i https://mirrors.aliyun.com/pypi/simple

【注意】:

  • 请使用 Python3 (3.6以及之后版本应该都行),没测过Python2下是否ok。
  • 依赖 opencv,所以可能需要额外安装opencv。

已有STD模型

CnSTD 从 V1.2 开始,可直接使用的模型包含两类:1)CnSTD 自己训练的模型,通常会包含 PyTorch 和 ONNX 版本;2)从其他ocr引擎搬运过来的训练好的外部模型,ONNX化后用于 CnSTD 中。

直接使用的模型都放在 cnstd-cnocr-models 项目中,可免费下载使用。

1. CnSTD 自己训练的模型

当前版本(Since V1.1.0)的文字检测模型使用的是 DBNet,相较于 V0.1 使用的 PSENet 模型, DBNet 的检测耗时几乎下降了一个量级,同时检测精度也得到了极大的提升。

目前包含以下已训练好的模型:

模型名称 参数规模 模型文件大小 测试集精度(IoU) 平均推断耗时
(秒/张)
下载方式
db_resnet34 22.5 M 86 M 0.7322 3.11 自动
db_resnet18 12.3 M 47 M 0.7294 1.93 自动
db_mobilenet_v3 4.2 M 16 M 0.7269 1.76 自动
db_mobilenet_v3_small 2.0 M 7.9 M 0.7054 1.24 自动
db_shufflenet_v2 4.7 M 18 M 0.7238 1.73 自动
db_shufflenet_v2_small 3.0 M 12 M 0.7190 1.29 自动
db_shufflenet_v2_tiny 1.9 M 7.5 M 0.7172 1.14 下载链接

上表耗时基于本地 Mac 获得,绝对值无太大参考价值,相对值可供参考。IoU的计算方式经过调整,仅相对值可供参考。

相对于两个基于 ResNet 的模型,基于 MobileNetShuffleNet 的模型体积更小,速度更快,建议在轻量级场景使用。

2. 外部模型

以下模型是 PaddleOCR 中模型的 ONNX 版本,所以不会依赖 PaddlePaddle 相关工具包,故而也不支持基于这些模型在自己的领域数据上继续精调模型。这些模型支持检测竖排文字

model_name PyTorch 版本 ONNX 版本 支持检测的语言 模型文件大小
ch_PP-OCRv3_det X 简体中问、英文、数字 2.3 M
ch_PP-OCRv2_det X 简体中问、英文、数字 2.2 M
en_PP-OCRv3_det X 英文、数字 2.3 M

更多模型可参考 PaddleOCR/models_list.md 。如有其他外语(如日、韩等)检测需求,可在 知识星球 CnOCR/CnSTD私享群 中向作者提出建议。

使用方法

首次使用 CnSTD 时,系统会自动下载zip格式的模型压缩文件,并存放于 ~/.cnstd目录(Windows下默认路径为 C:\Users\<username>\AppData\Roaming\cnstd)。下载速度超快。下载后的zip文件代码会自动对其解压,然后把解压后的模型相关目录放于~/.cnstd/1.2目录中。

如果系统无法自动成功下载zip文件,则需要手动从 百度云盘(提取码为 nstd)下载对应的zip文件并把它存放于 ~/.cnstd/1.2(Windows下为 C:\Users\<username>\AppData\Roaming\cnstd\1.2)目录中。模型也可从 cnstd-cnocr-models 中下载。放置好zip文件后,后面的事代码就会自动执行了。

场景文字检测(STD)

使用类 CnStd 进行场景文字的检测。类 CnStd 的初始化函数如下:

class CnStd(object):
    """
    场景文字检测器(Scene Text Detection)。虽然名字中有个"Cn"(Chinese),但其实也可以轻松识别英文的。
    """

    def __init__(
        self,
        model_name: str = 'ch_PP-OCRv3_det',
        *,
        auto_rotate_whole_image: bool = False,
        rotated_bbox: bool = True,
        context: str = 'cpu',
        model_fp: Optional[str] = None,
        model_backend: str = 'onnx',  # ['pytorch', 'onnx']
        root: Union[str, Path] = data_dir(),
        use_angle_clf: bool = False,
        angle_clf_configs: Optional[dict] = None,
        **kwargs,
    ):

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

  • model_name: 模型名称,即前面模型表格第一列中的值。默认为 ch_PP-OCRv3_det

  • auto_rotate_whole_image: 是否自动对整张图片进行旋转调整。默认为False

  • rotated_bbox: 是否支持检测带角度的文本框;默认为 True,表示支持;取值为 False 时,只检测水平或垂直的文本。

  • context:预测使用的机器资源,可取值为字符串cpugpucuda:0

  • model_fp: 如果不使用系统自带的模型,可以通过此参数直接指定所使用的模型文件(.ckpt文件)。

  • model_backend (str): 'pytorch', or 'onnx'。表明预测时是使用 PyTorch 版本模型,还是使用 ONNX 版本模型。 同样的模型,ONNX 版本的预测速度一般是 PyTorch 版本的2倍左右。默认为 onnx

  • root: 模型文件所在的根目录。

    • Linux/Mac下默认值为 ~/.cnstd,表示模型文件所处文件夹类似 ~/.cnstd/1.2/db_shufflenet_v2_small
    • Windows下默认值为 C:\Users\<username>\AppData\Roaming\cnstd
  • use_angle_clf (bool): 对于检测出的文本框,是否使用角度分类模型进行调整(检测出的文本框可能会存在倒转180度的情况)。默认为 False

  • angle_clf_configs (dict): 角度分类模型对应的参数取值,主要包含以下值:

    • model_name: 模型名称。默认为 'ch_ppocr_mobile_v2.0_cls'
    • model_fp: 如果不使用系统自带的模型,可以通过此参数直接指定所使用的模型文件('.onnx' 文件)。默认为 None。具体可参考类 AngleClassifier 的说明

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

文本检测使用类CnOcr的函数 detect(),以下是详细说明:

类函数CnStd.detect()

    def detect(
        self,
        img_list: Union[
            str,
            Path,
            Image.Image,
            np.ndarray,
            List[Union[str, Path, Image.Image, np.ndarray]],
        ],
        resized_shape: Union[int, Tuple[int, int]] = (768, 768),
        preserve_aspect_ratio: bool = True,
        min_box_size: int = 8,
        box_score_thresh: float = 0.3,
        batch_size: int = 20,
        **kwargs,
    ) -> Union[Dict[str, Any], List[Dict[str, Any]]]:

函数说明

函数输入参数包括:

  • img_list: 支持对单个图片或者多个图片(列表)的检测。每个值可以是图片路径,或者已经读取进来 PIL.Image.Imagenp.ndarray, 格式应该是 RGB 3 通道,shape: (height, width, 3), 取值范围:[0, 255]

  • resized_shape: int or tuple, tuple 含义为 (height, width), int 则表示高宽都为此值;
    检测前,先把原始图片resize到接近此大小(只是接近,未必相等)。默认为 (768, 768)

    Note (注意) 这个取值对检测结果的影响较大,可以针对自己的应用多尝试几组值,再选出最优值。例如 (512, 768), (768, 768), (768, 1024)等。

  • preserve_aspect_ratio: 对原始图片 resize 时是否保持高宽比不变。默认为 True

  • min_box_size: 过滤掉高度或者宽度小于此值的文本框。默认为 8,也即高或者宽小于 8 的文本框会被过滤去掉。

  • box_score_thresh: 过滤掉得分低于此值的文本框。默认为 0.3

  • batch_size: 待处理图片很多时,需要分批处理,每批图片的数量由此参数指定。默认为 20

  • kwargs: 保留参数,目前未被使用。

函数输出类型为list,其中每个元素是一个字典,对应一张图片的检测结果。字典中包含以下 keys

  • rotated_angle: float, 整张图片旋转的角度。只有 auto_rotate_whole_image==True 才可能非 0

  • detected_texts: list, 每个元素存储了检测出的一个框的信息,使用词典记录,包括以下几个值:

    • box:检测出的文字对应的矩形框;np.ndarray, shape: (4, 2),对应 box 4个点的坐标值 (x, y);

    • score:得分;float 类型;分数越高表示越可靠;

    • cropped_img:对应 "box" 中的图片patch(RGB格式),会把倾斜的图片旋转为水平。np.ndarray类型,shape: (height, width, 3), 取值范围:[0, 255]

    • 示例:

        [{'box': array([[416,  77],
                        [486,  13],
                        [800, 325],
                        [730, 390]], dtype=int32),
          'score': 1.0, 
          'cropped_img': array([[[25, 20, 24],
                                 [26, 21, 25],
                                 [25, 20, 24],
                                ...,
                                 [11, 11, 13],
                                 [11, 11, 13],
                                 [11, 11, 13]]], dtype=uint8)},
         ...
        ]

调用示例

from cnstd import CnStd
std = CnStd()
box_info_list = std.detect('examples/taobao.jpg')

或:

from PIL import Image
from cnstd import CnStd

std = CnStd()
img_fp = 'examples/taobao.jpg'
img = Image.open(img_fp)
box_infos = std.detect(img)

识别检测框中的文字(OCR)

上面示例识别结果中"cropped_img"对应的值可以直接交由 cnocr 中的 CnOcr 进行文字识别。如上例可以结合 CnOcr 进行文字识别:

from cnstd import CnStd
from cnocr import CnOcr

std = CnStd()
cn_ocr = CnOcr()

box_infos = std.detect('examples/taobao.jpg')

for box_info in box_infos['detected_texts']:
    cropped_img = box_info['cropped_img']
    ocr_res = cn_ocr.ocr_for_single_line(cropped_img)
    print('ocr result: %s' % str(ocr_res))

注:运行上面示例需要先安装 cnocr

pip install cnocr

数学公式检测(MFD)与 版面分析(Layout Analysis)

数学公式检测(MFD)与 版面分析(Layout Analysis)都是检测图片中感兴趣的元素,它们使用的都是基于YOLOv7的检测架构,在CnSTD都来源于相同的类 LayoutAnalyzer,差别只是训练模型使用的数据不同。

这两个模型的训练代码在 yolov7 中(Forked from WongKinYiu/yolov7,感谢原作者。)

LayoutAnalyzer 的初始化函数如下:

class LayoutAnalyzer(object):
    def __init__(
        self,
        model_name: str = 'mfd',  # 'layout' or 'mfd'
        *,
        model_type: str = 'yolov7_tiny',  # 当前支持 [`yolov7_tiny`, `yolov7`]'
        model_backend: str = 'pytorch',
        model_categories: Optional[List[str]] = None,
        model_fp: Optional[str] = None,
        model_arch_yaml: Optional[str] = None,
        root: Union[str, Path] = data_dir(),
        device: str = 'cpu',
        **kwargs,
    )

其中的参数含义如下:

  • model_name: 字符串类型,表示模型类型。可选值:'mfd' 表示数学公式检测;'layout' 表示版面分析。默认值:'mfd'

  • model_type: 字符串类型,表示模型类型。当前支持 'yolov7_tiny' 和 'yolov7';默认值:'yolov7_tiny'。'yolov7' 模型暂不开源,当前仅开放给星球会员下载,具体说明见:P2T YoloV7 数学公式检测模型开放给星球会员下载 | Breezedeus.com

  • model_backend: 字符串类型,表示backend。当前仅支持: 'pytorch';默认值:'pytorch'

  • model_categories: 模型的检测类别名称。默认值:None,表示基于 model_name 自动决定

  • model_fp: 字符串类型,表示模型文件的路径。默认值:None,表示使用默认的文件路径

  • model_arch_yaml: 架构文件路径,例如 'yolov7-mfd.yaml';默认值为 None,表示将自动选择。

  • root: 字符串或Path类型,表示模型文件所在的根目录。

    • Linux/Mac下默认值为 ~/.cnstd,表示模型文件所处文件夹类似 ~/.cnstd/1.2/analysis
    • Windows下默认值为 C:/Users/<username>/AppData/Roaming/cnstd
  • device: 字符串类型,表示运行模型的设备,可选值:'cpu' 或 'gpu';默认值:'cpu'

  • **kwargs: 额外的参数。

函数输出结果为一个list,其中每个元素表示识别出的版面中的一个元素,包含以下信息:

  • type: 版面元素对应的类型;可选值来自:self.categories ;
  • box: 版面元素对应的矩形框;np.ndarray, shape: (4, 2),对应 box 4个点的坐标值 (x, y) ;
  • score: 得分,越高表示越可信 。

类函数LayoutAnalyzer.analyze()

对指定图片(列表)进行版面分析。

def analyze(
    self,
    img_list: Union[
        str,
        Path,
        Image.Image,
        np.ndarray,
        List[Union[str, Path, Image.Image, np.ndarray]],
    ],
    resized_shape: Union[int, Tuple[int, int]] = 700,
    box_margin: int = 2,
    conf_threshold: float = 0.25,
    iou_threshold: float = 0.45,
) -> Union[List[Dict[str, Any]], List[List[Dict[str, Any]]]]:

函数说明

函数输入参数包括:

  • img_list (str or list): 待识别图片或图片列表;如果是 np.ndarray,则应该是shape为 [H, W, 3] 的 RGB 格式数组
  • resized_shape (int or tuple): (H, W); 把图片resize到此大小再做分析;默认值为 700
  • box_margin (int): 对识别出的内容框往外扩展的像素大小;默认值为 2
  • conf_threshold (float): 分数阈值;默认值为 0.25
  • iou_threshold (float): IOU阈值;默认值为 0.45
  • **kwargs: 额外的参数。

调用示例

from cnstd import LayoutAnalyzer
img_fp = 'examples/mfd/zh5.jpg'
analyzer = LayoutAnalyzer('mfd')
out = analyzer.analyze(img_fp, resized_shape=700)
print(out)

脚本使用

cnstd 包含了几个命令行工具,安装 cnstd 后即可使用。

STD 预测单个文件或文件夹中所有图片

使用命令 cnstd predict 预测单个文件或文件夹中所有图片,以下是使用说明:

(venv) ➜  cnstd git:(master) ✗ cnstd predict -h
Usage: cnstd predict [OPTIONS]

  预测单个文件,或者指定目录下的所有图片

Options:
  -m, --model-name [ch_PP-OCRv2_det|ch_PP-OCRv3_det|db_mobilenet_v3|db_mobilenet_v3_small|db_resnet18|db_resnet34|db_shufflenet_v2|db_shufflenet_v2_small|db_shufflenet_v2_tiny|en_PP-OCRv3_det]
                                  模型名称。默认值为 db_shufflenet_v2_small
  -b, --model-backend [pytorch|onnx]
                                  模型类型。默认值为 `onnx`
  -p, --pretrained-model-fp TEXT  使用训练好的模型。默认为 `None`,表示使用系统自带的预训练模型
  -r, --rotated-bbox              是否检测带角度(非水平和垂直)的文本框。默认为 `True`
  --resized-shape TEXT            格式:"height,width";
                                  预测时把图片resize到此大小再进行预测。两个值都需要是32的倍数。默认为
                                  `768,768`

  --box-score-thresh FLOAT        检测结果只保留分数大于此值的文本框。默认值为 `0.3`
  --preserve-aspect-ratio BOOLEAN
                                  resize时是否保留图片原始比例。默认值为 `True`
  --context TEXT                  使用cpu还是 `gpu` 运行代码,也可指定为特定gpu,如`cuda:0`。默认为
                                  `cpu`

  -i, --img-file-or-dir TEXT      输入图片的文件路径或者指定的文件夹
  -o, --output-dir TEXT           检测结果存放的文件夹。默认为 `./predictions`
  -h, --help                      Show this message and exit.

例如可以使用以下命令对图片 examples/taobao.jpg进行检测,并把检测结果存放在目录 outputs中:

cnstd predict -i examples/taobao.jpg -o outputs

具体使用也可参考文件 Makefile

MFD or Layout Analysis 预测单个文件

使用命令 cnstd analyze 获得单个文件的 MFD 或者 Layout Analysis 结果,以下是使用说明:

(venv) ➜  cnstd git:(master) ✗ cnstd analyze -h
Usage: cnstd analyze [OPTIONS]

  对给定图片进行 MFD 或者 版面分析。

Options:
  -m, --model-name TEXT           模型类型。`mfd` 表示数学公式检测,`layout`
                                  表示版面分析;默认为:`mfd`
  -t, --model-type TEXT           模型类型。当前支持 [`yolov7_tiny`, `yolov7`]
  -b, --model-backend [pytorch|onnx]
                                  模型后端架构。当前仅支持 `pytorch`
  -c, --model-categories TEXT     模型的检测类别名称(","分割)。默认值:None,表示基于 `model_name`
                                  自动决定
  -p, --model-fp TEXT             使用训练好的模型。默认为 `None`,表示使用系统自带的预训练模型
  -y, --model-arch-yaml TEXT      模型的配置文件路径
  --device TEXT                   cuda device, i.e. 0 or 0,1,2,3 or cpu
  -i, --img-fp TEXT               待分析的图片路径或图片目录
  -o, --output-fp TEXT            分析结果输出的图片路径。默认为 `None`,会存储在当前文件夹,文件名称为输入文件名称
                                  前面增加`out-`;如输入文件名为 `img.jpg`, 输出文件名即为 `out-
                                  img.jpg`;如果输入为目录,则此路径也应该是一个目录,会将输出文件存储在此目录下
  --resized-shape INTEGER         分析时把图片resize到此大小再进行。默认为 `608`
  --conf-thresh FLOAT             Confidence Threshold。默认值为 `0.25`
  --iou-thresh FLOAT              IOU threshold for NMS。默认值为 `0.45`
  -h, --help                      Show this message and exit.

例如可以使用以下命令对图片 examples/mfd/zh.jpg 进行 MFD,并把检测结果存放在文件 out-zh.jpg 中:

(venv) ➜  cnstd analyze -m mfd --conf-thresh 0.25 --resized-shape 800 -i examples/mfd/zh.jpg -o out-zh.jpg

具体使用也可参考文件 Makefile

模型训练

使用命令 cnstd train 训练文本检测模型,以下是使用说明:

(venv) ➜  cnstd git:(master) ✗ cnstd train -h
Usage: cnstd train [OPTIONS]

  训练文本检测模型

Options:
  -m, --model-name [db_resnet50|db_resnet34|db_resnet18|db_mobilenet_v3|db_mobilenet_v3_small|db_shufflenet_v2|db_shufflenet_v2_small|db_shufflenet_v2_tiny]
                                  模型名称。默认值为 `db_shufflenet_v2_small`
  -i, --index-dir TEXT            索引文件所在的文件夹,会读取文件夹中的 `train.tsv``dev.tsv` 文件
                                  [required]

  --train-config-fp TEXT          训练使用的json配置文件  [required]
  -r, --resume-from-checkpoint TEXT
                                  恢复此前中断的训练状态,继续训练
  -p, --pretrained-model-fp TEXT  导入的训练好的模型,作为初始模型。优先级低于 "--restore-training-
                                  fp",当传入"--restore-training-fp"时,此传入失效

  -h, --help                      Show this message and exit.

具体使用可参考文件 Makefile

模型转存

训练好的模型会存储训练状态,使用命令 cnstd resave 去掉与预测无关的数据,降低模型大小。

(venv) ➜  cnstd git:(master) ✗ cnstd resave -h
Usage: cnstd resave [OPTIONS]

  训练好的模型会存储训练状态,使用此命令去掉预测时无关的数据,降低模型大小

Options:
  -i, --input-model-fp TEXT   输入的模型文件路径  [required]
  -o, --output-model-fp TEXT  输出的模型文件路径  [required]
  -h, --help                  Show this message and exit.

未来工作

  • 进一步精简模型结构,降低模型大小
  • PSENet速度上还是比较慢,尝试更快的STD算法
  • 加入更多的训练数据
  • 加入对外部模型的支持
  • 加入数学公式检测(MFD)与 版面分析(Layout Analysis)模型
  • 加入对文档结构与表格的检测

给作者来杯咖啡

开源不易,如果此项目对您有帮助,可以考虑 给作者来杯咖啡 ☕️


官方代码库:https://github.com/breezedeus/cnstd

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.

简介

CnSTD: 基于 PyTorch/MXNet 的 中文/英文 场景文字检测(Scene Text Detection)Python3 包 展开 收起
Python 等 2 种语言
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/breezedeus/cnstd.git
git@gitee.com:breezedeus/cnstd.git
breezedeus
cnstd
CnSTD
master

搜索帮助