Skip to content

Commit

Permalink
[Docs] Add header for files (open-mmlab#5900)
Browse files Browse the repository at this point in the history
* [Docs] Add header for files

* update license copyright

* add copyright header

* add copyright header tools

* delete add header code
  • Loading branch information
BIGWangYuDong authored Aug 24, 2021
1 parent 15f1882 commit bde7b4b
Show file tree
Hide file tree
Showing 428 changed files with 429 additions and 4 deletions.
1 change: 1 addition & 0 deletions .dev_scripts/batch_test_list.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
# yapf: disable
atss = dict(
config='configs/atss/atss_r50_fpn_1x_coco.py',
Expand Down
1 change: 1 addition & 0 deletions .dev_scripts/benchmark_filter.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 .dev_scripts/benchmark_inference_fps.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 .dev_scripts/benchmark_test_image.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import logging
import os.path as osp
from argparse import ArgumentParser
Expand Down
1 change: 1 addition & 0 deletions .dev_scripts/convert_test_benchmark_script.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 .dev_scripts/convert_train_benchmark_script.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 .dev_scripts/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_scripts/gather_test_benchmark_metric.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 os.path as osp
Expand Down
1 change: 1 addition & 0 deletions .dev_scripts/gather_train_benchmark_metric.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 os.path as osp
Expand Down
1 change: 1 addition & 0 deletions .dev_scripts/test_init_backbone.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
"""Check out backbone whether successfully load pretrained checkpoint."""
import copy
import os
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2018-2019 Open-MMLab. All rights reserved.
Copyright 2018-2023 OpenMMLab. All rights reserved.

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -188,7 +188,7 @@ Copyright 2018-2019 Open-MMLab. All rights reserved.
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018-2019 Open-MMLab.
Copyright 2018-2023 OpenMMLab.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions demo/create_result_gif.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.
import asyncio
from argparse import ArgumentParser

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

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

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

from .version import __version__, short_version
Expand Down
1 change: 1 addition & 0 deletions mmdet/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 (async_inference_detector, inference_detector,
init_detector, show_result_pyplot)
from .test import multi_gpu_test, single_gpu_test
Expand Down
1 change: 1 addition & 0 deletions mmdet/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 mmcv
Expand Down
1 change: 1 addition & 0 deletions mmdet/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 mmdet/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 mmdet/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .anchor import * # noqa: F401, F403
from .bbox import * # noqa: F401, F403
from .evaluation import * # noqa: F401, F403
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/anchor/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .anchor_generator import (AnchorGenerator, LegacyAnchorGenerator,
YOLOAnchorGenerator)
from .builder import (ANCHOR_GENERATORS, PRIOR_GENERATORS,
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/anchor/anchor_generator.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 mmdet/core/anchor/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.utils import Registry, build_from_cfg
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/anchor/point_generator.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
from torch.nn.modules.utils import _pair
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/anchor/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch


Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .assigners import (AssignResult, BaseAssigner, CenterRegionAssigner,
MaxIoUAssigner, RegionAssigner)
from .builder import build_assigner, build_bbox_coder, build_sampler
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/assigners/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .approx_max_iou_assigner import ApproxMaxIoUAssigner
from .assign_result import AssignResult
from .atss_assigner import ATSSAssigner
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/assigners/approx_max_iou_assigner.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 BBOX_ASSIGNERS
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/assigners/assign_result.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch

from mmdet.utils import util_mixins
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/assigners/atss_assigner.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 BBOX_ASSIGNERS
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/assigners/base_assigner.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 mmdet/core/bbox/assigners/center_region_assigner.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 BBOX_ASSIGNERS
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/assigners/grid_assigner.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 BBOX_ASSIGNERS
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/assigners/hungarian_assigner.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 BBOX_ASSIGNERS
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/assigners/max_iou_assigner.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 BBOX_ASSIGNERS
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/assigners/point_assigner.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 BBOX_ASSIGNERS
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/assigners/region_assigner.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch

from mmdet.core import anchor_inside_flags
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/assigners/sim_ota_assigner.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 mmdet/core/bbox/assigners/uniform_assigner.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 BBOX_ASSIGNERS
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/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

BBOX_ASSIGNERS = Registry('bbox_assigner')
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/coder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .base_bbox_coder import BaseBBoxCoder
from .bucketing_bbox_coder import BucketingBBoxCoder
from .delta_xywh_bbox_coder import DeltaXYWHBBoxCoder
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/coder/base_bbox_coder.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 mmdet/core/bbox/coder/bucketing_bbox_coder.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
import torch
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/coder/delta_xywh_bbox_coder.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
import torch
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/coder/legacy_delta_xywh_bbox_coder.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
import torch
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/coder/pseudo_bbox_coder.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from ..builder import BBOX_CODERS
from .base_bbox_coder import BaseBBoxCoder

Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/coder/tblr_bbox_coder.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import mmcv
import torch

Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/coder/yolo_bbox_coder.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import mmcv
import torch

Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/demodata.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 mmdet/core/bbox/iou_calculators/__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_iou_calculator
from .iou2d_calculator import BboxOverlaps2D, bbox_overlaps

Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/iou_calculators/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

IOU_CALCULATORS = Registry('IoU calculator')
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/iou_calculators/iou2d_calculator.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 IOU_CALCULATORS
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/match_costs/__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_match_cost
from .match_cost import BBoxL1Cost, ClassificationCost, FocalLossCost, IoUCost

Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/match_costs/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

MATCH_COST = Registry('Match Cost')
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/match_costs/match_cost.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch

from mmdet.core.bbox.iou_calculators import bbox_overlaps
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/samplers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .base_sampler import BaseSampler
from .combined_sampler import CombinedSampler
from .instance_balanced_pos_sampler import InstanceBalancedPosSampler
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/samplers/base_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

import torch
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/samplers/combined_sampler.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from ..builder import BBOX_SAMPLERS, build_sampler
from .base_sampler import BaseSampler

Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/samplers/instance_balanced_pos_sampler.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 mmdet/core/bbox/samplers/iou_balanced_neg_sampler.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 mmdet/core/bbox/samplers/ohem_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 ..builder import BBOX_SAMPLERS
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/samplers/pseudo_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 ..builder import BBOX_SAMPLERS
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/samplers/random_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 ..builder import BBOX_SAMPLERS
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/samplers/sampling_result.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import torch

from mmdet.utils import util_mixins
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/samplers/score_hlr_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 mmcv.ops import nms_match

Expand Down
1 change: 1 addition & 0 deletions mmdet/core/bbox/transforms.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 mmdet/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 (cityscapes_classes, coco_classes, dataset_aliases,
get_classes, imagenet_det_classes,
imagenet_vid_classes, voc_classes)
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/evaluation/bbox_overlaps.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


Expand Down
1 change: 1 addition & 0 deletions mmdet/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 mmdet/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 mmdet/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.
from multiprocessing import Pool

import mmcv
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/evaluation/recall.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 numpy as np
Expand Down
1 change: 1 addition & 0 deletions mmdet/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 .onnx_helper import (add_dummy_nms_for_onnx, dynamic_clip_for_onnx,
get_k_for_topk)
from .pytorch2onnx import (build_model_from_cfg,
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/export/model_wrappers.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 mmdet/core/export/onnx_helper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os

import torch
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/export/pytorch2onnx.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

import mmcv
Expand Down
1 change: 1 addition & 0 deletions mmdet/core/hook/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .checkloss_hook import CheckInvalidLossHook
from .ema import ExpMomentumEMAHook, LinearMomentumEMAHook
from .sync_norm_hook import SyncNormHook
Expand Down
Loading

0 comments on commit bde7b4b

Please sign in to comment.