Systems and methods for PatchSwap—a regularization technique for vision transformers
View Patent ↗Examples of a computer-implemented regularization technique are described and tailor-made for Vision Transformers. Examples can combine two or more input images and swap patches between them to produce a PatchSwap image. The PatchSwap image is then used to train a Vision Transformer to predict the mixing ratio as well as the categories of the original images.
1 . A system for regularizing Vision Transformers, comprising:
a processor in communication with a memory, the memory including instructions executable by the processor to:
access a plurality of input images;
access a parameter for a patch size;
generate a plurality of patched images from the plurality of input images by:
selecting a first image in the plurality of images and selecting a second image in the plurality of images,
dividing the first image and the second image into a plurality of patches of equal size based on the parameter for patch size,
determining a mixing ratio for selecting a proportion of patches from the first image and proportion of patches from the second image;
generate a patched image based on the first image, the second image, and the mixing ratio, wherein the patched image is comprised of patches from the first image and the second image and the relative position of the patches from the first image and the patches from the second image remains consistent; and
train a model based on the plurality of patched images.
2 . The system of claim 1 , further comprising using a supervised approach.
3 . The system of claim 1 , further comprising using a semi-supervised approach.