mahmoodlab / HEST

HEST: Bringing Spatial Transcriptomics and Histopathology together - NeurIPS 2024
Other
164 stars 12 forks source link

Questions about image cropping #55

Closed HelloWorldLTY closed 1 month ago

HelloWorldLTY commented 1 month ago

Hi, thanks for your great work. I have a quick question about the image cropping design.

In this function:

 Patches are computed such that:
             - each patch is rescaled to `target_pixel_size` um/px
             - a crop of `target_patch_size`x`target_patch_size` pixels around each ST (pseudo) spot is derived (which coordinates are derived from adata.obsm['spatial'])

You discussed the setting of target_patch_size, does this mean we utilize the center of each spot and 224 as radius to have a square as our final image? Thanks a lot.

guillaumejaume commented 1 month ago

That's almost correct. 224 x 224 px is the final image size at the target px size centered around each spot.

HelloWorldLTY commented 1 month ago

Got it, thanks a lot!