A Novel Unified Architecture for Low-Shot Counting by Detection and Segmentation

Low-shot object counters estimate the number of objects in an image using few or no annotated exemplars. Objects are localized by matching them to prototypes, which are constructed by unsupervised image-wide object appearance aggregation. Due to potentially diverse object appearances, the existing approaches often lead to overgeneralization and false positive detections. Furthermore, the best-performing methods train object localization by a surrogate loss, that predicts a unit Gaussian at each object center. This loss is sensitive to annotation error, hyperparameters and does not directly optimize the detection task, leading to suboptimal counts. We introduce GeCo, a novel low-shot counter that achieves accurate object detection, segmentation, and count estimation in a unified architecture. GeCo robustly generalizes the prototypes across objects appearances through a novel dense object query formulation. In addition, a novel counting loss is proposed, that directly optimizes the detection task and avoids the issues of the standard surrogate loss. GeCo surpasses the leading few-shot detection-based counters by $\sim$25\% in the total count MAE, achieves superior detection accuracy and sets a new solid state-of-the-art result across all low-shot counting setups.

Paper

Similar papers

Peer review

Reviewer QayL6/10 · confidence 4/52024-07-11

Summary

This paper introduces GeCo, a novel unified architecture for low-shot counting that integrates object detection and segmentation. GeCo addresses the limitations of current state-of-the-art methods by generalizing object prototypes across diverse appearances and introducing a new counting loss that directly optimizes the detection task. The architecture achieves significant improvements in detection accuracy and count estimation over previous methods and sets a new benchmark in low-shot counting.

Strengths

1. GeCo combines object detection and segmentation in a single framework, enhancing efficiency and performance. 2. The novel dense object query formulation improves the generalization of object prototypes across diverse appearances, reducing false positives. 3. The proposed counting loss directly optimizes detection tasks, leading to more accurate object counts and better handling of annotation noise. 4. GeCo surpasses existing few-shot detection-based counters by approximately 25% in total count MAE and shows superior detection accuracy. The method demonstrates substantial robustness to the number of exemplars, performing well even in one-shot and zero-shot scenarios.

Weaknesses

1. While SAM's pre-training provides strong generalization with other potential backbone networks, it is unclear if similar results could be achieved with other networks like ResNet or EfficientNet. Thus the complexity and computational requirements of the proposed GeCo architecture might limit its scalability and real-time applicability, especially in resource-constrained environments. 2. Although the method is claimed to be low-shot friendly, the paper does not provide explicit architectural components or techniques specifically designed for low-shot scenarios. 3. The performance of GeCo on highly heterogeneous datasets, where object appearances vary significantly within the same category, is not adequately demonstrated. 4. The effectiveness of this method in scenarios involving small objects or high-density areas, such as crowd density estimation or face detection in dense crowds, has not been well explored as this type of dataset has large-scale variations.

Questions

1. Why was the SAM framework specifically chosen over other backbone networks? How does it compare in terms of generalization and performance with other pre-trained models like ResNet or EfficientNet? 2. What specific design elements make GeCo particularly suitable for low-shot learning? Are there any modifications or components that specifically address the challenges of low-shot scenarios? 3. How does GeCo perform on datasets with significant intra-class variability? Can it generalize well to objects with a high degree of appearance variation within the same category?

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

2

Limitations

1. The method's performance still heavily depends on the quality and representativeness of the provided exemplars. Poor quality or unrepresentative exemplars could negatively impact the detection and counting accuracy. 2. While the dense object query formulation improves generalization, the method's ability to handle extreme variability in object appearances within the same category needs further validation. 3. The effectiveness of GeCo in scenarios involving small objects or highly dense regions (e.g., crowd counting, face detection in crowds) is not thoroughly evaluated. These scenarios often present unique challenges that may require additional considerations.

Reviewer HCSh5/10 · confidence 4/52024-07-13

Summary

