Skip to content
Snippets Groups Projects
Commit 6fea3f21 authored by hsfzxjy's avatar hsfzxjy
Browse files

fix bug

parent 1692bc80
Branches
No related tags found
No related merge requests found
......@@ -213,6 +213,7 @@ def test(config, test_dataset, testloader, model,
image, size, name = batch
size = size[0]
pred = test_dataset.multi_scale_inference(
config,
model,
image,
scales=config.TEST.SCALE_LIST,
......
......@@ -192,7 +192,7 @@ class Cityscapes(BaseDataset):
def save_pred(self, preds, sv_path, name):
palette = self.get_palette(256)
preds = np.asarray(np.argmax(preds, axis=1), dtype=np.uint8)
preds = np.asarray(np.argmax(preds.cpu(), axis=1), dtype=np.uint8)
for i in range(preds.shape[0]):
pred = self.convert_label(preds[i], inverse=True)
save_img = Image.fromarray(pred)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment