OpenMMLab Computer Vision Foundation

Related tags

Deep Learning mmcv
Overview

PyPI - Python Version PyPI badge codecov license

English | 简体中文

Introduction

MMCV is a foundational library for computer vision research and supports many research projects as below:

  • MMCV: OpenMMLab foundational library for computer vision.
  • MIM: MIM Installs OpenMMLab Packages.
  • MMClassification: OpenMMLab image classification toolbox and benchmark.
  • MMDetection: OpenMMLab detection toolbox and benchmark.
  • MMDetection3D: OpenMMLab's next-generation platform for general 3D object detection.
  • MMSegmentation: OpenMMLab semantic segmentation toolbox and benchmark.
  • MMAction2: OpenMMLab's next-generation action understanding toolbox and benchmark.
  • MMTracking: OpenMMLab video perception toolbox and benchmark.
  • MMPose: OpenMMLab pose estimation toolbox and benchmark.
  • MMEditing: OpenMMLab image and video editing toolbox.
  • MMOCR: A Comprehensive Toolbox for Text Detection, Recognition and Understanding.
  • MMGeneration: OpenMMLab image and video generative models toolbox.
  • MMFlow: OpenMMLab optical flow toolbox and benchmark.

It provides the following functionalities.

  • Universal IO APIs
  • Image/Video processing
  • Image and annotation visualization
  • Useful utilities (progress bar, timer, ...)
  • PyTorch runner with hooking mechanism
  • Various CNN architectures
  • High-quality implementation of common CUDA ops

See the documentation for more features and usage.

Note: MMCV requires Python 3.6+.

Installation

There are two versions of MMCV:

  • mmcv-full: comprehensive, with full features and various CUDA ops out of box. It takes longer time to build.
  • mmcv: lite, without CUDA ops but all other features, similar to mmcv<1.0.0. It is useful when you do not need those CUDA ops.

Note: Do not install both versions in the same environment, otherwise you may encounter errors like ModuleNotFound. You need to uninstall one before installing the other. Installing the full version is highly recommended if CUDA is available.

a. Install the full version.

Before installing mmcv-full, make sure that PyTorch has been successfully installed following the official guide.

We provide pre-built mmcv packages (recommended) with different PyTorch and CUDA versions to simplify the building. In addition, you can run check_installation.py to check the installation of mmcv-full after running the installation commands.

i. Install the latest version.

The rule for installing the latest mmcv-full is as follows:

pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html

Please replace {cu_version} and {torch_version} in the url to your desired one. For example, to install the latest mmcv-full with CUDA 11.1 and PyTorch 1.9.0, use the following command:

pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9.0/index.html

Note: mmcv-full is only compiled on PyTorch 1.x.0 because the compatibility usually holds between 1.x.0 and 1.x.1. If your PyTorch version is 1.x.1, you can install mmcv-full compiled with PyTorch 1.x.0 and it usually works well. For example, if your PyTorch version is 1.8.1 and CUDA version is 11.1, you can use the following command to install mmcv-full.

pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.8.0/index.html

For more details, please refer the the following tables and delete =={mmcv_version}.

ii. Install a specified version.

The rule for installing a specified mmcv-full is as follows:

pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html

First of all, please refer to the Releases and replace {mmcv_version} a specified one. e.g. 1.3.9. Then replace {cu_version} and {torch_version} in the url to your desired versions. For example, to install mmcv-full==1.3.9 with CUDA 11.1 and PyTorch 1.9.0, use the following command:

pip install mmcv-full==1.3.9 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9.0/index.html

For more details, please refer the the following tables.

CUDA torch1.10 torch1.9 torch1.8 torch1.7 torch1.6 torch1.5
11.3
install
pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10.0/index.html
11.1
install
pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.10.0/index.html
install
pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9.0/index.html
install
pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.8.0/index.html
11.0
install
pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu110/torch1.7.0/index.html
10.2
install
pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.10.0/index.html
install
pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.9.0/index.html
install
pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.8.0/index.html
install
pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.7.0/index.html
install
pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.6.0/index.html
install
pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.5.0/index.html
10.1
install
 pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.8.0/index.html
install
 pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.7.0/index.html
install
 pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.6.0/index.html
install
 pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.5.0/index.html
9.2
install
 pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu92/torch1.7.0/index.html
install
 pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu92/torch1.6.0/index.html
install
 pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cu92/torch1.5.0/index.html
cpu
install
 pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.10.0/index.html
install
 pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.9.0/index.html
install
 pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.8.0/index.html
install
 pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.7.0/index.html
install
 pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.6.0/index.html
install
 pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.5.0/index.html

Note: The pre-built packages provided above do not include all versions of mmcv-full, you can click on the corresponding links to see the supported versions. For example, you can click cu102-torch1.8.0 and you can see that cu102-torch1.8.0 only provides 1.3.0 and above versions of mmcv-full. In addition, We no longer provide mmcv-full pre-built packages compiled with PyTorch 1.3 & 1.4 since v1.3.17. You can find previous versions that compiled with PyTorch 1.3 & 1.4 here. The compatibility is still ensured in our CI, but we will discard the support of PyTorch 1.3 & 1.4 next year.

Another way is to compile locally by running

pip install mmcv-full

Note that the local compiling may take up to 10 mins.

b. Install the lite version.

pip install mmcv

c. Install full version with custom operators for onnxruntime

  • Check here for detailed instruction.

If you would like to build MMCV from source, please refer to the guide.

FAQ

If you face some installation issues, CUDA related issues or RuntimeErrors, you may first refer to this Frequently Asked Questions.

Citation

If you find this project useful in your research, please consider cite:

