Skip to content

Commit 88e5ea0

Browse files
committed
Objects365 is added, and made some updates after rebasing on dev-3.x, .
1 parent 0ed99b5 commit 88e5ea0

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

docs/en/user_guides/finetune.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ model = dict(
5656

5757
## Modify dataset
5858

59-
The users may also need to prepare the dataset and write the configs about dataset, refer to [Customize Datasets](../advanced_guides/customize_dataset.md) for more detail. MMDetection V3.0 already supports VOC, WIDERFACE, COCO, LIVS, OpenImages, DeepFashion and Cityscapes Dataset.
59+
The users may also need to prepare the dataset and write the configs about dataset, refer to [Customize Datasets](../advanced_guides/customize_dataset.md) for more detail. MMDetection V3.0 already supports VOC, WIDERFACE, COCO, LIVS, OpenImages, DeepFashion, Objects365 and Cityscapes Dataset.
6060

6161
## Modify training schedule
6262

docs/zh_cn/user_guides/inference.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ MMDetection 提供了许多预训练好的检测模型,可以在 [Model Zoo](h
66

77
在 MMDetection 中,一个模型被定义为一个[配置文件](config.md)和对应被存储在 checkpoint 文件内的模型参数的集合。
88

9-
首先,我们建议从 [Faster RCNN](../../../configs/faster_rcnn) 开始,其 [配置](../../../configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py) 文件和 [checkpoint](https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth) 文件在此。
9+
首先,我们建议从 [Faster RCNN](https://github.com/open-mmlab/mmdetection/blob/3.x/configs/faster_rcnn) 开始,其 [配置](https://github.com/open-mmlab/mmdetection/blob/3.x/configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py) 文件和 [checkpoint](https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth) 文件在此。
1010
我们建议将 checkpoint 文件下载到 `checkpoints` 文件夹内。
1111

1212
## 推理的高层编程接口
@@ -19,11 +19,8 @@ import mmcv
1919
from mmcv.transforms import Compose
2020
from mmengine.utils import track_iter_progress
2121
from mmdet.registry import VISUALIZERS
22-
from mmdet.utils import register_all_modules
2322
from mmdet.apis import init_detector, inference_detector
2423

25-
# 注册 mmdet 中的所有模块
26-
register_all_modules()
2724

2825
# 指定模型的配置文件和 checkpoint 文件路径
2926
config_file = 'configs/faster_rcnn/faster-rcnn_r50-fpn_1x_coco.py'
@@ -58,6 +55,8 @@ visualizer.add_datasample(
5855
model.cfg.test_dataloader.dataset.pipeline[0].type = 'LoadImageFromNDArray'
5956
test_pipeline = Compose(model.cfg.test_dataloader.dataset.pipeline)
6057

58+
# 可视化工具在第33行和35行已经初完成了初始化,如果直接在一个 jupyter nodebook 中运行这个 demo,
59+
# 这里则不需要再创建一个可视化工具了。
6160
# 初始化可视化工具
6261
visualizer = VISUALIZERS.build(model.cfg.visualizer)
6362
# 从 checkpoint 中加载 Dataset_meta,并将其传递给模型的 init_detector
@@ -84,23 +83,32 @@ for frame in track_iter_progress(video_reader):
8483
cv2.destroyAllWindows()
8584
```
8685

87-
jupyter notebook 上的演示样例在 [demo/inference_demo.ipynb](../../../demo/inference_demo.ipynb)
86+
Jupyter notebook 上的演示样例在 [demo/inference_demo.ipynb](https://github.com/open-mmlab/mmdetection/blob/3.x/demo/inference_demo.ipynb)
8887

8988
注意: `inference_detector` 目前仅支持单张图片的推理。
9089

9190
## 演示样例
9291

93-
我们还提供了三个演示脚本,它们是使用高层编程接口实现的。 [源码在此](../../../demo)
92+
我们还提供了三个演示脚本,它们是使用高层编程接口实现的。 [源码在此](https://github.com/open-mmlab/mmdetection/blob/3.x/demo)
9493

9594
### 图片样例
9695

97-
这是在单张图片上进行推理的脚本,
96+
这是在单张图片上进行推理的脚本。
97+
98+
```shell
99+
python demo/image_demo.py \
100+
${IMAGE_FILE} \
101+
${CONFIG_FILE} \
102+
[--weights ${WEIGHTS}] \
103+
[--device ${GPU_ID}] \
104+
[--pred-score-thr ${SCORE_THR}]
105+
```
98106

99107
运行样例:
100108

101109
```shell
102110
python demo/image_demo.py demo/demo.jpg \
103-
configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py \
111+
configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py \
104112
--weights checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth \
105113
--device cpu
106114
```
@@ -122,7 +130,7 @@ python demo/webcam_demo.py \
122130

123131
```shell
124132
python demo/webcam_demo.py \
125-
configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py \
133+
configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py \
126134
checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth
127135
```
128136

0 commit comments

Comments
 (0)