Skip to content
Open
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
7 changes: 6 additions & 1 deletion explanations.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ def __init__(self, model, input_size, gpu_batch=100):
self.model = model
self.input_size = input_size
self.gpu_batch = gpu_batch

def generate_masks(self, N, s, p1, savepath='masks.npy'):

''' N is the number of masks used,
(s, s) is the size of the smaller square binary masks,
p is the probability of each pixel in the smaller masks being set to 1.'''

cell_size = np.ceil(np.array(self.input_size) / s)
up_size = (s + 1) * cell_size

Expand Down