Commit Graph

10 Commits (779b86cd74dc8df9024f72ab9939531c693d84e2)

Author SHA1 Message Date
Miao Zheng 310ec4afc7
[Enhancement] Modify interface of MMSeginferencer and add docs (#2658)
## Motivation

Make MMSeginferencer easier to be used

## Modification

1. Add `_load_weights_to_model` to MMSeginferencer, it is for get
`dataset_meta` from ckpt
2. Modify and remove some parameters of `__call__`, `visualization` and
`postprocess`
3. Add function of save seg mask, remove dump pkl.
4. Refine docstring of MMSeginferencer and SegLocalVisualizer
5. Add the user documentation of MMSeginferencer

## BC-breaking (Optional)

yes, remove some parameters, we need to discuss whether keep them with
deprecated waring or just remove them as the MMSeginferencer just merged
in mmseg a few days.

Co-authored-by: xiexinch <xiexinch@outlook.com>
2023-03-03 14:37:54 +08:00
谢昕辰 53fe1ccf39
[Feature] Support MMSegInferencer (#2413)
## Motivation

Support `MMSegInferencer` for providing an easy and clean interface for
single or multiple images inferencing.

Ref: https://github.com/open-mmlab/mmengine/pull/773
https://github.com/open-mmlab/mmocr/pull/1608

## Modification

- mmseg/apis/mmseg_inferencer.py
- mmseg/visualization/local_visualizer.py
- demo/image_demo_with_inferencer.py

## Use cases (Optional)

Based on https://github.com/open-mmlab/mmengine/tree/inference

Add a new image inference demo with `MMSegInferencer`

- demo/image_demo_with_inferencer.py

```shell
python demo/image_demo_with_inferencer.py demo/demo.png fcn_r50-d8_4xb2-40k_cityscapes-512x1024
```

---------

Co-authored-by: MeowZheng <meowzheng@outlook.com>
2023-02-23 21:16:19 +08:00
谢昕辰 37af545f6b
[Fix] Fix inference api and support setting palette to SegLocalVisualizer (#2475)
as title

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>
2023-01-20 21:40:13 +08:00
Miao Zheng 2a183283f5
[Enhancement]Add `out_file` in add_datasample to directly save image (#2090)
* [Enhancement]Add `out_file` in add_datasample to for save vis image directly

* comments

* ut
2022-09-20 15:23:13 +08:00
MengzhangLI bff8a98d81
[Doc] Update Data Preparation and Visualization doc (#2054)
* [Doc] Update Data Preparation and Visualization doc

* upload visualization figure example

* fix

* fix

* delete demo image

* remove segvisualizer

* fix

* fix

* fix
2022-09-14 22:27:12 +08:00
Miao Zheng 8de0050f25
[Refactor] data flow (#1956)
* [WIP] Refactor data flow

* model return

* [WIP] Refactor data flow

* support data_samples is optional

* fix benchmark

* fix base

* minors

* rebase

* fix api

* ut

* fix api inference

* comments

* docstring

* docstring

* docstring

* fix bug of slide inference

* add assert c > 1
2022-08-26 15:54:23 +08:00
Miao Zheng 50546da85c
[Fix]Remove modules from mmcv.runner and mmcv.utils (#1966)
* [WIP] mmcv-clean

* [WIP]Remove modules from mmcv.runner and mmcv.utils

* wip

* fix import mmengine

* remove ut

* loadcheckpoint in mae
2022-08-25 15:15:21 +08:00
谢昕辰 167f94a70b rename data to structures (#1854) 2022-08-19 20:50:02 +08:00
MengzhangLI 7369d50049
[Fix] Fix SegLocalVisualizer gt_sem_seg cuda tensor error (#1845)
* [Fix] Fix SegLocalVisualizer gt_sem_seg cuda tensor error

* fix ut error and add config visualizer dict

* fix ut error
2022-08-01 15:03:01 +08:00
谢昕辰 5d9650838e
[Fix] Fix demo scripts (#1815)
* [Feature] Add SegVisualizer

* change name to visualizer_example

* fix inference api

* fix video demo and refine inference api

* fix

* mmseg compose

* set default device to cuda:0

* fix import

* update dir

* rm engine/visualizer ut

* refine inference api and docs

* rename

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>
2022-07-29 18:37:20 +08:00