in src/data_utils.py [0:0]
def sample_points(image, region, scale, num_pix, geom=True, seed=1234):
"""Sample points from dataset
Args:
image: image to sample from
region: region to sample from
scale: pixel size in meters
num_pix: number of pixels to be sampled
geom: whether to add the center of the sampled pixel as property
seed: random seed used for sampling
Returns:
object: ee.FeatureCollection
"""
return image.sample(
**{
"region": region,
"scale": scale,
"numPixels": num_pix,
"seed": seed,
"geometries": geom,
}
)