PointsPatchExtractor

class PointsPatchExtractor(input_img, locations_list, patch_size=(224, 224), resolution=0, units='level', pad_mode='constant', pad_constant_values=0, within_bound=False)[source]

Extracting patches with specified points as a centre.

Parameters

locations_list (ndarray, pd.DataFrame, str, pathlib.Path) – contains location and/or type of patch. This can be path to csv, npy or json files. Input can also be a numpy.ndarray or pandas.DataFrame. NOTE: value of location $(x,y)$ is expected to be based on the specified resolution and units (not the ‘baseline’ resolution).

Methods