Skip to content

Commit

Permalink
Fix palette confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
xmlyqing00 committed Nov 5, 2020
1 parent 4a38c6b commit fca6ed7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def main():
else:
raise ValueError('CUDA is required. --gpu must be >= 0.')

palette = Image.open(os.path.join(args.dataset, 'mask_palette.png')).getpalette()
palette = Image.open(os.path.join('./assets/mask_palette.png')).getpalette()

main()

Expand Down
2 changes: 1 addition & 1 deletion myutils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def vis_sample(sample, name, tmp_dir='./tmp/'):


def vis_result(frames, masks, scores, tmp_dir='./tmp/'):
palette = Image.open(os.path.join(tmp_dir, 'mask_palette.png')).getpalette()
palette = Image.open(os.path.join('assets/mask_palette.png')).getpalette()
for i in range(frames.shape[0]):
img = TF.to_pil_image(frames[i].cpu())
img.save(os.path.join(tmp_dir, f'{i}_img.png'))
Expand Down

0 comments on commit fca6ed7

Please sign in to comment.