SimMIMMaskGenerator¶ class mmpretrain.datasets.transforms.SimMIMMaskGenerator(input_size=192, mask_patch_size=32, model_patch_size=4, mask_ratio=0.6)[源代码]¶ Generate random block mask for each Image. Added Keys: mask This module is used in SimMIM to generate masks. 参数: input_size (int) – Size of input image. Defaults to 192. mask_patch_size (int) – Size of each block mask. Defaults to 32. model_patch_size (int) – Patch size of each token. Defaults to 4. mask_ratio (float) – The mask ratio of image. Defaults to 0.6. transform(results)[源代码]¶ Method to generate random block mask for each Image in SimMIM. 参数: results (dict) – Result dict from previous pipeline. 返回: Result dict with added key mask. 返回类型: dict