Bridge the Points: Graph-based Few-shot Segment Anything Semantically

The recent advancements in large-scale pre-training techniques have significantly enhanced the capabilities of vision foundation models, notably the Segment Anything Model (SAM), which can generate precise masks based on point and box prompts. Recent studies extend SAM to Few-shot Semantic Segmentation (FSS), focusing on prompt generation for SAM-based automatic semantic segmentation. However, these methods struggle with selecting suitable prompts, require specific hyperparameter settings for different scenarios, and experience prolonged one-shot inference times due to the overuse of SAM, resulting in low efficiency and limited automation ability. To address these issues, we propose a simple yet effective approach based on graph analysis. In particular, a Positive-Negative Alignment module dynamically selects the point prompts for generating masks, especially uncovering the potential of the background context as the negative reference. Another subsequent Point-Mask Clustering module aligns the granularity of masks and selected points as a directed graph, based on mask coverage over points. These points are then aggregated by decomposing the weakly connected components of the directed graph in an efficient manner, constructing distinct natural clusters. Finally, the positive and overshooting gating, benefiting from graph-based granularity alignment, aggregate high-confident masks and filter out the false-positive masks for final prediction, reducing the usage of additional hyperparameters and redundant mask generation. Extensive experimental analysis across standard FSS, One-shot Part Segmentation, and Cross Domain FSS datasets validate the effectiveness and efficiency of the proposed approach, surpassing state-of-the-art generalist models with a mIoU of 58.7% on COCO-20i and 35.2% on LVIS-92i. The code is available in https://andyzaq.github.io/GF-SAM/.

Paper

Similar papers

Peer review

Reviewer XvpJ7/10 · confidence 5/52024-07-01

Summary

This paper proposes a graph-based approach for Few-shot Semantic Segmentation (FSS) based on the Segment Anything Model (SAM). The authors propose a Positive-Negative Alignment module to select point prompts and a Point-Mask Clustering module to align the granularity of masks and selected points. The proposed method surpasses state-of-the-art generalist models on COCO-20i and LVIS-92i datasets, and also performs well on One-shot Part Segmentation and Cross Domain FSS datasets. Moreover, the proposed method is hyperparameter-free and efficient.

Strengths

1. How to conduct prompt engineering for vision foundation models(SAM) is still a challenging problem in the research community. This work fills this gap. 2. The proposed method is systematic, consisting of three modules: Positive-Negative Alignment, Point-Mask Clustering, and Positive and Overshooting Gating. Each module is well-designed and novel. 3. The paper is well-written and easy to follow. The authors can accurately describe the well-designed modules. 4. The experiments are comprehensive and the results are convincing. The proposed method significantly outperforms the SOTA on COCO-20i. The cross-domain validation further demonstrates the generalization and robustness of the method. 5. The proposed method is hyperparameter-free, which is a great advantage and increases the practical value of the method. 6. I briefly checked the code, and the submitted code is complete, which increases the reproducibility of the paper.

Weaknesses

1. In L173, "This is the precondition for the efficacy of our PMC module, as even slight errors could significantly impact the clustering accuracy" The authors should provide some visualization examples or experiments to verify this statement. 2. In Table 4, I notice weak or strong connected components are not clearly defined and the difference are also very small. The authors should provide more analysis to explain this. And what is the hyperparameter for K-means++? Have you tried different hyperparameters for K-means++? 3. I notice the authors conduct ablation studies on different datasets for different components. I hope the authors can provide more experiments on part segmentation. Since previous SOTA Matcher require different hyperparameters for part segmentation. Conducting ablation on part segmentation can further prove the hyperparameter-free advantage of the proposed method.

Questions

Can this methods applied to other tasks such as video object segmentation or instance segmentation?

Rating

7

Confidence

5

Soundness

3

Presentation

3

Contribution

3

Limitations

The authors have discussed the limitations of the proposed method in appendix.

Reviewer zdFP6/10 · confidence 4/52024-07-07

Summary

The paper first proposes graph-based approach for SAM-based few-shot semantic segmentation, modeling the relationship of SAM-generated masks in an automatic clustering manner. A positive-negative alignment module and a post-gating strategy based on the weakly connected graph components, enabling a hyper parameter-free pipeline. Extensive experimental comparisons and analysis across several datasets over various settings show the effectiveness and efficiency of the proposed method.

Strengths

1、The graph-based approach for SAM-based methods proposed in the article is more insightful. Because SAM-based methods can generate many patches with point prompts, and how to group them is a good question. 2.The experiments are comprehensive. The ablation experiment demonstrates the effectiveness of the modules. The visualisation also illustrates the idea expressed.

Weaknesses

1. The captions are not detailed, especially in Figure I and 2. 2. The overall organisation and presentation of the article are poor and need improvement. Some details: ① On the left side of the first line of Figure 2, the images are ‘reference on top and target on bottom, but the features become ‘reference on bottom target on top’; it's not consistent. ② In my understanding, in Figure 2,positive-negative alignment should be conducted on the target image using the foreground and background features of the reference's image, but the part is very unclear and not informative and does not show the above content. ③Point-Mask Clustering part in Figure 2 can be understood that it wants to express the cluster of the points to different targets in the images, but the drawing is very casual, and there is no mark or expression. 3. How to conduct mask merging? Is each point used to generate a mask and then merge, or is the cluster of points used together to SAM to generate mask prediction, or are there other ways? Give the details.

Questions

See the weakness part.

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

The author provides the limitations in the appendix. They say the coordinates of points will miss the small objects. This is a real problem and is suitable for further study.

Reviewer DDH86/10 · confidence 3/52024-07-12

Summary

This paper extends SAM to few-shot semantic segmentation tasks by proposing an approach based on graph analysis and representation learning. The contributions include a Positive-Negative Alignment module to generate the initial points prompt using DINOv2 features, as well as Point-Mask Clustering and Post Gating modules to filter the proper points based on the SAM generated masks. The proposed method exhibits efficiency and performance advantages over previous work such as PerSAM and Matcher.

Strengths

(1) The paper is well-written and easy to follow. (2) The proposed method is hyperparameter-free and shows significant improvements in both efficiency and performance. (3) Experiments on various datasets and tasks validated the generality of the proposed method.

Weaknesses

(1) The proposed method is specifically tailored for DINOv2 and SAM, is it possible to apply it to other foundation models? This could broaden the impact of the method. (2) In Figure 1(b), the scales of the axes are unclear. Are the starting points of the nine axes all 0? (3) On the FSS-1000 dataset, the performance of the proposed method is comparable to Matcher, which deserves a discussion. For example, what factors may have contributed to this result.

Questions

See weakness.

Rating

6

Confidence

3

Soundness

3

Presentation

3

Contribution

3

Limitations

The limitations have been discussed.

Reviewer XvpJ2024-08-08

After reading the author's response, most of my concerns have been addressed. I've decided to maintain my current score.

Authorsrebuttal2024-08-12

We thank the reviewer for taking the time to review our response. We’re pleased that our rebuttal has addressed the concerns and we sincerely appreciate the reviewer's positive score. We will incorporate the key points the reviewer raised as we work on the final version of the revised paper.

Area Chair qdAB2024-08-11

Author-reviewer discussion

Dear reviewer DDH8 and zdFP, Since the authors provided their responses, please read the responses, respond to them on in the discussion, and discuss points of disagreement if necessary by Aug 13. Best regards, AC

Reviewer zdFP2024-08-13

After reading the author's response, most of my concerns have been addressed. I've decided to raise my score.

Program Chairsdecision2024-09-25

Decision

Accept (spotlight)

© 2026 NYSGPT2525 LLC