Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10222223master
| @@ -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 | from typing import Dict | ||||
| import numpy as np | import numpy as np | ||||
| @@ -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 | ||||
| import os.path as osp | import os.path as osp | ||||
| from typing import Any, Dict | from typing import Any, Dict | ||||
| @@ -1,3 +1,4 @@ | |||||
| # Copyright (c) Alibaba, Inc. and its affiliates. | |||||
| from .save_op import get_pred_boundary, pred2scene, scene2video | from .save_op import get_pred_boundary, pred2scene, scene2video | ||||
| from .shot_encoder import resnet50 | from .shot_encoder import resnet50 | ||||
| from .trn import TransformerCRN | from .trn import TransformerCRN | ||||
| @@ -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 as nn | ||||
| import torch.nn.functional as F | import torch.nn.functional as F | ||||
| @@ -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 | ||||
| import os.path as osp | import os.path as osp | ||||
| import subprocess | import subprocess | ||||
| @@ -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 | from typing import Any, Callable, List, Optional, Type, Union | ||||
| @@ -1 +1,2 @@ | |||||
| # Copyright (c) Alibaba, Inc. and its affiliates. | |||||
| from .movie_scene_segmentation_dataset import MovieSceneSegmentationDataset | from .movie_scene_segmentation_dataset import MovieSceneSegmentationDataset | ||||
| @@ -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 copy | ||||
| import os | import os | ||||
| import os.path as osp | import os.path as osp | ||||
| @@ -1,3 +1,4 @@ | |||||
| # Copyright (c) Alibaba, Inc. and its affiliates. | |||||
| from typing import Any, Dict | from typing import Any, Dict | ||||
| import torch | import torch | ||||
| @@ -1,3 +1,4 @@ | |||||
| # Copyright (c) Alibaba, Inc. and its affiliates. | |||||
| from typing import TYPE_CHECKING | from typing import TYPE_CHECKING | ||||
| from modelscope.utils.import_utils import LazyImportModule | from modelscope.utils.import_utils import LazyImportModule | ||||
| @@ -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 numbers | ||||
| import os.path as osp | import os.path as osp | ||||
| import random | import random | ||||
| @@ -1,3 +1,4 @@ | |||||
| # Copyright (c) Alibaba, Inc. and its affiliates. | |||||
| from modelscope.metainfo import Trainers | from modelscope.metainfo import Trainers | ||||
| from modelscope.trainers.builder import TRAINERS | from modelscope.trainers.builder import TRAINERS | ||||
| from modelscope.trainers.trainer import EpochBasedTrainer | from modelscope.trainers.trainer import EpochBasedTrainer | ||||