Skip to content

[Fix] Fix typo in prepare_data #3777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev-1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mmseg/apis/remote_sense_inferencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
gdal = None

from mmseg.registry import MODELS
from .utils import _preprare_data
from .utils import _prepare_data


class RSImage:
Expand Down Expand Up @@ -224,7 +224,7 @@ def inference(self):
self.read_buffer.put(self.END_FLAG)
self.write_buffer.put(item)
break
data, _ = _preprare_data(item[1], self.model)
data, _ = _prepare_data(item[1], self.model)
with torch.no_grad():
result = self.model.test_step(data)
item[1] = result[0].pred_sem_seg.cpu().data.numpy()[0]
Expand Down
2 changes: 1 addition & 1 deletion mmseg/apis/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ImageType = Union[str, np.ndarray, Sequence[str], Sequence[np.ndarray]]


def _preprare_data(imgs: ImageType, model: BaseModel):
def _prepare_data(imgs: ImageType, model: BaseModel):

cfg = model.cfg
for t in cfg.test_pipeline:
Expand Down