Skip to content

Commit

Permalink
deleted all test messages
Browse files Browse the repository at this point in the history
  • Loading branch information
KMarshallX committed May 21, 2024
1 parent 2cf4ceb commit 9ebcddf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions utils/unet_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,15 +222,15 @@ def __call__(self, input, segin):
ind = np.random.randint(0, 2)
if ind == 0:
k = np.random.randint(1, 4)
print("Aug mode 3, rotate")
# print("Aug mode 3, rotate")
input_batch = np.expand_dims(self.rot(input, k), axis=0)
segin_batch = np.expand_dims(self.rot(segin, k), axis=0)
elif ind == 1:
print("Aug mode 3, blur")
# print("Aug mode 3, blur")
input_batch = np.expand_dims(self.filter(input, 2), axis=0)
segin_batch = np.expand_dims(self.filter(segin, 2), axis=0)
elif self.mode == "off":
print("Aug mode off")
# print("Aug mode off")
input_batch = np.expand_dims(input, axis=0)
segin_batch = np.expand_dims(segin, axis=0)

Expand Down Expand Up @@ -277,10 +277,8 @@ def __init__(self, img_sz, exp_sz, test_mode=False, test_crop_sz=(64,64,64)):
def __call__(self, img, lab):
slice_hwd = [self._get_slice(i, k) for i, k in zip(self.img_sz, self.crop_sz)]
if not self.test_mode:
print("TEST MODE: The patch are zoomed")
return scind.zoom(self._crop(img, *slice_hwd),(self.exp_sz[0]/self.crop_sz[0], self.exp_sz[1]/self.crop_sz[1], self.exp_sz[2]/self.crop_sz[2]), order=0, mode='nearest'), scind.zoom(self._crop(lab, *slice_hwd),(self.exp_sz[0]/self.crop_sz[0], self.exp_sz[1]/self.crop_sz[1], self.exp_sz[2]/self.crop_sz[2]), order=0, mode='nearest')
else:
print("TEST MODE: The patch hasn't been zoomed")
return self._crop(img, *slice_hwd), self._crop(lab, *slice_hwd)

@staticmethod
Expand Down

0 comments on commit 9ebcddf

Please sign in to comment.