Hi there,
Thanks for your work, I am using both FPS and PathDino, and it is really great so far.
I actually have a question about the order of the FPS steps.
In the paper, the spatial constrains are applied to $S$ (sampled after KDE):
$$
s_i, s_j \in S, \sqrt{(s_{i,x} - s_{j, x})^2 + (s_{i, y} - s_{j, y})^2} \geq e_{min}
$$
However, in the code, it looks like the spatial constrains are applied to $P$, the potential patch locations. Subsequently, the KDE is used for sampling:
https://github.com/KimiaLabMayo/PathDino/blob/main/FPS%20code/FPS_helper.py#L128
`
patch_locations, image_with_contours, image_with_rectangles = get_patch_locations(tissue_mask, cthumbnail, mask_hratio, mask_wratio, tissue_percent)
min_distance = mask_hratio * 2 # Minimum distance between points
filtered_patch_locations = []
for (x, y), _ in patch_locations:
if is_far_enough((x, y), filtered_patch_locations, min_distance):
filtered_patch_locations.append((x, y))
filtered_patch_locations = get_sampled_points_density_proportional_KDE(filtered_patch_locations, returnSamples)`
I was wondering if there is a reason for reversing the paper formulation order to do spatial constrains to $P$ first, and then KDE to get $S$. May this be a bug or a mistake in the paper?
Thank you so much in advance,
Best,
Bego
Hi there,
Thanks for your work, I am using both FPS and PathDino, and it is really great so far.
I actually have a question about the order of the FPS steps.
In the paper, the spatial constrains are applied to$S$ (sampled after KDE):
However, in the code, it looks like the spatial constrains are applied to$P$ , the potential patch locations. Subsequently, the KDE is used for sampling:
https://github.com/KimiaLabMayo/PathDino/blob/main/FPS%20code/FPS_helper.py#L128
`
I was wondering if there is a reason for reversing the paper formulation order to do spatial constrains to$P$ first, and then KDE to get $S$ . May this be a bug or a mistake in the paper?
Thank you so much in advance,
Best,
Bego