Skip to content

Conversation

@xiexinch
Copy link
Collaborator

@xiexinch xiexinch commented Jul 18, 2022

Motivation

Fix demo scripts

Modification

  • apply 2.0 methods to inference APIs
  • Refactored the inference_model() API

Dependency

#1792

@xiexinch xiexinch changed the title [WIP] Fix demo scripts [Fix] Fix demo scripts Jul 21, 2022
from mmcv.parallel import collate, scatter
from mmcv.runner import load_checkpoint

from mmseg.datasets.transforms import Compose
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from mmseg.datasets.transforms.compose import Compose

Comment on lines 57 to 58
data, data_samples = model.data_preprocessor(
[pipeline(dict(img_path=img))], False)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use test_step of model which can call data_preprocessor automatically
https://github.com/open-mmlab/mmdetection/blob/a0a0211217edf66cd66b8e4074e45cc0f3dafbf7/mmdet/apis/inference.py#L137

@CLAassistant
Copy link

CLAassistant commented Jul 24, 2022

CLA assistant check
All committers have signed the CLA.

@xiexinch xiexinch closed this Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants