Skip to content

Commit

Permalink
[Fix] update code in docs and fix broken urls (open-mmlab#3947)
Browse files Browse the repository at this point in the history
  • Loading branch information
hubutui authored Oct 19, 2020
1 parent 5d07dda commit 29e0c5e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ python tools/convert_datasets/cityscapes.py ./data/cityscapes --nproc 8 --out-di
Currently the config files in `cityscapes` use COCO pre-trained weights to initialize.
You could download the pre-trained models in advance if network is unavailable or slow, otherwise it would cause errors at the beginning of training.

For using custom datasets, please refer to [Tutorials 2: Adding New Dataset](tutorials/new_dataset.md).
For using custom datasets, please refer to [Tutorials 2: Customize Datasets](tutorials/customize_dataset.md).

## Inference with pretrained models

Expand Down Expand Up @@ -461,5 +461,5 @@ If you need a lightweight GUI for visualizing the detection results, you can ref

## Tutorials

Currently, we provide four tutorials for users to [finetune models](tutorials/finetune.md), [add new dataset](tutorials/new_dataset.md), [design data pipeline](tutorials/data_pipeline.md) and [add new modules](tutorials/new_modules.md).
Currently, we provide four tutorials for users to [finetune models](tutorials/finetune.md), [customize datasets](tutorials/customize_dataset.md), [design data pipeline](tutorials/data_pipeline.md), [customize modules](tutorials/customize_models.md), [customize runtime settings](tutorials/customize_runtime.md), and [customize losses](tutorials/customize_losses.md).
We also provide a full description about the [config system](config.md).
9 changes: 6 additions & 3 deletions docs/tutorials/customize_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Create a new file `mmdet/models/backbones/mobilenet.py`.
```python
import torch.nn as nn

from ..registry import BACKBONES
from ..builder import BACKBONES


@BACKBONES.register_module()
Expand Down Expand Up @@ -74,7 +74,7 @@ model = dict(
Create a new file `mmdet/models/necks/pafpn.py`.

```python
from ..registry import NECKS
from ..builder import NECKS

@NECKS.register
class PAFPN(nn.Module):
Expand Down Expand Up @@ -125,11 +125,14 @@ neck=dict(

Here we show how to develop a new head with the example of [Double Head R-CNN](https://arxiv.org/abs/1904.06493) as the following.

First, add a new bbox head in `mmdet/models/bbox_heads/double_bbox_head.py`.
First, add a new bbox head in `mmdet/models/roi_heads/bbox_heads/double_bbox_head.py`.
Double Head R-CNN implements a new bbox head for object detection.
To implement a bbox head, basically we need to implement three functions of the new module as the following.

```python
from mmdet.models.builder import HEADS
from .bbox_head import BBoxHead

@HEADS.register_module()
class DoubleConvFCBBoxHead(BBoxHead):
r"""Bbox head used in Double-Head R-CNN
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/finetune.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Detectors pre-trained on the COCO dataset can serve as a good pre-trained model
This tutorial provides instruction for users to use the models provided in the [Model Zoo](../model_zoo.md) for other datasets to obtain better performance.

There are two steps to finetune a model on a new dataset.
- Add support for the new dataset following [Tutorial 2: Adding New Dataset](new_dataset.md).
- Add support for the new dataset following [Tutorial 2: Customize Datasets](customize_dataset.md).
- Modify the configs as will be discussed in this tutorial.


Expand Down

0 comments on commit 29e0c5e

Please sign in to comment.