Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dcos] Add header for files #796

Merged
merged 2 commits into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dev/gather_models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import glob
import json
Expand Down
1 change: 1 addition & 0 deletions .dev/md2yml.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/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
# 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
Expand Down
1 change: 1 addition & 0 deletions .dev/upload_modelzoo.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import os
import os.path as osp
Expand Down
1 change: 1 addition & 0 deletions demo/image_demo.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from argparse import ArgumentParser

from mmseg.apis import inference_segmentor, init_segmentor, show_result_pyplot
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
Expand Down
1 change: 1 addition & 0 deletions docs/stat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
# Copyright (c) OpenMMLab. All rights reserved.
import functools as func
import glob
import os.path as osp
Expand Down
1 change: 1 addition & 0 deletions docs_zh-CN/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
Expand Down
1 change: 1 addition & 0 deletions docs_zh-CN/stat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
# Copyright (c) OpenMMLab. All rights reserved.
import functools as func
import glob
import os.path as osp
Expand Down
1 change: 1 addition & 0 deletions mmseg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings

import mmcv
Expand Down
1 change: 1 addition & 0 deletions mmseg/apis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .inference import inference_segmentor, init_segmentor, show_result_pyplot
from .test import multi_gpu_test, single_gpu_test
from .train import get_root_logger, set_random_seed, train_segmentor
Expand Down
1 change: 1 addition & 0 deletions mmseg/apis/inference.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import matplotlib.pyplot as plt
import mmcv
import torch
Expand Down
1 change: 1 addition & 0 deletions mmseg/apis/test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp
import tempfile

Expand Down
1 change: 1 addition & 0 deletions mmseg/apis/train.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import random
import warnings

Expand Down
1 change: 1 addition & 0 deletions mmseg/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .evaluation import * # noqa: F401, F403
from .seg import * # noqa: F401, F403
from .utils import * # noqa: F401, F403
1 change: 1 addition & 0 deletions mmseg/core/evaluation/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .class_names import get_classes, get_palette
from .eval_hooks import DistEvalHook, EvalHook
from .metrics import eval_metrics, mean_dice, mean_fscore, mean_iou
Expand Down
1 change: 1 addition & 0 deletions mmseg/core/evaluation/class_names.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import mmcv


Expand Down
1 change: 1 addition & 0 deletions mmseg/core/evaluation/eval_hooks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp

import torch.distributed as dist
Expand Down
1 change: 1 addition & 0 deletions mmseg/core/evaluation/metrics.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from collections import OrderedDict

import mmcv
Expand Down
1 change: 1 addition & 0 deletions mmseg/core/seg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .builder import build_pixel_sampler
from .sampler import BasePixelSampler, OHEMPixelSampler

Expand Down
1 change: 1 addition & 0 deletions mmseg/core/seg/builder.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from mmcv.utils import Registry, build_from_cfg

PIXEL_SAMPLERS = Registry('pixel sampler')
Expand Down
1 change: 1 addition & 0 deletions mmseg/core/seg/sampler/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .base_pixel_sampler import BasePixelSampler
from .ohem_pixel_sampler import OHEMPixelSampler

Expand Down
1 change: 1 addition & 0 deletions mmseg/core/seg/sampler/base_pixel_sampler.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from abc import ABCMeta, abstractmethod


Expand Down
1 change: 1 addition & 0 deletions mmseg/core/seg/sampler/ohem_pixel_sampler.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn.functional as F

Expand Down
1 change: 1 addition & 0 deletions mmseg/core/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .misc import add_prefix

