Skip to content

Commit

Permalink
Update train.py
Browse files Browse the repository at this point in the history
  • Loading branch information
LiheYoung authored Mar 21, 2021
1 parent 39d2b2f commit d8cf149
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ def validation(self):
for i in range(out1.shape[0]):
mask = Image.fromarray(out1[i].astype(np.uint8), mode="P")
mask.putpalette(cmap)
mask.save("outdir/masks/train/im1/" + id[i])
mask.save("outdir/masks/val/im1/" + id[i])

mask = Image.fromarray(out2[i].astype(np.uint8), mode="P")
mask.putpalette(cmap)
mask.save("outdir/masks/train/im2/" + id[i])
mask.save("outdir/masks/val/im2/" + id[i])

metric.add_batch(out1, mask1.numpy())
metric.add_batch(out2, mask2.numpy())
Expand Down

0 comments on commit d8cf149

Please sign in to comment.