@misc{mmcv,
    title={{MMCV: OpenMMLab} Computer Vision Foundation},
    author={MMCV Contributors},
    howpublished = {\url{https://github.com/open-mmlab/mmcv}},
    year={2018}
}

Contributing

We appreciate all contributions to improve MMCV. Please refer to CONTRIBUTING.md for the contributing guideline.

License

MMCV is released under the Apache 2.0 license, while some specific operations in this library are with other licenses. Please refer to LICENSES.md for the careful check, if you are using our code for commercial matters.

Comments
  • Support receptive field search of CNN models. (TPAMI paper rf-next)

    Support receptive field search of CNN models. (TPAMI paper rf-next)

    Motivation

    Merging a general receptive field search method to mmcv and mmdet. (paper: RF-Next: Efficient Receptive Field Search for Convolutional Neural Networks TPAMI 2022 pdf)

    Modification

    The RFSearch module is included.

    BC-breaking (Optional)

    Does the modification introduce changes that break the backward-compatibility of the downstream repositories? If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

    Use cases (Optional)

    If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

    This pr is a part of pr in mmdet https://github.com/open-mmlab/mmdetection/pull/8191

    Checklist

    Before PR:

    • [x] I have read and followed the workflow indicated in the CONTRIBUTING.md to create this PR.
    • [x] Pre-commit or linting tools indicated in CONTRIBUTING.md are used to fix the potential lint issues.
    • [ ] Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
    • [ ] New functionalities are covered by complete unit tests. If not, please add more unit test to ensure the correctness.
    • [ ] The documentation has been modified accordingly, including docstring or example tutorials.

    After PR:

    • [x] If the modification has potential influence on downstream or other related projects, this PR should be tested with some of those projects, like MMDet or MMCls.
    • [x] CLA has been signed and all committers have signed the CLA in this PR.
    opened by gasvn 36
  • Easy contributions! Add type annotation for mmcv~

    Easy contributions! Add type annotation for mmcv~

    Hi guys, we are planning to add type annotation for python code in MMCV. PRs of adding type annotation from community are welcomed :stuck_out_tongue_closed_eyes:. To make the community fully aware of the progress, we list the progress here. Please feel free to leave a message and create a PR if you are willing to add type annotation for one of the following modules :rocket::rocket:.

    opened by HAOCHENYE 33
  • Installation takes forever

    Installation takes forever

    Hi guys,

    I am running

     pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu110/torch1.9.0/index.html
    

    On a quite powerful 8 core machine and the installation takes forever, more than 30m. The process is stuck at Building wheel for mmcv-full (setup.py) ... |

    I am wondering if this is okay.

    Thank you :)

    Francesco

    Installation 
    opened by FrancescoSaverioZuppichini 29
  • [Feature] Add CRF module

    [Feature] Add CRF module

    Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

    Motivation

    add the crf block, and crf can improve the model capability

    Modification

    add the crf module and test_crf.py

    BC-breaking (Optional)

    Does the modification introduce changes that break the backward-compatibility of the downstream repositories? If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

    Use cases (Optional)

    If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

    Checklist

    Before PR:

    • [x] I have read and followed the workflow indicated in the CONTRIBUTING.md to create this PR.
    • [ ] Pre-commit or linting tools indicated in CONTRIBUTING.md are used to fix the potential lint issues.
    • [ ] Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
    • [ ] New functionalities are covered by complete unit tests. If not, please add more unit test to ensure the correctness.
    • [ ] The documentation has been modified accordingly, including docstring or example tutorials.

    After PR:

    • [x] If the modification has potential influence on downstream or other related projects, this PR should be tested with some of those projects, like MMDet or MMCls.
    • [ ] CLA has been signed and all committers have signed the CLA in this PR.
    Waiting for Design 
    opened by 459737087 28
  • runner constructor

    runner constructor

    Add RunnerConstructor feature to build_runner.

    It will not effect the original code feature, but just an enhancement.

    Refer here for more details: issue1225

    opened by densechen 25
  • ModuleNotFoundError: No module named 'mmcv._ext'

    ModuleNotFoundError: No module named 'mmcv._ext'

    I clone the repo and run pip install.

    When I run test_image.py, this error shows up.

    https://github.com/open-mmlab/mmcv/blob/120c6a64daefe97d451cbea4eae15af0ade50a17/mmcv/video/optflow.py#L4

    opened by Liyw979 22
  • [Fix] Restrict the warning message

    [Fix] Restrict the warning message

    Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

    Motivation

    When I implemented a CenterNet2 model in mmdet, there was a situation when I had to use GroupNorm after Conv2d, and the Conv2d layer was supposed to have a bias. Once I finished the modeling part, I got a warning message 'ConvModule has norm and bias at the same time'. At first, I was not so sure about this warning, it made me uneased. Then I did a little research and realized that for BatchNorm (not so sure about SyncBN), the bias does not affect the calculation. But for other kinds of Norm, e.g., GN, I am pretty sure the bias does give some influence. I think maybe we should restrict the popping of this warning message, since it can be quite misleading for new starters.

    Modification

    Restrict a warning message of 'ConvModule has norm and bias at the same time' to BN, BN1, BN2 and BN3 normalization.

    BC-breaking (Optional)

    Does the modification introduce changes that break the backward-compatibility of the downstream repos? If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

    Use cases (Optional)

    If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

    Checklist

    1. Pre-commit or other linting tools are used to fix the potential lint issues.
    2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
    3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMCls.
    4. The documentation has been modified accordingly, like docstring or example tutorials.
    opened by yyz561 19
  • [Feature] Add EvalHook which will be used in downstream projects

    [Feature] Add EvalHook which will be used in downstream projects

    Overview

    This PR adds mmcv/runner/hooks/eval.py file and EvalHook and DistEvalHook to MMCV together with related unittest parts. Since those two hooks have been widely used in many MM repos, this PR implements and unifies common functions used in the evaluation part.

    Design

    Model Evaluation performed in OpenMMLab uses EvalHook and DistEvalHook during training.

    In detail, the those hooks are commonly registered in apis/train.py by runner.register_hook(eval_hook(val_dataloader, **eval_cfg)). Users can initialize their models with following steps:

    1. Define validation dataset by assigning cfg.data.val, building val_datasetloader
    2. Register EvalHook using runner.register_hook.

    Once registering it, runner will periodically call the evaluate function to perform evaluation in a fixed mode (by epoch or by iteration, etc.). The high-level workflow of EvalHook in OpenMMLab is:

    register EvalHook -> define evaluation setting (start, interval, by_epoch, save_best, comparison rules, etc.) -> perform evaluation after_train_iter or after_train_epoch -> (save the best checkpoint) -> loop back to after_train_xxx

    APIs

    EvalHook is the base module, and DistEvalHook is a child class to it. They both inherit Hook. Here is the APIs explanation for EvalHook.

    Initialization

    • dataloader: The PyTorch dataloader for evaluation. It can be built with build_dataloader with provided dataloader setting.

    • start: Evaluation starting epoch. It enables evaluation before the training starts if start <= the resuming epoch. If set to None, whether to evaluate is merely decided by interval.

    • interval: Evaluation interval.

    • by_epoch: Determine whether to perform evaluation by epoch or by iteration. If set to True, it will perform by epoch. Otherwise, by iteration.

    • save_best: If a metric is specified, it would measure the best checkpoint during evaluation. The information about best checkpoint would be save in runner.meta['hook_msgs']. Options are the evaluation metrics to the validation dataset. e.g., bbox_mAP, segm_mAP for bbox detection and instance segmentation. AR@100 for proposal recall. If save_best is auto, the first key of the returned OrderedDict result will be used. The interval of CheckpointHook should be divisible by that of EvalHook.

    • rule: Comparison rule for best score. If set to None, it will infer a reasonable rule. Keys such as acc, top, etc. will be inferred by greater rule. Keys contain loss will be inferred by less rule. Options are greater, less, None.

      But Note: Since the rule for downstream repos are different, it may need to overwrite the self.greater_keys and self.less_keys

    • eval_kwargs: Key word arguments for dataset evaluate function (def evaluate), which will be fed into the evaluate function of the dataset.

    • Other hardcoded inner variables: rule_map, init_value_map, greater_keys and less_keys.

      Note that: Since the rule for downstream repos are different, it may need to overwrite these variable due to the specific task.

      • rule_map: A dict containing comparison function, default as {'greater': lambda x, y: x > y, 'less': lambda x, y: x < y}.
      • init_value_map: The initialized value for comparison, default as {'greater': -inf, 'less': inf}.
      • greater_keys: A list containing some rule keys applied for greater function, which means in these rules EvalHook regards greater number as the better one. Note that: If a string is one of the rules' substring, it will be applied to greater function. e.g., for acc: top1_acc, top5_acc, mean_acc are all applied to greater rule.
      • less_keys: Similar to greater_keys but it is for less rules. e.g., for loss: bce_loss, bmn_loss are all applied to less rule.

    before_run

    This part is to initialize runner.meta.hook_msgs, if users determine to save the best checkpoint.

    before_train_xxx

    For before_train_iter and before_train_epoch part. It is mainly to determine whether it is the right time to perform evaluation by examining:

    • Whether it is the correct time to perform evaluation according to by_epoch
    • Whether it achieves the start to perform evaluation

    And use self.initial_flag to indicate whether the EvalHook gets into the normal evaluation loop. After getting into the normal evaluation loop, before_train_xxx will be skipped.

    after_train_xxx

    For after_train_iter and after_train_epoch part. It is mainly to inference the model and do evaluation, as well as save the best checkpoint if save_best is specified. In detail, it will call _do_evaluate() and _save_best().

    • _do_evaluate(): inference the model by calling single_gpu_test(), do evaluation and call _save_best()
    • _save_best(): compare the score according to the rule, write info into runner.meta['hook_msgs'] and save the best checkpoint in the work_dir

    For DistEvalHook, besides the variable and function mentioned above, it inferences model by calling multi_gpu_test() and assigns tmpdir, gpu_collect for multi_gpu_test()

    Usages

    Users adopt EvalHook by typing in --validate for training command, it will call EvalHook in training.

    Config

    To use EvalHook with a specific setting, users need to modify the evaluation variable in config files. like this:

    evaluation = dict(
        interval=1, metrics=['top_k_accuracy', 'mean_class_accuracy'])
    

    the key-value pairs in the dict are corresponding to EvalHook API.

    Migration

    Since the key for determine greater an less is related to the downstream task, downstream repos may need to overwrite the self.greater_keys and self.less_keys:

    from mmcv.runner import EvalHook as BasicEvalHook
    
    class EvalHook(BasicEvalHook):
    
        greater_keys = ['a', 'b']
        less_keys = ['c']
    
        def __init__(self, *args, **kwargs):
            super().__init__(*args, **kwargs)
    
    opened by dreamerlin 19
  • TypeError: init_weights() missing 1 required positional argument: 'pretrained'

    TypeError: init_weights() missing 1 required positional argument: 'pretrained'

    File "tools/train.py", line 189, in main() File "tools/train.py", line 163, in main model.init_weights() File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmcv\runner\base_module.py", line 117, in init_weights m.init_weights() TypeError: init_weights() missing 1 required positional argument: 'pretrained'

    Downstream 
    opened by apanand14 17
  • Initialization makes no effect.

    Initialization makes no effect.

    I attempt to modify the initialization of the weight of MultiScaleDeformableAttention and implement it as follows. I assign constant 0 values to weight and bias of sampling_offset layer. While initialization, the program goes into reset_parameters function and print 0 as expected. However, at the first forward step, the program prints a large value. I suspect anothre initialization is invoked somewhere. How to address this issue?

    import torch
    import torch.nn as nn
    
    from mmdet.core.bbox import bbox_cxcywh_to_xyxy
    from mmcv.cnn import constant_init, xavier_init
    from mmcv.cnn.bricks.registry import ATTENTION
    from mmcv.ops.multi_scale_deform_attn import MultiScaleDeformableAttnFunction, multi_scale_deformable_attn_pytorch
    from mmcv.runner.base_module import BaseModule
    from mmcv.cnn.bricks.transformer import MultiScaleDeformableAttention
    
    
    @ATTENTION.register_module()
    class MultiScaleRectifiedAttention(MultiScaleDeformableAttention):
        def __init__(self,
                     embed_dims=256,
                     num_heads=8,
                     num_levels=4,
                     num_points=4,
                     im2col_step=64,
                     dropout=0.1,
                     norm_cfg=None,
                     init_cfg=None):
            super(MultiScaleRectifiedAttention, self).__init__(embed_dims, num_heads, num_levels,
                                                               num_points, im2col_step, dropout,
                                                               norm_cfg, init_cfg)
    
            self.reset_parameters()
    
        def reset_parameters(self):
            constant_init(self.sampling_offsets, val=0., bias=0.)
            constant_init(self.attention_weights, val=0., bias=0.)
    
            print(self.sampling_offsets.weight.abs().sum())
            print(self.sampling_offsets.bias.abs().sum())
    
        def forward(self,
                    query,
                    key,
                    value,
                    residual=None,
                    query_pos=None,
                    key_padding_mask=None,
                    reference_points=None,
                    spatial_shapes=None,
                    level_start_index=None,
                    **kwargs):
            print(self.sampling_offsets.weight.abs().sum())
            print(self.sampling_offsets.bias.abs().sum())
    
            if key is None:
                key = query
            if value is None:
                value = key
    
            if residual is None:
                inp_residual = query
            if query_pos is not None:
                query = query + query_pos
    
            # change to (bs, num_query ,embed_dims)
            query = query.permute(1, 0, 2)
            value = value.permute(1, 0, 2)
    
            bs, num_query, _ = query.shape
            bs, num_key, _ = value.shape
            assert (spatial_shapes[:, 0] * spatial_shapes[:, 1]).sum() == num_key
    
            value = self.value_proj(value)
            if key_padding_mask is not None:
                value = value.masked_fill(key_padding_mask[..., None], 0.0)
            value = value.view(bs, num_key, self.num_heads, -1)
            sampling_offsets = self.sampling_offsets(query).view(
                bs, num_query, self.num_heads, self.num_levels, self.num_points, 2)
            attention_weights = self.attention_weights(query).view(
                bs, num_query, self.num_heads, self.num_levels * self.num_points)
            attention_weights = attention_weights.softmax(-1)
    
            attention_weights = attention_weights.view(bs, num_query,
                                                       self.num_heads,
                                                       self.num_levels,
                                                       self.num_points)
            if reference_points.shape[-1] == 2:
                offset_normalizer = torch.stack(
                    [spatial_shapes[..., 1], spatial_shapes[..., 0]], -1)
                sampling_locations = reference_points[:, :, None, :, None, :] \
                                     + sampling_offsets \
                                     / offset_normalizer[None, None, None, :, None, :]
            elif reference_points.shape[-1] == 4:
                sampling_locations = reference_points[:, :, None, :, None, :2] \
                                     + sampling_offsets / self.num_points \
                                     * reference_points[:, :, None, :, None, 2:] \
                                     * 0.5
            else:
                raise ValueError(
                    f'Last dim of reference_points must be'
                    f' 2 or 4, but get {reference_points.shape[-1]} instead.')
            if torch.cuda.is_available():
                output = MultiScaleDeformableAttnFunction.apply(
                    value, spatial_shapes, level_start_index, sampling_locations,
                    attention_weights, self.im2col_step)
            else:
                output = multi_scale_deformable_attn_pytorch(
                    value, spatial_shapes, level_start_index, sampling_locations,
                    attention_weights, self.im2col_step)
            output = self.output_proj(output).permute(1, 0, 2)
            # (num_query, bs ,embed_dims)
            return self.dropout(output) + inp_residual
    

    image

    opened by LuckyDC 17
  • add model registry

    add model registry

    This PR refactored Registry class in following ways:

    1. make build function an attribute of Registry class.

    before:

    model = build_from_cfg(cfg, MODELS)
    

    after:

    model = MODELS.build(cfg)
    

    build function could be configured by passing argument.

    1. Added hierarchy structure for Registry.

    For example, we can define MODEL registry in both MMDetection and MMClassification as followed: In MMDetection:

    from mmcv.utils import Registry
    from mmcv.cnn import MODELS as MMCV_MODELS
    MODELS = Registry('model', parent=MMCV_MODELS)
    
    @MODELS.register_module()
    class NetA(nn.Module):
        def forward(self, x):
            return x
    

    In MMClassification:

    from mmcv.utils import Registry
    from mmcv.cnn import MODELS as MMCV_MODELS
    MODELS = Registry('model', parent=MMCV_MODELS)
    
    @MODELS.register_module()
    class NetB(nn.Module):
        def forward(self, x):
            return x + 1
    

    We could build either NetA or NetB by:

    from mmcv.cnn import MODELS as MMCV_MODELS
    net_a = MMCV_MODELS.build(cfg=dict(type='mmdet.NetA'))
    net_b = MMCV_MODELS.build(cfg=dict(type='mmcls.NetB'))
    

    Modification for MM repos:

    before:

    from mmcv.utils import Registry, build_from_cfg
    BACKBONES = Registry('backbone')
    def build(cfg, registry, default_args=None):
        """Build a module.
    
        Args:
            cfg (dict, list[dict]): The config of modules, is is either a dict
                or a list of configs.
            registry (:obj:`Registry`): A registry the module belongs to.
            default_args (dict, optional): Default arguments to build the module.
                Defaults to None.
    
        Returns:
            nn.Module: A built nn module.
        """
        if isinstance(cfg, list):
            modules = [
                build_from_cfg(cfg_, registry, default_args) for cfg_ in cfg
            ]
            return nn.Sequential(*modules)
        else:
            return build_from_cfg(cfg, registry, default_args)
    
    def build_backbone(cfg):
        """Build backbone."""
        return build(cfg, BACKBONES) 
    

    after:

    from mmcv.cnn import ModelRegistry
    from mmcv.cnn import MODELS as MMCV_MODELS
    MODELS = ModelRegistry('models', parent=MMCV_MODELS)
    def build_model(cfg):
        """Build model."""
        return MODELS.build(cfg)
    
    opened by xvjiarui 17
Releases(v1.7.1)
  • v1.7.1(Jan 3, 2023)

    Features

    • Support RoiawarePool3d, MultiScaleDeformableAttn, ModulatedDeformConv2d and NMS with cambricon MLU backend (#2359, #2396, #2411, #2401)
    • Add Ascend npu adapter for FusedBiasLeakyRelu, DeformableRoIPool and NMS (#2474, #2481, #2387)
    • Support receptive field search of CNN models (https://github.com/open-mmlab/mmcv/pull/2056)

    Bug fixes

    • Create Tensor with new_* method to support AMP (https://github.com/open-mmlab/mmcv/pull/2389)
    • Fix DCN TensorRT plugin (https://github.com/open-mmlab/mmcv/pull/2408)
    • Fix the bug when the input mask is not '0-1-tensor' in masked_conv (https://github.com/open-mmlab/mmcv/pull/2423)
    • Fix UT caused by the new version of packaging (https://github.com/open-mmlab/mmcv/pull/2482)
    • Change the block size to 1024 during compilation (https://github.com/open-mmlab/mmcv/pull/2460)
    • Fix skip_layer for RF-Next (https://github.com/open-mmlab/mmcv/pull/2489)

    Documentations

    • Update supported pytorch versions (https://github.com/open-mmlab/mmcv/pull/2382)
    • Add code style guide (https://github.com/open-mmlab/mmcv/pull/2406)
    • Add currently-npu-supported-ops in ops.md (https://github.com/open-mmlab/mmcv/pull/2420)
    • Refine contributing.md (https://github.com/open-mmlab/mmcv/pull/1941)
    • Fix typos in contributing docs (#2462, #2485)
    • Update qq group link (https://github.com/open-mmlab/mmcv/pull/2453)
    • Replace NPU with Ascend in installation documentatio (https://github.com/open-mmlab/mmcv/pull/2469)

    Others

    • Add torch1.13 checking in CI (https://github.com/open-mmlab/mmcv/pull/2405)
    • Update the URL of pyupgrade pre-commit hook (https://github.com/open-mmlab/mmcv/pull/2448)

    Contributors

    A total of 24 developers contributed to this release. @ZhangLearning @grimoire @zhouzaida @cathyzhang222 @DerryHub @ckirchhoff2021 @wangjiangben-hw @zcc-zjut @momo609 @ZShaopeng @Wickyzheng @HAOCHENYE @gasvn @lzyhha @zytx121 @BayMaxBHL @sunyc11 @mengpenghui @RangeKing @vansin @Taited @jayggh @xiabo123 @CokeDong

    New Contributors

    • @ZhangLearning made their first contribution in https://github.com/open-mmlab/mmcv/pull/2359
    • @DerryHub made their first contribution in https://github.com/open-mmlab/mmcv/pull/2408
    • @gasvn made their first contribution in https://github.com/open-mmlab/mmcv/pull/2056
    • @BayMaxBHL made their first contribution in https://github.com/open-mmlab/mmcv/pull/2448
    • @sunyc11 made their first contribution in https://github.com/open-mmlab/mmcv/pull/2459
    • @mengpenghui made their first contribution in https://github.com/open-mmlab/mmcv/pull/2411
    • @Taited made their first contribution in https://github.com/open-mmlab/mmcv/pull/2485
    • @jayggh made their first contribution in https://github.com/open-mmlab/mmcv/pull/2474
    • @xiabo123 made their first contribution in https://github.com/open-mmlab/mmcv/pull/2460
    • @lzyhha made their first contribution in https://github.com/open-mmlab/mmcv/pull/2489

    Full Changelog: https://github.com/open-mmlab/mmcv/compare/v1.7.0...v1.7.1

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0rc3(Nov 25, 2022)

    Features

    • Add stack ball query and stack group points ops (#2292)
    • Support RoIAwarePool3d, Iou3d and MultiScaleDeformableAttn with MLU backend (#2359, #2339)
    • Support NMS with MLU590 backend (#2401)

    Improvements

    • Adapt mlu code to cntoolkit3.0.1

    Bug fixes

    • Fix roi align symbolic for torch>=1.13 (#2443)
    • Create Tensor with new_* method to support AMP (#2389)
    • Fix three nn op can not accept half tensor (#2348)
    • Fix the potential NaN bug in calc_square_dist (#2356)
    • Fix Correlation op (#2274)
    • Fix a not proper assertion in RandomChoiceResize (#2450)

    Documentations

    • Make installation commands compatible with windows CMD (#2353)
    • Add macOS building notice (#2364)
    • Refine contributing.md (#1941)
    • Add code style guide (#2406)

    Others

    • Add torch1.13 checking in CI (#2441)

    Contributors

    A total of 13 developers contributed to this release. @LYMDLUT @LYM-fire @zhouzaida @VVsssssk @xin-li-67 @grimoire @ZCMax @ZhangLearning @cathyzhang222 @HAOCHENYE @defei-coder @ZShaopeng @xiexinch

    New Contributors

    • @LYMDLUT made their first contribution in https://github.com/open-mmlab/mmcv/pull/2353
    • @xiexinch made their first contribution in https://github.com/open-mmlab/mmcv/pull/2450

    Full Changelog: https://github.com/open-mmlab/mmcv/compare/v2.0.0rc2...v2.0.0rc3

    Source code(tar.gz)
    Source code(zip)
  • v1.7.0(Nov 3, 2022)

    Highlights

    Starting from v1.7.0, we are providing pre-built packages for PyTorch v1.13.0, as well as for the macOS platform. Note that, for the mac M1 chip, only the pre-built packages on PyTorch v1.13.0 are available.

    pip install -U openmim
    mim install mmcv-full
    

    Features

    • Support training on Ascend device (https://github.com/open-mmlab/mmcv/pull/2262, https://github.com/open-mmlab/mmcv/pull/2370)
    • Add box_iou_quadri & nms_quadri (https://github.com/open-mmlab/mmcv/pull/2277)
    • Add stack ball query and stack group points ops (https://github.com/open-mmlab/mmcv/pull/2292)
    • Support PrRoI op for Parrots (https://github.com/open-mmlab/mmcv/pull/2280)
    • Support Iou3d with cambricon MLU backend (https://github.com/open-mmlab/mmcv/pull/2339)
    • Add getJobLimitCapability interface and use it in nms (https://github.com/open-mmlab/mmcv/pull/2337)

    Improvements

    • Support SiLU with torch < 1.7.0 (https://github.com/open-mmlab/mmcv/pull/2278)
    • Update onnx registry (https://github.com/open-mmlab/mmcv/pull/2294)
    • Adapt mlu code to cntoolkit3.0.1 (https://github.com/open-mmlab/mmcv/pull/2248)
    • Refactor the nms3d op to support MLU (https://github.com/open-mmlab/mmcv/pull/2296)
    • Add ability to pass logger instance to frameworks (https://github.com/open-mmlab/mmcv/pull/2317)
    • Add a new argument define_metric in wandb hook (https://github.com/open-mmlab/mmcv/pull/2237)

    Bug fixes

    • Fix warning of CUDA ops (https://github.com/open-mmlab/mmcv/pull/2324)
    • Fix the bug of uninitialized prarmeter (https://github.com/open-mmlab/mmcv/pull/2345)
    • Fix three nn op can not accept half tensor (https://github.com/open-mmlab/mmcv/pull/2348)
    • Fix Correlation op (https://github.com/open-mmlab/mmcv/pull/2274)
    • Fix the potential NaN bug in calc_square_dist() (https://github.com/open-mmlab/mmcv/pull/2356)
    • Fix MPS ops for torch1.12+ (https://github.com/open-mmlab/mmcv/pull/2302)

    Documentations

    • Refine README and installation documentations (https://github.com/open-mmlab/mmcv/pull/1977)
    • Update README and fix typo in docs (https://github.com/open-mmlab/mmcv/pull/2358)
    • Add steps to install mmcv-full on Ascend machine (https://github.com/open-mmlab/mmcv/pull/2363)
    • Add maintenance plan and print deprecated message (https://github.com/open-mmlab/mmcv/pull/2357)

    Others

    • Upgrade pre commit hooks (https://github.com/open-mmlab/mmcv/pull/2321)
    • Build macOS wheel in Github Action (https://github.com/open-mmlab/mmcv/pull/2311, https://github.com/open-mmlab/mmcv/pull/2366)

    Contributors

    A total of 14 developers contributed to this release. @okotaku @zhouzaida @grimoire @wangjiangben-hw @ckirchhoff2021 @tpoisonooo @defei-coder @budefei @CokeDong @shcheklein @cathyzhang222 @ZCMax @zytx121 @momo609

    New Contributors

    • @tpoisonooo made their first contribution in https://github.com/open-mmlab/mmcv/pull/2324
    • @shcheklein made their first contribution in https://github.com/open-mmlab/mmcv/pull/2317
    • @cathyzhang222 made their first contribution in https://github.com/open-mmlab/mmcv/pull/2339
    • @momo609 made their first contribution in https://github.com/open-mmlab/mmcv/pull/2363

    Full Changelog: https://github.com/open-mmlab/mmcv/compare/v1.6.2...v1.7.0

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0rc2(Oct 26, 2022)

    😀 We are glad to announce that we are providing the mmcv pre-built packages for macOS (x86_64 architecture).

    pip install -U openmim
    mim install 'mmcv>=2.0.0rc2'
    

    Features

    • Add TTA transform (#2146)
    • Add two CUDA ops, box_iou_quadri and nms_quadri (#2277)
    • Add two MLU ops, RoIPointPool3d and Deformable RoIPool (#2247, #2137)
    • Register a new activation layer SiLU to ACTIVATION_LAYERS (#2256, #2278)

    Bug fixes

    • Fix the calculation error of out_w in MaskedConv2dFunction (#2264)
    • Fix MPS ops for torch1.12+ (#2302)
    • Add swap_labe_pairs in RandomFlip (#2332)

    Documentations

    • Fix some mistakes in data_process.md (#2283)
    • Refactor the API structures of documentation (#2254)
    • Add a reminder in docs for macOS M1 users (#2268)
    • Translate data_transform.md to English (#2325)
    • Refine README and installation documentation (#2340)
    • Make installation commands compatible with Windows cmd (#2353)

    Others

    • Update configs of CircleCI and GitHub Action (#2255)
    • Build macOS wheels in Github Action (#2350)
    • Upgrade the versions of pre-commit hooks (#2328)
    • Remove onnx-related files (#2295)

    New Contributors

    • @yxzhao2022 made their first contribution in https://github.com/open-mmlab/mmcv/pull/2283
    • @xin-li-67 made their first contribution in https://github.com/open-mmlab/mmcv/pull/2268
    • @LYMDLUT made their first contribution in https://github.com/open-mmlab/mmcv/pull/2353

    Contributors

    @yxzhao2022 @LYMDLUT @grimoire @xin-li-67 @zytx121 @MeowZheng @HAOCHENYE @zhouzaida @ZShaopeng @defei-coder @okotaku

    Full Changelog: https://github.com/open-mmlab/mmcv/compare/v2.0.0rc1...v2.0.0rc2

    Source code(tar.gz)
    Source code(zip)
  • v1.6.2(Sep 29, 2022)

    Features

    • Register a new activation layer SiLU to ACTIVATION_LAYERS (#2256)
    • Add support of TorchVision's Model Registration API (#2246)
    • Add five MLU ops, which are CARAFEcarafe, MaskedConv2d, ThreeNN, DeformRoiPool, and RoipointPool3d (#2212, #2202, #2215, #2137,#2247)

    Improvements

    • Add support for logging parameters to MlflowLoggerHook (#2188)
    • Add a new argument params to MlflowLoggerHook (#2193)
    • Support different border modes in imrotate (#2141)
    • Add pillow backend for ColorJitter related functions (#2127)

    Bug fixes

    • Fix unit tests of onnx (#2155)
    • Fix cumulative gradient optimizer when resuming (#2093)
    • Path mapping only once in storage backends (#2204)
    • Fix RoiAlignRotated MLU implementation (#2210)
    • Fix a potential bug in PrRoIPool op (#2200)
    • Fix spconv clang-format (#2260)
    • Remove the restrictions of onnx versions (#2251)
    • Fix init_weights of MultiScaleDeformableAttention (#2158)
    • Cast the type of mask in ModulatedDeformConv2dFunction to enable training with AMP (#2220)
    • Fix the calculation error of out_w in MaskedConv2dFunction (#2264)
    • Fix ROCm backend support (#1918)

    Documentations

    • Limit sphinx_markdown_tables and markdown versions (#2144)
    • Add swith_language.md in docs (#2160)
    • Fix the example error in registry.md (#2243)
    • Add zhihu articles (#2157)
    • Fix some mistakes in data_process.md (#2283)

    Others

    • Add type hints for mmcv/image (#2089)

    New Contributors

    • @gfyts0123 made their first contribution in https://github.com/open-mmlab/mmcv/pull/2103
    • @xcnick made their first contribution in https://github.com/open-mmlab/mmcv/pull/2155
    • @eivtho made their first contribution in https://github.com/open-mmlab/mmcv/pull/2188
    • @CokeDong made their first contribution in https://github.com/open-mmlab/mmcv/pull/2189
    • @tudejiang79 made their first contribution in https://github.com/open-mmlab/mmcv/pull/2210
    • @DanieeelLiu made their first contribution in https://github.com/open-mmlab/mmcv/pull/2215
    • @PungTeng made their first contribution in https://github.com/open-mmlab/mmcv/pull/2243
    • @ZShaopeng made their first contribution in https://github.com/open-mmlab/mmcv/pull/2247
    • @zstreet87 made their first contribution in https://github.com/open-mmlab/mmcv/pull/1918
    • @okotaku made their first contribution in https://github.com/open-mmlab/mmcv/pull/2256
    • @datumbox made their first contribution in https://github.com/open-mmlab/mmcv/pull/2246

    Full Changelog: https://github.com/open-mmlab/mmcv/compare/v1.6.1...v1.6.2

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0rc1(Aug 31, 2022)

    Highlights

    Starting from mmcv v2.0.0rc1, mmcv removes training process related modules such as Runner, Hook, Parallel, which will be provided by MMEngine. In addition, in v2.0.0rc1, mmcv added many data augmentation methods, such as CenterCrop.

    Source code(tar.gz)
    Source code(zip)
  • v1.6.1(Jul 26, 2022)

    😀 We are glad to announce that we are providing the mmcv-full pre-built packages for PyTorch 1.12.0 starting from v1.6.0.

    pip install -U openmim
    mim install mmcv-full
    

    Features

    • Add bbox overlap MPS op (#2123)
    • Add PrRoIPool CUDA op (#2113)

    Improvements

    • Improve ProfilerHook behavior when using a relative (or empty) dir_name (#2119)

    Documentations

    • Fix some mistakes of examples (#2120)
    • Fix typos (#2124)
    • Fix markdown version (#2121)

    Others

    • Add .pre-commit-config-zh-cn.yaml to speed up pre-commit in some cases

    Contributors

    A total of 6 developers contributed to this release.

    @JingweiZhang12 @grimoire @zhouzaida @GPhilo @0reza @Happylkx

    New Contributors

    • @Happylkx made their first contribution in https://github.com/open-mmlab/mmcv/pull/2120
    • @0reza made their first contribution in https://github.com/open-mmlab/mmcv/pull/2124
    • @GPhilo made their first contribution in https://github.com/open-mmlab/mmcv/pull/2119
    • @JingweiZhang12 made their first contribution in https://github.com/open-mmlab/mmcv/pull/2113

    Full Changelog: https://github.com/open-mmlab/mmcv/compare/v1.6.0...v1.6.1

    Source code(tar.gz)
    Source code(zip)
  • v1.6.0(Jul 12, 2022)

    😀 We are glad to announce that we are providing the mmcv-full pre-built packages for PyTorch 1.12.0 starting from v1.6.0.

    pip install -U openmim
    mim install mmcv-full
    

    Features

    • Add support for MPS (#2092)
    • Support RoiPool with Cambricon MLU backend (#2073)

    Improvements

    • Add torch_meshgrid wrapper due to PyTorch change (#2044)
    • Add _run_ddp_forward method for MMDistributedDataParallel to be compatible with PyTorch1.12 (#2107)

    Bug fixes

    • Fix name error in trt_deform_conv.cpp (#2075)
    • Add torchvision_0.12.json for testing torchvision0.13 (#2084)
    • Fix num_channels in test_build_norm_layer which can not be divisible by num_groups (#2085)
    • Fix index error when using multi-samplers strategy (#2094)
    • Fix undefined variable error in pixel_group.cpp (#2104)

    Type Hints

    #2031 #1991 #2003 #1995 #1993 #2030 #2002

    Documentations

    • Reformat the op docs (#2052)
    • Add Dockerfile (#1974)

    Contributors

    A total of 14 developers contributed to this release.

    @imabackstabber @triple-Mu @HAOCHENYE @zhouzaida @ZwwWayne @pallgeuer @triwahyuu @ytzhao @WINDSKY45 @EvelynWang-0423 @grimoire @zcyKTH @zhangtingyu11 @ychfan

    Source code(tar.gz)
    Source code(zip)
  • v1.5.3(Jun 15, 2022)

    Features

    • Add ChamferDistance CUDA op (#1933)
    • Add two MLU ops, RoiAlignRotated and PSAMask (#2033 #2024)

    Bug fixes

    • Fix protobuf compatible error (#1992)
    • Include torchvision_12.json in the sdist package (#2039)
    • make iou3d.boxes_iou3d actually calculate 3D IoU (#2018)
    • Fix batched_nms for rotated box and add type hints for nms.py (#2006)

    Type Hints

    Thanks to contributors for their efforts, mmcv has added type hints, which makes the code more readable. Here are all the pull requests of adding type hints.

    #1981 #1989 #1998 #1985 #1987 #1983 #2005 #1988 #2013 #2007 #2015 #2017 #2001 #2019 #2021 #2023 #2000 #2026 #1997 #2029 #2016 #2008 #2031 #1982 #1994 #1999 #2020 #2037 #2034 #1996 #2050

    Documentations

    • Update copyright years in docs (#2042)
    • Fix mdformat version to support python3.6 (#2014)

    Contributors

    A total of 22 developers contributed to this release.

    @RangeKing @gy-7 @triple-Mu @ytzhao @zengxiang68 @yangrisheng @WINDSKY45 @ShawnHXH @vansin @HarborYuan @tcexeexe @luopeichao @zcyKTH @filaPro @nxznm @liuyanyi @grimoire @zhouzaida @HAOCHENYE @ZwwWayne @teamwong111 @imabackstabber

    Source code(tar.gz)
    Source code(zip)
  • v1.5.2(May 30, 2022)

    Improvements

    • Lower the restrictions of _resize method in BaseMergeCell (#1959)
    • Replace BEV IoU with 3D IoU (#1902)
    • Hook can get data_batch from Runner (#1940)
    • Add pyupgrade pre-commit hook (#1937)

    Bug fixes

    • Fix bbox overlap fp16 (#1958)
    • Skip CPU test in test_rotated_feature_align.py for parrots (#1968)
    • Fix is_module_wrapper (#1900)
    • Fix the problem that the instance cannot be reused when overwriting the file client (#1747)

    Documentations

    • Replace markdownlint with mdformat for avoiding installing ruby (#1936)
    • Fix failed links in docs/zh_cn/faq.md (#1964)
    • Fix docstrings in EvalHook (#1978)

    Notes

    Since PyTorch 1.11.0 has been released and we have provided the mmcv-full pre-compiled packages for it, we no longer provide them compiled with PyTorch 1.3 & 1.4 since v1.3.17. You can find previous versions compiled with PyTorch 1.3 & 1.4 here. The compatibility is still ensured in our CI, but we will discard the support of PyTorch 1.3 & 1.4 this year.

    Contributors

    A total of 14 developers contributed to this release.

    @grimoire @teamwong111 @zhouzaida @JarvisKevin @HAOCHENYE @jshilong @filaPro @HIT-cwh @hhaAndroid @ZwwWayne @Tai-Wang @274869388 @wlf-darkmatter @imabackstabber

    Source code(tar.gz)
    Source code(zip)
  • v1.5.1(May 17, 2022)

    Features

    • Added ClearMLLoggerHook (#1906)
    • Added rotated_feature_align cpu & onnxruntime implementations (#1878)
    • Supports registering function (#1858)
    • Added adjust_hue (#1628)
    • Added a script to visualize lr (#1667)

    Improvements

    • Speeds up bbox_overlaps op (#1718)
    • Added support for latest Pillow resampling filter naming scheme (#1931)

    Bug fixes

    • Fixed collec_env() encoding error on Windows (#1905)
    • Fixed dump method of Config (#1837)
    • Fixed bbox_overlaps unit tests (#1914)
    • Ensures the type of filename parameter in Config is str (#1725)
    • Fixed nms rotate illegal memory access (#1891)
    • Fixed LmdbBackend which could not pickle env obj (#1764)
    • Fixed type annotations in file_client (#1942)
    • Fixed bbox overlap fp16 (#1958)

    Documentations

    • Added IPU installation documentation (#1904)
    • Added type annotations (#1947, #1950, #1946)

    Contributors

    A total of 18 developers contributed to this release.

    @imabackstabber @akravchuk97 @SuTanTank @grimoire @teamwong111 @HuDi2018 @WilliamKyle @luopeichao @274869388 @bryandeng @tehkillerbee @cuhk-hbsun @jmercat @triple-Mu @sundongwei @teamwong111 @ZwwWayne @zhouzaida

    Source code(tar.gz)
    Source code(zip)
  • v1.5.0(Apr 21, 2022)

    Features

    • Support training on IPU chip (#1882)
    • Support training on MLU chip (#1770, #1563,#1884,#1885,#1881)
    • Support for linearly learning rate decay (#1627)

    Improvements

    • Optimize correlation (#1814)
    • Speed up Registry initialization (#1844)
    • NMS with CUDA only (#1824)
    • Add a differentiable rotated IoU op (#1854)
    • Support passing None to DictAction (#1834)
    • Enhance get_torchvision_models (#1867)

    Bug fixes

    • Fix Python3.10 CI (#1828)
    • Fix collect_env() in Windows (#1789, #1887)
    • Fix sparse_conv unit test by releasing cache on GPU (#1872)
    • Fix unexpected keyword argument for GELU (#1847)
    • Fix potential negative padding size (#1792)
    • Fix version comparison to include prerelease versions (#1877)

    Documentations

    • Fix docstring (#1876, #1880)

    Notes

    Since PyTorch 1.11.0 has been released and we have provided the mmcv-full pre-compiled packages for it, we no longer provide them compiled with PyTorch 1.3 & 1.4 since v1.3.17. You can find previous versions compiled with PyTorch 1.3 & 1.4 here. The compatibility is still ensured in our CI, but we will discard the support of PyTorch 1.3 & 1.4 this year.

    Contributors

    A total of 29 developers contributed to this release.

    @wulele2 @Sharpiless @RockeyCoss @teamwong111 @SuTanTank @grimoire @MeowZheng @triple-Mu @astahlman @Qiza-lyhm @daydayfun @VVsssssk @Charlyo @filaPro @zytx121 @DCNSW @luopeichao @gaotongxiao @yushinliu @zihanchang11 @raoshenglong @zcyKTH @Mrxiaofei @HuDi2018 @vakker @zhouzaida @ZwwWayne @HAOCHENYE @imabackstabber

    Source code(tar.gz)
    Source code(zip)
  • v1.4.8(Mar 29, 2022)

    😀 We are glad to announce that we are providing the mmcv-full pre-built packages for torch1.11.0 starting from v1.4.7.

    # pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html
    pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu115/torch1.11/index.html
    pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11/index.html
    # PyTorch does not provide pre-built packages for cu102 on Windows, so does mmcv-full
    pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.11/index.html
    

    Features

    • Config ignores imported modules and functions (#1802)
    • Implemented corner pool with python for torch<1.5 (#1772)

    Improvements

    • Removed warnings in compilation (#1675)
    • Updated unit tests of mmdet3d ops (#1811)

    Bug fixes

    • Fix ROCm support (#1704)
    • Fix MultiScaleDeformableAttention (#1823)
    • Fix voxelization bug (#1822)
    • Fix error cased by _sync_params which was renamed in torch1.11.0 (#1816)

    Documentations

    • Add more Windows information in README (#1829)

    Notes

    Since PyTorch 1.10.0 has been released and we have provided the mmcv-full pre-compiled packages for it, we no longer provide them compiled with PyTorch 1.3 & 1.4 since v1.3.17. You can find previous versions compiled with PyTorch 1.3 & 1.4 here. The compatibility is still ensured in our CI, but we will discard the support of PyTorch 1.3 & 1.4 this year.

    Contributors

    A total of 12 developers contributed to this release.

    @SuTanTank @VVsssssk @wHao-Wu @grimoire @jshilong @zhanggefan @luopeichao @imabackstabber @HAOCHENYE @zhouzaida @ZwwWayne @teamwong111

    Source code(tar.gz)
    Source code(zip)
  • v1.4.7(Mar 21, 2022)

    😀 We are glad to announce that we are providing the mmcv-full pre-built packages for torch1.11.0 starting from v1.4.7.

    # pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html
    pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu115/torch1.11/index.html
    pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11/index.html
    # PyTorch does not provide pre-built packages for cu102 on Windows, so does mmcv-full
    pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.11/index.html
    

    Features

    • Add SegmindLoggerHook (#1650)
    • Config supports shallow copy (#1796)
    • Support fp16 training for gather_points op (#1758)
    • Add non-deterministic voxelization op from mmdet3d (#1783)
    • Add worker_init_fn helper function to initialize dataloader workers (#1788)

    Bug fixes

    • Fix deconv_flops_counter_hook (#1760)
    • Fix deform_conv inconsistent pybind (#1781)
    • Fix ProfilerHook when using IterBasedRunner (#1755)
    • Include spconv header files in the sdist package (#1766)
    • Fix bugs in DynamicScatter and Voxelization ops (#1748, #1746)

    Documentations

    • Fix typos in config.md, cnn.md and data_process.md (#1797, #1798, #1799)
    • Fix a wrong example in DefaultOptimizerConstructor (#1795)

    Deprecations

    • Add deprecated warning of deployment (#1750)

    Others

    • Add copyright pre-commit-hook (#1742)
    • Reorganize OpenMMLab projects in README.md (#1744)
    • Fix typo in conv.py (#1759)
    • Add .owners.yml to dispatch daily issue (#1775)
    • Add PyTorch1.11.0 CI (#1800)

    Notes

    Since PyTorch 1.10.0 has been released and we have provided the mmcv-full pre-compiled packages for it, we no longer provide them compiled with PyTorch 1.3 & 1.4 since v1.3.17. You can find previous versions compiled with PyTorch 1.3 & 1.4 here. The compatibility is still ensured in our CI, but we will discard the support of PyTorch 1.3 & 1.4 this year.

    Contributors

    A total of 15 developers contributed to this release.

    @saurbhc @XiwuChen @Xiangxu-0103 @SuTanTank @imflash217 @wangruohui @imabackstabber @del-zhenwu @gaotongxiao @HAOCHENYE @zhouzaida @RunningLeon @ZwwWayne @wHao-Wu @teamwong111

    Source code(tar.gz)
    Source code(zip)
  • v1.4.6(Feb 26, 2022)

    😀 We are glad to announce that we are providing the mmcv pre-built packages on Windows starting from v1.4.0.

    # pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html
    pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.10.0/index.html
    # We can ignore the micro version of PyTorch
    pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.10/index.html
    

    Features

    • Add detection3d op spconv (#1581)
    • Support deepcopy for Config (#1658)

    Improvements

    • Refactor the interface of RoIAlignRotated (#1662)
    • Replace positional argument with keyword argument in EvalHook when calling save_checkpoint (#1694)

    Bug fixes

    • Remove unused header files (#1653)

    Documentations

    • Fix spelling error in registry.md (#1717)

    Notes

    Since PyTorch 1.10.0 has been released and we have provided the mmcv-full pre-compiled packages for it, we no longer provide them compiled with PyTorch 1.3 & 1.4 since v1.3.17. You can find previous versions compiled with PyTorch 1.3 & 1.4 here. The compatibility is still ensured in our CI, but we will discard the support of PyTorch 1.3 & 1.4 this year.

    Contributors

    A total of 12 developers contributed to this release.

    @rentainhe @mzr1996 @MeowZheng @wHao-Wu @grimoire @ZwwWayne @AllentDan @teamwong111 @zhouzaida @nijkah @luopeichao @makifozkanoglu

    Source code(tar.gz)
    Source code(zip)
  • v1.4.5(Feb 15, 2022)

    😀 We are glad to announce that we are providing the mmcv pre-built packages on Windows starting from v1.4.0.

    # pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html
    pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.10.0/index.html
    # We can ignore the micro version of PyTorch
    pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.10/index.html
    

    Improvements

    • Replace HSwish with PyTorch implementation (#1709)

    Bug fixes

    • Fix the undefined name error (#1695)
    • Fix an incorrect assignment in the BaseTransformerLayer (#1670)
    • Fix the mismatch torch version of MlflowLoggerHook (#1680)
    • Fix a bug in min_area_polygons (#1702)
    • Fix batched nms for nms_rotated (#1688)

    Documentations

    • Add cuDNN installation steps in tensorrt_plugin.md (#1711)

    Notes

    Since PyTorch 1.10.0 has been released and we have provided the mmcv-full pre-compiled packages for it, we no longer provide them compiled with PyTorch 1.3 & 1.4 since v1.3.17. You can find previous versions compiled with PyTorch 1.3 & 1.4 here. The compatibility is still ensured in our CI, but we will discard the support of PyTorch 1.3 & 1.4 this year.

    Contributors

    A total of 11 developers contributed to this release.

    @nijkah @zytx121 @jamiechoi1995 @jshilong @MeowZheng @RangiLyu @RunningLeon @HAOCHENYE @ZwwWayne @zhouzaida @grimoire

    Source code(tar.gz)
    Source code(zip)
  • v1.4.4(Jan 26, 2022)

    😀 We are glad to announce that we are providing the mmcv pre-built packages on Windows starting from v1.4.0.

    # pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html
    pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.10.0/index.html
    # We can ignore the micro version of PyTorch
    pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.10/index.html
    

    Features

    • Add 6 rotated detection ops for parrots (#1665)
    • Gradually reduce the difference between max_lr and base_lr of CyclicLrUpdaterHook (#1655)

    Improvements

    • Improve the docstring of LoggerHooks (#1664)

    Bug fixes

    • Fix the unit test of correlation op (#1659)
    • Fix the invalid CUDA memory access when training s2anet (#1660)
    • Fix the bug of momentum updater with warmup policy (#1626)
    • Align HSigmoid with PyTorch official implementation(#1622)
    • Fix the scatter function when the device type of input is CPU (#1621)
    • Fix the cast_tensor_type (#1639)

    Notes

    Since PyTorch 1.10.0 has been released and we have provided the mmcv-full pre-compiled packages for it, we no longer provide them compiled with PyTorch 1.3 & 1.4 since v1.3.17. You can find previous versions compiled with PyTorch 1.3 & 1.4 here. The compatibility is still ensured in our CI, but we will discard the support of PyTorch 1.3 & 1.4 this year.

    Contributors

    A total of 11 developers contributed to this release.

    @hokmund @HAOCHENYE @ZwwWayne @teamwong111 @zhouzaida @luopeichao @Bilibilee @gaotongxiao @imyhxy @zhanggefan @grimoire

    Source code(tar.gz)
    Source code(zip)
  • v1.4.3(Jan 13, 2022)

    😀 We are glad to announce that we are providing the mmcv pre-built packages on Windows starting from v1.4.0.

    # pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html
    pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.10.0/index.html
    

    Features

    • Add three rotated detection ops, which are ConvexIoU, ActiveRotatedFilter and MinAreaPolygon (#1610, #1598, #1611)
    • Add artifact logging to wandb hook (#1616)

    Improvements

    • Deprecate the support for "python setup.py test" (#1637)
    • Add clockwise argument to ops box_iou_rotated and nms_rotated (#1592)
    • Replace DIVUP with GET_BLOCKS (#1586)
    • Refactor requirements (#1536)

    Bug fixes

    • Fix the compilation error on windows (#1657, #1643)
    • Fix iou3d bug in parrots (#1656)

    Documentations

    • Add the link of mmdeploy (#1638)

    Notes

    Since PyTorch 1.10.0 has been released and we have provided the mmcv-full pre-compiled packages for it, we no longer provide them compiled with PyTorch 1.3 & 1.4 since v1.3.17. You can find previous versions compiled with PyTorch 1.3 & 1.4 here. The compatibility is still ensured in our CI, but we will discard the support of PyTorch 1.3 & 1.4 next year.

    Contributors

    A total of 12 developers contributed to this release.

    @zytx121 @fcakyon @zhanggefan @LudoBar @zhouzaida @ZwwWayne @grimoire @luopeichao @MeowZheng @AllentDan @Johnson-Wang @teamwong111

    Source code(tar.gz)
    Source code(zip)
  • v1.4.2(Dec 25, 2021)

    😀 We are glad to announce that we are providing the mmcv pre-built packages on Windows starting from v1.4.0.

    # pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html
    pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.10.0/index.html
    

    Features

    • Add three rotated detection ops, which are RotatedFeatureAlign, RiRoIAlignRotated and PointsInPolygons (#1603, #1599, #1600)
    • Support device dispatch in parrots (#1588)

    Improvements

    • Fix some warnings in the unit tests (#1522)
    • Improve the DvcliveLoggerHook (#1208)
    • tensor2imgs supports converting a tensor to gray image (#1595)

    Bug fixes

    • Compute distance to origin after sort (#1500)
    • Convert the type of bias to the same as the input in ModulatedDeformConv2dFunction (#1605)

    Documentations

    • Refactor the structure of documentation (#1580)
    • Fix the typo in runner.md (#1591)

    Notes

    Since PyTorch 1.10.0 has been released and we have provided the mmcv-full pre-compiled packages for it, we no longer provide them compiled with PyTorch 1.3 & 1.4 since v1.3.17. You can find previous versions compiled with PyTorch 1.3 & 1.4 here. The compatibility is still ensured in our CI, but we will discard the support of PyTorch 1.3 & 1.4 next year.

    Contributors

    A total of 11 developers contributed to this release.

    @teamwong111 @grimoire @uniyushu @daavoo @cuhk-hbsun @zhouzaida @ZwwWayne @gaotongxiao @AceCoooool @zytx121 @luopeichao

    Source code(tar.gz)
    Source code(zip)
  • v1.4.1(Dec 16, 2021)

    😀 We are glad to announce that we are providing the mmcv pre-built packages on Windows starting from v1.4.0.

    # pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html
    pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.10.0/index.html
    

    Features

    • Add ModuleDict inherited from BaseModule and ModuleDict (#1542)
    • Add PatchEmbed and PatchMerging modules used by transformer methods (#1305)
    • Add multiple backends support for imread/imwrite (#1527)

    Improvements

    • Cancel previous CI jobs that are not completed or in the queue (#1537)
    • Detect anomalous parameters for debugging (#1547)
    • batched_nms supportd skipping the NMS operation (#1552)

    Bug fixes

    • Fix the TensorRT error with PyTorch 1.8+ (#1464)
    • Fix _get_checkpoint_loader that can not correctly obtain a loader when the path of ceph contains cluster name (#1577)
    • Fix load_from_local that can not handle the path starting with ~ (#1549)
    • Fix the type inconsistency when a config contains the _delete_ key (#1575)

    Documentations

    • Fix the documentation of deployment (#1512)
    • Fix the format of docstring (#1462, #1573)
    • Update FAQ (#1481)

    Notes

    Since PyTorch 1.10.0 has been released and we have provided the mmcv-full pre-compiled packages for it, we no longer provide them compiled with PyTorch 1.3 & 1.4 since v1.3.17. You can find previous versions compiled with PyTorch 1.3 & 1.4 here. The compatibility is still ensured in our CI, but we will discard the support of PyTorch 1.3 & 1.4 next year.

    Contributors

    A total of 10 developers contributed to this release.

    @lvhan027 @RunningLeon @grimoire @zhouzaida @ZwwWayne @LutingWang @MeowZheng @teamwong111 @twmht @274869388

    Source code(tar.gz)
    Source code(zip)
  • v1.4.0(Dec 3, 2021)

    😀 We are glad to announce that we are providing the mmcv pre-built packages on Windows starting from v1.4.0.

    # pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html
    pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.10.0/index.html
    

    Improvements

    • Replace the third-party markdownlint hook with the official (#1535)
    • Add the CircleCI to test the unit tests of CUDA (#1540)
    • Skip CI when some specific files were changed (#1533)

    Bug fixes

    • Fix the python bind of iou3d (#1524)
    • Fix a compiled error on Windows (#1526, #1543)
    • Fix a compiled error on Linux with cuda9.0 (#1525)
    • Fix an undefined symbol error when installing from pip (#1544)

    Notes

    Since PyTorch 1.10.0 has been released and we have provided the mmcv-full pre-compiled packages for it, we no longer provide them compiled with PyTorch 1.3 & 1.4 since v1.3.17. You can find previous versions compiled with PyTorch 1.3 & 1.4 here. The compatibility is still ensured in our CI, but we will discard the support of PyTorch 1.3 & 1.4 next year.

    Contributors

    A total of 5 developers contributed to this release.

    @grimoire @teamwong111 @zhouzaida @ZwwWayne @wangruohui @del-zhenwu

    Source code(tar.gz)
    Source code(zip)
  • v1.3.18(Nov 25, 2021)

    New features

    • Add group_points, iou3d, roiaware_pool3d and voxelize in parrots (#1504)

    Improvements

    • Refactor csrc with device dispatcher (#1463)
    • Update MMCls models in model_zoo/mmcls.json (#1513)
    • Improve .gitignore about datasets and logs and checkpoints (#1477)

    Bug fixes

    • Fix compiled error on Windows (#1510)
    • Fix the unit test of Deform Conv (#1490)
    • Fix train example (#1502)
    • Fix ops links in LICENSES (#1517)
    • Skip the checking of LOCAL_RANK when loading checkpoint from HTTP or HTTPS (#1396)
    • Add load_url to handle incompatibility of PyTorch versions (#1377)

    Docs

    • Add a script to check the installation of mmcv-full (#1474)
    • Add the URL of pre-built packages built with CUDA 11.3 (#1489)
    • Fix grammatical error in Registry docs (#1516)
    • Add the link and introduction of MMFlow in README (#1506)

    Notes

    Since PyTorch 1.10.0 has been released and we have provided the mmcv-full pre-compiled packages for it, we no longer provide them compiled with PyTorch 1.3 & 1.4 since v1.3.17. You can find previous versions compiled with PyTorch 1.3 & 1.4 here. The compatibility is still ensured in our CI, but we will discard the support of PyTorch 1.3 & 1.4 next year.

    Contributors

    A total of 13 developers contributed to this release.

    @grimoire @lzhangzz @RunningLeon @zhouzaida @ZwwWayne @teamwong111 @MeowZheng @luopeichao @mzr1996 @vansin @tobiasfshr @innerlee @ly015

    Source code(tar.gz)
    Source code(zip)
  • v1.3.17(Nov 11, 2021)

    Improvements

    • Improve the log when loading checkpoints (#1446)

    Bug fixes

    • Fix the wrong weight reference in BaseTransformerLayer (#1418)
    • Sleep 2 seconds to prevent deadlock in IterBasedRunner (#1442)
    • Fix deform conv by adding an extra argument im2col_step (#1459)
    • Print a warning log if eval_res is an empty dict (#1398)
    • Rename the init parameter task to name in PaviLoggerHook (#1438)
    • Update the test data of test_tin_shift (#1426)

    Docs

    • Add ops definition (#1434)
    • Fix invalid symbols in docstring (#1466)
    • Update the table of pre-built packages in README (#1433)

    Notes

    Since PyTorch 1.10.0 has been released and we have provided the mmcv-full pre-compiled packages for it, we no longer provide them compiled with PyTorch 1.3 & 1.4 since v1.3.17. You can find previous versions compiled with PyTorch 1.3 & 1.4 here. The compatibility is still ensured in our CI, but we will discard the support of PyTorch 1.3 & 1.4 next year.

    Contributors

    A total of 12 developers contributed to this release.

    @grimoire @gaotongxiao @zhouzaida @ZwwWayne @teamwong111 @MeowZheng @ly015 @nbei @RangiLyu @Junjun2016 @hhaAndroid @RunningLeon

    Source code(tar.gz)
    Source code(zip)
  • v1.3.16(Oct 25, 2021)

    New features

    • Add 4 detection3d related CUDA operators, which are voxel op, roiaware pool3d op, iou3d op and group points op (#1381, #1382, #1356, #1415)
    • Power FileClient and make it support more file interfaces (#1330)
    • Support uploading (loading) checkpoints to (from) different backends (#1375)

    Improvements

    • Add CI for PyTorch 1.10 (#1431)
    • Add case_sensitive argument in scandir (#1389)

    Bug fixes

    • Add DeviceGuard for ms_deform_attn_forward (#1402)
    • Fix config parsing error caused by non-ascii characters (#1410)
    • Fix error when building pdf documentaiton (#1414)
    • Update test data for test_iou3d (#1427)

    Docs

    • Polish the documentation (#1411)

    Notes

    Since PyTorch 1.10.0 has been released and we have provided the pre-compiled packages for it, we plan to end the support for PyTorch 1.3 and 1.4 in future releases. We will still provide pre-compiled packages of these two versions for three months, but the reliability and technical support are not guaranteed.

    Contributors

    A total of 11 developers contributed to this release.

    @jshilong , @bobo0810 , @ly015 , @zhouzaida , @Ezra-Yu , @DCNSW, @grimoire , @luopeichao , @ZwwWayne , @nbei , @mzr1996

    Source code(tar.gz)
    Source code(zip)
  • v1.3.15(Oct 16, 2021)

    New features

    • Add seven detection3d related CUDA operators, which are FurthestPointSample, KNN, GatherPoints, ThreeInterpolate, ThreeNN, AssignScoreWithK and RoIPointPool3d (#1337, #1354, #1338, #1355, #1357, #1358, )
    • Add Deformable Conv CustomOp for onnxruntime (#1343)

    Improvements

    • Switch the CUDA CI to the docker image provided by PyTorch (#1376)
    • Add code spell hook to pre-commit and fix typos (#1384)
    • Remove some obsolete code (#1370)

    Bug fixes

    • Fix the weight initialization of deform conv (#1262)
    • Revise the unit test of correlation (#1368)
    • Fix the unrecognized symbol in correlation.cpp (#1372)
    • Fix a potential bug in deprecated_api_warning (#1395)
    • Add error handler when getting host failed (#1374)
    • Fix the infernence issue of MultiScaleDeformableAttention on CPU device (#1223)
    • Add a condition to disable invalid memory write by furthest_sample_point (#1405)
    • Reduce the test memory usage of ms_deformable_attn (#1407)

    Docs

    • Add the Chinese documentation for CNN, ONNX, TensorRT, Build mmcv-full from source and contributing (#1246, #1331, #1336, #1353, #1351)
    • Add a note for installing mmcv-full (#1320)

    Notes

    Since PyTorch 1.9 has been released, we plan to end the support for PyTorch 1.3 and 1.4 in future releases. We will still provide pre-compiled packages of these two versions for three months, but the reliability and technical support are not guaranteed. In addition, starting from this version, we provide pre-compiled packages for Python 3.9.

    Contributors

    A total of 12 developers contributed to this release.

    @bofen97, @grimoire, @zhouzaida, @ZwwWayne, @MeowZheng, @Fu0511, @hhaAndroid, @eugene123tw, @DCNSW, @del-zhenwu, @ZhichengHuang, @jshilong

    Source code(tar.gz)
    Source code(zip)
  • v1.3.14(Sep 24, 2021)

    New features

    • Add two CUDA OPs BallQuery and Correlation (#1332, #1361 )
    • Support loading optical flow data from bytes (#1362)
    • Support empty tensor in MMSyncBN (#1205)

    Docs

    • Replace the default theme of documentation with PyTorch Sphinx Theme (#1321)
    • Add the Chinese documentation for registry.md, config.md, ops.md and visualization.md (#1204, #1349, #1350)

    Notes

    Since PyTorch 1.9 has been released, we plan to end the support for PyTorch 1.3 and 1.4 in future releases. We will still provide pre-compiled packages of these two versions for three months, but the reliability and technical support are not guaranteed.

    Contributors

    A total of 8 developers contributed to this release.

    @AluminiumOxide, @MeowZheng, @zhouzaida, @grimoire, @ZwwWayne, @nbei, @DCNSW, @luopeichao

    Source code(tar.gz)
    Source code(zip)
  • v1.3.13(Sep 10, 2021)

    New features

    • Add the CPU implementation of DCN and Modulated DCN (#1278)
    • Add the revert_sync_batchnorm function to convert SyncBN in any model to BN (#1253)
    • Add python3.9 in CI to verify the support for python3.9 (#1291)

    Improvements

    • Reimplement cc_attention using pure PyTorch (#1201)
    • Enhance the output of exception (#1309)
    • Restrict the warning message (#1267)

    Bug fixes

    • Fix missing state_dict._metadata when saving and loading checkpoints (#1294)
    • Fix typo about installation (#1313)
    • Fix sphinx version (#1301)

    Docs

    • Add the Chinese documentation for faq.md (#1252)

    Notes

    Since PyTorch 1.9 has been released, we plan to end the support for PyTorch 1.3 and 1.4 in future releases. We will still provide pre-compiled packages of these two versions for three months, but the reliability and technical support are not guaranteed.

    Contributors

    A total of 13 developers contributed to this release.

    @Leojc @eugene123tw @weiji14 @mzr1996 @zhouzaida @yyz561 @gaotongxiao @EricKani @MeowZheng @ZwwWayne @xvjiarui @Junjun2016 @grimoire

    Source code(tar.gz)
    Source code(zip)
  • v1.3.12(Aug 24, 2021)

    New features

    • Add a GradientCumulativeOptimizerHook for training model with a larger batch size (#1221)
    • Add a DefaultRunnerConstructor for extending existing Runner(#1296)
    • Add modulated_deform_conv to support onnxruntime (#1281)

    Improvements

    • Add mmcv namespace for custom onnx ops (#1254)
    • Compile mmcv with all available CPUs (#1046)
    • Support deprecation information in Config (#1275)
    • Add windows CI (#1023)

    Bug fixes

    • Fix the nms implementation of CPU (#1244)
    • Remove the duplicate files in mmcv/ops/csrc (#1284)
    • Upgrade the version of ONNX Runtime (#1290)

    Docs

    • Use myst-parser extension for sphinx and make the style more beautiful (#1287)
    • Add the Chinese documentation for utils.md and runner.md (#1232, #1202)

    Notes

    Since PyTorch 1.9 has been released, we plan to end the support for PyTorch 1.3 and 1.4 in future releases. We will still provide pre-compiled packages of these two versions for three months, but the reliability and technical support are not guaranteed.

    Contributors

    A total of 11 developers contributed to this release.

    @innerlee, @grimoire, @zhouzaida, @raoshenglong, @jiang1997, @ZhiyuanChen, @mzr1996, @PeiqiWang, @hhaAndroid, @ZwwWayne, @densechen

    Source code(tar.gz)
    Source code(zip)
  • v1.3.11(Aug 12, 2021)

    Improvements

    • Refactor the directory of csrc (#1206)
    • Add PR document (#1209)
    • Speed up mmcv import (#1249)
    • Do not depend on setuptools>=52 (#1235)

    Bug Fixes

    • Fix the bug that the training log and evaluating log are mixed (#1252)
    • Fix dcn forward and backward when batch size is larger than im2col_step (#1212)
    • Fix potential bugs of basemodule when record the initilization information (#1217)

    Notes

    Since PyTorch 1.9 has been released, we plan to end the support for PyTorch 1.3 and 1.4 in the future releases. We will still provide pre-compiled packages of these two versions for three months, but the reliability and technical support are not guaranteed.

    Contributors

    A total of 12 developers contributed to this release.

    @hellock, @xvjiarui, @jshilong, @ZwwWayne, @MeowZheng, @innerlee, @zhouzaida, @kennymckormick, @grimoire, @nbei, @dreamerlin, @Junjun2016

    Source code(tar.gz)
    Source code(zip)
  • v1.3.10(Jul 24, 2021)

    New Features

    • Register CrissCrossAttention into plugin layers (#1189)
    • Support custom hooks in IterBasedRunner (#1193)
    • Add ONNX export support to torch.roll (#1194)
    • Add flat cosine lr updater (#1066)
    • Add logger for initialization of parameters (#1150)

    Improvements

    • Add is_tracing to wrap torch.jit.is_tracing in different versions of pytorch #1187
    • Revise the interface of upfirdn2d function (#1195)
    • Improve digit_version (#1185)
    • Add TERMINOLOGY.md (#895)

    Bug Fixes

    • Fix potential integer overflow in imequalize (#1198)
    • Fix floor/ceil error in deform_attn for windows (#1037)
    • Resolves the duplicate logs issue (#1164)
    • Fix example (#1074)
    • Prevent kernel_normalizer to change mask dtype (#1210)

    Notes

    Since PyTorch 1.9 has been released, we plan to end the support for PyTorch 1.3 and 1.4 in the future releases. We will still provide pre-compiled packages of these two versions for three months, but the reliability and technical support are not guaranteed.

    Contributors

    A total of 19 developers contributed to this release.

    @yeliudev, @007gzs, @wangg12, @qizhuli, @ddonatien, @mzr1996, @Junjun2016, @grimoire, @nbei, @dreamerlin, @jshilong, @kennymckormick, @zhouzaida, @ZwwWayne, @hellock, @MeowZheng, @innerlee, @xvjiarui, @RunningLeon

    Source code(tar.gz)
    Source code(zip)
Implementation of CoCa, Contrastive Captioners are Image-Text Foundation Models, in Pytorch

CoCa - Pytorch Implementation of CoCa, Contrastive Captioners are Image-Text Foundation Models, in Pytorch. They were able to elegantly fit in contras

Phil Wang 565 Dec 30, 2022
OpenMMLab Detection Toolbox and Benchmark

MMDetection is an open source object detection toolbox based on PyTorch. It is a part of the OpenMMLab project.

OpenMMLab 22.5k Jan 5, 2023
OpenMMLab Semantic Segmentation Toolbox and Benchmark.

Documentation: https://mmsegmentation.readthedocs.io/ English | 简体中文 Introduction MMSegmentation is an open source semantic segmentation toolbox based

OpenMMLab 5k Dec 31, 2022
OpenMMLab Image and Video Editing Toolbox

Introduction MMEditing is an open source image and video editing toolbox based on PyTorch. It is a part of the OpenMMLab project. The master branch wo

OpenMMLab 3.9k Jan 4, 2023
OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark

Introduction English | 简体中文 MMAction2 is an open-source toolbox for video understanding based on PyTorch. It is a part of the OpenMMLab project. The m

OpenMMLab 2.7k Jan 7, 2023
OpenMMLab Pose Estimation Toolbox and Benchmark.

Introduction English | 简体中文 MMPose is an open-source toolbox for pose estimation based on PyTorch. It is a part of the OpenMMLab project. The master b

OpenMMLab 2.8k Dec 31, 2022
MIM: MIM Installs OpenMMLab Packages

MIM provides a unified API for launching and installing OpenMMLab projects and their extensions, and managing the OpenMMLab model zoo.

OpenMMLab 254 Jan 4, 2023
Convert openmmlab (not only mmdetection) series model to tensorrt

MMDet to TensorRT This project aims to convert the mmdetection model to TensorRT model end2end. Focus on object detection for now. Mask support is exp

JinTian 4 Dec 17, 2021
Some pre-commit hooks for OpenMMLab projects

pre-commit-hooks Some pre-commit hooks for OpenMMLab projects. Using pre-commit-hooks with pre-commit Add this to your .pre-commit-config.yaml - rep

OpenMMLab 16 Nov 29, 2022
Mmrotate - OpenMMLab Rotated Object Detection Benchmark

OpenMMLab website HOT OpenMMLab platform TRY IT OUT ?? Documentation | ??️ Insta

OpenMMLab 1.2k Jan 4, 2023
An example to implement a new backbone with OpenMMLab framework.

Backbone example on OpenMMLab framework English | 简体中文 Introduction This is an template repo about how to use OpenMMLab framework to develop a new bac

Ma Zerun 22 Dec 29, 2022
Open source Python module for computer vision

About PCV PCV is a pure Python library for computer vision based on the book "Programming Computer Vision with Python" by Jan Erik Solem. More details

Jan Erik Solem 1.9k Jan 6, 2023
PyTorchCV: A PyTorch-Based Framework for Deep Learning in Computer Vision.

PyTorchCV: A PyTorch-Based Framework for Deep Learning in Computer Vision @misc{CV2018, author = {Donny You ([email protected])}, howpubl

Donny You 40 Sep 14, 2022
Build fully-functioning computer vision models with PyTorch

Detecto is a Python package that allows you to build fully-functioning computer vision and object detection models with just 5 lines of code. Inferenc

Alan Bi 576 Dec 29, 2022
Implementation of self-attention mechanisms for general purpose. Focused on computer vision modules. Ongoing repository.

Self-attention building blocks for computer vision applications in PyTorch Implementation of self attention mechanisms for computer vision in PyTorch

AI Summer 962 Dec 23, 2022
Datasets, Transforms and Models specific to Computer Vision

torchvision The torchvision package consists of popular datasets, model architectures, and common image transformations for computer vision. Installat

null 13.1k Jan 2, 2023
Repository providing a wide range of self-supervised pretrained models for computer vision tasks.

Hierarchical Pretraining: Research Repository This is a research repository for reproducing the results from the project "Self-supervised pretraining

Colorado Reed 53 Nov 9, 2022
A PyTorch-Based Framework for Deep Learning in Computer Vision

TorchCV: A PyTorch-Based Framework for Deep Learning in Computer Vision @misc{you2019torchcv, author = {Ansheng You and Xiangtai Li and Zhen Zhu a

Donny You 2.2k Jan 9, 2023
Open Source Differentiable Computer Vision Library for PyTorch

Kornia is a differentiable computer vision library for PyTorch. It consists of a set of routines and differentiable modules to solve generic computer

kornia 7.6k Jan 4, 2023