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

[Docs] Add Copyright information. #413

Merged
merged 1 commit 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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2020 MMClassification Authors. All rights reserved.
Copyright (c) OpenMMLab. All rights reserved

Apache License
Version 2.0, January 2004
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 mmcls.apis import inference_model, init_model, show_result_pyplot
Expand Down
1 change: 1 addition & 0 deletions mmcls/__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 mmcls/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_model, init_model, show_result_pyplot
from .test import multi_gpu_test, single_gpu_test
from .train import set_random_seed, train_model
Expand Down
1 change: 1 addition & 0 deletions mmcls/apis/inference.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings

import matplotlib.pyplot as plt
Expand Down
1 change: 1 addition & 0 deletions mmcls/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 pickle
import shutil
Expand Down
1 change: 1 addition & 0 deletions mmcls/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 mmcls/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 .fp16 import * # noqa: F401, F403
from .utils import * # noqa: F401, F403
1 change: 1 addition & 0 deletions mmcls/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 .eval_hooks import DistEvalHook, EvalHook
from .eval_metrics import (calculate_confusion_matrix, f1_score, precision,
precision_recall_f1, recall, support)
Expand Down
1 change: 1 addition & 0 deletions mmcls/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 warnings

Expand Down
1 change: 1 addition & 0 deletions mmcls/core/evaluation/eval_metrics.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from numbers import Number

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions mmcls/core/evaluation/mean_ap.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

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

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions mmcls/core/export/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .test import ONNXRuntimeClassifier, TensorRTClassifier

__all__ = ['ONNXRuntimeClassifier', 'TensorRTClassifier']
1 change: 1 addition & 0 deletions mmcls/core/export/test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions mmcls/core/fp16/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .decorators import auto_fp16, force_fp32
from .hooks import Fp16OptimizerHook, wrap_fp16_model

Expand Down
1 change: 1 addition & 0 deletions mmcls/core/fp16/decorators.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import functools
from inspect import getfullargspec

Expand Down
1 change: 1 addition & 0 deletions mmcls/core/fp16/hooks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import copy

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

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions mmcls/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 .dist_utils import DistOptimizerHook, allreduce_grads
from .misc import multi_apply

Expand Down
1 change: 1 addition & 0 deletions mmcls/core/utils/dist_utils.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 torch.distributed as dist
Expand Down
1 change: 1 addition & 0 deletions mmcls/core/utils/misc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from functools import partial


Expand Down
1 change: 1 addition & 0 deletions mmcls/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .base_dataset import BaseDataset
from .builder import DATASETS, PIPELINES, build_dataloader, build_dataset
from .cifar import CIFAR10, CIFAR100
Expand Down
1 change: 1 addition & 0 deletions mmcls/datasets/base_dataset.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import copy
from abc import ABCMeta, abstractmethod

