From a22a4e9a3aee858c0a34fb037c8d26e83d9a1a15 Mon Sep 17 00:00:00 2001 From: "shuying.shu" Date: Fri, 23 Sep 2022 09:38:55 +0800 Subject: [PATCH] [to #42322933]add license header Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10222223 --- modelscope/metrics/movie_scene_segmentation_metric.py | 2 ++ modelscope/models/cv/movie_scene_segmentation/model.py | 3 +++ .../models/cv/movie_scene_segmentation/utils/__init__.py | 1 + .../models/cv/movie_scene_segmentation/utils/head.py | 8 ++------ .../models/cv/movie_scene_segmentation/utils/save_op.py | 6 ++---- .../cv/movie_scene_segmentation/utils/shot_encoder.py | 4 +--- .../task_datasets/movie_scene_segmentation/__init__.py | 1 + .../movie_scene_segmentation_dataset.py | 5 ++--- .../pipelines/cv/movie_scene_segmentation_pipeline.py | 1 + .../preprocessors/movie_scene_segmentation/__init__.py | 1 + .../preprocessors/movie_scene_segmentation/transforms.py | 8 ++------ .../trainers/cv/movie_scene_segmentation_trainer.py | 1 + 12 files changed, 19 insertions(+), 22 deletions(-) diff --git a/modelscope/metrics/movie_scene_segmentation_metric.py b/modelscope/metrics/movie_scene_segmentation_metric.py index 56bdbd1c..65725b6f 100644 --- a/modelscope/metrics/movie_scene_segmentation_metric.py +++ b/modelscope/metrics/movie_scene_segmentation_metric.py @@ -1,3 +1,5 @@ +# The implementation here is modified based on BaSSL, +# originally Apache 2.0 License and publicly available at https://github.com/kakaobrain/bassl from typing import Dict import numpy as np diff --git a/modelscope/models/cv/movie_scene_segmentation/model.py b/modelscope/models/cv/movie_scene_segmentation/model.py index e9576963..676b5ac1 100644 --- a/modelscope/models/cv/movie_scene_segmentation/model.py +++ b/modelscope/models/cv/movie_scene_segmentation/model.py @@ -1,3 +1,6 @@ +# The implementation here is modified based on BaSSL, +# originally Apache 2.0 License and publicly avaialbe at https://github.com/kakaobrain/bassl + import os import os.path as osp from typing import Any, Dict diff --git a/modelscope/models/cv/movie_scene_segmentation/utils/__init__.py b/modelscope/models/cv/movie_scene_segmentation/utils/__init__.py index 3682726f..e5a929aa 100644 --- a/modelscope/models/cv/movie_scene_segmentation/utils/__init__.py +++ b/modelscope/models/cv/movie_scene_segmentation/utils/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) Alibaba, Inc. and its affiliates. from .save_op import get_pred_boundary, pred2scene, scene2video from .shot_encoder import resnet50 from .trn import TransformerCRN diff --git a/modelscope/models/cv/movie_scene_segmentation/utils/head.py b/modelscope/models/cv/movie_scene_segmentation/utils/head.py index 20a87e66..d6468c53 100644 --- a/modelscope/models/cv/movie_scene_segmentation/utils/head.py +++ b/modelscope/models/cv/movie_scene_segmentation/utils/head.py @@ -1,9 +1,5 @@ -# ------------------------------------------------------------------------------------ -# BaSSL -# Copyright (c) 2021 KakaoBrain. All Rights Reserved. -# Licensed under the Apache License, Version 2.0 [see LICENSE for details] -# Github: https://github.com/kakaobrain/bassl -# ------------------------------------------------------------------------------------ +# The implementation here is modified based on BaSSL, +# originally Apache 2.0 License and publicly avaialbe at https://github.com/kakaobrain/bassl import torch.nn as nn import torch.nn.functional as F diff --git a/modelscope/models/cv/movie_scene_segmentation/utils/save_op.py b/modelscope/models/cv/movie_scene_segmentation/utils/save_op.py index d7c8c0ed..cf26d21a 100644 --- a/modelscope/models/cv/movie_scene_segmentation/utils/save_op.py +++ b/modelscope/models/cv/movie_scene_segmentation/utils/save_op.py @@ -1,7 +1,5 @@ -# ---------------------------------------------------------------------------------- -# The codes below partially refer to the SceneSeg LGSS. -# Github: https://github.com/AnyiRao/SceneSeg -# ---------------------------------------------------------------------------------- +# The implementation here is modified based on SceneSeg, +# originally Apache 2.0 License and publicly avaialbe at https://github.com/AnyiRao/SceneSeg import os import os.path as osp import subprocess diff --git a/modelscope/models/cv/movie_scene_segmentation/utils/shot_encoder.py b/modelscope/models/cv/movie_scene_segmentation/utils/shot_encoder.py index 7ad1907f..11d20b13 100644 --- a/modelscope/models/cv/movie_scene_segmentation/utils/shot_encoder.py +++ b/modelscope/models/cv/movie_scene_segmentation/utils/shot_encoder.py @@ -1,6 +1,4 @@ -""" -Modified from original implementation in torchvision -""" +# The implementation is adopted from torchvision from typing import Any, Callable, List, Optional, Type, Union diff --git a/modelscope/msdatasets/task_datasets/movie_scene_segmentation/__init__.py b/modelscope/msdatasets/task_datasets/movie_scene_segmentation/__init__.py index e56039ac..b1bc40f8 100644 --- a/modelscope/msdatasets/task_datasets/movie_scene_segmentation/__init__.py +++ b/modelscope/msdatasets/task_datasets/movie_scene_segmentation/__init__.py @@ -1 +1,2 @@ +# Copyright (c) Alibaba, Inc. and its affiliates. from .movie_scene_segmentation_dataset import MovieSceneSegmentationDataset diff --git a/modelscope/msdatasets/task_datasets/movie_scene_segmentation/movie_scene_segmentation_dataset.py b/modelscope/msdatasets/task_datasets/movie_scene_segmentation/movie_scene_segmentation_dataset.py index 925d6281..68cbf918 100644 --- a/modelscope/msdatasets/task_datasets/movie_scene_segmentation/movie_scene_segmentation_dataset.py +++ b/modelscope/msdatasets/task_datasets/movie_scene_segmentation/movie_scene_segmentation_dataset.py @@ -1,6 +1,5 @@ -# --------------------------------------------------------------------------------------------------- -# The implementation is built upon BaSSL, publicly available at https://github.com/kakaobrain/bassl -# --------------------------------------------------------------------------------------------------- +# The implementation here is modified based on BaSSL, +# originally Apache 2.0 License and publicly available at https://github.com/kakaobrain/bassl import copy import os import os.path as osp diff --git a/modelscope/pipelines/cv/movie_scene_segmentation_pipeline.py b/modelscope/pipelines/cv/movie_scene_segmentation_pipeline.py index 0ef0261d..b5acf17a 100644 --- a/modelscope/pipelines/cv/movie_scene_segmentation_pipeline.py +++ b/modelscope/pipelines/cv/movie_scene_segmentation_pipeline.py @@ -1,3 +1,4 @@ +# Copyright (c) Alibaba, Inc. and its affiliates. from typing import Any, Dict import torch diff --git a/modelscope/preprocessors/movie_scene_segmentation/__init__.py b/modelscope/preprocessors/movie_scene_segmentation/__init__.py index 73da792d..b28ccabc 100644 --- a/modelscope/preprocessors/movie_scene_segmentation/__init__.py +++ b/modelscope/preprocessors/movie_scene_segmentation/__init__.py @@ -1,3 +1,4 @@ +# Copyright (c) Alibaba, Inc. and its affiliates. from typing import TYPE_CHECKING from modelscope.utils.import_utils import LazyImportModule diff --git a/modelscope/preprocessors/movie_scene_segmentation/transforms.py b/modelscope/preprocessors/movie_scene_segmentation/transforms.py index b4e57420..5b84003c 100644 --- a/modelscope/preprocessors/movie_scene_segmentation/transforms.py +++ b/modelscope/preprocessors/movie_scene_segmentation/transforms.py @@ -1,9 +1,5 @@ -# ------------------------------------------------------------------------------------ -# The codes below partially refer to the BaSSL -# Copyright (c) 2021 KakaoBrain. All Rights Reserved. -# Licensed under the Apache License, Version 2.0 [see LICENSE for details] -# Github: https://github.com/kakaobrain/bassl -# ------------------------------------------------------------------------------------ +# The implementation here is modified based on BaSSL, +# originally Apache 2.0 License and publicly avaialbe at https://github.com/kakaobrain/bassl import numbers import os.path as osp import random diff --git a/modelscope/trainers/cv/movie_scene_segmentation_trainer.py b/modelscope/trainers/cv/movie_scene_segmentation_trainer.py index ee4dd849..7645f9f3 100644 --- a/modelscope/trainers/cv/movie_scene_segmentation_trainer.py +++ b/modelscope/trainers/cv/movie_scene_segmentation_trainer.py @@ -1,3 +1,4 @@ +# Copyright (c) Alibaba, Inc. and its affiliates. from modelscope.metainfo import Trainers from modelscope.trainers.builder import TRAINERS from modelscope.trainers.trainer import EpochBasedTrainer