shuying.shu yingda.chen 3 years ago
parent
commit
a22a4e9a3a
12 changed files with 19 additions and 22 deletions
  1. +2
    -0
      modelscope/metrics/movie_scene_segmentation_metric.py
  2. +3
    -0
      modelscope/models/cv/movie_scene_segmentation/model.py
  3. +1
    -0
      modelscope/models/cv/movie_scene_segmentation/utils/__init__.py
  4. +2
    -6
      modelscope/models/cv/movie_scene_segmentation/utils/head.py
  5. +2
    -4
      modelscope/models/cv/movie_scene_segmentation/utils/save_op.py
  6. +1
    -3
      modelscope/models/cv/movie_scene_segmentation/utils/shot_encoder.py
  7. +1
    -0
      modelscope/msdatasets/task_datasets/movie_scene_segmentation/__init__.py
  8. +2
    -3
      modelscope/msdatasets/task_datasets/movie_scene_segmentation/movie_scene_segmentation_dataset.py
  9. +1
    -0
      modelscope/pipelines/cv/movie_scene_segmentation_pipeline.py
  10. +1
    -0
      modelscope/preprocessors/movie_scene_segmentation/__init__.py
  11. +2
    -6
      modelscope/preprocessors/movie_scene_segmentation/transforms.py
  12. +1
    -0
      modelscope/trainers/cv/movie_scene_segmentation_trainer.py

+ 2
- 0
modelscope/metrics/movie_scene_segmentation_metric.py View File

@@ -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


+ 3
- 0
modelscope/models/cv/movie_scene_segmentation/model.py View File

@@ -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


+ 1
- 0
modelscope/models/cv/movie_scene_segmentation/utils/__init__.py View File

@@ -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

+ 2
- 6
modelscope/models/cv/movie_scene_segmentation/utils/head.py View File

@@ -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


+ 2
- 4
modelscope/models/cv/movie_scene_segmentation/utils/save_op.py View File

@@ -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


+ 1
- 3
modelscope/models/cv/movie_scene_segmentation/utils/shot_encoder.py View File

@@ -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



+ 1
- 0
modelscope/msdatasets/task_datasets/movie_scene_segmentation/__init__.py View File

@@ -1 +1,2 @@
# Copyright (c) Alibaba, Inc. and its affiliates.
from .movie_scene_segmentation_dataset import MovieSceneSegmentationDataset

+ 2
- 3
modelscope/msdatasets/task_datasets/movie_scene_segmentation/movie_scene_segmentation_dataset.py View File

@@ -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


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

@@ -1,3 +1,4 @@
# Copyright (c) Alibaba, Inc. and its affiliates.
from typing import Any, Dict

import torch


+ 1
- 0
modelscope/preprocessors/movie_scene_segmentation/__init__.py View File

@@ -1,3 +1,4 @@
# Copyright (c) Alibaba, Inc. and its affiliates.
from typing import TYPE_CHECKING

from modelscope.utils.import_utils import LazyImportModule


+ 2
- 6
modelscope/preprocessors/movie_scene_segmentation/transforms.py View File

@@ -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


+ 1
- 0
modelscope/trainers/cv/movie_scene_segmentation_trainer.py View File

@@ -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


Loading…
Cancel
Save