Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: restoration cnn channel_axes parameter check fix #241

Merged
merged 1 commit into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions aydin/nn/util/data_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ def random_sample_patches(
which we call patch. Also sorts the patches, and makes sure only patches with
higher entropy in the intensity histogram are selected.

To be able to work with any adoption_rate between 0 and 1, we accordingly
generate more patches per image during patch generation. After sorting, we
are able to apply the adoption rate to the total number of patches we generated
for each image.

Parameters
----------
image : numpy.ArrayLike
Expand All @@ -21,6 +26,7 @@ def random_sample_patches(

Returns
-------
List of Tuples of Slicing Objects

"""
list_of_slice_objects = []
Expand Down
2 changes: 1 addition & 1 deletion aydin/restoration/denoise/noise2selfcnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def train(self, noisy_image, *, batch_axes=None, chan_axes=None, **kwargs):

"""
with lsection("Noise2Self train is starting..."):
if any(chan_axes):
if chan_axes:
return

self.it = self.get_translator()
Expand Down