Paper tackles the task of few-shot and zero-shot class agnostic counting, and presents Geco, a unified counting framework that can detect, segment and count objects. Geco uses SAM backbone for feature extraction, and implements Dense Query Encoder (DQE) and Dense Query Decoder (DQD) to detect prototypes. For few shot setup, prototypes are obtained from the exemplars, and zero shot setup uses learned objectness prototypes. DQD outputs a set of dense detections, which are further refined by the SAM decoder, by considering DQD detections as prompts for the SAM decoder.

Strengths

Paper presents a unified approach for few shot and zero shot class agnostic object counting which achieves good results on standard benchmark datasets.

Weaknesses

1. Lines 110 - 114: authors claim that existing low shot counting approaches uses a small number of prototypes or exemplars, often leading to false detections. Authors say their approach is different from these existing approaches. However, eqn 1 in Sec 3.1 appears to be conceptually similar to the existing approaches, i.e. few prototypes p are used to create keys and values in a cross attention layer, where the query is formed by the image features. 2. Looking at the ablation study in table 6, it appears that removing SAM decoder degrades the performance of Geco significantly in terms of AP, which raises some questions about the effectiveness of the approach. How does Geco perform without SAM decoder on the test set of FSCD147 ? 3. Related to my point 2 above and the ablation study in table 2: it would be useful to have a baseline without using Geco, by simply using the exemplars as prompts for the SAM decoder. This baseline does not require any new training.

Questions

I would request the authors to kindly address the points I raised in Weaknesses section.

Rating

5

Confidence

4

Soundness

3

Presentation

2

Contribution

2

Limitations

Yes.

Reviewer s2FV5/10 · confidence 3/52024-07-15

Summary

This paper address the issue for low-shot and zero-shot object counting, with an object detection-based approach. The proposed method heavily uses SAM framework, to provide feature embeddings and refine detection boxes. Attention-based feature aggregation and SAM-HQ are used to get the final features for objectiveness and bounding boxes. Evaluations are carried out on standard datasets with few/one/zero-shot setups, and the proposed GeCo outperforms many state-of-the-art methods.

Strengths

* The proposed method achieves high quality on multiple metrics, including counting accuracy and detection accuracy, and it works well for both low-shot and zero-shot setups. * The counting loss directly optimizes the detection tasks and greatly improves the model's performance.

Weaknesses

* One concern is that the paper utilizes SAM as its backbone, which is trained on SA-1B dataset. This may leads to some benefits to GeCo by having seeing large amount of diverse data. More discussion is needed to address this. * Also related to SAM, in table 6, it shows that without detection refinement module, the $GeCo_{\overline{Ref}}$'s performance drops heavily and goes lower than other methods in table 1. I am wondering what if we also feed other detection-based methods' output into SAM decoder. This may be a more fair comparison.

Questions

Does the use of SAM in multiple places bring advantages over other baselines?

Rating

5

Confidence

3

Soundness

2

Presentation

3

Contribution

2

Limitations

The limitations are sufficiently discussed in the paper.

Reviewer QayL2024-08-12

Thank you for the author's response, which solved most of my problems. SAM may give GeCo some benefit by looking at a lot of different data, which isn't fair to other comparison methods. The author said that any backbone network can be used instead of SAM in the image encoding stage, but it is not clear whether the performance will be significantly reduced because of the different backbones. Therefore I maintain my original rating: 6 Weak Accept

Authorsrebuttal2024-08-13

We thank the reviewer for the positive comment and we are happy to clarify the remaining point about the SAM backbone and comparison fairness. Note that recent state-of-the-art (PSECO) also uses SAM as a backbone, but GeCo outperforms it substantially, thus comparison seems fair. To further clarify, we replaced SAM backbone in GeCo with the classical ResNet. As reviewer anticipated, the performance drops a bit, but remains high, i.e., MAE (7.91-> 9.01) RMSE (54.28 -> 48.01), and this GeCo version still outperforms all state-of-the-art, including PSECO that uses the SAM backbone. We conclude that the SAM backbone is not the main contributor to good counting performance of GeCo.

Reviewer s2FV2024-08-13

thanks for the response, which addresses my concerns. I've changed the rating to Borderline accept.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC