Skip to content

Commit

Permalink
Adjusted norm flag so that zeroing out non label information only hap…
Browse files Browse the repository at this point in the history
…pens if the norm flag is true
  • Loading branch information
vanvalen committed Jun 3, 2022
1 parent e2674d9 commit 9959234
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions deepcell_tracking/utils.py
Expand Up @@ -658,12 +658,12 @@ def get_image_features(X, y, appearance_dim=32, crop_mode='resize', norm=True):
app = np.copy(X_padded[minr:maxr, minc:maxc, :])
label = np.copy(y_padded[minr:maxr, minc:maxc])

# Use label as a mask to zero out non-label information
app = app * (label == prop.label)
idx = np.nonzero(app)

# Check data and normalize
if norm:
# Use label as a mask to zero out non-label information
app = app * (label == prop.label)
idx = np.nonzero(app)

# Check data and normalize
if len(idx) > 0:
mean = np.mean(app[np.nonzero(app)])
std = np.std(app[np.nonzero(app)])
Expand Down

0 comments on commit 9959234

Please sign in to comment.