ANTsPyNet
ANTsPyNet copied to clipboard
image reconstruction with masked patches
import ants
x = ants.image_read(ants.get_ants_data('r16'))
mask=ants.get_mask( x )
patches = antspynet.extract_image_patches(x, patch_size=tuple([32,32]),
max_number_of_patches=int(mask.sum()), return_as_array=False,
mask_image=mask, randomize=False )
reconstructed_image = antspynet.reconstruct_image_from_patches(
patches, mask, domain_image_is_mask=True )
the above fails
import ants
import antspynet
x = ants.image_read(ants.get_ants_data('r16'))
mask=ants.get_mask( x )
patches = antspynet.extract_image_patches(x, patch_size=tuple([32,32]),
max_number_of_patches=int(mask.sum()), return_as_array=False,
mask_image=mask, randomize=False )
reconstructed_image = antspynet.reconstruct_image_from_patches(
patches, mask, domain_image_is_mask=True, stride_length=2 )
this runs but produces junk ... is this repairable?
I have a fix - it just seems slow .... let me test further - will push to my pull request if it goes ok
Awesome. Let me know if you need me to take a look.