Skip to content

Commit

Permalink
Fix bug in docstring. (#137)
Browse files Browse the repository at this point in the history
* Update rotated_anchor_head.py

* fix lint

* update docstring

* Update

* update docstring

* fix link in docs.

* update

* add install in reademe

* Revert "add install in reademe"

This reverts commit e0a0f09.

* Update .gitignore

* fix docstring error

* fix readthedocs api bug

* fix hyperlink

* Update smooth_focal_loss.py

* fix lint

* fix bugs

* update return in docstring

* fix bugs

* update api.rst

* update assigner

* fix bugs

* update

* update

* fix bugs in return

* add download link in demo

* fix typos
  • Loading branch information
zytx121 authored Apr 1, 2022
1 parent 27ad538 commit d11241f
Show file tree
Hide file tree
Showing 64 changed files with 761 additions and 428 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ instance/
.scrapy

# Sphinx documentation
docs/_build/
docs/en/_build/
docs/zh_cn/_build/
src

# PyBuilder
target/
Expand Down
3 changes: 2 additions & 1 deletion demo/huge_image_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
Example:
```
wget -P checkpoint https://download.openmmlab.com/mmrotate/v0.1.0/oriented_rcnn/oriented_rcnn_r50_fpn_1x_dota_le90/oriented_rcnn_r50_fpn_1x_dota_le90-6d2b2ce0.pth # noqa: E501, E261.
python demo/huge_image_demo.py \
demo/dota_demo.jpg \
configs/oriented_rcnn/oriented_rcnn_r50_fpn_1x_dota_v3.py \
work_dirs/oriented_rcnn_r50_fpn_1x_dota_v3/epoch_12.pth \
checkpoint/oriented_rcnn_r50_fpn_1x_dota_le90-6d2b2ce0.pth \
```
""" # nowq

Expand Down
7 changes: 5 additions & 2 deletions demo/image_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
"""Inference on single image.
Example:
```
wget -P checkpoint https://download.openmmlab.com/mmrotate/v0.1.0/oriented_rcnn/oriented_rcnn_r50_fpn_1x_dota_le90/oriented_rcnn_r50_fpn_1x_dota_le90-6d2b2ce0.pth # noqa: E501, E261.
python demo/image_demo.py \
demo/demo.jpg \
configs/oriented_rcnn/oriented_rcnn_r50_fpn_1x_dota_v3.py \
work_dirs/oriented_rcnn_r50_fpn_1x_dota_v3/epoch_12.pth \
configs/oriented_rcnn/oriented_rcnn_r50_fpn_1x_dota_le90.py \
checkpoint/oriented_rcnn_r50_fpn_1x_dota_le90-6d2b2ce0.pth \
demo/vis.jpg
```
""" # nowq
Expand Down
80 changes: 63 additions & 17 deletions docs/en/api.rst
Original file line number Diff line number Diff line change
@@ -1,42 +1,88 @@
mmrotate
=================
mmrotate.apis
--------------
.. automodule:: mmrotate.apis
:members:

mmrotate.models
------------------------------
.. automodule:: mmrotate.models
mmrotate.core
--------------

anchor
^^^^^^^^^^
.. automodule:: mmrotate.core.anchor
:members:

backbones
bbox
^^^^^^^^^^
.. automodule:: mmrotate.models.backbones
.. automodule:: mmrotate.core.bbox
:members:

dense_heads
patch
^^^^^^^^^^
.. automodule:: mmrotate.models.dense_heads
.. automodule:: mmrotate.core.patch
:members:

evaluation
^^^^^^^^^^
.. automodule:: mmrotate.core.evaluation
:members:

post_processing
^^^^^^^^^^^^^^^
.. automodule:: mmrotate.core.post_processing
:members:

mmrotate.datasets
--------------

datasets
^^^^^^^^^^
.. automodule:: mmrotate.datasets
:members:

pipelines
^^^^^^^^^^
.. automodule:: mmrotate.datasets.pipelines
:members:

mmrotate.models
--------------

detectors
^^^^^^^^^^
.. automodule:: mmrotate.models.detectors
:members:

losses
backbones
^^^^^^^^^^
.. automodule:: mmrotate.models.losses
.. automodule:: mmrotate.models.backbones
:members:

necks
^^^^^^^^^^^^
.. automodule:: mmrotate.models.necks
:members:

dense_heads
^^^^^^^^^^^^
.. automodule:: mmrotate.models.dense_heads
:members:

roi_heads
^^^^^^^^^^
.. automodule:: mmrotate.models.roi_heads
:members:

mmrotate.core
------------------------------
.. automodule:: mmrotate.core
losses
^^^^^^^^^^
.. automodule:: mmrotate.models.losses
:members:

mmrotate.datasets
------------------------------
.. automodule:: mmrotate.datasets
utils
^^^^^^^^^^
.. automodule:: mmrotate.models.utils
:members:

mmrotate.utils
--------------
.. automodule:: mmrotate.utils
:members:
4 changes: 2 additions & 2 deletions docs/en/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ python tools/test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} [optional arguments] --la

Examples:

Inference RotatedRetinaNet on DOTA-1.0 dataset, which can generate compressed files for online [submission](https://captain-whu.github.io/DOTA/evaluation.html). (Please change the [data_root](../../configs/_base_/datasets/dotav1.py) firstly.)
Inference RotatedRetinaNet on DOTA-1.0 dataset, which can generate compressed files for online [submission](https://captain-whu.github.io/DOTA/evaluation.html). (Please change the [data_root](https://github.com/open-mmlab/mmrotate/tree/main/configs/_base_/datasets/dotav1.py) firstly.)
```shell
python ./tools/test.py \
configs/rotated_retinanet/rotated_retinanet_obb_r50_fpn_1x_dota_le90.py \
Expand All @@ -35,7 +35,7 @@ or
--eval-options submission_dir=work_dirs/Task1_results
```

You can change the test set path in the [data_root](../../configs/_base_/datasets/dotav1.py) to the val set or trainval set for the offline evaluation.
You can change the test set path in the [data_root](https://github.com/open-mmlab/mmrotate/tree/main/configs/_base_/datasets/dotav1.py) to the val set or trainval set for the offline evaluation.
```shell
python ./tools/test.py \
configs/rotated_retinanet/rotated_retinanet_obb_r50_fpn_1x_dota_le90.py \
Expand Down
2 changes: 1 addition & 1 deletion docs/en/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Or you can still install MMRotate manually:

3. Install MMRotate.

You can simply install mmrotate with the following command:
You can simply install MMRotate with the following command:

```shell
pip install mmrotate
Expand Down
30 changes: 15 additions & 15 deletions docs/en/model_zoo.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
## Benchmark and Model Zoo

- [Rotated RetinaNet-OBB/HBB](../../configs/rotated_retinanet/README.md) (ICCV'2017)
- [Rotated FasterRCNN-OBB](../../configs/rotated_faster_rcnn/README.md) (TPAMI'2017)
- [Rotated RepPoints-OBB](../../configs/rotated_reppoints/README.md) (ICCV'2019)
- [RoI Transformer](../../configs/roi_trans/README.md) (CVPR'2019)
- [Gliding Vertex](../../configs/gliding_vertex/README.md) (TPAMI'2020)
- [CSL](../../configs/csl/README.md) (ECCV'2020)
- [R<sup>3</sup>Det](../../configs/r3det/README.md) (AAAI'2021)
- [S<sup>2</sup>A-Net](../../configs/s2anet/README.md) (TGRS'2021)
- [ReDet](../../configs/redet/README.md) (CVPR'2021)
- [Beyond Bounding-Box](../../configs/cfa/README.md) (CVPR'2021)
- [Oriented R-CNN](../../configs/oriented_rcnn/README.md) (ICCV'2021)
- [GWD](../../configs/gwd/README.md) (ICML'2021)
- [KLD](../../configs/kld/README.md) (NeurIPS'2021)
- [Rotated RetinaNet-OBB/HBB](https://github.com/open-mmlab/mmrotate/tree/main/configs/rotated_retinanet/README.md) (ICCV'2017)
- [Rotated FasterRCNN-OBB](https://github.com/open-mmlab/mmrotate/tree/main/configs/rotated_faster_rcnn/README.md) (TPAMI'2017)
- [Rotated RepPoints-OBB](https://github.com/open-mmlab/mmrotate/tree/main/configs/rotated_reppoints/README.md) (ICCV'2019)
- [RoI Transformer](https://github.com/open-mmlab/mmrotate/tree/main/configs/roi_trans/README.md) (CVPR'2019)
- [Gliding Vertex](https://github.com/open-mmlab/mmrotate/tree/main/configs/gliding_vertex/README.md) (TPAMI'2020)
- [CSL](https://github.com/open-mmlab/mmrotate/tree/main/configs/csl/README.md) (ECCV'2020)
- [R<sup>3</sup>Det](https://github.com/open-mmlab/mmrotate/tree/main/configs/r3det/README.md) (AAAI'2021)
- [S<sup>2</sup>A-Net](https://github.com/open-mmlab/mmrotate/tree/main/configs/s2anet/README.md) (TGRS'2021)
- [ReDet](https://github.com/open-mmlab/mmrotate/tree/main/configs/redet/README.md) (CVPR'2021)
- [Beyond Bounding-Box](https://github.com/open-mmlab/mmrotate/tree/main/configs/cfa/README.md) (CVPR'2021)
- [Oriented R-CNN](https://github.com/open-mmlab/mmrotate/tree/main/configs/oriented_rcnn/README.md) (ICCV'2021)
- [GWD](https://github.com/open-mmlab/mmrotate/tree/main/configs/gwd/README.md) (ICML'2021)
- [KLD](https://github.com/open-mmlab/mmrotate/tree/main/configs/kld/README.md) (NeurIPS'2021)
- [SASM](configs/sasm_reppoints/README.md) (AAAI'2022)
- [KFIoU](../../configs/kfiou/README.md) (arXiv)
- [G-Rep](../../configs/g_reppoints/README.md) (stay tuned)
- [KFIoU](https://github.com/open-mmlab/mmrotate/tree/main/configs/kfiou/README.md) (arXiv)
- [G-Rep](https://github.com/open-mmlab/mmrotate/tree/main/configs/g_reppoints/README.md) (stay tuned)

### Results on DOTA v1.0

Expand Down
80 changes: 63 additions & 17 deletions docs/zh_cn/api.rst
Original file line number Diff line number Diff line change
@@ -1,42 +1,88 @@
mmrotate
=================
mmrotate.apis
--------------
.. automodule:: mmrotate.apis
:members:

mmrotate.models
------------------------------
.. automodule:: mmrotate.models
mmrotate.core
--------------

anchor
^^^^^^^^^^
.. automodule:: mmrotate.core.anchor
:members:

backbones
bbox
^^^^^^^^^^
.. automodule:: mmrotate.models.backbones
.. automodule:: mmrotate.core.bbox
:members:

dense_heads
patch
^^^^^^^^^^
.. automodule:: mmrotate.models.dense_heads
.. automodule:: mmrotate.core.patch
:members:

evaluation
^^^^^^^^^^
.. automodule:: mmrotate.core.evaluation
:members:

post_processing
^^^^^^^^^^^^^^^
.. automodule:: mmrotate.core.post_processing
:members:

mmrotate.datasets
--------------

datasets
^^^^^^^^^^
.. automodule:: mmrotate.datasets
:members:

pipelines
^^^^^^^^^^
.. automodule:: mmrotate.datasets.pipelines
:members:

mmrotate.models
--------------

detectors
^^^^^^^^^^
.. automodule:: mmrotate.models.detectors
:members:

losses
backbones
^^^^^^^^^^
.. automodule:: mmrotate.models.losses
.. automodule:: mmrotate.models.backbones
:members:

necks
^^^^^^^^^^^^
.. automodule:: mmrotate.models.necks
:members:

dense_heads
^^^^^^^^^^^^
.. automodule:: mmrotate.models.dense_heads
:members:

roi_heads
^^^^^^^^^^
.. automodule:: mmrotate.models.roi_heads
:members:

mmrotate.core
------------------------------
.. automodule:: mmrotate.core
losses
^^^^^^^^^^
.. automodule:: mmrotate.models.losses
:members:

mmrotate.datasets
------------------------------
.. automodule:: mmrotate.datasets
utils
^^^^^^^^^^
.. automodule:: mmrotate.models.utils
:members:

mmrotate.utils
--------------
.. automodule:: mmrotate.utils
:members:
6 changes: 3 additions & 3 deletions docs/zh_cn/get_started.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Test a model
## 测试一个模型

- 单个 GPU
- 单个节点多个 GPU
Expand All @@ -20,7 +20,7 @@ python tools/test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} [optional arguments] --la

例子:

在 DOTA-1.0 数据集推理 RotatedRetinaNet,可以生成压缩文件用于在线[提交](https://captain-whu.github.io/DOTA/evaluation.html)(首先请修改 [data_root](../../configs/_base_/datasets/dotav1.py))
在 DOTA-1.0 数据集推理 RotatedRetinaNet 并生成压缩文件用于在线[提交](https://captain-whu.github.io/DOTA/evaluation.html) (首先请修改 [data_root](https://github.com/open-mmlab/mmrotate/tree/main/configs/_base_/datasets/dotav1.py))
```shell
python ./tools/test.py \
configs/rotated_retinanet/rotated_retinanet_obb_r50_fpn_1x_dota_le90.py \
Expand All @@ -35,7 +35,7 @@ python ./tools/test.py \
--eval-options submission_dir=work_dirs/Task1_results
```

您可以修改 [data_root](../../configs/_base_/datasets/dotav1.py) 中测试集的路径为验证集或训练集路径用于离线的验证。
您可以修改 [data_root](https://github.com/open-mmlab/mmrotate/tree/main/configs/_base_/datasets/dotav1.py) 中测试集的路径为验证集或训练集路径用于离线的验证。
```shell
python ./tools/test.py \
configs/rotated_retinanet/rotated_retinanet_obb_r50_fpn_1x_dota_le90.py \
Expand Down
2 changes: 1 addition & 1 deletion docs/zh_cn/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ MIM 能够自动地安装 OpenMMLab 的项目以及对应的依赖包。

3. 安装 MMRotate.

你可以直接通过如下命令从 pip 安装使用 mmrotate
你可以直接通过如下命令从 pip 安装使用 MMRotate

```shell
pip install mmrotate
Expand Down
30 changes: 15 additions & 15 deletions docs/zh_cn/model_zoo.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
## 基准和模型库

- [Rotated RetinaNet-OBB/HBB](../../configs/rotated_retinanet/README.md) (ICCV'2017)
- [Rotated FasterRCNN-OBB](../../configs/rotated_faster_rcnn/README.md) (TPAMI'2017)
- [Rotated RepPoints-OBB](../../configs/rotated_reppoints/README.md) (ICCV'2019)
- [RoI Transformer](../../configs/roi_trans/README.md) (CVPR'2019)
- [Gliding Vertex](../../configs/gliding_vertex/README.md) (TPAMI'2020)
- [CSL](../../configs/csl/README.md) (ECCV'2020)
- [R<sup>3</sup>Det](../../configs/r3det/README.md) (AAAI'2021)
- [S<sup>2</sup>A-Net](../../configs/s2anet/README.md) (TGRS'2021)
- [ReDet](../../configs/redet/README.md) (CVPR'2021)
- [Beyond Bounding-Box](../../configs/cfa/README.md) (CVPR'2021)
- [Oriented R-CNN](../../configs/oriented_rcnn/README.md) (ICCV'2021)
- [GWD](../../configs/gwd/README.md) (ICML'2021)
- [KLD](../../configs/kld/README.md) (NeurIPS'2021)
- [Rotated RetinaNet-OBB/HBB](https://github.com/open-mmlab/mmrotate/tree/main/configs/rotated_retinanet/README.md) (ICCV'2017)
- [Rotated FasterRCNN-OBB](https://github.com/open-mmlab/mmrotate/tree/main/configs/rotated_faster_rcnn/README.md) (TPAMI'2017)
- [Rotated RepPoints-OBB](https://github.com/open-mmlab/mmrotate/tree/main/configs/rotated_reppoints/README.md) (ICCV'2019)
- [RoI Transformer](https://github.com/open-mmlab/mmrotate/tree/main/configs/roi_trans/README.md) (CVPR'2019)
- [Gliding Vertex](https://github.com/open-mmlab/mmrotate/tree/main/configs/gliding_vertex/README.md) (TPAMI'2020)
- [CSL](https://github.com/open-mmlab/mmrotate/tree/main/configs/csl/README.md) (ECCV'2020)
- [R<sup>3</sup>Det](https://github.com/open-mmlab/mmrotate/tree/main/configs/r3det/README.md) (AAAI'2021)
- [S<sup>2</sup>A-Net](https://github.com/open-mmlab/mmrotate/tree/main/configs/s2anet/README.md) (TGRS'2021)
- [ReDet](https://github.com/open-mmlab/mmrotate/tree/main/configs/redet/README.md) (CVPR'2021)
- [Beyond Bounding-Box](https://github.com/open-mmlab/mmrotate/tree/main/configs/cfa/README.md) (CVPR'2021)
- [Oriented R-CNN](https://github.com/open-mmlab/mmrotate/tree/main/configs/oriented_rcnn/README.md) (ICCV'2021)
- [GWD](https://github.com/open-mmlab/mmrotate/tree/main/configs/gwd/README.md) (ICML'2021)
- [KLD](https://github.com/open-mmlab/mmrotate/tree/main/configs/kld/README.md) (NeurIPS'2021)
- [SASM](configs/sasm_reppoints/README.md) (AAAI'2022)
- [KFIoU](../../configs/kfiou/README.md) (arXiv)
- [G-Rep](../../configs/g_reppoints/README.md) (stay tuned)
- [KFIoU](https://github.com/open-mmlab/mmrotate/tree/main/configs/kfiou/README.md) (arXiv)
- [G-Rep](https://github.com/open-mmlab/mmrotate/tree/main/configs/g_reppoints/README.md) (stay tuned)

### DOTA v1.0 数据集上的结果

Expand Down
Loading

0 comments on commit d11241f

Please sign in to comment.