From 113fe128c214358b897ee50ee987426a2d3d83ea Mon Sep 17 00:00:00 2001 From: Won-Kyu Park Date: Sat, 27 Sep 2025 06:50:08 +0900 Subject: [PATCH] restore apache2 license from original source code --- surya/detection/model/encoderdecoder.py | 2 ++ surya/detection/processor.py | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/surya/detection/model/encoderdecoder.py b/surya/detection/model/encoderdecoder.py index 3d54173..af5ea9c 100644 --- a/surya/detection/model/encoderdecoder.py +++ b/surya/detection/model/encoderdecoder.py @@ -5,6 +5,8 @@ Original paper at https://arxiv.org/abs/2205.14756 Code adapted from timm, https://github.com/huggingface/pytorch-image-models/blob/main/timm/models/efficientvit_mit.py Original code (that timm adapted from) at https://github.com/mit-han-lab/efficientvit + +License: Apache 2 """ from __future__ import annotations diff --git a/surya/detection/processor.py b/surya/detection/processor.py index c260761..e8a8b70 100644 --- a/surya/detection/processor.py +++ b/surya/detection/processor.py @@ -1,3 +1,19 @@ +# coding=utf-8 +# Copyright 2022 The HuggingFace Inc. team. 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. +"""Modified image processor class for Segformer based on transformers""" + import warnings from typing import Any, Dict, List, Optional, Union