[paper review] Zero-shot Referring Image Segmentation with Global-Local Context Features
#referring_image_segmentation #CLIP #zero-shot #CVPR_2023
Get 小連同學’s stories in your inbox
Join Medium for free to get updates from this writer.
[paper link] [code link]
My Key Takeaways
- The knowledge in linguistics gives rise to the important approach — Global-Local Context Features. The target object noun is extracted by the spaCy tool, helping this model catch the visual relationship between target and scene.
- The transformer structure has extremely potential flexibility. As you can transfer any data type into sequence, multi-modal features may be fused through transformer mechanism. This is the reason why I want to continue my research on CV transformer.
Global-local CLIP
The model is briefly composed of 4 parts:
- Global-context Visual Features Extraction:
In this paper, the two different architectures, ResNet and ViT, are employed as the visual encoder, similar to CLIP (the latter performs sightly better). These features have comprehensive information about the scene. - Local-context Visual Features Extraction:
The cropping operation, commonly used in zero-shot semantic segmentation, is applied to remove irrelevant region, enabling these features to focus on the masked parts. - Global-local Context Visual Features Extraction:
The global-local context visual feature is computed using global-context and local-context visual features. - Global-local Context Textual Features Extraction:
To address RIS problem which CLIP cannot handle because of image-level presentation, spaCy is utilized to parse dependency and identify the target noun in Local-context textual features extraction. Eventually, the global-local context textual feature is weighted sum of global and local textual features.
Below is analysis show the best α, β value on different test dataset:
Why Global-local CLIP?
The shortcoming of the original CLIP should be discussed. Here are the insights after studying this paper:
- CLIP view image as image-level presentation, so the visual feature it extracts cannot understand the global relationship between multiple objects while the textual feature it extracts cannot specify the target noun in the expression.
- As mentioned above, CLIP isn’t completely suitable for dense prediction tasks like object detection and image segmentation because they’re pixel-level.
Why Zero-shot?
- For specific prompts, annotation incurs high costs.
- There are weakly-supervised methods to solve RIS problems, but it is expensive to perform high-level annotation, as mentioned above..
- As of the publication of this paper, there is no zero-shot approach to solving the RIS problem.
Two Different CLIP visual encoder — ResNet and ViT
[ResNet]
- A global average pooling layer in original ResNet is replaced by an attention pooling layer, the same architecture as the multihead attention in a Transformer.
- A query is computed by a global average pooling operation onto the feature maps extracted by the ResNet backbone while a key and a value given by a flattened feature map.
[ViT]
- Just like the original ViT model.
- To capture global-context of images, masking tokens is in only the last k Transformer layers (k = 3 the best). The tokens are reshaped and masked by a given mask proposall, and then flattened and applied to the subsequent Transformer layer.
- The output from the class token (CLS) is as the global-context visual representation.
Main Results
The global-local context approach is innovative and achieves the ability to distinguish between different instances by referring text. Through the significant indicator, we can find that:
- Compared with other zero-shot RIS baseline, Global-Local CLIP outperform them including weakly-supervised one.
- Below left chart shows Global-Local CLIP also performs better than both supervised method and works robustly on the unseen domain while the right chart shows in a few-shot learning setting, it outperforms others with large margins when k is small.
Ablation Study
The relatively important analysis includes 2 insights:
- If the mask generation part performs better and generates more precise results, similar to the ground truth, this model would definitely improve.
- The performance of the model, utilizing global-local context features is the best, which indicates the necessity of incorporating the idea of word dependency. Below are the visualization results:
Personal Point of View
- The Global-Local CLIP model stands on the shoulders of giants, CLIP FreeSOLO, etc., incorporating numerous existing concepts and models to forge its own innovative approach.
- There are many comparison methods of similarity, such as Jaccard similarity, Euclidean distance, and so on. They can be utilized in ablation study part.

![[life note] 台南遊記 (2407–2409)](https://miro.medium.com/v2/resize:fit:1358/format:webp/1*H-agUAVH2IUK7MkR0UXUdQ.jpeg)
![[personal growth] 報技術性質 paper 的簡報撇步](https://miro.medium.com/v2/resize:fit:1358/format:webp/1*S03jJSGAtNEycrugMosbcg.png)
![[life note] 台南遊記 (2404–2406)](https://miro.medium.com/v2/resize:fit:1358/format:webp/1*iLaRanp0rPClBXjnorUgUg.jpeg)
![[personal growth] 2024 暑期實習面試心得(AI / SW)](https://miro.medium.com/v2/resize:fit:1358/format:webp/1*Xmt48nYjWMO3W2-6ujVAZg.jpeg)