__all__ = ['add_prefix']
1 change: 1 addition & 0 deletions mmseg/core/utils/misc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
def add_prefix(inputs, prefix):
"""Add prefix for dict.

Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .ade import ADE20KDataset
from .builder import DATASETS, PIPELINES, build_dataloader, build_dataset
from .chase_db1 import ChaseDB1Dataset
Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/ade.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp
import tempfile

Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/builder.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import copy
import platform
import random
Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/chase_db1.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp

from .builder import DATASETS
Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/cityscapes.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp
import tempfile

Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/custom.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os
import os.path as osp
from collections import OrderedDict
Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/dataset_wrappers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from torch.utils.data.dataset import ConcatDataset as _ConcatDataset

from .builder import DATASETS
Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/drive.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp

from .builder import DATASETS
Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/hrf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp

from .builder import DATASETS
Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/pascal_context.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp

from .builder import DATASETS
Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/pipelines/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .compose import Compose
from .formating import (Collect, ImageToTensor, ToDataContainer, ToTensor,
Transpose, to_tensor)
Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/pipelines/compose.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import collections

from mmcv.utils import build_from_cfg
Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/pipelines/formating.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from collections.abc import Sequence

import mmcv
Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/pipelines/loading.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp

import mmcv
Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/pipelines/test_time_aug.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings

import mmcv
Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/pipelines/transforms.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import mmcv
import numpy as np
from mmcv.utils import deprecated_api_warning, is_tuple_of
Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/stare.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp

from .builder import DATASETS
Expand Down
1 change: 1 addition & 0 deletions mmseg/datasets/voc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp

from .builder import DATASETS
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .backbones import * # noqa: F401,F403
from .builder import (BACKBONES, HEADS, LOSSES, SEGMENTORS, build_backbone,
build_head, build_loss, build_segmentor)
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/backbones/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .cgnet import CGNet
from .fast_scnn import FastSCNN
from .hrnet import HRNet
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/backbones/cgnet.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings

import torch
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/backbones/fast_scnn.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn as nn
from mmcv.cnn import ConvModule, DepthwiseSeparableConvModule
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/backbones/hrnet.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings

import torch.nn as nn
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/backbones/mit.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import math
import warnings

Expand Down
1 change: 1 addition & 0 deletions mmseg/models/backbones/mobilenet_v2.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings

import torch.nn as nn
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/backbones/mobilenet_v3.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings

import mmcv
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/backbones/resnest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import math

import torch
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/backbones/resnet.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings

import torch.nn as nn
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/backbones/resnext.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import math

from mmcv.cnn import build_conv_layer, build_norm_layer
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/backbones/swin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings
from copy import deepcopy

Expand Down
1 change: 1 addition & 0 deletions mmseg/models/backbones/unet.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings

import torch.nn as nn
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/backbones/vit.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import math
import warnings

Expand Down
1 change: 1 addition & 0 deletions mmseg/models/builder.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings

from mmcv.cnn import MODELS as MMCV_MODELS
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .ann_head import ANNHead
from .apc_head import APCHead
from .aspp_head import ASPPHead
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/ann_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn as nn
from mmcv.cnn import ConvModule
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/apc_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn as nn
import torch.nn.functional as F
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/aspp_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn as nn
from mmcv.cnn import ConvModule
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/cascade_decode_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from abc import ABCMeta, abstractmethod

from .decode_head import BaseDecodeHead
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/cc_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch

from ..builder import HEADS
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/da_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn.functional as F
from mmcv.cnn import ConvModule, Scale
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/decode_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from abc import ABCMeta, abstractmethod

import torch
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/dm_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn as nn
import torch.nn.functional as F
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/dnl_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
from mmcv.cnn import NonLocal2d
from torch import nn
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/ema_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import math

import torch
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/enc_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn as nn
import torch.nn.functional as F
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/fcn_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn as nn
from mmcv.cnn import ConvModule
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/fpn_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import numpy as np
import torch.nn as nn
from mmcv.cnn import ConvModule
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/gc_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
from mmcv.cnn import ContextBlock

Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/lraspp_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn as nn
from mmcv import is_tuple_of
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/nl_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
from mmcv.cnn import NonLocal2d

Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/ocr_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn as nn
import torch.nn.functional as F
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/point_head.py
Original file line number Diff line number Diff line change
@@ -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

import torch
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/psa_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn as nn
import torch.nn.functional as F
Expand Down
1 change: 1 addition & 0 deletions mmseg/models/decode_heads/psp_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn as nn
from mmcv.cnn import ConvModule
Expand Down
Loading