Skip to content

Commit

Permalink
config update
Browse files Browse the repository at this point in the history
  • Loading branch information
ashesh-0 committed Apr 8, 2024
1 parent c7b50ea commit 965e463
Show file tree
Hide file tree
Showing 4 changed files with 664 additions and 3 deletions.
4 changes: 2 additions & 2 deletions denoisplit/configs/biosr_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def get_config():
# data.channel_1 = 0
# data.channel_2 = 1
data.ch1_fname = 'ER/GT_all.mrc'
data.ch2_fname = 'Microtubules/GT_all.mrc'
data.ch2_fname = 'CCPs/GT_all.mrc'
data.num_channels = 2

data.poisson_noise_factor = 1000
Expand All @@ -22,7 +22,7 @@ def get_config():
data.trainig_datausage_fraction = 1.0
# data.validtarget_random_fraction = 1.0
# data.training_validtarget_fraction = 0.2
config.data.synthetic_gaussian_scale = 6675
config.data.synthetic_gaussian_scale = 5000
# if True, then input has 'identical' noise as the target. Otherwise, noise of input is independently sampled.
config.data.input_has_dependant_noise = True

Expand Down
6 changes: 5 additions & 1 deletion denoisplit/data_loader/vanilla_dloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,17 @@ def reduce_data(self, t_list=None, h_start=None, h_end=None, w_start=None, w_end
self.set_img_sz(self._img_sz, self._grid_sz)
print(f'[{self.__class__.__name__}] Data reduced. New data shape: {self._data.shape}')

def set_img_sz(self, image_size, grid_size):
def set_img_sz(self, image_size, grid_size, grid_alignment=None, overlapping_padding_kwargs=None):
"""
If one wants to change the image size on the go, then this can be used.
Args:
image_size: size of one patch
grid_size: frame is divided into square grids of this size. A patch centered on a grid having size `image_size` is returned.
"""
if grid_alignment is not None:
self._grid_alignment = grid_alignment
assert overlapping_padding_kwargs is not None, 'Padding is needed with Center grid alignment.'
self._overlapping_padding_kwargs = overlapping_padding_kwargs

self._img_sz = image_size
self._grid_sz = grid_size
Expand Down
Loading

0 comments on commit 965e463

Please sign in to comment.