NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Object Counting and Instance Segmentation With Image-Level Supervision

Hisham Cholakkal, Guolei Sun, Fahad Shahbaz Khan, Ling Shao

Abstract

Common object counting in a natural scene is a challenging problem in computer vision with numerous real-world applications. Existing image-level supervised common object counting approaches only predict the global object count and rely on additional instance-level supervision to also determine object locations. We propose an image-level supervised approach that provides both the global object count and the spatial distribution of object instances by constructing an object category density map. Motivated by psychological studies, we further reduce image-level supervision using a limited object count information (up to four). To the best of our knowledge, we are the first to propose image-level supervised density map estimation for common object counting and demonstrate its effectiveness in image-level supervised instance segmentation. Comprehensive experiments are performed on the PASCAL VOC and COCO datasets. Our approach outperforms existing methods, including those using instance-level supervision, on both datasets for common object counting. Moreover, our approach improves state-of-the-art image-level supervised instance segmentation with a relative gain of 17.8% in terms of average best overlap, on the PASCAL VOC 2012 dataset.

Introduction

Object counting in natural scenes—such as identifying the number of people in a crowd or animals in a field—is a fundamental task in computer vision. Traditionally, researchers have faced a trade-off between ease of training and localization accuracy. Regression-based methods are easy to train with image-level labels but provide no spatial information. Conversely, localization-based methods provide precise coordinates but require expensive instance-level supervision, where humans must manually annotate every object instance.

This research, presented at CVPR 2019, introduces an "Image-Level Lower-Count" (ILC) supervision strategy. By leveraging the psychological concept of "subitizing"—the human ability to instantly perceive small quantities (1-4) without counting—the authors demonstrate that models can learn to count and locate objects using only total image counts, significantly reducing the human effort required for data labeling.

Methodology

The proposed architecture utilizes a two-branch deep learning model based on ResNet-50. The first branch, the Classification Branch, identifies the presence of specific categories and generates "Peak Response Maps" to highlight discriminative object parts. The second branch, the Density Branch, produces a density map where the integral of pixel values corresponds to the total object count.

Subitizing and Density Maps

The core innovation lies in the ILC supervision. The model is trained with exact counts for images containing 0 to 4 objects. For scenes with 5 or more objects, a simple "5+" label is used. To bridge the gap between image-level labels and spatial localization, the model employs a Spatial Loss to align the density map with classification peaks and a Global Loss to ensure the total density sum matches the known count.

Figure 5: The density map provides a spatial prior where the sum of values in a region (e.g., 0.9, 1.3) helps identify and separate individual object instances.

In instance segmentation tasks, these density maps act as a spatial prior. By evaluating object proposals against the density map, the system can determine if a proposal contains exactly one object (a sum near 1.0), allowing it to successfully "split" adjacent or overlapping objects that traditional weakly-supervised methods often merge into a single blob.

Experimental Results

The model was evaluated on the PASCAL VOC 2007, PASCAL VOC 2012, and COCO datasets.

Object Counting

On the COCO dataset, which features 80 diverse categories and heavy occlusion, the ILC method achieved a Mean Root Mean Square Error (mRMSE) of 0.34. This result is particularly significant as it outperforms existing methods that utilize much richer point-level and bounding-box supervision (which typically score between 0.35 and 0.38).

Instance Segmentation

For weakly-supervised instance segmentation on PASCAL VOC 2012, the approach achieved a relative gain of 17.8% in Average Best Overlap (ABO), improving the state-of-the-art from 37.6 to 44.3. The density map's ability to provide a count-based spatial prior proved crucial in distinguishing between touching instances of the same class.

Figure 6: Qualitative results of the proposed approach for instance segmentation, demonstrating the ability to distinguish multiple individual 'person' instances in a single scene.

Conclusion

This work proves that image-level counts are a "sweet spot" for supervision—far more informative than binary labels but significantly cheaper than bounding boxes. The ability of the model to generalize from small numbers (1-4) to count much larger groups suggests that learning the basic concept of an "instance" is sufficient for complex counting tasks. Future work may involve integrating proposal generation directly into the network for a more seamless end-to-end training process.

Summary updated

BibTeX
@inproceedings{cholakkal2019object,
  author = {Hisham Cholakkal and Guolei Sun and Fahad Shahbaz Khan and Ling Shao},
  title = {{Object Counting and Instance Segmentation With Image-Level Supervision}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  url = {https://openreview.net/forum?id=Bf4xli5qk9},
}
Figure