Skip to content

Commit

Permalink
watershed transform to_categorical should use num_classes=distance_bins
Browse files Browse the repository at this point in the history
  • Loading branch information
willgraf committed Dec 18, 2018
1 parent de0bf95 commit 9020a2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deepcell/image_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ def _transform_masks(y, transform, data_format=None, **kwargs):
mask, distance_bins, erosion)

# convert to one hot notation
y_transform = to_categorical(np.expand_dims(y_transform, axis=-1))
y_transform = np.expand_dims(y_transform, axis=-1)
y_transform = to_categorical(y_transform, num_classes=distance_bins)
if data_format == 'channels_first':
y_transform = np.rollaxis(y_transform, y.ndim - 1, 1)

Expand Down

0 comments on commit 9020a2d

Please sign in to comment.