Learning Mask-aware CLIP Representations for Zero-Shot Segmentation

Recently, pre-trained vision-language models have been increasingly used to tackle the challenging zero-shot segmentation task. Typical solutions follow the paradigm of first generating mask proposals and then adopting CLIP to classify them. To maintain the CLIP's zero-shot transferability, previous practices favour to freeze CLIP during training. However, in the paper, we reveal that CLIP is insensitive to different mask proposals and tends to produce similar predictions for various mask proposals of the same image. This insensitivity results in numerous false positives when classifying mask proposals. This issue mainly relates to the fact that CLIP is trained with image-level supervision. To alleviate this issue, we propose a simple yet effective method, named Mask-aware Fine-tuning (MAFT). Specifically, Image-Proposals CLIP Encoder (IP-CLIP Encoder) is proposed to handle arbitrary numbers of image and mask proposals simultaneously. Then, mask-aware loss and self-distillation loss are designed to fine-tune IP-CLIP Encoder, ensuring CLIP is responsive to different mask proposals while not sacrificing transferability. In this way, mask-aware representations can be easily learned to make the true positives stand out. Notably, our solution can seamlessly plug into most existing methods without introducing any new parameters during the fine-tuning process. We conduct extensive experiments on the popular zero-shot benchmarks. With MAFT, the performance of the state-of-the-art methods is promoted by a large margin: 50.4% (+ 8.2%) on COCO, 81.8% (+ 3.2%) on Pascal-VOC, and 8.7% (+4.3%) on ADE20K in terms of mIoU for unseen classes. The code is available at https://github.com/jiaosiyu1999/MAFT.git.

Paper

References (39)

Scroll for more · 27 remaining

Similar papers

Peer review

Reviewer XVP77/10 · confidence 5/52023-07-04

Summary

This paper proposes a new topic and method for training a mask-aware CLIP, which could serve as a core component for open-vocabulary segmentation. The designed structure could be used as a flexible plug-in but brings significant improvements for existing methods on various benchmarks.

Strengths

1. This topic is promising. Previous methods decouple open-vocabulary segmentation into class-agnostic segmentation and CLIP-guided recognition. However, most of them fail to use CLIP effectively, I think training a mask-aware CLIP is an ideal way to deal with this problem. 2. The model design is reasonable, using a mask2former-style network and tasks the masks to perform masked attention sounds reasonable. 3. The experiment results are great with significant improvement. It would be an ideal solution for various open-vocabulary segmentation tasks incorporating strong class-agnostic segmentation models like SAM. 4. The paper is clearly presented.

Weaknesses

The experiment setting is unsatisfactory, which only tackles zero-shot semantic segmentation. As this topic and idea are good, I expect the authors to extend the method into open-vocabulary panoptic settings, and use some large datasets for training. Currently, the datasets used are small. it is hard to distill universal knowledge from CLIP.

Questions

See weakness

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

yes

Reviewer uMA54/10 · confidence 5/52023-07-06

Summary

This paper mainly discusses how to use pre-trained CLIP to solve zero-shot segmentation task, and proposes a new method called Mask-aware Fine-tuning (MAFT) to address the issue of significant false positives in CLIP's classification of mask proposals. Specifically, the paper introduces an Image-Proposals CLIP Encoder (IP-CLIP Encoder) to handle any number of images and mask proposals simultaneously, and designs mask-aware loss and self-distillation loss to fine-tune the IP-CLIP Encoder, ensuring that CLIP responds to different mask proposals without sacrificing its transferability.

Strengths

1. This paper introduces an Image-Proposals CLIP Encoder (IP-CLIP Encoder) that is sensitive to different mask proposals. 2. This paper includes mask-aware loss and self-distillation loss to fine-tune the IP-CLIP Encoder without sacrificing its transferability. 3. The paper is well-written and easy to follow.

Weaknesses

1. The ability to handle any number of mask proposals is not unique to this method and has already been a feature of previous methods such as ZegFormer. 2. The main effect of this method comes from the mask-aware loss, which utilizes mask proposals as prior knowledge to obtain more accurate prediction probabilities from the cls score map. Therefore, the effectiveness of this loss function is limited by the quality of the mask proposals, which limits the innovation of this paper. 3. In terms of experiments, it is necessary to conduct experiments on the updated methods such as "Scaling Open-Vocabulary Image Segmentation with Image-Level Labels"(ECCV2022) where the performance of it has already surpassed this method on VOC and COCO. 4. Why is Table 2's benchmark experiment conducted under the setting of using only CLIP classifier?

