Skip to content

Commit

Permalink
small fixes (#200)
Browse files Browse the repository at this point in the history
- string comparison for lower-contrast in DefectAugment
- remove repetitive assignment in SimpleAugment
  • Loading branch information
moenigin authored Jan 22, 2024
1 parent 3686130 commit 92e2756
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gunpowder/nodes/defect_augment.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def process(self, batch, request):
if augmentation_type == "zero_out":
raw.data[section_selector] = 0

elif augmentation_type == "low_contrast":
elif augmentation_type == "lower_contrast":
section = raw.data[section_selector]

mean = section.mean()
Expand Down
2 changes: 1 addition & 1 deletion gunpowder/nodes/simple_augment.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def process(self, batch, request):
array.data = array.data[channel_slices + mirror]

transpose = [t + num_channels for t in self.transpose]
array.data = array.data = array.data.transpose(
array.data = array.data.transpose(
list(range(num_channels)) + transpose
)

Expand Down

0 comments on commit 92e2756

Please sign in to comment.