diff --git a/colabs/biomedparse_inference_demo.py b/colabs/biomedparse_inference_demo.py index 833c14cbba65191a8ecf16ee396096cfa64076b0..5f71557e7c73cb2dcc9f9c01a0082d23d31516bc 100644 --- a/colabs/biomedparse_inference_demo.py +++ b/colabs/biomedparse_inference_demo.py @@ -1,3 +1,15 @@ +# 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. + # -*- coding: utf-8 -*- """biomedparse_inference_demo.ipynb diff --git a/inference_utils/inference.py b/inference_utils/inference.py index 76fd069a1e265dc806c5bb1f5840fa61696fa516..51013fea6c65956320fae893d97f1650b218f578 100644 --- a/inference_utils/inference.py +++ b/inference_utils/inference.py @@ -1,3 +1,15 @@ +# 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. + import torch import numpy as np import torch.nn.functional as F diff --git a/inference_utils/output_processing.py b/inference_utils/output_processing.py index 17ee3efe677107d9a93a0da5f9d59c70614b4ef1..c295b2ad3dbe8c0ae0e209c962a97efb08b72ead 100644 --- a/inference_utils/output_processing.py +++ b/inference_utils/output_processing.py @@ -1,3 +1,15 @@ +# 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. + import json from scipy import stats import numpy as np diff --git a/inference_utils/processing_utils.py b/inference_utils/processing_utils.py index d47ef98703ee65e69c3b87daf72db36f33c129e3..08c96adda829eb37c330bbb4d32d34dcee62ec8f 100644 --- a/inference_utils/processing_utils.py +++ b/inference_utils/processing_utils.py @@ -1,3 +1,15 @@ +# 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. + import numpy as np from skimage import transform import pydicom diff --git a/main.py b/main.py index 829b5984398b1f5c28ebbe49d14a6f34429106d5..0ca0cd852390e80ec8886742800eee9bcfbb4bb2 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,15 @@ +# 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. + import os import gradio as gr import torch diff --git a/modeling/BaseModel.py b/modeling/BaseModel.py index fb96fe7d5a3d8e89148d00182788884d1e2abd42..da29c8db65b0b4d9c8217e92a31ce4a4fa88581c 100755 --- a/modeling/BaseModel.py +++ b/modeling/BaseModel.py @@ -1,3 +1,15 @@ +# 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. + import os import logging diff --git a/modeling/__init__.py b/modeling/__init__.py index 0a3487693f2a738d9106e74518fb35114faefb27..d29fafc1ebeec5a40afdb4f174498380c234f4ae 100755 --- a/modeling/__init__.py +++ b/modeling/__init__.py @@ -1 +1,13 @@ +# 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. + from .architectures import build_model \ No newline at end of file diff --git a/modeling/architectures/__init__.py b/modeling/architectures/__init__.py index 73256af41ec8a6db085e65083f4ec84429138891..e24dfe7828992d102ddb75b310c636026304a1b9 100755 --- a/modeling/architectures/__init__.py +++ b/modeling/architectures/__init__.py @@ -1,3 +1,15 @@ +# 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. + from .xdecoder_model import * from .seem_model_v0 import * from .seem_model_v1 import * diff --git a/modeling/architectures/build.py b/modeling/architectures/build.py index 33bc340601d9fa3369d2c38711b8374662502002..9dbf72c9d1be9ce6d2a4851b694427a97602f81c 100755 --- a/modeling/architectures/build.py +++ b/modeling/architectures/build.py @@ -1,3 +1,15 @@ +# 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. + _model_entrypoints = {} diff --git a/modeling/architectures/seem_model_demo.py b/modeling/architectures/seem_model_demo.py index f1786d575c7b893499b8aa8ea39f2939485829a2..2edd630b50a877fd68b6382ef47f2c3a3d63c44b 100755 --- a/modeling/architectures/seem_model_demo.py +++ b/modeling/architectures/seem_model_demo.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # SEEM -- Segment Everything Everywhere All at Once # Licensed under The Apache License 2.0 [see LICENSE for details] diff --git a/modeling/architectures/seem_model_v0.py b/modeling/architectures/seem_model_v0.py index a10f47557e4a65dfcfeac4d7a4865b6ebee61c90..46a5025278a9015b85694860a9be2d5d558b30c7 100755 --- a/modeling/architectures/seem_model_v0.py +++ b/modeling/architectures/seem_model_v0.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # SEEM -- Segment Everything Everywhere All at Once # Licensed under The Apache License 2.0 [see LICENSE for details] diff --git a/modeling/architectures/seem_model_v1.py b/modeling/architectures/seem_model_v1.py index 6d762c3a3bcbef94d6d3ab3462eaa11664e10153..205504232267147e73d470a04824c54c52dcafc9 100755 --- a/modeling/architectures/seem_model_v1.py +++ b/modeling/architectures/seem_model_v1.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # SEEM -- Segment Everything Everywhere All at Once # Licensed under The Apache License 2.0 [see LICENSE for details] diff --git a/modeling/architectures/xdecoder_model.py b/modeling/architectures/xdecoder_model.py index 32cd76adfce667e8c3a14b4216888aa33a0ad8c8..86dabe78423e680513ff64dc62a624cd71817ffa 100755 --- a/modeling/architectures/xdecoder_model.py +++ b/modeling/architectures/xdecoder_model.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # X-Decoder -- Generalized Decoding for Pixel, Image, and Language # Copyright (c) 2022 Microsoft diff --git a/modeling/body/__init__.py b/modeling/body/__init__.py index 044a59613be514852cf550c1550842bbe9335846..f75a19bf14bcbca747ecbe28b1051a54dfba402e 100755 --- a/modeling/body/__init__.py +++ b/modeling/body/__init__.py @@ -1,3 +1,15 @@ +# 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. + from .xdecoder_head import * from .build import * diff --git a/modeling/body/build.py b/modeling/body/build.py index 4e77853edc69bd7636cfbc262483b29de07d6adb..ef9d2466cea3a384374a7c9e6dc0b029ad9632e2 100755 --- a/modeling/body/build.py +++ b/modeling/body/build.py @@ -1,3 +1,15 @@ +# 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. + _model_entrypoints = {} def register_body(fn): diff --git a/modeling/body/xdecoder_head.py b/modeling/body/xdecoder_head.py index fc782b21d14e76e554c4d8d84452e521c52375ce..2a998906c24f701c5b4772b93bc35f9e122fc784 100755 --- a/modeling/body/xdecoder_head.py +++ b/modeling/body/xdecoder_head.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # X-Decoder -- Generalized Decoding for Pixel, Image, and Language # Copyright (c) 2022 Microsoft diff --git a/modeling/interface/__init__.py b/modeling/interface/__init__.py index c3b995e69c354638a3c118a1f4fbcc0ca1818bfc..3e7c41e3c1b29a607fdca5fb05f9da372ab08e9b 100755 --- a/modeling/interface/__init__.py +++ b/modeling/interface/__init__.py @@ -1,3 +1,15 @@ +# 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. + from .xdecoder import * from .seem_v0 import * from .seem_v1 import * diff --git a/modeling/interface/build.py b/modeling/interface/build.py index 1565142701e6f9f4063bbf3475703a7b3e620946..5b2693047f03cd955695e5b9fb82e0b444abce4f 100755 --- a/modeling/interface/build.py +++ b/modeling/interface/build.py @@ -1,3 +1,15 @@ +# 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. + _model_entrypoints = {} diff --git a/modeling/interface/modules.py b/modeling/interface/modules.py index fbfe449ec78319a2dbf4e691a220ec8967e53763..606b65c787275a5fa25201eaaaf5de8cf75968be 100755 --- a/modeling/interface/modules.py +++ b/modeling/interface/modules.py @@ -1,3 +1,15 @@ +# 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. + from typing import Optional import torch diff --git a/modeling/interface/prototype/__init__.py b/modeling/interface/prototype/__init__.py index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6f610ac51f45274e0a619b5d7f45e37ef0c52b7c 100755 --- a/modeling/interface/prototype/__init__.py +++ b/modeling/interface/prototype/__init__.py @@ -0,0 +1,12 @@ +# 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. + diff --git a/modeling/interface/prototype/attention_data_struct_seemdemo.py b/modeling/interface/prototype/attention_data_struct_seemdemo.py index f885cfd1f8615fb631bf2913ead49feeff3ca9b6..06ebcd94edf6a7049e4bd3184f1ffa712df48166 100755 --- a/modeling/interface/prototype/attention_data_struct_seemdemo.py +++ b/modeling/interface/prototype/attention_data_struct_seemdemo.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # X-Decoder -- Generalized Decoding for Pixel, Image, and Language # Copyright (c) 2022 Microsoft diff --git a/modeling/interface/prototype/attention_data_struct_seemv0.py b/modeling/interface/prototype/attention_data_struct_seemv0.py index f568e9c5ea01a6f7a8036496f33ecde8f82ed18b..5bf8ba3b49b0682cb12fdc2ad7d80a7d1369f514 100755 --- a/modeling/interface/prototype/attention_data_struct_seemv0.py +++ b/modeling/interface/prototype/attention_data_struct_seemv0.py @@ -1,3 +1,15 @@ +# 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. + import torch import torch.nn as nn import torch.nn.functional as F diff --git a/modeling/interface/prototype/attention_data_struct_seemv1.py b/modeling/interface/prototype/attention_data_struct_seemv1.py index 29761c1f16ac32e92ae7cbe64c10549e84d6481f..1a8e5db5338a0e0a91050c415241c10c71f53d1b 100755 --- a/modeling/interface/prototype/attention_data_struct_seemv1.py +++ b/modeling/interface/prototype/attention_data_struct_seemv1.py @@ -1,3 +1,15 @@ +# 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. + import torch import torch.nn as nn import torch.nn.functional as F diff --git a/modeling/interface/seem_demo.py b/modeling/interface/seem_demo.py index bde92033d9e7a96cc498f5196c346c324fa22ee9..8068b1c2d8945004b2409b4f27acf2bad4cdfb94 100755 --- a/modeling/interface/seem_demo.py +++ b/modeling/interface/seem_demo.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # SEEM -- Segment Everything Everywhere All At Once # Licensed under The Apache License 2.0 [see LICENSE for details] diff --git a/modeling/interface/seem_v0.py b/modeling/interface/seem_v0.py index 285563eb0569403876429e08f15c42a5f23ce9f6..5769c53f305d2081cfea46603b2f1a7bb3a18246 100755 --- a/modeling/interface/seem_v0.py +++ b/modeling/interface/seem_v0.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # SEEM -- Segment Everything Everywhere All at Once # Licensed under The Apache License 2.0 [see LICENSE for details] diff --git a/modeling/interface/seem_v1.py b/modeling/interface/seem_v1.py index 8266d7495b8b3a1f9327c110d195bacbff7d0c80..ec683cc73a3825e49dbe254df4a8257e9fdee153 100755 --- a/modeling/interface/seem_v1.py +++ b/modeling/interface/seem_v1.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # SEEM -- Segment Everything Everywhere All at Once # Licensed under The Apache License 2.0 [see LICENSE for details] diff --git a/modeling/interface/xdecoder.py b/modeling/interface/xdecoder.py index 2f13a28ed6971e79e7297ed2b6102ad1c19e2dc6..8e53e420498778b15b3cc64af0e11088053023f7 100755 --- a/modeling/interface/xdecoder.py +++ b/modeling/interface/xdecoder.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # X-Decoder -- Generalized Decoding for Pixel, Image, and Language # Copyright (c) 2022 Microsoft diff --git a/modeling/language/LangEncoder/__init__.py b/modeling/language/LangEncoder/__init__.py index 81e0291ebac7a30a9f523f6170f8b9a248aca7f1..668b01be2b658a61db918a5cfb0aefc73e8c3211 100755 --- a/modeling/language/LangEncoder/__init__.py +++ b/modeling/language/LangEncoder/__init__.py @@ -1,3 +1,15 @@ +# 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. + from transformers import CLIPTokenizer, CLIPTokenizerFast from transformers import AutoTokenizer diff --git a/modeling/language/LangEncoder/build.py b/modeling/language/LangEncoder/build.py index 6f3d7a1d188dac2902cd35a5d9ee7ace5ce49af0..e3013a9da667704ae3d0717d19cc99a1b0763a48 100755 --- a/modeling/language/LangEncoder/build.py +++ b/modeling/language/LangEncoder/build.py @@ -1,3 +1,15 @@ +# 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. + _lang_encoders = {} diff --git a/modeling/language/LangEncoder/transformer.py b/modeling/language/LangEncoder/transformer.py index f921721996bf6d346dda2e6214362087e81ae82e..26052330fb7f11f15a6ee5dc4638ee7d13c7ce9f 100755 --- a/modeling/language/LangEncoder/transformer.py +++ b/modeling/language/LangEncoder/transformer.py @@ -1,3 +1,15 @@ +# 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. + from collections import OrderedDict from typing import Tuple, Union import logging diff --git a/modeling/language/__init__.py b/modeling/language/__init__.py index 33112edbe72acf6fa1c8543e05d89428c41dfdf4..92f4e15fa8ac3a44c334c9d6988913131f9517d2 100755 --- a/modeling/language/__init__.py +++ b/modeling/language/__init__.py @@ -1,3 +1,15 @@ +# 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. + from .vlpencoder import * from .build import * diff --git a/modeling/language/build.py b/modeling/language/build.py index 22c4961df7cc16007596144ac4ec9d0ef4f02e47..f82ade57f8c4ec169f8c74e612af07d39ba0d2f3 100755 --- a/modeling/language/build.py +++ b/modeling/language/build.py @@ -1,3 +1,15 @@ +# 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. + _model_entrypoints = {} diff --git a/modeling/language/loss.py b/modeling/language/loss.py index 530f6b46dd99fee2186314db2d2c23ab7feef78b..b2e64f47eb226a7e23503c923cf02aa31ddd1796 100755 --- a/modeling/language/loss.py +++ b/modeling/language/loss.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # X-Decoder -- Generalized Decoding for Pixel, Image, and Language # Copyright (c) 2022 Microsoft diff --git a/modeling/language/misc.py b/modeling/language/misc.py index 2f1aa8c5cc1392f4fc4098845a43fdac3081d531..dd1fbd9b5957e5b840536859b9958cba222c12b2 100755 --- a/modeling/language/misc.py +++ b/modeling/language/misc.py @@ -1,3 +1,15 @@ +# 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. + import random import torch diff --git a/modeling/language/vlpencoder.py b/modeling/language/vlpencoder.py index bbf1932411fc89a86e84e3a4543962bc8160c1b6..03dfa1c5aea3fd1e1036ef9fdc07bab017b14ce1 100755 --- a/modeling/language/vlpencoder.py +++ b/modeling/language/vlpencoder.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # X-Decoder -- Generalized Decoding for Pixel, Image, and Language # Copyright (c) 2022 Microsoft diff --git a/modeling/modules/__init__.py b/modeling/modules/__init__.py index 83531335a4b0b1cf3c26e99ba117b355b3baff2c..9e3a3d0f2d6c3c5d7bdd94cf3e5c778cc8800b9a 100755 --- a/modeling/modules/__init__.py +++ b/modeling/modules/__init__.py @@ -1,3 +1,15 @@ +# 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. + from .point_features import * from .position_encoding import * from .postprocessing import * diff --git a/modeling/modules/attention.py b/modeling/modules/attention.py index b11c793aaf74b941b2388bd74f35cf0376f7ecff..6b510eb3214b88ed27924c388f38963141f6e509 100755 --- a/modeling/modules/attention.py +++ b/modeling/modules/attention.py @@ -1,3 +1,15 @@ +# 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. + import warnings from typing import Optional, Tuple diff --git a/modeling/modules/criterion.py b/modeling/modules/criterion.py index dd9644c7093643447e4f3ba5eb1ee9a6c804a331..db97383bcb246d3b2c1f9abb1e6c7e30f07457ba 100755 --- a/modeling/modules/criterion.py +++ b/modeling/modules/criterion.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # X-Decoder -- Generalized Decoding for Pixel, Image, and Language # Copyright (c) 2022 Microsoft diff --git a/modeling/modules/matcher.py b/modeling/modules/matcher.py index 1c8abb59f245b716744b2083da4242542265810b..309586cd459ec99af3bdd11d14733482a43215a0 100755 --- a/modeling/modules/matcher.py +++ b/modeling/modules/matcher.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # X-Decoder -- Generalized Decoding for Pixel, Image, and Language # Copyright (c) 2022 Microsoft diff --git a/modeling/modules/point_features.py b/modeling/modules/point_features.py index c770811ff7ef1acc6d628b560079e27fda3a347b..bf425a867272d55a75071d405a13c8efdbb77a5c 100755 --- a/modeling/modules/point_features.py +++ b/modeling/modules/point_features.py @@ -1,3 +1,15 @@ +# 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. + # Copyright (c) Facebook, Inc. and its affiliates. import torch from torch.nn import functional as F diff --git a/modeling/modules/position_encoding.py b/modeling/modules/position_encoding.py index f49e05d57be26d70d150422b57b24fefac88bf06..0314b2464614926ce9cdb95d317fc83050d55881 100755 --- a/modeling/modules/position_encoding.py +++ b/modeling/modules/position_encoding.py @@ -1,3 +1,15 @@ +# 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. + # Copyright (c) Facebook, Inc. and its affiliates. # # Modified by Bowen Cheng from: https://github.com/facebookresearch/detr/blob/master/models/position_encoding.py """ diff --git a/modeling/modules/postprocessing.py b/modeling/modules/postprocessing.py index 93e00439921b34300eb52b3ede8622ebf6afb63e..18cf6905539ed95877d2ae8298d87e10eb36fa65 100755 --- a/modeling/modules/postprocessing.py +++ b/modeling/modules/postprocessing.py @@ -1,3 +1,15 @@ +# 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. + # Copyright (c) Facebook, Inc. and its affiliates. import torch from torch.nn import functional as F diff --git a/modeling/utils/__init__.py b/modeling/utils/__init__.py index 807342aef0c01d0516b53fbd73cf5c877399ed73..c63943b96ac1475d4421b12f187b0f3e535b8334 100755 --- a/modeling/utils/__init__.py +++ b/modeling/utils/__init__.py @@ -1,3 +1,15 @@ +# 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. + from .config import * from .misc import * from .interactive import * diff --git a/modeling/utils/attention.py b/modeling/utils/attention.py index aa3d7b04953b51b62b80317a3a2d56a11e06ad39..64d23eb9114318ba63347aa8be8bf2458ada82a0 100755 --- a/modeling/utils/attention.py +++ b/modeling/utils/attention.py @@ -1,3 +1,15 @@ +# 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. + from typing import Callable, List, Optional, Tuple import torch diff --git a/modeling/utils/box_ops.py b/modeling/utils/box_ops.py index 9bae398cec9a8f9748c6763ddd72deae8a72a207..91143b52c7bab2c8b9ea2b2f35e74dec59539c25 100755 --- a/modeling/utils/box_ops.py +++ b/modeling/utils/box_ops.py @@ -1,3 +1,15 @@ +# 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. + # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Utilities for bounding box manipulation and GIoU. diff --git a/modeling/utils/config.py b/modeling/utils/config.py index 766bb386498f0f034485a19027d5b30b0b6d20ff..3b2b36c6e89766d0e870bafe7e10485e512c5f12 100755 --- a/modeling/utils/config.py +++ b/modeling/utils/config.py @@ -1,3 +1,15 @@ +# 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. + # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. diff --git a/modeling/utils/interactive.py b/modeling/utils/interactive.py index 164ddeaaf0f4e09187569b3f12fbbb68ea95dd12..4e14d1f79632ee448caa53057291317ed3948879 100755 --- a/modeling/utils/interactive.py +++ b/modeling/utils/interactive.py @@ -1,3 +1,15 @@ +# 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. + import os import copy import math diff --git a/modeling/utils/misc.py b/modeling/utils/misc.py index 9f3fd93d9424ee23b9cb8851b322c0a923edcac6..63e750105e14b0c14c08a3ea143e295232eda889 100755 --- a/modeling/utils/misc.py +++ b/modeling/utils/misc.py @@ -1,3 +1,15 @@ +# 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. + # Copyright (c) Facebook, Inc. and its affiliates. # Modified by Bowen Cheng from https://github.com/facebookresearch/detr/blob/master/util/misc.py diff --git a/modeling/vision/backbone/__init__.py b/modeling/vision/backbone/__init__.py index 50f543f58aa1e6331fd07e545d7590048e1ea03a..571d9ed0c56ecf7ff5bd8de09e033c1e7e11deb6 100755 --- a/modeling/vision/backbone/__init__.py +++ b/modeling/vision/backbone/__init__.py @@ -1,3 +1,15 @@ +# 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. + from .focal import * from .focal_dw import * from .davit import * diff --git a/modeling/vision/backbone/backbone.py b/modeling/vision/backbone/backbone.py index 6d97ac219a1a22ffd24aafb542526b111651d046..eb185100b9649c6c72ada994458947f066a4ba4e 100755 --- a/modeling/vision/backbone/backbone.py +++ b/modeling/vision/backbone/backbone.py @@ -1,3 +1,15 @@ +# 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. + # Copyright (c) Facebook, Inc. and its affiliates. import torch.nn as nn diff --git a/modeling/vision/backbone/build.py b/modeling/vision/backbone/build.py index 65c5f809acf8008fcf11be46be90608bfd819f0d..636cf6f855dc0ec8eae968be37d8fed2244d7807 100755 --- a/modeling/vision/backbone/build.py +++ b/modeling/vision/backbone/build.py @@ -1,3 +1,15 @@ +# 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. + _model_entrypoints = {} diff --git a/modeling/vision/backbone/common.py b/modeling/vision/backbone/common.py index 2bf15236a3eb24d8526073bc4fa2b274cccb3f96..30fb09907f88711498b347874fbbe65da69c4b60 100755 --- a/modeling/vision/backbone/common.py +++ b/modeling/vision/backbone/common.py @@ -1,3 +1,15 @@ +# 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. + # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. diff --git a/modeling/vision/backbone/davit.py b/modeling/vision/backbone/davit.py index 976448f423b893f903b89e2eda6b90b4c015cd8a..2f972773250f882b5f35100e2354fc12b02f405d 100755 --- a/modeling/vision/backbone/davit.py +++ b/modeling/vision/backbone/davit.py @@ -1,3 +1,15 @@ +# 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. + import os import itertools import logging diff --git a/modeling/vision/backbone/focal.py b/modeling/vision/backbone/focal.py index fb03baa4d0d4e0289d33035f2aa991473572e4e8..345f2bf7c644e44d14789900ec77a693cb59586b 100755 --- a/modeling/vision/backbone/focal.py +++ b/modeling/vision/backbone/focal.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # FocalNet for Semantic Segmentation # Copyright (c) 2022 Microsoft diff --git a/modeling/vision/backbone/focal_dw.py b/modeling/vision/backbone/focal_dw.py index a54c2116fd4780d948396b6dd72840421266cd50..b2d17561870535613bfb6425fbc25b4ca3f9eaa3 100755 --- a/modeling/vision/backbone/focal_dw.py +++ b/modeling/vision/backbone/focal_dw.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # FocalNet for Semantic Segmentation # Copyright (c) 2022 Microsoft diff --git a/modeling/vision/backbone/vit.py b/modeling/vision/backbone/vit.py index af9bf5d7e0e3610b751a042bdf8d509d49b5e3c2..dd906b3a825d71e6fa15cce160342cfb7aefc534 100755 --- a/modeling/vision/backbone/vit.py +++ b/modeling/vision/backbone/vit.py @@ -1,3 +1,15 @@ +# 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. + # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. diff --git a/modeling/vision/encoder/__init__.py b/modeling/vision/encoder/__init__.py index 89af46390df7beeb8b74585408fe95ab9511d444..7f13af6c32dcb23860cc803a21f27bbf34666f6d 100755 --- a/modeling/vision/encoder/__init__.py +++ b/modeling/vision/encoder/__init__.py @@ -1,3 +1,15 @@ +# 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. + from .transformer_encoder_fpn import * try: from .transformer_encoder_deform import * diff --git a/modeling/vision/encoder/build.py b/modeling/vision/encoder/build.py index ced42d145632d1e4963aad2881653bb8d90e34ce..5052100566a8a78c65e47e9c21c0b41e961c35de 100755 --- a/modeling/vision/encoder/build.py +++ b/modeling/vision/encoder/build.py @@ -1,3 +1,15 @@ +# 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. + _model_entrypoints = {} diff --git a/modeling/vision/encoder/ops/functions/__init__.py b/modeling/vision/encoder/ops/functions/__init__.py index 2b06b5ac538b63bdb9a6c82e4635b95bb5491d5b..e9811e011ef0e56fb01563fa4d7709da64ef458c 100755 --- a/modeling/vision/encoder/ops/functions/__init__.py +++ b/modeling/vision/encoder/ops/functions/__init__.py @@ -1,3 +1,15 @@ +# 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. + # ------------------------------------------------------------------------------------------------ # Deformable DETR # Copyright (c) 2020 SenseTime. All Rights Reserved. diff --git a/modeling/vision/encoder/ops/functions/ms_deform_attn_func.py b/modeling/vision/encoder/ops/functions/ms_deform_attn_func.py index 94a36ab85b7c5f9ecee342db91a5d5731740740f..a18bfd749ca78eb3e406e0afbad72425f3bdbedb 100755 --- a/modeling/vision/encoder/ops/functions/ms_deform_attn_func.py +++ b/modeling/vision/encoder/ops/functions/ms_deform_attn_func.py @@ -1,3 +1,15 @@ +# 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. + # ------------------------------------------------------------------------------------------------ # Deformable DETR # Copyright (c) 2020 SenseTime. All Rights Reserved. diff --git a/modeling/vision/encoder/ops/modules/__init__.py b/modeling/vision/encoder/ops/modules/__init__.py index 6fdbf03359958f3d67ab00f879bf6b61a6c8f06a..2165dd157c500d6a5becd1398d2bce943596bc8c 100755 --- a/modeling/vision/encoder/ops/modules/__init__.py +++ b/modeling/vision/encoder/ops/modules/__init__.py @@ -1,3 +1,15 @@ +# 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. + # ------------------------------------------------------------------------------------------------ # Deformable DETR # Copyright (c) 2020 SenseTime. All Rights Reserved. diff --git a/modeling/vision/encoder/ops/modules/ms_deform_attn.py b/modeling/vision/encoder/ops/modules/ms_deform_attn.py index e7b4c42ea504a0859ccadd72646919c941e72f73..31b5f499172474a3962cb8d710645e65154b6fa6 100755 --- a/modeling/vision/encoder/ops/modules/ms_deform_attn.py +++ b/modeling/vision/encoder/ops/modules/ms_deform_attn.py @@ -1,3 +1,15 @@ +# 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. + # ------------------------------------------------------------------------------------------------ # Deformable DETR # Copyright (c) 2020 SenseTime. All Rights Reserved. diff --git a/modeling/vision/encoder/ops/setup.py b/modeling/vision/encoder/ops/setup.py index 3b57ad313ac8f9b6586892142da8ba943e516cec..99f94c02ae94d14c23b6015c25d8402c0cf79441 100755 --- a/modeling/vision/encoder/ops/setup.py +++ b/modeling/vision/encoder/ops/setup.py @@ -1,3 +1,15 @@ +# 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. + # ------------------------------------------------------------------------------------------------ # Deformable DETR # Copyright (c) 2020 SenseTime. All Rights Reserved. diff --git a/modeling/vision/encoder/ops/test.py b/modeling/vision/encoder/ops/test.py index 6e1b545459f6fd3235767e721eb5a1090ae14bef..c98f9806e09faa143a51c081018f4422a41c1804 100755 --- a/modeling/vision/encoder/ops/test.py +++ b/modeling/vision/encoder/ops/test.py @@ -1,3 +1,15 @@ +# 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. + # ------------------------------------------------------------------------------------------------ # Deformable DETR # Copyright (c) 2020 SenseTime. All Rights Reserved. diff --git a/modeling/vision/encoder/transformer_blocks.py b/modeling/vision/encoder/transformer_blocks.py index 54134f34556b32c98401be2eb862e539ccb812d4..6473d4baefd9f966c2f20421f186df980eb06e63 100755 --- a/modeling/vision/encoder/transformer_blocks.py +++ b/modeling/vision/encoder/transformer_blocks.py @@ -1,3 +1,15 @@ +# 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. + # Copyright (c) Facebook, Inc. and its affiliates. # Modified by Bowen Cheng from: https://github.com/facebookresearch/detr/blob/master/models/transformer.py """ diff --git a/modeling/vision/encoder/transformer_encoder_deform.py b/modeling/vision/encoder/transformer_encoder_deform.py index 40e4c360f0f397060fa833cf4a244284c4300d4c..9e69c61779ffb318ca647409a9be290c7efd5340 100755 --- a/modeling/vision/encoder/transformer_encoder_deform.py +++ b/modeling/vision/encoder/transformer_encoder_deform.py @@ -1,3 +1,15 @@ +# 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. + # Copyright (c) Facebook, Inc. and its affiliates. import logging import numpy as np diff --git a/modeling/vision/encoder/transformer_encoder_fpn.py b/modeling/vision/encoder/transformer_encoder_fpn.py index ac0e02b033d741a22489c5c296c2f5ae1350ce47..c902d6cc5e1587195e3e9a1ecf47d1e5157d72ef 100755 --- a/modeling/vision/encoder/transformer_encoder_fpn.py +++ b/modeling/vision/encoder/transformer_encoder_fpn.py @@ -1,3 +1,15 @@ +# 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. + # Copyright (c) Facebook, Inc. and its affiliates. import logging import numpy as np diff --git a/utilities/Config.py b/utilities/Config.py index 86f5dc6086bd0427c6ef0aa9c2d2ab1caf57d4d3..d46f680f4ecf7023c28e4acc8cfe98a28672ce70 100755 --- a/utilities/Config.py +++ b/utilities/Config.py @@ -1,3 +1,15 @@ +# 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. + from fvcore.common.config import CfgNode as _CfgNode diff --git a/utilities/__init__.py b/utilities/__init__.py index ecb3c97f07feb8a9ba130de89f4fdd4354d8f906..13638555d1d4058c7fcbb31c53b3f0e1b5276736 100755 --- a/utilities/__init__.py +++ b/utilities/__init__.py @@ -1,2 +1,14 @@ +# 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. + from .prompt_engineering import * from .dataset import * \ No newline at end of file diff --git a/utilities/arguments.py b/utilities/arguments.py index 7f2693268a2318cb843ee81f52738a7e9b287acc..d19874d9d26ae0e4b7ca9461f44019958f447105 100755 --- a/utilities/arguments.py +++ b/utilities/arguments.py @@ -1,3 +1,15 @@ +# 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. + import yaml import json import argparse diff --git a/utilities/constants.py b/utilities/constants.py index 2856a91b65bca17c84948bbbd585eb7a219a4cc5..f597ea1458c1e22a99e499502705c64485e4db4f 100755 --- a/utilities/constants.py +++ b/utilities/constants.py @@ -1,3 +1,15 @@ +# 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. + BIOMED_CLASSES = ['liver', 'lung', 'kidney', 'pancreas', 'heart anatomies', 'brain anatomies', 'eye anatomies', 'vessel', 'other organ', 'tumor', 'infection', 'other lesion', 'fluid disturbance', 'other abnormality', 'histology structure', 'other'] diff --git a/utilities/dataset.py b/utilities/dataset.py index 7dbb757b416ba09077c4ec8552ee3027df05006a..d930f7098d55a1bd8e57de73e87cc84c6f58b99f 100755 --- a/utilities/dataset.py +++ b/utilities/dataset.py @@ -1,3 +1,15 @@ +# 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. + class Entity(object): def __init__(self, _id, _text, _mask, _interactive, _type, _start_idx, _end_idx, _image=None): diff --git a/utilities/distributed.py b/utilities/distributed.py index b0025912de9d77f1d1b6a607345706069ca998bd..ec5c92d58f445b32f4ac86416694d4464a6c5f54 100755 --- a/utilities/distributed.py +++ b/utilities/distributed.py @@ -1,3 +1,15 @@ +# 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. + import os import time import torch diff --git a/utilities/misc.py b/utilities/misc.py index c9e55caf20915b6bd80e416b449ef23c255043c3..7588287dee89da33e1861fa74ed2177a46cedbbf 100755 --- a/utilities/misc.py +++ b/utilities/misc.py @@ -1,3 +1,15 @@ +# 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. + # -------------------------------------------------------- # X-Decoder -- Generalized Decoding for Pixel, Image, and Language # Copyright (c) 2022 Microsoft diff --git a/utilities/model.py b/utilities/model.py index f87e38b390cba21c55662e8435ed2cec25744b15..6ff40ce4fc88cf99785cfbc4d84689ecca1b8472 100755 --- a/utilities/model.py +++ b/utilities/model.py @@ -1,3 +1,15 @@ +# 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. + import logging import os import time diff --git a/utilities/prompt_engineering.py b/utilities/prompt_engineering.py index 9a84ca628eedd32e2c560e99005ef4c260957e73..e4a48d1d3a6468d9a3574ca6050bac69e2d1e52f 100755 --- a/utilities/prompt_engineering.py +++ b/utilities/prompt_engineering.py @@ -1,3 +1,15 @@ +# 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. + import numpy as np diff --git a/utilities/visualizer.py b/utilities/visualizer.py index 0c32a2f9bdccd0d3679a5f23ee4852e73a8ec681..545d24f1409fa19607607f97be9140c148221897 100755 --- a/utilities/visualizer.py +++ b/utilities/visualizer.py @@ -1,3 +1,15 @@ +# 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. + # Copyright (c) Facebook, Inc. and its affiliates. import colorsys import logging