Expand Down
1 change: 1 addition & 0 deletions mmcls/datasets/builder.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import platform
import random
from distutils.version import LooseVersion
Expand Down
1 change: 1 addition & 0 deletions mmcls/datasets/cifar.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
import pickle
Expand Down
1 change: 1 addition & 0 deletions mmcls/datasets/dataset_wrappers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import bisect
import math
from collections import defaultdict
Expand Down
1 change: 1 addition & 0 deletions mmcls/datasets/imagenet.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions mmcls/datasets/mnist.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import codecs
import os
import os.path as osp
Expand Down
1 change: 1 addition & 0 deletions mmcls/datasets/multi_label.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions mmcls/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 .auto_augment import (AutoAugment, AutoContrast, Brightness,
ColorTransform, Contrast, Cutout, Equalize, Invert,
Posterize, RandAugment, Rotate, Sharpness, Shear,
Expand Down
1 change: 1 addition & 0 deletions mmcls/datasets/pipelines/auto_augment.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import copy
import random
from numbers import Number
Expand Down
1 change: 1 addition & 0 deletions mmcls/datasets/pipelines/compose.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

from mmcv.utils import build_from_cfg
Expand Down
1 change: 1 addition & 0 deletions mmcls/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 mmcls/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 mmcls/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 inspect
import math
import random
Expand Down
1 change: 1 addition & 0 deletions mmcls/datasets/samplers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .distributed_sampler import DistributedSampler

__all__ = ['DistributedSampler']
1 change: 1 addition & 0 deletions mmcls/datasets/samplers/distributed_sampler.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch
from torch.utils.data import DistributedSampler as _DistributedSampler

Expand Down
1 change: 1 addition & 0 deletions mmcls/datasets/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import gzip
import hashlib
import os
Expand Down
1 change: 1 addition & 0 deletions mmcls/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
import xml.etree.ElementTree as ET

Expand Down
1 change: 1 addition & 0 deletions mmcls/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, CLASSIFIERS, HEADS, LOSSES, NECKS,
build_backbone, build_classifier, build_head, build_loss,
Expand Down
1 change: 1 addition & 0 deletions mmcls/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 .alexnet import AlexNet
from .lenet import LeNet5
from .mobilenet_v2 import MobileNetV2
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/backbones/alexnet.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch.nn as nn

from ..builder import BACKBONES
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/backbones/base_backbone.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 mmcv.runner import BaseModule
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/backbones/lenet.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch.nn as nn

from ..builder import BACKBONES
Expand Down
1 change: 1 addition & 0 deletions mmcls/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 torch.nn as nn
import torch.utils.checkpoint as cp
from mmcv.cnn import ConvModule
Expand Down
1 change: 1 addition & 0 deletions mmcls/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.
from mmcv.cnn import ConvModule
from torch.nn.modules.batchnorm import _BatchNorm

Expand Down
1 change: 1 addition & 0 deletions mmcls/models/backbones/regnet.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 build_conv_layer, build_norm_layer
Expand Down
1 change: 1 addition & 0 deletions mmcls/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 torch
import torch.nn as nn
import torch.nn.functional as F
Expand Down
1 change: 1 addition & 0 deletions mmcls/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 torch.nn as nn
import torch.utils.checkpoint as cp
from mmcv.cnn import (ConvModule, build_conv_layer, build_norm_layer,
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/backbones/resnet_cifar.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch.nn as nn
from mmcv.cnn import build_conv_layer, build_norm_layer

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

from ..builder import BACKBONES
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/backbones/seresnet.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch.utils.checkpoint as cp

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

from ..builder import BACKBONES
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/backbones/shufflenet_v1.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.utils.checkpoint as cp
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/backbones/shufflenet_v2.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.utils.checkpoint as cp
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/backbones/swin_transformer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from copy import deepcopy
from typing import Sequence

Expand Down
1 change: 1 addition & 0 deletions mmcls/models/backbones/tnt.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 mmcls/models/backbones/vgg.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch.nn as nn
from mmcv.cnn import ConvModule
from mmcv.utils.parrots_wrapper import _BatchNorm
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/backbones/vision_transformer.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 (build_activation_layer, build_conv_layer,
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/builder.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from mmcv.cnn import MODELS as MMCV_MODELS
from mmcv.cnn.bricks.registry import ATTENTION as MMCV_ATTENTION
from mmcv.utils import Registry
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/classifiers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .base import BaseClassifier
from .image import ImageClassifier

Expand Down
1 change: 1 addition & 0 deletions mmcls/models/classifiers/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import warnings
from abc import ABCMeta, abstractmethod
from collections import OrderedDict
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/classifiers/image.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import copy
import warnings

Expand Down
1 change: 1 addition & 0 deletions mmcls/models/heads/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .cls_head import ClsHead
from .linear_head import LinearClsHead
from .multi_label_head import MultiLabelClsHead
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/heads/base_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 mmcv.runner import BaseModule
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/heads/cls_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

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

Expand Down
1 change: 1 addition & 0 deletions mmcls/models/heads/multi_label_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

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

Expand Down
1 change: 1 addition & 0 deletions mmcls/models/heads/stacked_head.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from typing import Dict, Sequence

import torch.nn as nn
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/heads/vision_transformer_head.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 torch.nn as nn
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/losses/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .accuracy import Accuracy, accuracy
from .asymmetric_loss import AsymmetricLoss, asymmetric_loss
from .cross_entropy_loss import (CrossEntropyLoss, binary_cross_entropy,
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/losses/accuracy.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from numbers import Number

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions mmcls/models/losses/asymmetric_loss.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

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

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

Expand Down
1 change: 1 addition & 0 deletions mmcls/models/losses/label_smooth_loss.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 mmcls/models/losses/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import functools

import torch
Expand Down
Loading