Questions

Same as weakness.

Rating

4: Borderline reject: Technically solid paper where reasons to reject, e.g., limited evaluation, outweigh reasons to accept, e.g., good evaluation. Please use sparingly.

Confidence

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

3 good

Presentation

3 good

Contribution

2 fair

Limitations

The paper has a description of some limitations.

Reviewer q7Qn6/10 · confidence 4/52023-07-08

Summary

The paper proposes a mask-aware fine-tuning method to address challenges faced by frozen-CLIP-based zero-shot segmentation methods. It addresses the problem of CLIP being insensitive to different mask proposals and tending to produce similar predictions regardless of the variation in proposals. The proposed IP-CLIP successfully assigns appropriate scores to different proposals, unlike the frozen CLIP that exhibits similar scores. Instead of processing each mask individually, the proposed modified CLIP considers all mask proposals simultaneously, thereby reducing computational costs. The experimental results consistently demonstrate that the proposed method outperforms the baselines by a significant margin.

Strengths

- The proposed method is designed as a plug-and-play approach, making it applicable to any frozen CLIP-based method. - The proposed method consistently improves the performance of baseline methods, including SegFormer, ZSSeg, and FreeSeg, by substantial margins, particularly on unseen classes. - The method significantly reduces the computational requirements of CLIP in FreeSeg, and the effectiveness of the proposed mask-aware loss and IP-CLIP is demonstrated through ablation studies.

Weaknesses

- The starting point of the mask attention layer L is determined by a user-defined hyperparameter. The proposed method specifically employs ViT-B/16 as the backbone in the paper. However, if a different backbone is utilized, the selection of this hyperparameter would necessitate a hyperparameter search. - The notation presented in the paper would be better if it were simplified and clarified.

Questions

- Including experiments with other backbones and proposal generators would enhance the comprehensiveness of the paper

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

The limitations are briefly discussed in the paper, while the societal impact is not addressed.

Reviewer fJQP5/10 · confidence 4/52023-07-09

Summary

The general goal of the paper is to leverage CLIP for zero-shot segmentation. For this, in contrast to prior work, an CLIP-inspired IP-CLIP encoder is trained to enable mask-level encodings for segmentation. The core of the approach is the so-called IP-encoder that uses as input a frozen mask generator, as well as two losses, a mask-aware loss and a distillation loss

Strengths

The general idea is good and on a high-level the components (IP-CLIP encoder, mask aware loss and CLIP distillation) make sense to me The reported results are good across three prior baselines and different datasets

Weaknesses

In my view the paper is not well written and important details are either not well motivated or even unclear (see below) The paper reads to a large extend like an engineering paper with a few changes here and there to adapt to the task as hand. I would assume that to be not so interesting for the majority of NeurIPS

Questions

Here are my main questions about writing 1) A^c is defined to be of dimension NxC (line 119) - with N the number of mask proposals in the self-distillation loss however, figure 2 is showing a cx1 dimensional vector? in any case I am confused as standard CLIP (here used as teacher) would not generate a NxC dimensional map - and thus A^C_{fro} in equation (7) does not seem to make sense to me - can you please explain? 2) related to that: in figure 2 it seems that the final projection from IP-CLIP encoder is used without biases? (w.o. B) - that seems quite obscure to me actually - what is meant? 3) the mask-aware loss seems sensible on a high-level - but the details are not really motivated well. E.g. the reason for normalizing the IoU scores is unclear (equation 5) - similarly the reason behind the exact formulation of equation 6 remain unclear. 4) the paper uses L layers prior to condition on the masks, and 12-L after that. While there is an experimental ablation about this why would that make sense intuitively? if the authors can clarify these points I will consider upgrading my score. detail: - line 125 "wildly" -> "widely" post rebuttal thanks for addressing my questions - I have upgraded mu review as mentioned in my initial review. Please make sure that the improvements are promised are implemented - thanks

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

2 fair

Contribution

2 fair

Limitations

ok

Reviewer fJQP2023-08-18

Thanks for the rebuttal. Are the authors planning to update the paper in any way - in particular w.r.t. Q1-Q4? If the authors plan to update, it would be useful to know how (concretely) the authors plan to update the paper. Thanks.

