Browse Source

[to #42322933]add copyright info

添加ocr部分代码的copyright信息
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10342392
master
xixing.tj yingda.chen 3 years ago
parent
commit
da5d5cd10b
9 changed files with 40 additions and 19 deletions
  1. +1
    -0
      modelscope/pipelines/cv/ocr_utils/model_convnext_transformer.py
  2. +2
    -0
      modelscope/pipelines/cv/ocr_utils/model_resnet_mutex_v4_linewithchar.py
  3. +2
    -8
      modelscope/pipelines/cv/ocr_utils/ocr_modules/convnext.py
  4. +2
    -4
      modelscope/pipelines/cv/ocr_utils/ocr_modules/timm_tinyc.py
  5. +2
    -7
      modelscope/pipelines/cv/ocr_utils/ocr_modules/vitstr.py
  6. +2
    -0
      modelscope/pipelines/cv/ocr_utils/ops.py
  7. +14
    -0
      modelscope/pipelines/cv/ocr_utils/resnet18_v1.py
  8. +14
    -0
      modelscope/pipelines/cv/ocr_utils/resnet_utils.py
  9. +1
    -0
      modelscope/pipelines/cv/ocr_utils/utils.py

+ 1
- 0
modelscope/pipelines/cv/ocr_utils/model_convnext_transformer.py View File

@@ -1,3 +1,4 @@
# Copyright (c) Alibaba, Inc. and its affiliates.
import torch import torch
import torch.nn as nn import torch.nn as nn




+ 2
- 0
modelscope/pipelines/cv/ocr_utils/model_resnet_mutex_v4_linewithchar.py View File

@@ -1,3 +1,5 @@
# Part of the implementation is borrowed and modified from SegLink,
# publicly available at https://github.com/bgshih/seglink
import tensorflow as tf import tensorflow as tf


from . import ops, resnet18_v1, resnet_utils from . import ops, resnet18_v1, resnet_utils


+ 2
- 8
modelscope/pipelines/cv/ocr_utils/ocr_modules/convnext.py View File

@@ -1,11 +1,5 @@
""" Contains various versions of ConvNext Networks.
ConvNext Networks (ConvNext) were proposed in:
Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell and Saining Xie
A ConvNet for the 2020s. CVPR 2022.
Compared to https://github.com/facebookresearch/ConvNeXt,
we obtain different ConvNext variants by changing the network depth, width,
feature number, and downsample ratio.
"""
# Part of the implementation is borrowed and modified from ConvNext,
# publicly available at https://github.com/facebookresearch/ConvNeXt
import torch import torch
import torch.nn as nn import torch.nn as nn
import torch.nn.functional as F import torch.nn.functional as F


+ 2
- 4
modelscope/pipelines/cv/ocr_utils/ocr_modules/timm_tinyc.py View File

@@ -1,7 +1,5 @@
'''Referenced from rwightman's pytorch-image-models(timm).
Github: https://github.com/rwightman/pytorch-image-models
We use some modules and modify the parameters according to our network.
'''
# Part of the implementation is borrowed and modified from timm,
# publicly available at https://github.com/rwightman/pytorch-image-models
import collections.abc import collections.abc
import logging import logging
import math import math


+ 2
- 7
modelscope/pipelines/cv/ocr_utils/ocr_modules/vitstr.py View File

@@ -1,10 +1,5 @@
""" Contains various versions of ViTSTR.
ViTSTR were proposed in:
Rowel Atienza
Vision transformer for fast and efficient scene text recognition. ICDAR 2021.
Compared to https://github.com/roatienza/deep-text-recognition-benchmark,
we obtain different ViTSTR variants by changing the network patch_size and in_chans.
"""
# Part of the implementation is borrowed and modified from ViTSTR,
# publicly available at https://github.com/roatienza/deep-text-recognition-benchmark
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
import logging import logging
from copy import deepcopy from copy import deepcopy


+ 2
- 0
modelscope/pipelines/cv/ocr_utils/ops.py View File

@@ -1,3 +1,5 @@
# Part of the implementation is borrowed and modified from SegLink,
# publicly available at https://github.com/bgshih/seglink
import math import math
import os import os
import shutil import shutil


+ 14
- 0
modelscope/pipelines/cv/ocr_utils/resnet18_v1.py View File

@@ -1,3 +1,17 @@
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# 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.
# ==============================================================================
"""Contains definitions for the original form of Residual Networks. """Contains definitions for the original form of Residual Networks.
The 'v1' residual networks (ResNets) implemented in this module were proposed The 'v1' residual networks (ResNets) implemented in this module were proposed
by: by:


+ 14
- 0
modelscope/pipelines/cv/ocr_utils/resnet_utils.py View File

@@ -1,3 +1,17 @@
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# 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.
# ==============================================================================
"""Contains building blocks for various versions of Residual Networks. """Contains building blocks for various versions of Residual Networks.
Residual networks (ResNets) were proposed in: Residual networks (ResNets) were proposed in:
Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun


+ 1
- 0
modelscope/pipelines/cv/ocr_utils/utils.py View File

@@ -1,3 +1,4 @@
# Copyright (c) Alibaba, Inc. and its affiliates.
import cv2 import cv2
import numpy as np import numpy as np




Loading…
Cancel
Save