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

HistoNet: Predicting size histograms of object instances

Kishan Sharma, Moritz Gold, Christian Zurbruegg, Laura Leal-Taixé, Jan Dirk Wegner

Abstract

In many practical applications, such as biological monitoring or medical diagnosis, the primary goal is to understand the statistical distribution of object sizes within an image rather than precise individual localization. Traditional instance segmentation methods are often computationally expensive and prone to errors in crowded scenes. We present HistoNet, a deep learning approach that directly predicts object counts and size histograms. By avoiding explicit instance segmentation, HistoNet achieves superior accuracy in high-density environments while utilizing significantly fewer parameters than state-of-the-art models.

Introduction

Fields like biology (e.g., counting larvae) and medicine (e.g., estimating tumor cellularity) frequently require aggregate statistics of object populations. The standard "counting-by-detection" paradigm, exemplified by models like Mask R-CNN, attempts to segment every individual object. However, in "crowded" scenes where objects overlap significantly, these methods often fail. Non-Maximum Suppression (NMS), a critical step in detection, can inadvertently remove valid overlapping instances. Furthermore, training for pixel-perfect masks is often unnecessary when only a histogram is required.

Methodology

HistoNet employs a two-branch convolutional neural network (CNN) architecture designed for statistical estimation.

The HistoNet architecture features a dual-branch design for counting and histogram prediction, utilizing Deep Supervision (DSN) for gradual refinement.

Dual-Branch Architecture

  • Counting Branch: Instead of point-based detection, this branch predicts a "redundant count map"—a density map where the integral over the image yields the total count. This approach is inherently more robust to minor localization errors.
  • Histogram Branch: This branch predicts the distribution of object sizes across discrete bins (e.g., 8 or 16 bins).

Key Innovations

  1. Deep Supervision (DSN): To handle the complexity of fine-grained histogram prediction, HistoNet uses intermediate "trapezoid" modules. These modules first learn coarse distributions (2-bin, then 4-bin) before tackling the final 16-bin prediction, preventing training from stalling on hard bin boundaries.
  2. Weighted L1 Loss: Recognizing that missing large objects is often more critical than missing small ones, the authors introduced a weighted loss function that penalizes errors in larger size bins more heavily.
  3. Multi-task Learning: The model is optimized using a combined loss function including L1 loss for counting, KL-Divergence for histogram shape, and the weighted L1 loss for scale.

Datasets and Evaluation

The model was evaluated on several challenging datasets:

  • FlyLarvae: A new dataset of 11,000 soldier fly larvae instances. These images are extremely crowded, making them ideal for testing robustness to overlap.
  • Synthetic Ellipse Dataset: Used to evaluate performance across varying densities and non-Gaussian distributions.
  • BreastPathQ: A medical dataset used for calculating tumor cellularity scores.
Visualization of the FlyLarvae dataset showing (a) input image, (b) ground truth masks, (c) predicted density map, and (d-e) resulting size histograms.

Results and Discussion

HistoNet demonstrates significant improvements over traditional segmentation-based approaches:

  • Accuracy in Crowded Scenes: On the FlyLarvae dataset, HistoNet reduced the $\chi^2$ distance (measuring histogram discrepancy) by over 50% compared to Mask R-CNN. While Mask R-CNN tended to under-count due to occlusion, HistoNet remained accurate.
  • Parameter Efficiency: HistoNet is remarkably lean, using approximately 30M parameters compared to the ~237M parameters required by Mask R-CNN—an 85% reduction.
  • Medical Utility: In the BreastPathQ challenge, HistoNet achieved a prediction probability of 0.83, significantly outperforming the CountCeption baseline of 0.56.

Conclusion

HistoNet shifts the focus from individual object detection to aggregate statistical estimation, effectively bypassing the "NMS bottleneck" in crowded scenes. Its parameter efficiency and robustness make it a powerful tool for large-scale biological and medical image analysis. Future work may involve using HistoNet's predictions as spatial priors to improve standard object detectors in complex environments.

Summary updated

BibTeX
@inproceedings{sharma2020histonet,
  author = {Kishan Sharma and Moritz Gold and Christian Zurbruegg and Laura Leal-Taixé and Jan Dirk Wegner},
  title = {{HistoNet: Predicting size histograms of object instances}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2020},
  doi = {10.1109/wacv45572.2020.9093484},
}
Figure