From 81de9f053ecd1286b2ef2813fb6a9e7e30f2349f Mon Sep 17 00:00:00 2001 From: zhouzaida Date: Thu, 6 Apr 2023 19:59:13 +0800 Subject: [PATCH 1/4] [Docs] Describe branch changes --- README_zh-CN.md | 52 ++++++++++++++++++++++++++++++++++--- docs/zh_cn/compatibility.md | 51 ++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 3 deletions(-) diff --git a/README_zh-CN.md b/README_zh-CN.md index 2e3a66f04c..dbcc9a3c11 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -1,5 +1,5 @@
- +
 
OpenMMLab 官网 @@ -17,9 +17,7 @@
 
-
-[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmcv.readthedocs.io/zh_CN/latest/) [![platform](https://img.shields.io/badge/platform-Linux%7CWindows%7CmacOS-blue)](https://mmcv.readthedocs.io/zh_CN/latest/get_started/installation.html) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mmcv)](https://pypi.org/project/mmcv/) [![pytorch](https://img.shields.io/badge/pytorch-1.8~2.0-orange)](https://pytorch.org/get-started/previous-versions/) @@ -29,8 +27,46 @@ [![codecov](https://codecov.io/gh/open-mmlab/mmcv/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmcv) [![license](https://img.shields.io/github/license/open-mmlab/mmcv.svg)](https://github.com/open-mmlab/mmcv/blob/master/LICENSE) +[📘使用文档](https://mmcv.readthedocs.io/zh_CN/latest/) | +[🛠️安装教程](https://mmcv.readthedocs.io/zh_CN/latest/get_started/installation.html) | +[🤔报告问题](https://github.com/open-mmlab/mmcv/issues/new/choose) + + + +
+ [English](README.md) | 简体中文 +
+ +
+ + + + + + + + + + + + + + + + + +
+ +## Highlights + +OpenMMLab 团队于 2022 年 9 月 1 日在世界人工智能大会发布了新一代训练引擎 [MMEngine](https://github.com/open-mmlab/mmengine),它是一个用于训练深度学习模型的基础库。相比于 MMCV,它提供了更高级且通用的训练器、接口更加统一的开放架构以及可定制化程度更高的训练流程。与此同时,MMCV 发布了 v2.0.0 预发布版本。 + +v2.0.0 正式版本于 2023 年 4 月 6 日发布。在 2.x 版本中,它删除了和训练流程相关的组件,并新增了数据变换模块。另外,从 2.x 版本开始,重命名包名 **mmcv** 为 **mmcv-lite** 以及 **mmcv-full** 为 **mmcv**。详情见[兼容性文档](docs/zh_cn/compatibility.md)。 + +MMCV 会同时维护 1.x (对应原 master 分支) 和 **2.x(对应 main 分支,现为默认分支)版本**,详情见[分支维护计划](README_zh-CN.md#分支维护计划)。 + ## 简介 MMCV 是一个面向计算机视觉的基础库,它提供了以下功能: @@ -120,6 +156,16 @@ mim install mmcv-lite `MMCV` 目前以 Apache 2.0 的许可证发布,但是其中有一部分功能并不是使用的 Apache2.0 许可证,我们在 [许可证](LICENSES.md) 中详细地列出了这些功能以及他们对应的许可证,如果您正在从事盈利性活动,请谨慎参考此文档。 +## 分支维护计划 + +MMCV 目前有两个分支,分别是 master 和 2.x 分支,它们会经历以下三个阶段: + +| 阶段 | 时间 | 分支 | 说明 | +| ------ | --------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | +| 公测期 | 2022/9/1 - 2023.4.5 | 公测版代码发布在 2.x 分支;默认主分支 master 仍对应 1.x 版本 | master 和 2.x 分支正常进行迭代 | +| 兼容期 | 2023/4/6 - 2023.12.31 | **2.x 分支重命名为 main 分支并设置为默认分支**;1.x 分支对应 1.x 版本 | 保持对旧版本 1.x 的维护和开发,响应用户需求,但尽量不引进破坏旧版本兼容性的改动;main 分支正常进行迭代 | +| 维护期 | 2024/1/1 - 待定 | 默认主分支 main 为 2.x 版本;1.x 分支对应 1.x 版本 | 1.x 分支进入维护阶段,不再进行新功能支持;main 分支正常进行迭代 | + ## OpenMMLab 的其他项目 - [MMEngine](https://github.com/open-mmlab/mmengine): OpenMMLab 深度学习模型训练基础库 diff --git a/docs/zh_cn/compatibility.md b/docs/zh_cn/compatibility.md index 6bda560927..c1261102f8 100644 --- a/docs/zh_cn/compatibility.md +++ b/docs/zh_cn/compatibility.md @@ -1,3 +1,54 @@ +### v2.0.0 + +OpenMMLab 团队于 2022 年 9 月 1 日在世界人工智能大会发布了新一代训练引擎 [MMEngine](https://github.com/open-mmlab/mmengine),它是一个用于训练深度学习模型的基础库。相比于 MMCV,它提供了更高级且通用的训练器、接口更加统一的开放架构以及可定制化程度更高的训练流程。 + +OpenMMLab 团队于 2023 年 4 月 6 日发布 MMCV [v2.0.0](https://github.com/open-mmlab/mmcv/releases/tag/v2.0.0)。在 2.x 版本中,它有以下重大变化: + +(1)删除了以下组件: + +- `mmcv.fileio` 模块,删除于 PR [#2179](https://github.com/open-mmlab/mmcv/pull/2179)。在需要使用 FileIO 的地方使用 mmengine 中的 FileIO 模块 +- `mmcv.runner`、`mmcv.parallel`、`mmcv.engine` 和 `mmcv.device`,删除于 PR [#2216](https://github.com/open-mmlab/mmcv/pull/2216) +- `mmcv.utils` 的所有类(例如 `Config` 和 `Registry`)和大部分函数,删除于 PR [#2217](https://github.com/open-mmlab/mmcv/pull/2217),只保留少数和 mmcv 相关的函数 +- `mmcv.onnex`、`mmcv.tensorrt` 模块以及相关的函数,删除于 PR [#2225](https://github.com/open-mmlab/mmcv/pull/2225) + +(2)新增了 [`mmcv.transforms`](https://github.com/open-mmlab/mmcv/tree/2.x/mmcv/transforms) 数据变换模块 + +(3)在 PR [#2235](https://github.com/open-mmlab/mmcv/pull/2235) 中将包名 **mmcv** 重命名为 **mmcv-lite**、 **mmcv-full** 重命名为 **mmcv**。此外,将环境变量 `MMCV_WITH_OPS` 的默认值从 0 改为 1 + + + + + + + + + + + + +
MMCV < 2.0MMCV >= 2.0
+ +```bash +# 包含算子,因为 mmcv-full 的最高版本小于 2.0.0,所以无需加版本限制 +mim install mmcv-full + +# 不包含算子 +mmcv install "mmcv < 2.0.0" +``` + + + +```bash +# 包含算子 +mim install openmim +mim install mmcv + +# 不包含算子,因为 mmcv-lite 的起始版本为 2.0.0,所以无需加版本限制 +pip install mmcv-lite +``` + +
+ ### v1.3.18 部分自定义算子对于不同的设备有不同实现,为此添加的大量宏命令与类型检查使得代码变得难以维护。例如: From f8b4697573ca896353647953eb036e5ed5a94336 Mon Sep 17 00:00:00 2001 From: zhouzaida Date: Thu, 6 Apr 2023 20:01:14 +0800 Subject: [PATCH 2/4] fix typo --- README_zh-CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_zh-CN.md b/README_zh-CN.md index dbcc9a3c11..8c4b6cfcaa 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -1,5 +1,5 @@
- +
 
OpenMMLab 官网 From 048499c243b6071fc6bbc7ac32880ccd04e162be Mon Sep 17 00:00:00 2001 From: zhouzaida Date: Thu, 6 Apr 2023 22:36:40 +0800 Subject: [PATCH 3/4] Update English --- README.md | 32 ++++++++++++-- README_zh-CN.md | 12 +++--- docs/en/community/contributing.md | 14 +++--- docs/en/compatibility.md | 52 +++++++++++++++++++++++ docs/en/deployment/mmcv_ops_definition.md | 2 +- docs/en/understand_mmcv/cnn.md | 41 ------------------ docs/zh_cn/community/contributing.md | 12 +++--- docs/zh_cn/compatibility.md | 3 +- docs/zh_cn/understand_mmcv/cnn.md | 39 ----------------- 9 files changed, 103 insertions(+), 104 deletions(-) diff --git a/README.md b/README.md index 8cd843fa6a..540248aca8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@
- +
 
OpenMMLab website @@ -17,9 +17,7 @@
 
-
-[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmcv.readthedocs.io/en/latest/) [![platform](https://img.shields.io/badge/platform-Linux%7CWindows%7CmacOS-blue)](https://mmcv.readthedocs.io/en/latest/get_started/installation.html) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mmcv)](https://pypi.org/project/mmcv/) [![pytorch](https://img.shields.io/badge/pytorch-1.8~2.0-orange)](https://pytorch.org/get-started/previous-versions/) @@ -29,8 +27,26 @@ [![codecov](https://codecov.io/gh/open-mmlab/mmcv/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmcv) [![license](https://img.shields.io/github/license/open-mmlab/mmcv.svg)](https://github.com/open-mmlab/mmcv/blob/master/LICENSE) +[📘Documentation](https://mmcv.readthedocs.io/en/latest/) | +[🛠️Installation](https://mmcv.readthedocs.io/en/latest/get_started/installation.html) | +[🤔Reporting Issues](https://github.com/open-mmlab/mmcv/issues/new/choose) + +
+ +
+ English | [简体中文](README_zh-CN.md) +
+ +## Highlights + +The OpenMMLab team released a new generation of training engine [MMEngine](https://github.com/open-mmlab/mmengine) at the World Artificial Intelligence Conference on September 1, 2022. It is a foundational library for training deep learning models. Compared with MMCV, it provides a universal and powerful runner, an open architecture with a more unified interface, and a more customizable training process. At the same time, MMCV released v2.0.0 release candidate version. + +MMCV v2.0.0 official version was released on April 6, 2023. In version 2.x, it removed components related to the training process and added a data transformation module. Also, starting from 2.x, it renamed the package names **mmcv** to **mmcv-lite** and **mmcv-full** to **mmcv**. For details, see [Compatibility Documentation](docs/en/compatibility.md). + +MMCV will maintain both [1.x](https://github.com/open-mmlab/mmcv/tree/1.x) (corresponding to the original [master](https://github.com/open-mmlab/mmcv/tree/master) branch) and **2.x** (corresponding to the **main** branch, now the default branch) versions simultaneously. For details, see [Branch Maintenance Plan](README.md#branch-maintenance-plan). + ## Introduction MMCV is a foundational library for computer vision research and it provides the following functionalities: @@ -136,6 +152,16 @@ We appreciate all contributions to improve MMCV. Please refer to [CONTRIBUTING.m 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](LICENSES.md) for the careful check, if you are using our code for commercial matters. +## Branch Maintenance Plan + +MMCV currently has four branches, namely main, 1.x, master, and 2.x, where 2.x is an alias for the main branch, and master is an alias for the 1.x branch. The 2.x and master branches will be deleted in the future. MMCV's branches go through the following three stages: + +| Phase | Time | Branch | description | +| -------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| RC Period | 2022.9.1 - 2023.4.5 | Release candidate code (2.x version) will be released on 2.x branch. Default master branch is still 1.x version | Master and 2.x branches iterate normally | +| Compatibility Period | 2023.4.6 - 2023.12.31 | **The 2.x branch has been renamed to the main branch and set as the default branch**, and 1.x branch will correspond to 1.x version | We still maintain the old version 1.x, respond to user needs, but try not to introduce changes that break compatibility; main branch iterates normally | +| Maintenance Period | From 2024/1/1 | Default main branch corresponds to 2.x version and 1.x branch is 1.x version | 1.x branch is in maintenance phase, no more new feature support; main branch is iterating normally | + ## Projects in OpenMMLab - [MMEngine](https://github.com/open-mmlab/mmengine): OpenMMLab foundational library for training deep learning models. diff --git a/README_zh-CN.md b/README_zh-CN.md index 8c4b6cfcaa..7d77be68f0 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -63,9 +63,9 @@ OpenMMLab 团队于 2022 年 9 月 1 日在世界人工智能大会发布了新一代训练引擎 [MMEngine](https://github.com/open-mmlab/mmengine),它是一个用于训练深度学习模型的基础库。相比于 MMCV,它提供了更高级且通用的训练器、接口更加统一的开放架构以及可定制化程度更高的训练流程。与此同时,MMCV 发布了 v2.0.0 预发布版本。 -v2.0.0 正式版本于 2023 年 4 月 6 日发布。在 2.x 版本中,它删除了和训练流程相关的组件,并新增了数据变换模块。另外,从 2.x 版本开始,重命名包名 **mmcv** 为 **mmcv-lite** 以及 **mmcv-full** 为 **mmcv**。详情见[兼容性文档](docs/zh_cn/compatibility.md)。 +MMCV v2.0.0 正式版本于 2023 年 4 月 6 日发布。在 2.x 版本中,它删除了和训练流程相关的组件,并新增了数据变换模块。另外,从 2.x 版本开始,重命名包名 **mmcv** 为 **mmcv-lite** 以及 **mmcv-full** 为 **mmcv**。详情见[兼容性文档](docs/zh_cn/compatibility.md)。 -MMCV 会同时维护 1.x (对应原 master 分支) 和 **2.x(对应 main 分支,现为默认分支)版本**,详情见[分支维护计划](README_zh-CN.md#分支维护计划)。 +MMCV 会同时维护 [1.x](https://github.com/open-mmlab/mmcv/tree/1.x) (对应原 [master](https://github.com/open-mmlab/mmcv/tree/master) 分支) 和 **2.x**(对应 **main** 分支,现为默认分支)版本,详情见[分支维护计划](README_zh-CN.md#分支维护计划)。 ## 简介 @@ -158,13 +158,13 @@ mim install mmcv-lite ## 分支维护计划 -MMCV 目前有两个分支,分别是 master 和 2.x 分支,它们会经历以下三个阶段: +MMCV 目前有四个分支,分别是 main、1.x、master 和 2.x,其中 2.x 为 main 分支的别名,master 为 1.x 分支的别名,2.x 和 master 这两个分支在将来会被删除。MMCV 的分支经历以下三个阶段: | 阶段 | 时间 | 分支 | 说明 | | ------ | --------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | -| 公测期 | 2022/9/1 - 2023.4.5 | 公测版代码发布在 2.x 分支;默认主分支 master 仍对应 1.x 版本 | master 和 2.x 分支正常进行迭代 | -| 兼容期 | 2023/4/6 - 2023.12.31 | **2.x 分支重命名为 main 分支并设置为默认分支**;1.x 分支对应 1.x 版本 | 保持对旧版本 1.x 的维护和开发,响应用户需求,但尽量不引进破坏旧版本兼容性的改动;main 分支正常进行迭代 | -| 维护期 | 2024/1/1 - 待定 | 默认主分支 main 为 2.x 版本;1.x 分支对应 1.x 版本 | 1.x 分支进入维护阶段,不再进行新功能支持;main 分支正常进行迭代 | +| 公测期 | 2022.9.1 - 2023.4.5 | 公测版代码发布在 2.x 分支;默认主分支 master 仍对应 1.x 版本 | master 和 2.x 分支正常进行迭代 | +| 兼容期 | 2023.4.6 - 2023.12.31 | **2.x 分支重命名为 main 分支并设置为默认分支**;1.x 分支对应 1.x 版本 | 保持对旧版本 1.x 的维护和开发,响应用户需求,但尽量不引进破坏旧版本兼容性的改动;main 分支正常进行迭代 | +| 维护期 | 2024.1.1 - 待定 | 默认主分支 main 为 2.x 版本;1.x 分支对应 1.x 版本 | 1.x 分支进入维护阶段,不再进行新功能支持;main 分支正常进行迭代 | ## OpenMMLab 的其他项目 diff --git a/docs/en/community/contributing.md b/docs/en/community/contributing.md index e339935778..303fd0d794 100644 --- a/docs/en/community/contributing.md +++ b/docs/en/community/contributing.md @@ -96,16 +96,16 @@ git commit -m "xxx" --no-verify #### 3. Create a development branch -After configuring the pre-commit, we should create a branch based on the master branch to develop the new feature or fix the bug. The proposed branch name is `username/pr_name` +After configuring the pre-commit, we should create a branch based on the main branch to develop the new feature or fix the bug. The proposed branch name is `username/pr_name` ```shell git checkout -b yhc/refactor_contributing_doc ``` -In subsequent development, if the master branch of the local repository is behind the master branch of "upstream", we need to pull the upstream for synchronization, and then execute the above command: +In subsequent development, if the main branch of the local repository is behind the main branch of "upstream", we need to pull the upstream for synchronization, and then execute the above command: ```shell -git pull upstream master +git pull upstream main ``` #### 4. Commit the code and pass the unit test @@ -168,18 +168,18 @@ MMCV will run unit test for the posted Pull Request on different platforms (Linu #### 7. Resolve conflicts -If your local branch conflicts with the latest master branch of "upstream", you'll need to resolove them. There are two ways to do this: +If your local branch conflicts with the latest main branch of "upstream", you'll need to resolove them. There are two ways to do this: ```shell git fetch --all --prune -git rebase upstream/master +git rebase upstream/main ``` or ```shell git fetch --all --prune -git merge upstream/master +git merge upstream/main ``` If you are very good at handling conflicts, then you can use rebase to resolve conflicts, as this will keep your commit logs tidy. If you are not familiar with `rebase`, then you can use `merge` to resolve conflicts. @@ -188,7 +188,7 @@ If you are very good at handling conflicts, then you can use rebase to resolve c #### Unit test -If you cannot run the unit test of some modules for lacking of some dependencies, such as [video](https://github.com/open-mmlab/mmcv/tree/master/mmcv/video) module, you can try to install the following dependencies: +If you cannot run the unit test of some modules for lacking of some dependencies, such as [video](https://github.com/open-mmlab/mmcv/tree/main/mmcv/video) module, you can try to install the following dependencies: ```shell # Linux diff --git a/docs/en/compatibility.md b/docs/en/compatibility.md index c8618388f4..cd2e1a10ea 100644 --- a/docs/en/compatibility.md +++ b/docs/en/compatibility.md @@ -1,3 +1,55 @@ +### v2.0.0 + +The OpenMMLab team released a new generation of training engine [MMEngine](https://github.com/open-mmlab/mmengine) at the World Artificial Intelligence Conference on September 1, 2022. It is a foundational library for training deep learning models. Compared with MMCV, it provides a universal and powerful runner, an open architecture with a more unified interface, and a more customizable training process. + +The OpenMMLab team released MMCV v2.0.0 on April 6, 2023. In the 2.x version, it has the following significant changes: + +(1) It removed the following components: + +- `mmcv.fileio` module, removed in PR [#2179](https://github.com/open-mmlab/mmcv/pull/2179). FileIO module from mmengine will be used wherever required. +- `mmcv.runner`, `mmcv.parallel`, `mmcv. engine` and `mmcv.device`, removed in PR [#2216](https://github.com/open-mmlab/mmcv/pull/2216). +- All classes in `mmcv.utils` (eg `Config` and `Registry`) and many functions, removed in PR [#2217](https://github.com/open-mmlab/mmcv/pull/2217). Only a few functions related to mmcv are reserved. +- `mmcv.onnex`, `mmcv.tensorrt` modules and related functions, removed in PR [#2225](https://github.com/open-mmlab/mmcv/pull/2225). +- Removed all root registrars in MMCV and registered classes or functions to the [root registrar](https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/root.py) in MMEngine. + +(2) It added the [`mmcv.transforms`](https://github.com/open-mmlab/mmcv/tree/main/mmcv/transforms) data transformation module. + +(3) It renamed the package name **mmcv** to **mmcv-lite** and **mmcv-full** to **mmcv** in PR [#2235](https://github.com/open-mmlab/mmcv/pull/2235). Also, change the default value of the environment variable `MMCV_WITH_OPS` from 0 to 1. + + + + + + + + + + + + +
MMCV < 2.0MMCV >= 2.0
+ +```bash +# Contains ops, because the highest version of mmcv-full is less than 2.0.0, so there is no need to add version restrictions +mim install mmcv-full + +# do not contain ops +mmcv install "mmcv < 2.0.0" +``` + + + +```bash +# Contains ops +mim install openmim +mim install mmcv + +# Ops are not included, because the starting version of mmcv-lite is 2.0.0rc1, so there is no need to add version restrictions +mim install mmcv-lite +``` + +
+ ### v1.3.18 Some ops have different implementations on different devices. Lots of macros and type checks are scattered in several files, which makes the code hard to maintain. For example: diff --git a/docs/en/deployment/mmcv_ops_definition.md b/docs/en/deployment/mmcv_ops_definition.md index d7eabb33fd..37097259bd 100644 --- a/docs/en/deployment/mmcv_ops_definition.md +++ b/docs/en/deployment/mmcv_ops_definition.md @@ -473,7 +473,7 @@ Read [PSANet: Point-wise Spatial Attention Network for Scene Parsing](https://hs Filter out boxes has high IoU overlap with previously selected boxes or low score. Output the indices of valid boxes. -Note this definition is slightly different with [onnx: NonMaxSuppression](https://github.com/onnx/onnx/blob/master/docs/Operators.md#nonmaxsuppression) +Note this definition is slightly different with [onnx: NonMaxSuppression](https://github.com/onnx/onnx/blob/main/docs/Operators.md#nonmaxsuppression) ### Parameters diff --git a/docs/en/understand_mmcv/cnn.md b/docs/en/understand_mmcv/cnn.md index 2c42f25d9d..12f5318bc7 100644 --- a/docs/en/understand_mmcv/cnn.md +++ b/docs/en/understand_mmcv/cnn.md @@ -77,44 +77,3 @@ conv = ConvModule(3, 8, 3, padding=1, act_cfg=dict(type='LeakyReLU')) conv = ConvModule( 3, 8, 2, norm_cfg=dict(type='BN'), order=('norm', 'conv', 'act')) ``` - -### Model Zoo - -Besides torchvision pre-trained models, we also provide pre-trained models of following CNN: - -- VGG Caffe -- ResNet Caffe -- ResNeXt -- ResNet with Group Normalization -- ResNet with Group Normalization and Weight Standardization -- HRNetV2 -- Res2Net -- RegNet - -#### Model URLs in JSON - -The model zoo links in MMCV are managed by JSON files. -The json file consists of key-value pair of model name and its url or path. -An example json file could be like: - -```json -{ - "model_a": "https://example.com/models/model_a_9e5bac.pth", - "model_b": "pretrain/model_b_ab3ef2c.pth" -} -``` - -The default links of the pre-trained models hosted on OpenMMLab AWS could be found [here](https://github.com/open-mmlab/mmcv/blob/master/mmcv/model_zoo/open_mmlab.json). - -You may override default links by putting `open-mmlab.json` under `MMCV_HOME`. If `MMCV_HOME` is not found in your environment, `~/.cache/mmcv` will be used by default. You may use your own path with `export MMCV_HOME=/your/path`. - -The external json files will be merged into default one. If the same key presents in both external json and default json, the external one will be used. - -#### Load Checkpoint - -The following types are supported for `filename` of `mmcv.load_checkpoint()`. - -- filepath: The filepath of the checkpoint. -- `http://xxx` and `https://xxx`: The link to download the checkpoint. The `SHA256` postfix should be contained in the filename. -- `torchvision://xxx`: The model links in `torchvision.models`. Please refer to [torchvision](https://pytorch.org/docs/stable/torchvision/models.html) for details. -- `open-mmlab://xxx`: The model links or filepath provided in default and additional json files. diff --git a/docs/zh_cn/community/contributing.md b/docs/zh_cn/community/contributing.md index e3aa781a5a..3805223a22 100644 --- a/docs/zh_cn/community/contributing.md +++ b/docs/zh_cn/community/contributing.md @@ -99,16 +99,16 @@ git commit -m "xxx" --no-verify #### 3. 创建开发分支 -安装完 pre-commit 之后,我们需要基于 master 创建开发分支,建议的分支命名规则为 `username/pr_name`。 +安装完 pre-commit 之后,我们需要基于 main 创建开发分支,建议的分支命名规则为 `username/pr_name`。 ```shell git checkout -b yhc/refactor_contributing_doc ``` -在后续的开发中,如果本地仓库的 master 分支落后于 upstream 的 master 分支,我们需要先拉取 upstream 的代码进行同步,再执行上面的命令 +在后续的开发中,如果本地仓库的 main 分支落后于 upstream 的 main 分支,我们需要先拉取 upstream 的代码进行同步,再执行上面的命令 ```shell -git pull upstream master +git pull upstream main ``` #### 4. 提交代码并在本地通过单元测试 @@ -178,14 +178,14 @@ MMCV 会在不同的平台(Linux、Window、Mac),基于不同版本的 Pyt ```shell git fetch --all --prune -git rebase upstream/master +git rebase upstream/main ``` 或者 ```shell git fetch --all --prune -git merge upstream/master +git merge upstream/main ``` 如果你非常善于处理冲突,那么可以使用 rebase 的方式来解决冲突,因为这能够保证你的 commit log 的整洁。如果你不太熟悉 `rebase` 的使用,那么可以使用 `merge` 的方式来解决冲突。 @@ -194,7 +194,7 @@ git merge upstream/master #### 单元测试 -如果你无法正常执行部分模块的单元测试,例如 [video](https://github.com/open-mmlab/mmcv/tree/master/mmcv/video) 模块,可能是你的当前环境没有安装以下依赖 +如果你无法正常执行部分模块的单元测试,例如 [video](https://github.com/open-mmlab/mmcv/tree/main/mmcv/video) 模块,可能是你的当前环境没有安装以下依赖 ```shell # Linux diff --git a/docs/zh_cn/compatibility.md b/docs/zh_cn/compatibility.md index c1261102f8..f9c80e74ce 100644 --- a/docs/zh_cn/compatibility.md +++ b/docs/zh_cn/compatibility.md @@ -10,8 +10,9 @@ OpenMMLab 团队于 2023 年 4 月 6 日发布 MMCV [v2.0.0](https://github.com/ - `mmcv.runner`、`mmcv.parallel`、`mmcv.engine` 和 `mmcv.device`,删除于 PR [#2216](https://github.com/open-mmlab/mmcv/pull/2216) - `mmcv.utils` 的所有类(例如 `Config` 和 `Registry`)和大部分函数,删除于 PR [#2217](https://github.com/open-mmlab/mmcv/pull/2217),只保留少数和 mmcv 相关的函数 - `mmcv.onnex`、`mmcv.tensorrt` 模块以及相关的函数,删除于 PR [#2225](https://github.com/open-mmlab/mmcv/pull/2225) +- 删除 MMCV 所有的根注册器并将类或者函数注册到 MMEngine 的[根注册器](https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/root.py) -(2)新增了 [`mmcv.transforms`](https://github.com/open-mmlab/mmcv/tree/2.x/mmcv/transforms) 数据变换模块 +(2)新增了 [`mmcv.transforms`](https://github.com/open-mmlab/mmcv/tree/main/mmcv/transforms) 数据变换模块 (3)在 PR [#2235](https://github.com/open-mmlab/mmcv/pull/2235) 中将包名 **mmcv** 重命名为 **mmcv-lite**、 **mmcv-full** 重命名为 **mmcv**。此外,将环境变量 `MMCV_WITH_OPS` 的默认值从 0 改为 1 diff --git a/docs/zh_cn/understand_mmcv/cnn.md b/docs/zh_cn/understand_mmcv/cnn.md index 1f910419b3..faba7c5918 100644 --- a/docs/zh_cn/understand_mmcv/cnn.md +++ b/docs/zh_cn/understand_mmcv/cnn.md @@ -73,42 +73,3 @@ conv = ConvModule(3, 8, 3, padding=1, act_cfg=dict(type='LeakyReLU')) conv = ConvModule( 3, 8, 2, norm_cfg=dict(type='BN'), order=('norm', 'conv', 'act')) ``` - -### Model Zoo - -除了`torchvision`的预训练模型,我们还提供以下 CNN 的预训练模型: - -- VGG Caffe -- ResNet Caffe -- ResNeXt -- ResNet with Group Normalization -- ResNet with Group Normalization and Weight Standardization -- HRNetV2 -- Res2Net -- RegNet - -#### Model URLs in JSON - -MMCV中的Model Zoo Link 由 JSON 文件管理。 json 文件由模型名称及其url或path的键值对组成,一个json文件可能类似于: - -```json -{ - "model_a": "https://example.com/models/model_a_9e5bac.pth", - "model_b": "pretrain/model_b_ab3ef2c.pth" -} -``` - -可以在[此处](https://github.com/open-mmlab/mmcv/blob/master/mmcv/model_zoo/open_mmlab.json)找到托管在 OpenMMLab AWS 上的预训练模型的默认链接。 - -你可以通过将 `open-mmlab.json` 放在 `MMCV_HOME`下来覆盖默认链接,如果在环境中找不到`MMCV_HOME`,则默认使用 `~/.cache/mmcv`。当然你也可以使用命令 `export MMCV_HOME=/your/path`来设置自己的路径。 - -外部的json文件将被合并为默认文件,如果相同的键出现在外部`json`和默认`json`中,则将使用外部`json`。 - -#### Load Checkpoint - -`mmcv.load_checkpoint()`的参数`filename`支持以下类型: - -- filepath: `checkpoint`路径 -- `http://xxx` and `https://xxx`: 下载checkpoint的链接,文件名中必需包含`SHA256`后缀 -- `torchvision://xxx`: `torchvision.models`中的模型链接,更多细节参考 [torchvision](https://pytorch.org/docs/stable/torchvision/models.html) -- `open-mmlab://xxx`: 默认和其他 json 文件中提供的模型链接或文件路径 From be6af17e00684c927d85bf97a81c67a2b8f96fb5 Mon Sep 17 00:00:00 2001 From: zhouzaida Date: Thu, 6 Apr 2023 22:55:40 +0800 Subject: [PATCH 4/4] refine --- README.md | 2 +- README_zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 540248aca8..f0ca668b12 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ English | [简体中文](README_zh-CN.md) ## Highlights -The OpenMMLab team released a new generation of training engine [MMEngine](https://github.com/open-mmlab/mmengine) at the World Artificial Intelligence Conference on September 1, 2022. It is a foundational library for training deep learning models. Compared with MMCV, it provides a universal and powerful runner, an open architecture with a more unified interface, and a more customizable training process. At the same time, MMCV released v2.0.0 release candidate version. +The OpenMMLab team released a new generation of training engine [MMEngine](https://github.com/open-mmlab/mmengine) at the World Artificial Intelligence Conference on September 1, 2022. It is a foundational library for training deep learning models. Compared with MMCV, it provides a universal and powerful runner, an open architecture with a more unified interface, and a more customizable training process. MMCV v2.0.0 official version was released on April 6, 2023. In version 2.x, it removed components related to the training process and added a data transformation module. Also, starting from 2.x, it renamed the package names **mmcv** to **mmcv-lite** and **mmcv-full** to **mmcv**. For details, see [Compatibility Documentation](docs/en/compatibility.md). diff --git a/README_zh-CN.md b/README_zh-CN.md index 7d77be68f0..e48f33bd7f 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -61,7 +61,7 @@ ## Highlights -OpenMMLab 团队于 2022 年 9 月 1 日在世界人工智能大会发布了新一代训练引擎 [MMEngine](https://github.com/open-mmlab/mmengine),它是一个用于训练深度学习模型的基础库。相比于 MMCV,它提供了更高级且通用的训练器、接口更加统一的开放架构以及可定制化程度更高的训练流程。与此同时,MMCV 发布了 v2.0.0 预发布版本。 +OpenMMLab 团队于 2022 年 9 月 1 日在世界人工智能大会发布了新一代训练引擎 [MMEngine](https://github.com/open-mmlab/mmengine),它是一个用于训练深度学习模型的基础库。相比于 MMCV,它提供了更高级且通用的训练器、接口更加统一的开放架构以及可定制化程度更高的训练流程。 MMCV v2.0.0 正式版本于 2023 年 4 月 6 日发布。在 2.x 版本中,它删除了和训练流程相关的组件,并新增了数据变换模块。另外,从 2.x 版本开始,重命名包名 **mmcv** 为 **mmcv-lite** 以及 **mmcv-full** 为 **mmcv**。详情见[兼容性文档](docs/zh_cn/compatibility.md)。