Finding local maxima
The peak_local_max function returns the coordinates of local peaks (maxima)
in an image. Internally, a maximum filter is used for finding local maxima. This
operation dilates the original image and merges neighboring local maxima closer
than the size of the dilation. Locations where the original image is equal to the
dilated image are returned as local maxima.

from scipy import ndimage as ndi
import matplotlib.pyplot as plt
from skimage.feature