Authorsrebuttal2023-08-18

Response to Reviewer fJQP

Thank you again for your valuable comments. We are committed to incorporating the suggested improvements into our paper, referencing **Q1-Q4**. We are confident that these updates will significantly enhance the clarity and overall readability of our work. **Q1. Explanation of $A^ c \in\mathbb{R}^{C \times N}$, $A^c_{IP}$$\in\mathbb{R}^{C \times 1}$ and $A^{c}_{fro}$$\in\mathbb{R}^{C \times 1}$** * **Simplify and clarify the notations: $A^c_{IP}$ and $A^c_{fro}$** We notice the potential confusion regarding the notations $A^c_{IP}$, $A^c_{fro}$ and $A^{c}$ for the readers. To address this concern, we have taken steps to enhance clarity. First, we will introduce additional clarifications at **Line187**: "$A^c_{IP}$ and $A^c_{fro}$ are specifically generated when computing the *self-distillation loss*. It is important to note that when processing an image through IP-CLIP without mask proposals, the resulting $A^c_{IP}$ is a matrix with dimensions ${C \times 1}$." Besides, we will simplify $A^c_{IP}$ and $A^c_{fro}$ with $A_{S}$ (indicating the student net's score) and $A_{T}$ (indicating the teacher net's score), and showcase them in Fig. 2. **Q2. Explanation of the final projection unit and** *w.o.* $B$ * **Add explanations of the final projection unit in Fig. 2** We will enhance the clarity of the final projection unit by adding the following sentence in the caption of Fig. 2: "The final projection unit is an MLP module, used for reshaping the channels of $F_{feat}$ and $F_{cls}$." * **The notation $w.o.B$ in Fig.2 will be revised as $w.o.M$** We will revise "*w.o.* $B$ " with "*w.o.* $M$ ", as it corresponds to the process of generating $A^{c}_{IP}$, where the image is input to IP-CLIP without incorporating any mask proposal ($M$). The adjustment to "w.o. $M$ " better conveys the intended meaning and minimizes the potential for confusion. In addition, the following explanation will be added into the caption of Fig. 2:"*w.o.*$M$ denotes IP-CLIP Encoder processes image without utilizing mask proposals ($M$)". **Q3. Explanation of the *mask-aware loss*** * **Clarify the normalization equation in Eq. 5** At **Line180**, we will update the explanation to:"We identify a discrepancy between the maximum values of $A^{c}$ and $S_{IoU}$. The maximum value of $A^{c}$ tends to approach 1, whereas the maximum value of $S_{IoU}$ ranges from 0.75 to 0.99. This inconsistency can hinder the alignment between $A^{c}$ and $S_{IoU}$. Therefore, we introduced a normalization technique for $S_{IoU}$ using Eq. 5." * **Clarify the $\mathrm{smoothL1}$ function and the *mask-aware loss* in Eq. 6** Eq. 6 provides the mathematical representation of the $\mathrm{smoothL1}$ function. To make it easier to understand, this equation will be re-formulized as: $L_{ma} (A^c_{select}, S_{IoU}^{norm}) = \mathrm{smoothL1} (A^c_{select}, S_{IoU}^{norm}),$ Given two elements $x, y$ in $\mathrm{smoothL1}$. $\mathrm{If} ~ |x - y| < 1$, $\mathrm{smoothL1}(x, y) = 0.5\cdot (x - y)^2$; $\mathrm{Otherwise}$, $\mathrm{smoothL1}(x, y) = |x - y| - 0.5$. **Q4. Explanation of starting mask attention from layer $L$** We will refine the sentence beginning at **Line152** as follows: "We consider that CLIP's classification significantly relies on context information. In the first $L$ Transformer layers, the propagation of $F^{i}$ is the same as in standard CLIP. Specifically, $F_{cls}$ utilizes cross-attention with all pixels within $F_{feat}$, effectively retaining the context information." **** We hope our responses have addressed all your concerns. If you have any further questions or comments, please kindly let us know, and we are happy to respond.

Authorsrebuttal2023-08-20

Dear Reviewers,   We thank all of you for taking your valuable time to provide insightful comments, which significantly strengthen our paper. We have carefully responded to your questions accordingly with the necessary additional experiments and analyses. We hope our responses have effectively resolved all your concerns. Since the discussion period is closing soon, if you have any further questions or comments, please let us know, and we are happy to respond. Paper9803 authors

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC