[Dcos] Add header for files (#796)

* Add header for files

* Delete header in config files
This commit is contained in:
Junjun2016 2021-08-17 14:16:55 +08:00 committed by GitHub
parent 6eff94165c
commit 441be4e435
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
202 changed files with 203 additions and 1 deletions

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import argparse import argparse
import glob import glob
import json import json

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
# Copyright (c) OpenMMLab. All rights reserved.
# This tool is used to update model-index.yml which is required by MIM, and # This tool is used to update model-index.yml which is required by MIM, and
# will be automatically called as a pre-commit hook. The updating will be # will be automatically called as a pre-commit hook. The updating will be
# triggered if any change of model information (.md files in configs/) has been # triggered if any change of model information (.md files in configs/) has been

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import argparse import argparse
import os import os
import os.path as osp import os.path as osp

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from argparse import ArgumentParser from argparse import ArgumentParser
from mmseg.apis import inference_segmentor, init_segmentor, show_result_pyplot from mmseg.apis import inference_segmentor, init_segmentor, show_result_pyplot

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
# Configuration file for the Sphinx documentation builder. # Configuration file for the Sphinx documentation builder.
# #
# This file only contains a selection of the most common options. For a full # This file only contains a selection of the most common options. For a full

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# Copyright (c) OpenMMLab. All rights reserved.
import functools as func import functools as func
import glob import glob
import os.path as osp import os.path as osp

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
# Configuration file for the Sphinx documentation builder. # Configuration file for the Sphinx documentation builder.
# #
# This file only contains a selection of the most common options. For a full # This file only contains a selection of the most common options. For a full

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# Copyright (c) OpenMMLab. All rights reserved.
import functools as func import functools as func
import glob import glob
import os.path as osp import os.path as osp

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings import warnings
import mmcv import mmcv

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .inference import inference_segmentor, init_segmentor, show_result_pyplot from .inference import inference_segmentor, init_segmentor, show_result_pyplot
from .test import multi_gpu_test, single_gpu_test from .test import multi_gpu_test, single_gpu_test
from .train import get_root_logger, set_random_seed, train_segmentor from .train import get_root_logger, set_random_seed, train_segmentor

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import mmcv import mmcv
import torch import torch

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp import os.path as osp
import tempfile import tempfile

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import random import random
import warnings import warnings

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .evaluation import * # noqa: F401, F403 from .evaluation import * # noqa: F401, F403
from .seg import * # noqa: F401, F403 from .seg import * # noqa: F401, F403
from .utils import * # noqa: F401, F403 from .utils import * # noqa: F401, F403

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .class_names import get_classes, get_palette from .class_names import get_classes, get_palette
from .eval_hooks import DistEvalHook, EvalHook from .eval_hooks import DistEvalHook, EvalHook
from .metrics import eval_metrics, mean_dice, mean_fscore, mean_iou from .metrics import eval_metrics, mean_dice, mean_fscore, mean_iou

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import mmcv import mmcv

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp import os.path as osp
import torch.distributed as dist import torch.distributed as dist

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from collections import OrderedDict from collections import OrderedDict
import mmcv import mmcv

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .builder import build_pixel_sampler from .builder import build_pixel_sampler
from .sampler import BasePixelSampler, OHEMPixelSampler from .sampler import BasePixelSampler, OHEMPixelSampler

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from mmcv.utils import Registry, build_from_cfg from mmcv.utils import Registry, build_from_cfg
PIXEL_SAMPLERS = Registry('pixel sampler') PIXEL_SAMPLERS = Registry('pixel sampler')

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .base_pixel_sampler import BasePixelSampler from .base_pixel_sampler import BasePixelSampler
from .ohem_pixel_sampler import OHEMPixelSampler from .ohem_pixel_sampler import OHEMPixelSampler

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from abc import ABCMeta, abstractmethod from abc import ABCMeta, abstractmethod

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn.functional as F import torch.nn.functional as F

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .misc import add_prefix from .misc import add_prefix
__all__ = ['add_prefix'] __all__ = ['add_prefix']

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
def add_prefix(inputs, prefix): def add_prefix(inputs, prefix):
"""Add prefix for dict. """Add prefix for dict.

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .ade import ADE20KDataset from .ade import ADE20KDataset
from .builder import DATASETS, PIPELINES, build_dataloader, build_dataset from .builder import DATASETS, PIPELINES, build_dataloader, build_dataset
from .chase_db1 import ChaseDB1Dataset from .chase_db1 import ChaseDB1Dataset

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp import os.path as osp
import tempfile import tempfile

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import copy import copy
import platform import platform
import random import random

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp import os.path as osp
from .builder import DATASETS from .builder import DATASETS

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp import os.path as osp
import tempfile import tempfile

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os import os
import os.path as osp import os.path as osp
from collections import OrderedDict from collections import OrderedDict

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from torch.utils.data.dataset import ConcatDataset as _ConcatDataset from torch.utils.data.dataset import ConcatDataset as _ConcatDataset
from .builder import DATASETS from .builder import DATASETS

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp import os.path as osp
from .builder import DATASETS from .builder import DATASETS

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp import os.path as osp
from .builder import DATASETS from .builder import DATASETS

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp import os.path as osp
from .builder import DATASETS from .builder import DATASETS

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .compose import Compose from .compose import Compose
from .formating import (Collect, ImageToTensor, ToDataContainer, ToTensor, from .formating import (Collect, ImageToTensor, ToDataContainer, ToTensor,
Transpose, to_tensor) Transpose, to_tensor)

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import collections import collections
from mmcv.utils import build_from_cfg from mmcv.utils import build_from_cfg

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from collections.abc import Sequence from collections.abc import Sequence
import mmcv import mmcv

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp import os.path as osp
import mmcv import mmcv

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings import warnings
import mmcv import mmcv

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import mmcv import mmcv
import numpy as np import numpy as np
from mmcv.utils import deprecated_api_warning, is_tuple_of from mmcv.utils import deprecated_api_warning, is_tuple_of

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp import os.path as osp
from .builder import DATASETS from .builder import DATASETS

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp import os.path as osp
from .builder import DATASETS from .builder import DATASETS

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .backbones import * # noqa: F401,F403 from .backbones import * # noqa: F401,F403
from .builder import (BACKBONES, HEADS, LOSSES, SEGMENTORS, build_backbone, from .builder import (BACKBONES, HEADS, LOSSES, SEGMENTORS, build_backbone,
build_head, build_loss, build_segmentor) build_head, build_loss, build_segmentor)

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .cgnet import CGNet from .cgnet import CGNet
from .fast_scnn import FastSCNN from .fast_scnn import FastSCNN
from .hrnet import HRNet from .hrnet import HRNet

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings import warnings
import torch import torch

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
from mmcv.cnn import ConvModule, DepthwiseSeparableConvModule from mmcv.cnn import ConvModule, DepthwiseSeparableConvModule

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings import warnings
import torch.nn as nn import torch.nn as nn

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import math import math
import warnings import warnings

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings import warnings
import torch.nn as nn import torch.nn as nn

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings import warnings
import mmcv import mmcv

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import math import math
import torch import torch

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings import warnings
import torch.nn as nn import torch.nn as nn

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import math import math
from mmcv.cnn import build_conv_layer, build_norm_layer from mmcv.cnn import build_conv_layer, build_norm_layer

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings import warnings
from copy import deepcopy from copy import deepcopy

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings import warnings
import torch.nn as nn import torch.nn as nn

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import math import math
import warnings import warnings

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings import warnings
from mmcv.cnn import MODELS as MMCV_MODELS from mmcv.cnn import MODELS as MMCV_MODELS

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .ann_head import ANNHead from .ann_head import ANNHead
from .apc_head import APCHead from .apc_head import APCHead
from .aspp_head import ASPPHead from .aspp_head import ASPPHead

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
from mmcv.cnn import ConvModule from mmcv.cnn import ConvModule

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
import torch.nn.functional as F import torch.nn.functional as F

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
from mmcv.cnn import ConvModule from mmcv.cnn import ConvModule

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from abc import ABCMeta, abstractmethod from abc import ABCMeta, abstractmethod
from .decode_head import BaseDecodeHead from .decode_head import BaseDecodeHead

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
from ..builder import HEADS from ..builder import HEADS

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn.functional as F import torch.nn.functional as F
from mmcv.cnn import ConvModule, Scale from mmcv.cnn import ConvModule, Scale

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from abc import ABCMeta, abstractmethod from abc import ABCMeta, abstractmethod
import torch import torch

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
import torch.nn.functional as F import torch.nn.functional as F

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
from mmcv.cnn import NonLocal2d from mmcv.cnn import NonLocal2d
from torch import nn from torch import nn

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import math import math
import torch import torch

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
import torch.nn.functional as F import torch.nn.functional as F

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
from mmcv.cnn import ConvModule from mmcv.cnn import ConvModule

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import numpy as np import numpy as np
import torch.nn as nn import torch.nn as nn
from mmcv.cnn import ConvModule from mmcv.cnn import ConvModule

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
from mmcv.cnn import ContextBlock from mmcv.cnn import ContextBlock

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
from mmcv import is_tuple_of from mmcv import is_tuple_of

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
from mmcv.cnn import NonLocal2d from mmcv.cnn import NonLocal2d

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
import torch.nn.functional as F import torch.nn.functional as F

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
# Modified from https://github.com/facebookresearch/detectron2/tree/master/projects/PointRend/point_head/point_head.py # noqa # Modified from https://github.com/facebookresearch/detectron2/tree/master/projects/PointRend/point_head/point_head.py # noqa
import torch import torch

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
import torch.nn.functional as F import torch.nn.functional as F

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
from mmcv.cnn import ConvModule from mmcv.cnn import ConvModule

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
from mmcv.cnn import ConvModule from mmcv.cnn import ConvModule

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
from mmcv.cnn import ConvModule, DepthwiseSeparableConvModule from mmcv.cnn import ConvModule, DepthwiseSeparableConvModule

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from mmcv.cnn import DepthwiseSeparableConvModule from mmcv.cnn import DepthwiseSeparableConvModule
from ..builder import HEADS from ..builder import HEADS

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
from mmcv.cnn import ConvModule from mmcv.cnn import ConvModule

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch.nn as nn import torch.nn as nn
from mmcv.cnn import ConvModule, build_norm_layer from mmcv.cnn import ConvModule, build_norm_layer

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
from mmcv.cnn import ConvModule from mmcv.cnn import ConvModule

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .accuracy import Accuracy, accuracy from .accuracy import Accuracy, accuracy
from .cross_entropy_loss import (CrossEntropyLoss, binary_cross_entropy, from .cross_entropy_loss import (CrossEntropyLoss, binary_cross_entropy,
cross_entropy, mask_cross_entropy) cross_entropy, mask_cross_entropy)

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch.nn as nn import torch.nn as nn

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
import torch.nn.functional as F import torch.nn.functional as F

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
"""Modified from https://github.com/LikeLy-Journey/SegmenTron/blob/master/ """Modified from https://github.com/LikeLy-Journey/SegmenTron/blob/master/
segmentron/solver/loss.py (Apache-2.0 License)""" segmentron/solver/loss.py (Apache-2.0 License)"""
import torch import torch

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
"""Modified from https://github.com/bermanmaxim/LovaszSoftmax/blob/master/pytor """Modified from https://github.com/bermanmaxim/LovaszSoftmax/blob/master/pytor
ch/lovasz_losses.py Lovasz-Softmax and Jaccard hinge loss in PyTorch Maxim ch/lovasz_losses.py Lovasz-Softmax and Jaccard hinge loss in PyTorch Maxim
Berman 2018 ESAT-PSI KU Leuven (MIT License)""" Berman 2018 ESAT-PSI KU Leuven (MIT License)"""

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import functools import functools
import mmcv import mmcv

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .fpn import FPN from .fpn import FPN
from .mla_neck import MLANeck from .mla_neck import MLANeck
from .multilevel_neck import MultiLevelNeck from .multilevel_neck import MultiLevelNeck

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch.nn as nn import torch.nn as nn
import torch.nn.functional as F import torch.nn.functional as F
from mmcv.cnn import ConvModule from mmcv.cnn import ConvModule

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch.nn as nn import torch.nn as nn
from mmcv.cnn import ConvModule, build_norm_layer from mmcv.cnn import ConvModule, build_norm_layer

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch.nn as nn import torch.nn as nn
from mmcv.cnn import ConvModule, xavier_init from mmcv.cnn import ConvModule, xavier_init

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .base import BaseSegmentor from .base import BaseSegmentor
from .cascade_encoder_decoder import CascadeEncoderDecoder from .cascade_encoder_decoder import CascadeEncoderDecoder
from .encoder_decoder import EncoderDecoder from .encoder_decoder import EncoderDecoder

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings import warnings
from abc import ABCMeta, abstractmethod from abc import ABCMeta, abstractmethod
from collections import OrderedDict from collections import OrderedDict

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from torch import nn from torch import nn
from mmseg.core import add_prefix from mmseg.core import add_prefix

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch import torch
import torch.nn as nn import torch.nn as nn
import torch.nn.functional as F import torch.nn.functional as F

View File

@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .ckpt_convert import swin_convert, vit_convert from .ckpt_convert import swin_convert, vit_convert
from .embed import PatchEmbed from .embed import PatchEmbed
from .inverted_residual import InvertedResidual, InvertedResidualV3 from .inverted_residual import InvertedResidual, InvertedResidualV3

Some files were not shown because too many files have changed in this diff Show More