spyrit.misc.statistics.stat_imagenet
- spyrit.misc.statistics.stat_imagenet(stat_root=PosixPath('stats'), data_root=PosixPath('data/ILSVRC2012_img_test_v10102019'), img_size: int = 64, batch_size: int = 1024, get_size: str = 'resize', n_loop: int = 1, device=device(type='cpu'))[source]
- Args:
stat_root: path to the folder where the mean and covariance matrices are saveddata_root: path to image database.data_rootneeds to have all images in a subfolderimg_size: image sizebatch_size: batch sizeget_size: specifies how images of sizeimg_sizeare obtained (seedata_loaders_imagenet)- Example:
data_root = Path(‘../data/ILSVRC2012_img_test_v10102019/’) stat_root = Path(‘../stat/ILSVRC2012_img_test_v10102019’)
from spyrit.misc.statistics import stat_imagenet stat_imagenet(stat_root = stat_root, data_root = data_root)