We first extract features from query and support images and compute initial cost between them. In specific, we follow [1]} to exploit rich semantics present in different feature levels, and build multi-level correlation maps. Given query and support images, \(x_q\)  and \(x_s\) , we use CNNs [2]}, [3]} to produce a sequence of \(L\)  feature maps, \(\lbrace (F_{q}^{l},F_{s}^{l})\rbrace ^L_{l=1}\) , where \(F_{q}^{l}\)  and \(F_{s}^{l}\)  denote query and support feature maps at \(l\) -th level, respectively. We utilize a support mask, \(m_s\) , to encode segmentation information and filter out the background information as done in [4]}, [1]}, [6]}. We obtain a masked support feature such that \(\hat{F}^{l}_{s} = {F}^{l}_{s} \ \odot \ \psi ^{l}{(m_{s})}\) ,
where \(\odot \)  denotes Hadamard product and \(\psi ^{l}(\cdot )\)  denotes a function that resizes the given tensor followed by expansion along channel dimension of \(l\) -th layer.
