Search⌘ K
AI Features

Predicting Relative Position of Patches

Explore how to predict the relative position of image patches as a self-supervised pretext task. Learn to sample patches in spatial configurations, generate pseudo labels, and design a CNN-based late-fusion network to classify these relationships. This lesson guides you through implementing this task to help models learn spatial features without labeled data.

Relative positioning of patches

Given an image XiX_i, this pretext task involves sampling a random pair of patches (Xip1,Xip2)(X_i^{p_1}, X_i^{p_2}) in one of the eight spatial configurations (shown in figure below) and assigning a pseudo label PiP_i (shown in figure below) that denotes the position of patch Xip2X_i^{p_2} ...