Skip to content

Commit

Permalink
Added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Madhav Khosla committed Jul 23, 2019
1 parent 0522cc6 commit 9b9f88d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
Binary file added .DS_Store
Binary file not shown.
13 changes: 0 additions & 13 deletions test.py

This file was deleted.

2 changes: 2 additions & 0 deletions utils/one_hot_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def PerPixelClassMatrix(self, Image):
class_map[x][y]= self.color[clr]
return class_map
def HotEncode(self, class_map):
"""Inputs the class map of the image and returns the hot encoded
N channel output. Each channel represents the presence of a class per pixel"""
assert isinstance(class_map, np.ndarray), "Class map has to be an ndarray and not {}".format(type(class_map))
shape_= class_map.shape
encoded= np.zeros(shape= (shape_[0], shape_[1], self.n_classes), dtype=float)
Expand Down

0 comments on commit 9b9f88d

Please sign in to comment.