You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/migration/interface.md
+16-23Lines changed: 16 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,17 @@ This guide describes the fundamental differences between MMSegmentation 0.x and
6
6
7
7
## New dependencies
8
8
9
-
MMSegmentation 1.x depends on some new packages, you can prepare a new clean environment and install again according to the [installation tutorial](get_started.md).
9
+
MMSegmentation 1.x depends on some new packages, you can prepare a new clean environment and install again according to the [installation tutorial](../get_started.md).
10
+
10
11
Or install the below packages manually.
11
12
12
13
1.[MMEngine](https://github.com/open-mmlab/mmengine): MMEngine is the core the OpenMMLab 2.0 architecture, and we splited many compentents unrelated to computer vision from MMCV to MMEngine.
13
14
14
15
2.[MMCV](https://github.com/open-mmlab/mmcv): The computer vision package of OpenMMLab. This is not a new dependency, but you need to upgrade it to above **2.0.0rc1** version.
15
16
16
-
3.[MMClassification](https://github.com/open-mmlab/mmclassification)(Optional): The image classification toolbox and benchmark of OpenMMLab. This is not a new dependency, but you need to upgrade it to above **1.0.0rc0** version.
17
+
3.[MMClassification](https://github.com/open-mmlab/mmclassification)(Optional): The image classification toolbox and benchmark of OpenMMLab. This is not a new dependency, but you need to upgrade it to above **1.0.0rc0** version.
18
+
19
+
4.[MMDetection](https://github.com/open-mmlab/mmdetection)(Optional): The object detection toolbox and benchmark of OpenMMLab. This is not a new dependency, but you need to upgrade it to above **3.0.0rc0** version.
17
20
18
21
## Train launch
19
22
@@ -86,7 +89,7 @@ Add `model.data_preprocessor` field to configure the `DataPreProcessor`, includi
86
89
87
90
-`bgr_to_rgb` (bool): whether to convert image from BGR to RGB.Defaults to False.
88
91
89
-
-`rgb_to_bgr` (bool): whether to convert image from RGB to RGB. Defaults to False.
92
+
-`rgb_to_bgr` (bool): whether to convert image from RGB to BGR. Defaults to False.
90
93
91
94
**Note:**
92
95
Please refer [models documentation](../advanced_guides/models.md) for more details.
@@ -260,8 +263,7 @@ tta_pipeline = [
260
263
Changes in **`evaluation`**:
261
264
262
265
- The **`evaluation`** field is split to `val_evaluator` and `test_evaluator`. And it won't support `interval` and `save_best` arguments.
263
-
The `interval` is moved to `train_cfg.val_interval`, and the `save_best`
264
-
is moved to `default_hooks.checkpoint.save_best`. `pre_eval` has been removed.
266
+
The `interval` is moved to `train_cfg.val_interval`, and the `save_best` is moved to `default_hooks.checkpoint.save_best`. `pre_eval` has been removed.
Changes in **`optimizer`** and **`optimizer_config`**:
293
295
294
-
- Now we use `optim_wrapper` field to specify all configuration about the optimization process. And the
295
-
`optimizer` is a sub field of `optim_wrapper` now.
296
+
- Now we use `optim_wrapper` field to specify all configuration about the optimization process. And the `optimizer` is a sub field of `optim_wrapper` now.
296
297
-`paramwise_cfg` is also a sub field of `optim_wrapper`, instead of `optimizer`.
297
298
-`optimizer_config` is removed now, and all configurations of it are moved to `optim_wrapper`.
298
299
-`grad_clip` is renamed to `clip_grad`.
@@ -326,11 +327,9 @@ optim_wrapper = dict(
326
327
Changes in **`lr_config`**:
327
328
328
329
- The `lr_config` field is removed and we use new `param_scheduler` to replace it.
329
-
- The `warmup` related arguments are removed, since we use schedulers combination to implement this
330
-
functionality.
330
+
- The `warmup` related arguments are removed, since we use schedulers combination to implement this functionality.
331
331
332
-
The new schedulers combination mechanism is very flexible, and you can use it to design many kinds of learning
333
-
rate / momentum curves. See [the tutorial](TODO) for more details.
332
+
The new schedulers combination mechanism is very flexible, and you can use it to design many kinds of learning rate / momentum curves. See [the tutorial](TODO) for more details.
334
333
335
334
<tableclass="docutils">
336
335
<tr>
@@ -374,8 +373,7 @@ param_scheduler = [
374
373
375
374
Changes in **`runner`**:
376
375
377
-
Most configuration in the original `runner` field is moved to `train_cfg`, `val_cfg` and `test_cfg`, which
378
-
configure the loop in training, validation and test.
376
+
Most configuration in the original `runner` field is moved to `train_cfg`, `val_cfg` and `test_cfg`, which configure the loop in training, validation and test.
379
377
380
378
<tableclass="docutils">
381
379
<tr>
@@ -402,8 +400,7 @@ test_cfg = dict(type='TestLoop') # Use the default test loop.
402
400
</tr>
403
401
</table>
404
402
405
-
In fact, in OpenMMLab 2.0, we introduced `Loop` to control the behaviors in training, validation and test. The functionalities of `Runner` are also changed. You can find more details of [runner tutorial](https://github.com/open-mmlab/mmengine/blob/main/docs/en/design/runner.md)
406
-
in [MMEngine](https://github.com/open-mmlab/mmengine/).
403
+
In fact, in OpenMMLab 2.0, we introduced `Loop` to control the behaviors in training, validation and test. The functionalities of `Runner` are also changed. You can find more details of [runner tutorial](https://github.com/open-mmlab/mmengine/blob/main/docs/en/design/runner.md) in [MMEngine](https://github.com/open-mmlab/mmengine/).
407
404
408
405
### Runtime settings
409
406
@@ -433,8 +430,7 @@ default_hooks = dict(
433
430
visualization=dict(type='SegVisualizationHook'))
434
431
```
435
432
436
-
In addition, we split the original logger to logger and visualizer. The logger is used to record
437
-
information and the visualizer is used to show the logger in different backends, like terminal and TensorBoard.
433
+
In addition, we split the original logger to logger and visualizer. The logger is used to record information and the visualizer is used to show the logger in different backends, like terminal and TensorBoard.
438
434
439
435
<tableclass="docutils">
440
436
<tr>
@@ -478,8 +474,7 @@ Changes in **`load_from`** and **`resume_from`**:
478
474
- If `resume=False` and `load_from` is **not None**, only load the checkpoint, not resume training.
479
475
- If `resume=False` and `load_from` is **None**, do not load nor resume.
480
476
481
-
Changes in **`dist_params`**: The `dist_params` field is a sub field of `env_cfg` now. And there are some new
482
-
configurations in the `env_cfg`.
477
+
Changes in **`dist_params`**: The `dist_params` field is a sub field of `env_cfg` now. And there are some new configurations in the `env_cfg`.
483
478
484
479
```python
485
480
env_cfg =dict(
@@ -496,8 +491,6 @@ env_cfg = dict(
496
491
497
492
Changes in **`workflow`**: `workflow` related functionalities are removed.
498
493
499
-
New field **`visualizer`**: The visualizer is a new design in OpenMMLab 2.0 architecture. We use a
500
-
visualizer instance in the runner to handle results & log visualization and save to different backends.
501
-
See the [visualization tutorial](user_guides/visualization.md) for more details.
494
+
New field **`visualizer`**: The visualizer is a new design in OpenMMLab 2.0 architecture. We use a visualizer instance in the runner to handle results & log visualization and save to different backends. See the [visualization tutorial](../user_guides/visualization.md) for more details.
502
495
503
-
New field **`default_scope`**: The start point to search module for all registries. The `default_scope` in MMSegmentation is `mmseg`. See [the registry tutorial](https://github.com/open-mmlab/mmengine/blob/main/docs/en/tutorials/registry.md) for more details.
496
+
New field **`default_scope`**: The start point to search module for all registries. The `default_scope` in MMSegmentation is `mmseg`. See [the registry tutorial](https://github.com/open-mmlab/mmengine/blob/main/docs/en/advanced_tutorials/registry.md) for more details.
Copy file name to clipboardExpand all lines: docs/en/migration/package.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,9 +74,8 @@ We moved registry implementations for all kinds of modules in MMSegmentation in
74
74
75
75
### `mmseg.apis`
76
76
77
-
OpenMMLab 2.0 tries to support unified interface for multitasking of Computer Vision,
78
-
and releases much stronger [`Runner`](https://github.com/open-mmlab/mmengine/blob/main/docs/en/design/runner.md),
79
-
so MMSeg 1.x removed modules in `train.py` and `test.py` renamed `init_segmentor` to `init_model` and `inference_segmentor` to `inference_model`
77
+
OpenMMLab 2.0 tries to support unified interface for multitasking of Computer Vision, and releases much stronger [`Runner`](https://github.com/open-mmlab/mmengine/blob/main/docs/en/design/runner.md), so MMSeg 1.x removed modules in `train.py` and `test.py` renamed `init_segmentor` to `init_model` and `inference_segmentor` to `inference_model`.
78
+
80
79
Here is the changes of `mmseg.apis`:
81
80
82
81
| Function | Changes |
@@ -92,7 +91,7 @@ Here is the changes of `mmseg.apis`:
92
91
93
92
### `mmseg.datasets`
94
93
95
-
OpenMMLab 2.0 defines the `BaseDataset` to function and interface of dataset, and MMSegmentation 1.x also follow this protocol and defines the `BaseSegDataset` inherited from `BaseDataset`. MMCV 2.x collects general data transforms for multiple tasks e.g. classification, detection, segmentation, so MMSegmentation 1.x uses these data transforms and removes them from mmseg.datasets
94
+
OpenMMLab 2.0 defines the `BaseDataset` to function and interface of dataset, and MMSegmentation 1.x also follow this protocol and defines the `BaseSegDataset` inherited from `BaseDataset`. MMCV 2.x collects general data transforms for multiple tasks e.g. classification, detection, segmentation, so MMSegmentation 1.x uses these data transforms and removes them from mmseg.datasets.
0 commit comments