Upon some discussion with @li-li-github today, we realized behavior of the current random patch generation method might be different than what was desired. We wrote the pseudo-code below as a reference for desired behavior. I will be implementing it to compare with existing implementation and then we can possibly discover opportunities for code optimization.
List[slice_objects] generate_random_patches(
image:BXYZC,
adoption_rate,
patch_size,
nb_patches_per_image,
):
list_of_slice_objects = []
for b in B:
patches_per_b = generate_patches_per_b(nb_patches_per_image / adoption_rate)
sorted_patches = sort_entropies_of_histograms_of_patches_per_b()
result = filter(sorted_patches, adoption_rate)
list_of_slice_objects.append(make_slice_object(result))
response = vstack(list_of_slice_objects)
return response
Upon some discussion with @li-li-github today, we realized behavior of the current random patch generation method might be different than what was desired. We wrote the pseudo-code below as a reference for desired behavior. I will be implementing it to compare with existing implementation and then we can possibly discover opportunities for code optimization.