diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..ecc5fb547 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,34 @@ +version: 2.1 + +# this allows you to use CircleCI's dynamic configuration feature +setup: true + +# the path-filtering orb is required to continue a pipeline based on +# the path of an updated fileset +orbs: + path-filtering: circleci/path-filtering@0.1.2 + +workflows: + # the always-run workflow is always triggered, regardless of the pipeline parameters. + always-run: + jobs: + # the path-filtering/filter job determines which pipeline + # parameters to update. + - path-filtering/filter: + name: check-updated-files + # 3-column, whitespace-delimited mapping. One mapping per + # line: + # + mapping: | + mmrotate/.* lint_only false + requirements/.* lint_only false + tests/.* lint_only false + tools/.* lint_only false + configs/.* lint_only false + .circleci/.* lint_only false + base-revision: main + # this is the path of the configuration we should trigger once + # path filtering and pipeline parameter value updates are + # complete. In this case, we are using the parent dynamic + # configuration itself. + config-path: .circleci/test.yml diff --git a/.circleci/docker/Dockerfile b/.circleci/docker/Dockerfile new file mode 100644 index 000000000..d9cf8cc77 --- /dev/null +++ b/.circleci/docker/Dockerfile @@ -0,0 +1,11 @@ +ARG PYTORCH="1.8.1" +ARG CUDA="10.2" +ARG CUDNN="7" + +FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel + +# To fix GPG key error when running apt-get update +RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub +RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub + +RUN apt-get update && apt-get install -y ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 libgl1-mesa-glx diff --git a/.circleci/scripts/get_mmcv_var.sh b/.circleci/scripts/get_mmcv_var.sh new file mode 100644 index 000000000..552ff871a --- /dev/null +++ b/.circleci/scripts/get_mmcv_var.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +TORCH=$1 +CUDA=$2 + +# 10.2 -> cu102 +MMCV_CUDA="cu`echo ${CUDA} | tr -d '.'`" + +# MMCV only provides pre-compiled packages for torch 1.x.0 +# which works for any subversions of torch 1.x. +# We force the torch version to be 1.x.0 to ease package searching +# and avoid unnecessary rebuild during MMCV's installation. +TORCH_VER_ARR=(${TORCH//./ }) +TORCH_VER_ARR[2]=0 +printf -v MMCV_TORCH "%s." "${TORCH_VER_ARR[@]}" +MMCV_TORCH=${MMCV_TORCH%?} # Remove the last dot + +echo "export MMCV_CUDA=${MMCV_CUDA}" >> $BASH_ENV +echo "export MMCV_TORCH=${MMCV_TORCH}" >> $BASH_ENV diff --git a/.circleci/test.yml b/.circleci/test.yml new file mode 100644 index 000000000..412780046 --- /dev/null +++ b/.circleci/test.yml @@ -0,0 +1,183 @@ + + +version: 2.1 + +# the default pipeline parameters, which will be updated according to +# the results of the path-filtering orb +parameters: + lint_only: + type: boolean + default: true + +jobs: + lint: + docker: + - image: cimg/python:3.7.4 + steps: + - checkout + - run: + name: Install pre-commit hook + command: | + pip install pre-commit + pre-commit install + - run: + name: Linting + command: pre-commit run --all-files + - run: + name: Check docstring coverage + command: | + pip install interrogate + interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-regex "__repr__" --fail-under 50 mmrotate + build_cpu: + parameters: + # The python version must match available image tags in + # https://circleci.com/developer/images/image/cimg/python + python: + type: string + torch: + type: string + torchvision: + type: string + docker: + - image: cimg/python:<< parameters.python >> + resource_class: large + steps: + - checkout + - run: + name: Get MMCV_TORCH as environment variables + command: | + . .circleci/scripts/get_mmcv_var.sh << parameters.torch >> + source $BASH_ENV + - run: + name: Install Libraries + command: | + sudo apt-get update + sudo apt-get install -y ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 libgl1-mesa-glx libjpeg-dev zlib1g-dev libtinfo-dev libncurses5 libgeos-dev + - run: + name: Configure Python & pip + command: | + python -m pip install --upgrade pip + python -m pip install wheel + - run: + name: Install PyTorch + command: | + python -V + python -m pip install torch==<< parameters.torch >>+cpu torchvision==<< parameters.torchvision >>+cpu -f https://download.pytorch.org/whl/torch_stable.html + - run: + name: Install mmrotate dependencies + command: | + python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch${MMCV_TORCH}/index.html + python -m pip install mmdet + python -m pip install -r requirements.txt + - run: + name: Build and install + command: | + python -m pip install -e . + - run: + name: Run unittests + command: | + python -m coverage run --branch --source mmrotate -m pytest tests/ + python -m coverage xml + python -m coverage report -m + build_cuda: + parameters: + torch: + type: string + cuda: + type: enum + enum: ["10.1", "10.2", "11.1"] + cudnn: + type: integer + default: 7 + machine: + image: ubuntu-2004-cuda-11.4:202110-01 + docker_layer_caching: true + resource_class: gpu.nvidia.small + steps: + - checkout + - run: + name: Get MMCV_TORCH and MMCV_CUDA as environment variables + command: | + . .circleci/scripts/get_mmcv_var.sh << parameters.torch >> << parameters.cuda >> + source $BASH_ENV + - run: + name: Build Docker image + command: | + docker build .circleci/docker -t mmrotate:gpu --build-arg PYTORCH=<< parameters.torch >> --build-arg CUDA=<< parameters.cuda >> --build-arg CUDNN=<< parameters.cudnn >> + docker run --gpus all -t -d -v /home/circleci/project:/mmrotate -w /mmrotate --name mmrotate mmrotate:gpu + - run: + name: Install mmrotate dependencies + command: | + docker exec mmrotate pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/${MMCV_CUDA}/torch${MMCV_TORCH}/index.html + docker exec mmrotate pip install mmdet + docker exec mmrotate pip install -r requirements.txt + - run: + name: Build and install + command: | + docker exec mmrotate pip install -e . + - run: + name: Run unittests + command: | + docker exec mmrotate python -m pytest tests/ +workflows: + pr_stage_lint: + when: << pipeline.parameters.lint_only >> + jobs: + - lint: + name: lint + filters: + branches: + ignore: + - main + pr_stage_test: + when: + not: + << pipeline.parameters.lint_only >> + jobs: + - lint: + name: lint + filters: + branches: + ignore: + - main + - build_cpu: + name: minimum_version_cpu + torch: 1.6.0 + torchvision: 0.7.0 + python: 3.7.7 + requires: + - lint + - build_cpu: + name: maximum_version_cpu + torch: 1.9.0 + torchvision: 0.10.0 + python: 3.9.0 + requires: + - minimum_version_cpu + - hold: + type: approval + requires: + - maximum_version_cpu + - build_cuda: + name: mainstream_version_gpu + torch: 1.8.1 + # Use double quotation mark to explicitly specify its type + # as string instead of number + cuda: "10.2" + requires: + - hold + merge_stage_test: + when: + not: + << pipeline.parameters.lint_only >> + jobs: + - build_cuda: + name: minimum_version_gpu + torch: 1.6.0 + # Use double quotation mark to explicitly specify its type + # as string instead of number + cuda: "10.1" + filters: + branches: + only: + - main diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.yml b/.github/ISSUE_TEMPLATE/1-bug-report.yml new file mode 100644 index 000000000..1c30e9385 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-bug-report.yml @@ -0,0 +1,105 @@ +name: "🐞 Bug report" +description: "Create a report to help us reproduce and fix the bug" +labels: "kind/bug,status/unconfirmed" +title: "[Bug] " + +body: + - type: markdown + attributes: + value: | + If you have already identified the reason, we strongly appreciate you creating a new PR to fix it [here](https://github.com/open-mmlab/mmrotate/pulls)! + If this issue is about installing MMCV, please file an issue at [MMCV](https://github.com/open-mmlab/mmcv/issues/new/choose). + If you need our help, please fill in as much of the following form as you're able to. + + **The less clear the description, the longer it will take to solve it.** + + - type: checkboxes + attributes: + label: Prerequisite + description: Please check the following items before creating a new issue. + options: + - label: I have searched [Issues](https://github.com/open-mmlab/mmrotate/issues) and [Discussions](https://github.com/open-mmlab/mmrotate/discussions) but cannot get the expected help. + required: true + - label: I have read the [FAQ documentation](https://mmrotate.readthedocs.io/en/1.x/notes/4_faq.html) but cannot get the expected help. + required: true + - label: The bug has not been fixed in the [latest version (master)](https://github.com/open-mmlab/mmrotate) or [latest version (1.x)](https://github.com/open-mmlab/mmrotate/tree/dev-1.x). + required: true + + - type: dropdown + id: task + attributes: + label: Task + description: The problem arises when + options: + - I'm using the official example scripts/configs for the officially supported tasks/models/datasets. + - I have modified the scripts/configs, or I'm working on my own tasks/models/datasets. + validations: + required: true + + - type: dropdown + id: branch + attributes: + label: Branch + description: The problem arises when I'm working on + options: + - master branch https://github.com/open-mmlab/mmrotate + - 1.x branch https://github.com/open-mmlab/mmrotate/tree/1.x + validations: + required: true + + + - type: textarea + attributes: + label: Environment + description: | + Please run `python mmrotate/utils/collect_env.py` to collect necessary environment information and copy-paste it here. + You may add additional information that may be helpful for locating the problem, such as + - How you installed PyTorch \[e.g., pip, conda, source\] + - Other environment variables that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.) + validations: + required: true + + - type: textarea + attributes: + label: Reproduces the problem - code sample + description: | + Please provide a code sample that reproduces the problem you ran into. It can be a Colab link or just a code snippet. + placeholder: | + ```python + # Sample code to reproduce the problem + ``` + validations: + required: true + + - type: textarea + attributes: + label: Reproduces the problem - command or script + description: | + What command or script did you run? + placeholder: | + ```shell + The command or script you run. + ``` + validations: + required: true + + - type: textarea + attributes: + label: Reproduces the problem - error message + description: | + Please provide the error message or logs you got, with the full traceback. + placeholder: | + ``` + The error message or logs you got, with the full traceback. + ``` + validations: + required: true + + - type: textarea + attributes: + label: Additional information + description: Tell us anything else you think we should know. + placeholder: | + 1. What's your expected result? + 2. What dataset did you use? + 3. What do you think might be the reason? diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.yml b/.github/ISSUE_TEMPLATE/2-feature-request.yml new file mode 100644 index 000000000..6285e6103 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-feature-request.yml @@ -0,0 +1,31 @@ +name: 🚀 Feature request +description: Suggest an idea for this project +labels: "kind/enhancement,status/unconfirmed" +title: "[Feature] " + +body: + - type: markdown + attributes: + value: | + We strongly appreciate you creating a PR to implement this feature [here](https://github.com/open-mmlab/mmrotate/pulls)! + If you need our help, please fill in as much of the following form as you're able to. + + **The less clear the description, the longer it will take to solve it.** + + - type: textarea + attributes: + label: What's the feature? + description: | + Tell us more about the feature and how this feature can help. + placeholder: | + E.g., It is inconvenient when \[....\]. + This feature can \[....\]. + validations: + required: true + + - type: textarea + attributes: + label: Any other context? + description: | + Have you considered any alternative solutions or features? If so, what are they? + Also, feel free to add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/3-new-model.yml b/.github/ISSUE_TEMPLATE/3-new-model.yml new file mode 100644 index 000000000..2346685ea --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3-new-model.yml @@ -0,0 +1,32 @@ +name: "\U0001F31F New model/dataset/scheduler addition" +description: Submit a proposal/request to implement a new model / dataset / scheduler +labels: "kind/feature,status/unconfirmed" +title: "[New Models] " + + +body: + - type: textarea + id: description-request + validations: + required: true + attributes: + label: Model/Dataset/Scheduler description + description: | + Put any and all important information relative to the model/dataset/scheduler + + - type: checkboxes + attributes: + label: Open source status + description: | + Please provide the open-source status, which would be very helpful + options: + - label: "The model implementation is available" + - label: "The model weights are available." + + - type: textarea + id: additional-info + attributes: + label: Provide useful links for the implementation + description: | + Please provide information regarding the implementation, the weights, and the authors. + Please mention the authors by @gh-username if you're aware of their usernames. diff --git a/.github/ISSUE_TEMPLATE/4-documentation.yml b/.github/ISSUE_TEMPLATE/4-documentation.yml new file mode 100644 index 000000000..9522a6df2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/4-documentation.yml @@ -0,0 +1,34 @@ +name: 📚 Documentation +description: Report an issue related to the documentation. +labels: "kind/doc,status/unconfirmed" +title: "[Docs] " + +body: +- type: dropdown + id: branch + attributes: + label: Branch + description: This issue is related to the + options: + - master branch https://mmrotate.readthedocs.io/en/latest/ + - 1.x branch https://mmrotate.readthedocs.io/en/1.x/ + validations: + required: true + +- type: textarea + attributes: + label: 📚 The doc issue + description: > + A clear and concise description the issue. + validations: + required: true + +- type: textarea + attributes: + label: Suggest a potential alternative/fix + description: > + Tell us how we could improve the documentation in this regard. +- type: markdown + attributes: + value: > + Thanks for contributing 🎉! diff --git a/.github/ISSUE_TEMPLATE/error-report.md b/.github/ISSUE_TEMPLATE/error-report.md deleted file mode 100644 index 2798b859b..000000000 --- a/.github/ISSUE_TEMPLATE/error-report.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -name: Error report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' ---- - -Thanks for your error report and we appreciate it a lot. - -**Checklist** - -1. I have searched related issues but cannot get the expected help. -2. I have read the [FAQ documentation](https://mmrotate.readthedocs.io/en/latest/faq.html) but cannot get the expected help. -3. The bug has not been fixed in the latest version. - -**Describe the bug** -A clear and concise description of what the bug is. - -**Reproduction** - -1. What command or script did you run? - -```none -A placeholder for the command. -``` - -2. Did you make any modifications on the code or config? Did you understand what you have modified? -3. What dataset did you use? - -**Environment** - -1. Please run `python mmrotate/utils/collect_env.py` to collect necessary environment information and paste it here. -2. You may add addition that may be helpful for locating the problem, such as - - How you installed PyTorch \[e.g., pip, conda, source\] - - Other environment variables that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.) - -**Error traceback** -If applicable, paste the error trackback here. - -```none -A placeholder for trackback. -``` - -**Bug fix** -If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated! diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 7bf92e8c9..000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' ---- - -**Describe the feature** - -**Motivation** -A clear and concise description of the motivation of the feature. -Ex1. It is inconvenient when \[....\]. -Ex2. There is a recent paper \[....\], which is very helpful for \[....\]. - -**Related resources** -If there is an official code release or third-party implementations, please also provide the information here, which would be very helpful. - -**Additional context** -Add any other context or screenshots about the feature request here. -If you would like to implement the feature and create a PR, please leave a comment here and that would be much appreciated. diff --git a/.github/ISSUE_TEMPLATE/general_questions.md b/.github/ISSUE_TEMPLATE/general_questions.md deleted file mode 100644 index f02dd63a8..000000000 --- a/.github/ISSUE_TEMPLATE/general_questions.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: General questions -about: Ask general questions to get help -title: '' -labels: '' -assignees: '' ---- diff --git a/.github/ISSUE_TEMPLATE/reimplementation_questions.md b/.github/ISSUE_TEMPLATE/reimplementation_questions.md deleted file mode 100644 index adc332425..000000000 --- a/.github/ISSUE_TEMPLATE/reimplementation_questions.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -name: Reimplementation Questions -about: Ask about questions during model reimplementation -title: '' -labels: reimplementation -assignees: '' ---- - -**Notice** - -There are several common situations in the reimplementation issues as below - -1. Reimplement a model in the model zoo using the provided configs -2. Reimplement a model in the model zoo on other dataset (e.g., custom datasets) -3. Reimplement a custom model but all the components are implemented in MMRotate -4. Reimplement a custom model with new modules implemented by yourself - -There are several things to do for different cases as below. - -- For case 1 & 3, please follow the steps in the following sections thus we could help to quick identify the issue. -- For case 2 & 4, please understand that we are not able to do much help here because we usually do not know the full code and the users should be responsible to the code they write. -- One suggestion for case 2 & 4 is that the users should first check whether the bug lies in the self-implemented code or the original code. For example, users can first make sure that the same model runs well on supported datasets. If you still need help, please describe what you have done and what you obtain in the issue, and follow the steps in the following sections and try as clear as possible so that we can better help you. - -**Checklist** - -1. I have searched related issues but cannot get the expected help. -2. The issue has not been fixed in the latest version. - -**Describe the issue** - -A clear and concise description of what the problem you meet and what have you done. - -**Reproduction** - -1. What command or script did you run? - -```none -A placeholder for the command. -``` - -2. What config dir you run? - -```none -A placeholder for the config. -``` - -3. Did you make any modifications on the code or config? Did you understand what you have modified? -4. What dataset did you use? - -**Environment** - -1. Please run `python mmrotate/utils/collect_env.py` to collect necessary environment information and paste it here. -2. You may add addition that may be helpful for locating the problem, such as - 1. How you installed PyTorch \[e.g., pip, conda, source\] - 2. Other environment variables that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.) - -**Results** - -If applicable, paste the related results here, e.g., what you expect and what you get. - -```none -A placeholder for results comparison -``` - -**Issue fix** - -If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated! diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2f1c00e75..d2b98bfe4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -110,6 +110,8 @@ jobs: run: python -m pip install -r requirements/tests.txt -r requirements/optional.txt - name: Build and install run: | + # Some dependencies may be required for the build of pycocotools + export CFLAGS=`python -c 'import sysconfig;print("-I"+sysconfig.get_paths()["include"])'` rm -rf .eggs python setup.py check -m -s TORCH_CUDA_ARCH_LIST=7.0 python -m pip install -e . @@ -163,6 +165,8 @@ jobs: run: python -m pip install -r requirements/tests.txt -r requirements/optional.txt - name: Build and install run: | + # Some dependencies may be required for the build of pycocotools + export CFLAGS=`python -c 'import sysconfig;print("-I"+sysconfig.get_paths()["include"])'` rm -rf .eggs python setup.py check -m -s TORCH_CUDA_ARCH_LIST=7.0 python -m pip install -e . diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index efcf14ba6..a6571b5ed 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/PyCQA/flake8 - rev: 3.8.3 + rev: 5.0.4 hooks: - id: flake8 - repo: https://github.com/asottile/seed-isort-config @@ -12,11 +12,11 @@ repos: hooks: - id: isort - repo: https://github.com/pre-commit/mirrors-yapf - rev: v0.30.0 + rev: v0.32.0 hooks: - id: yapf - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.1.0 + rev: v4.3.0 hooks: - id: trailing-whitespace - id: check-yaml @@ -29,7 +29,7 @@ repos: - id: mixed-line-ending args: [ "--fix=lf" ] - repo: https://github.com/codespell-project/codespell - rev: v2.1.0 + rev: v2.2.1 hooks: - id: codespell args: [ '--ignore-words-list', 'DOTA' ] diff --git a/README.md b/README.md index 83d2349e7..743194c9c 100644 --- a/README.md +++ b/README.md @@ -72,10 +72,9 @@ https://user-images.githubusercontent.com/10410257/154433305-416d129b-60c8-44c7- ## What's New -**0.3.2** was released in 6/7/2022: +**0.3.3** was released in 27/10/2022: -- Support Oriented Reppoints (CVPR'22) (#286) -- Support ConvNeXt backbone (CVPR'22) (#343) +- Fix several bugs in RepPoints Please refer to [changelog.md](docs/en/changelog.md) for details and release history. @@ -159,12 +158,12 @@ MMRotate is an open source project that is contributed by researchers and engine If you use this toolbox or benchmark in your research, please cite this project. ```bibtex -@article{mmrotate2022, +@inproceedings{zhou2022mmrotate, title = {MMRotate: A Rotated Object Detection Benchmark using PyTorch}, author = {Zhou, Yue and Yang, Xue and Zhang, Gefan and Wang, Jiabao and Liu, Yanyi and Hou, Liping and Jiang, Xue and Liu, Xingzhao and Yan, Junchi and Lyu, Chengqi and Zhang, Wenwei and Chen, Kai}, - journal= {arXiv preprint arXiv:2204.13317}, + booktitle={Proceedings of the 30th ACM International Conference on Multimedia}, year={2022} } ``` diff --git a/README_zh-CN.md b/README_zh-CN.md index 33d8e7343..b543b9275 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -68,10 +68,9 @@ https://user-images.githubusercontent.com/10410257/154433305-416d129b-60c8-44c7- ## 最新进展 -最新的 **0.3.2** 版本已经在 2022.07.06 发布: +最新的 **0.3.3** 版本已经在 2022.10.27 发布: -- 支持了 Oriented Reppoints 模型 (CVPR'22) (#286) -- 支持了 ConvNeXt 骨干网络 (CVPR'22) (#343) +- 修复了 Reppoints 的一些 bug 如果想了解更多版本更新细节和历史信息,请阅读[更新日志](docs/en/changelog.md)。 @@ -154,12 +153,13 @@ MMRotate 是一款由不同学校和公司共同贡献的开源项目。我们 如果你在研究中使用了本项目的代码或者性能基准,请参考如下 bibtex 引用 MMRotate。 ```bibtex -@article{mmrotate2022, +@inproceedings{zhou2022mmrotate, title = {MMRotate: A Rotated Object Detection Benchmark using PyTorch}, author = {Zhou, Yue and Yang, Xue and Zhang, Gefan and Wang, Jiabao and Liu, Yanyi and Hou, Liping and Jiang, Xue and Liu, Xingzhao and Yan, Junchi and Lyu, Chengqi and Zhang, Wenwei and Chen, Kai}, - journal= {arXiv preprint arXiv:2204.13317}, + booktitle={Proceedings of the 30th ACM International Conference on Multimedia}, + year={2022} } ``` diff --git a/docs/en/changelog.md b/docs/en/changelog.md index 1d53aa271..3c73ad2b5 100644 --- a/docs/en/changelog.md +++ b/docs/en/changelog.md @@ -1,5 +1,28 @@ ## Changelog +### v0.3.3 (27/10/2022) + +#### Bug Fixes + +- Fix reppoint bug fix when negative image training (#396) +- Fix bug in oriented_reppoints_head.py (#424) +- Fix mmcv-full version (#423) + +#### Improvements + +- Update issue templates to main branch (#579) +- Fix lint of dev branch (#578) + +#### Documentations + +- Update citation (#425) +- Fix markdown version when building docs (#414) + +#### Contributors + +A total of 5 developers contributed to this release. +Thanks @yangxue0827, @ZwwWayne, @MinkiSong, @zytx121, @RangiLyu + ### v0.3.2 (6/7/2022) #### Highlight diff --git a/docs/en/faq.md b/docs/en/faq.md index 8b0c77f2b..94b68e9d8 100644 --- a/docs/en/faq.md +++ b/docs/en/faq.md @@ -10,8 +10,9 @@ Compatible MMCV, MMDetection and MMRotate versions are shown as below. Please in | MMRotate version | MMCV version | MMDetection version | | :--------------: | :-----------------------: | :-----------------: | -| main | mmcv-full>=1.5.0, \<1.6.0 | mmdet >= 2.22.0 | -| 0.3.2 | mmcv-full>=1.4.5, \<1.6.0 | mmdet >= 2.22.0 | +| main | mmcv-full>=1.5.3, \<1.8.0 | mmdet >= 2.25.1 | +| 0.3.3 | mmcv-full>=1.5.3, \<1.7.0 | mmdet >= 2.25.1 | +| 0.3.2 | mmcv-full>=1.5.3, \<1.7.0 | mmdet >= 2.25.1 | | 0.3.1 | mmcv-full>=1.4.5, \<1.6.0 | mmdet >= 2.22.0 | | 0.3.0 | mmcv-full>=1.4.5, \<1.6.0 | mmdet >= 2.22.0 | | 0.2.0 | mmcv-full>=1.4.5, \<1.5.0 | mmdet >= 2.19.0 | diff --git a/docs/en/tutorials/customize_dataset.md b/docs/en/tutorials/customize_dataset.md index 0387a761a..e9b75492f 100644 --- a/docs/en/tutorials/customize_dataset.md +++ b/docs/en/tutorials/customize_dataset.md @@ -71,10 +71,10 @@ data = dict( # 2. model settings model = dict( - bbox_head=dict( - type='RotatedRetinaHead', - # explicitly over-write all the `num_classes` field from default 15 to 5. - num_classes=15)) + roi_head=dict( + bbox_head=dict( + # explicitly over-write all the `num_classes` field from default 15 to 5. + num_classes=5))) ``` #### 2. Check the annotations of the customized dataset diff --git a/docs/zh_cn/faq.md b/docs/zh_cn/faq.md index 93040b405..39b5675ca 100644 --- a/docs/zh_cn/faq.md +++ b/docs/zh_cn/faq.md @@ -10,8 +10,9 @@ MMRotate 和 MMCV, MMDet 版本兼容性如下所示,需要安装正确的版 | MMRotate 版本 | MMCV 版本 | MMDetection 版本 | | :-----------: | :-----------------------: | :--------------: | -| main | mmcv-full>=1.4.5, \<1.6.0 | mmdet >= 2.22.0 | -| 0.3.2 | mmcv-full>=1.4.5, \<1.6.0 | mmdet >= 2.22.0 | +| main | mmcv-full>=1.5.3, \<1.8.0 | mmdet >= 2.25.1 | +| 0.3.3 | mmcv-full>=1.5.3, \<1.7.0 | mmdet >= 2.25.1 | +| 0.3.2 | mmcv-full>=1.5.3, \<1.7.0 | mmdet >= 2.25.1 | | 0.3.1 | mmcv-full>=1.4.5, \<1.6.0 | mmdet >= 2.22.0 | | 0.3.0 | mmcv-full>=1.4.5, \<1.6.0 | mmdet >= 2.22.0 | | 0.2.0 | mmcv-full>=1.4.5, \<1.5.0 | mmdet >= 2.19.0 | diff --git a/mmrotate/__init__.py b/mmrotate/__init__.py index b82301f9f..7a13ae999 100644 --- a/mmrotate/__init__.py +++ b/mmrotate/__init__.py @@ -20,8 +20,8 @@ def digit_version(version_str): return digit_version -mmcv_minimum_version = '1.4.5' -mmcv_maximum_version = '1.6.0' +mmcv_minimum_version = '1.5.3' +mmcv_maximum_version = '1.8.0' mmcv_version = digit_version(mmcv.__version__) assert (mmcv_version >= digit_version(mmcv_minimum_version) diff --git a/mmrotate/core/bbox/assigners/max_convex_iou_assigner.py b/mmrotate/core/bbox/assigners/max_convex_iou_assigner.py index ebd8605dd..0654a84f6 100644 --- a/mmrotate/core/bbox/assigners/max_convex_iou_assigner.py +++ b/mmrotate/core/bbox/assigners/max_convex_iou_assigner.py @@ -212,6 +212,8 @@ def convex_overlaps(self, gt_rbboxes, points): overlaps (torch.Tensor): Overlaps between k gt_bboxes and n \ bboxes, shape(k, n). """ + if gt_rbboxes.size(0) == 0: + return gt_rbboxes.new_zeros((0, points.size(0))) overlaps = convex_iou(points, gt_rbboxes) overlaps = overlaps.transpose(1, 0) return overlaps diff --git a/mmrotate/models/dense_heads/oriented_reppoints_head.py b/mmrotate/models/dense_heads/oriented_reppoints_head.py index 359e4796e..bfe18ff12 100644 --- a/mmrotate/models/dense_heads/oriented_reppoints_head.py +++ b/mmrotate/models/dense_heads/oriented_reppoints_head.py @@ -792,7 +792,7 @@ def get_targets(self, gt_bboxes_ignore_list = [None for _ in range(num_imgs)] if gt_labels_list is None: gt_labels_list = [None for _ in range(num_imgs)] - all_overlaps_rotate_list = [None] * 4 + all_overlaps_rotate_list = [None] * len(proposals_list) (all_labels, all_label_weights, all_bbox_gt, all_proposals, all_proposal_weights, pos_inds_list, neg_inds_list, all_gt_inds, sampling_result) = multi_apply( diff --git a/mmrotate/models/dense_heads/rotated_reppoints_head.py b/mmrotate/models/dense_heads/rotated_reppoints_head.py index 332f1bd3e..8af17ae53 100644 --- a/mmrotate/models/dense_heads/rotated_reppoints_head.py +++ b/mmrotate/models/dense_heads/rotated_reppoints_head.py @@ -822,6 +822,9 @@ def get_pos_loss(self, cls_score, pts_pred, label, bbox_gt, label_weight, Returns: Tensor: Losses of all positive samples in single image. """ + if pos_inds.size(0) == 0: + pos_loss = bbox_gt.new_zeros(0) + return pos_loss, pos_scores = cls_score[pos_inds] pos_pts_pred = pts_pred[pos_inds] pos_bbox_gt = bbox_gt[pos_inds] diff --git a/mmrotate/version.py b/mmrotate/version.py index a5c2accc7..6ef564618 100644 --- a/mmrotate/version.py +++ b/mmrotate/version.py @@ -1,6 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. -__version__ = '0.3.2' +__version__ = '0.3.3' short_version = __version__ diff --git a/requirements/docs.txt b/requirements/docs.txt index d251554cb..09cc4d56a 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,7 +1,8 @@ docutils==0.16.0 +markdown>=3.4.0 myst-parser -e git+https://github.com/open-mmlab/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme sphinx==4.0.2 sphinx-copybutton -sphinx_markdown_tables +sphinx_markdown_tables>=0.0.16 sphinx_rtd_theme==0.5.2 diff --git a/setup.cfg b/setup.cfg index 5b91d475f..1570ae63a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,4 +15,4 @@ SPLIT_BEFORE_EXPRESSION_AFTER_OPENING_PAREN = true [codespell] skip = *.ipynb quiet-level = 3 -ignore-words-list = DOTA,dota,alse +ignore-words-list = DOTA,dota,alse,warmup