Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JNingWei authored Dec 22, 2017
1 parent 5d19bca commit 9f93990
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion FCN/src/utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# coding=utf-8

"""
Image-Segmentation
Expansion package.
__author__ = 'JNingWei'
"""

import numpy as np
import matplotlib as mpl
import matplotlib.cm

def color_image(image, num_classes=20):

norm = mpl.colors.Normalize(vmin=0., vmax=num_classes)
mycm = mpl.cm.get_cmap('Set1')
return mycm(norm(image))

0 comments on commit 9f93990

Please sign in to comment.