Skip to main content
QUICK REVIEW

[Paper Review] Open-world Text-specified Object Counting

Niki Amini-Naieni, Kiana Amini-Naieni|arXiv (Cornell University)|Jun 2, 2023
Multimodal Machine Learning ApplicationsComputer Science6 citations
TL;DR

This paper proposes CounTX, a single-stage, class-agnostic transformer-based model for open-world text-specified object counting that directly predicts object counts from an image and a natural language description without requiring visual exemplars. It outperforms prior two-stage methods on the FSC-147 benchmark and introduces FSC-147-D, an enhanced dataset with detailed textual descriptions for improved generalization.

ABSTRACT

Our objective is open-world object counting in images, where the target object class is specified by a text description. To this end, we propose CounTX, a class-agnostic, single-stage model using a transformer decoder counting head on top of pre-trained joint text-image representations. CounTX is able to count the number of instances of any class given only an image and a text description of the target object class, and can be trained end-to-end. In addition to this model, we make the following contributions: (i) we compare the performance of CounTX to prior work on open-world object counting, and show that our approach exceeds the state of the art on all measures on the FSC-147 benchmark for methods that use text to specify the task; (ii) we present and release FSC-147-D, an enhanced version of FSC-147 with text descriptions, so that object classes can be described with more detailed language than their simple class names. FSC-147-D and the code are available at https://www.robots.ox.ac.uk/~vgg/research/countx.

Motivation & Objective

  • To address the open-world object counting problem where the target class is not predefined and must be specified at inference time.
  • To eliminate the need for human-provided visual exemplars (e.g., bounding boxes) in open-world counting by using only text descriptions.
  • To develop a single-stage, end-to-end trainable model that generalizes to unseen object classes.
  • To enhance the FSC-147 benchmark with detailed textual descriptions to support more complex and realistic counting tasks.
  • To evaluate the effectiveness of different fine-tuning strategies for image and text encoders in the context of counting.

Proposed method

  • CounTX uses a pre-trained CLIP-based joint image-text encoder to embed both the input image and the text description into a shared embedding space.
  • A transformer decoder is employed to compute cross-attention between the text embedding and image patch features, modeling similarity to localize relevant object regions.
  • The resulting attention map is upsampled to image resolution and decoded into a density map used to predict the total object count.
  • The model is trained end-to-end using a combination of L1 and L2 loss on the predicted vs. ground-truth count and density map.
  • Freezing the text encoder and fine-tuning the image encoder yields optimal performance, as validated through ablation studies.
  • The method leverages the zero-shot generalization capability of CLIP while adapting the visual encoder specifically for counting through fine-tuning.

Experimental results

Research questions

  • RQ1Can a single-stage, end-to-end model achieve state-of-the-art performance in open-world text-specified object counting without requiring visual exemplars?
  • RQ2How does the choice of freezing or fine-tuning the image and text encoders affect counting performance?
  • RQ3To what extent can a pre-trained CLIP-based model generalize to count objects based solely on natural language descriptions?
  • RQ4Does augmenting the FSC-147 benchmark with detailed textual descriptions improve model generalization and evaluation robustness?
  • RQ5Can the model accurately distinguish between multiple object classes in a single image using only text descriptions?

Key findings

  • CounTX achieves a mean absolute error (MAE) of 15.88 and root mean square error (RMSE) of 106.29 on the FSC-147 test set, outperforming the prior two-stage method of Xu et al. (2023) across all metrics.
  • Freezing the text encoder and fine-tuning the image encoder yields the best performance, reducing MAE by over 50% compared to fully fine-tuned settings.
  • The model successfully generates density maps that highlight only regions matching the given text description, demonstrating accurate localization based on semantics.
  • Qualitative results on FSC-147-D and CountBench show that CounTX generalizes well to images with few instances and complex descriptions.
  • The release of FSC-147-D, with detailed textual descriptions, enables more realistic and diverse evaluation of text-specified counting models.
  • The model generalizes to unseen object classes at inference time, confirming its open-world capability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.