Conceptio › Archive › arXiv CS
arXiv CS open access

How Many, but How Sure? Class Competition as a Confidence Proxy in Multi-Class Density-Based Counting

Villanelle O'Reilly et al. · arxiv_cs
arXiv CS · Papers
Open Source ↗Direct PDF ↓
machine-learningneural-networks
Multi-class density estimators can count objects in crowded scenes, but their class-wise outputs offer no indication of how reliably density mass has been allocated. We introduce a training-free confidence proxy based on local competition between the strongest class channels. The resulting prominenc
Conceptio Open Archive

Analyze & explore related research in Conceptio

Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.

How Many, but How Sure? Class Competition as a Confidence Proxy in Multi-Class Density-Based Counting Villanelle O’Reilly∗†1,2 , Georgios Leontidis3 , and Marc Hanheide1 1

Lincoln Centre for Autonomous Systems, University of Lincoln, UK Applied Vision and Artificial Intelligence Lab, University of Lincoln, UK 3 UiT The Arctic University of Norway, Norway ✉ {voreilly, mhanheide}@lincoln.ac.uk, georgios.leontidis@uit.no✉ 2

arXiv:2610.23611v1 [cs.LG] 16 Oct 2026

Abstract

given location—this class competition is a direct source of uncertainty in the class-wise counts. Explicit confidence-awareness is absent from multi-class density-based counting, yet it is particularly needed there as a count-class allocation is difficult to act upon without some indication of its reliability. A biodiversity survey or a planning decision needs to know not only how many targets are present, but how confidently count mass has been assigned to classes. A measure of confidence in the class assignment of density-based counts would close this gap. We hypothesise that regions with both high density activity and strong class competition contain more allocation error than high-activity regions dominated by one class. To test this hypothesis, we introduce the prominence ratio, a training-free, spatially resolved confidence proxy computed solely from predicted density maps. We evaluate its diagnostic value by using it to attenuate contested density in frozen multi-class counters and measuring the resulting change in count error.

Multi-class density estimators can count objects in crowded scenes, but their class-wise outputs offer no indication of how reliably density mass has been allocated. We introduce a training-free confidence proxy based on local competition between the strongest class channels. The resulting prominence measure requires only the predicted density maps, with no retraining or access to model internals. We test whether residual competition is diagnostic of cross-class leakage by attenuating contested density at inference time. On DSACA predictions for the Hicks et al. dataset, this reduces overall MAE from 0.920 to 0.846, suggesting that class competition contains useful information about count reliability.

1

Introduction

Crowded environments pose a challenging counting task for humans and computers alike. Such environments arise when surveying flowers in the field for biodiversity monitoring, or when counting people and different vehicle types from overhead, and remote-sensing imagery to inform urban planning. These domains are inherently multi-class, and exhibit sufficiently non-uniform congestion that the assumption of individual discreteness is invalidated by occlusion and proximity between instances, undermining the most capable discrete counting methods, as reported in [1–4]. Therefore, estimating a continuous density map can be a more appropriate modelling choice than discretising by counting individual detections or instance masks. However, very little computer vision research has delivered both continuous counting and class discrimination robust to the epistemic uncertainty and modelling problems inherent to cluttered, class-diverse in situ domains. Per-class density maps are not mutually exclusive, so several classes may incorrectly claim the same density mass from the same evidence at a

2

Related Work

Uncertainty can be modelled directly within a density-based counter. The single-class Tarling et al. [6], for example, predict an image-level noise variance alongside their single-class density map, optimised through an uncertainty-regularised count loss so that uncertainty in the target counts is learned as part of the regression task itself. Nothing comparable has been attempted for the multi-class case, where a distinctive source of uncertainty is crossclass competition—activations in one class channel contributing count mass that belongs to another. Such channel cross-talk is also a broader quantity than the observation noise Tarling et al. model, reflecting a distinctive source of uncertainty in the multi-class setting. Rather than explicitly model this uncertainty, ∗ Corresponding Author. multi-class density counters compensate for com† This work was supported by the UKRI AI Centre for petition indirectly, through an auxiliary supervised Doctoral Training in Sustainable Understandable agri-food task. Michel et al. [3] pair the density estimator Systems Transformed by Artificial INtelligence (SUSTAIN), with the grant reference: EP/Y03063X/1. with a detection-and-classification pipeline, while 1

Sample 64 (Input Image)

GT Class daisy (5.0)

0.00150 0.00125 0.00100 0.00075 0.00050 0.00025 0.00000

Raw Class daisy (10.7)

Prominence c = daisy; ρc = D(1)D+1.0ε Filtered density D c = Dc ρc (9.3) c

0.0012 0.0010 0.0008 0.0006 0.0004 0.0002 0.0000

0.8 0.6 0.4 0.2 0.0

0

0.0012 0.0010 0.0008 0.0006 0.0004 0.0002 0.0000

Figure 1. Qualitative sample from the Hicks et al. [5] dataset, using DSACA [2]; weights from GeTNuRi [4].

DSACA [2] and GeTNuRi [4] attach a non-exclusive, segmentation-like head trained with binary crossentropy, via their Category Attention Module and Category Focus Module respectively. In GeTNuRi the auxiliary loss is shown empirically to aid the density optimisation, reducing channel competition over training. Closest to our concern, NWPU-MOC [7] penalises competition explicitly, regularising the cosine similarity between each pair of flattened class channels. In every case, however, competition is treated as a nuisance to be suppressed at training time, either as a by-product of a borrowed objective or as a whole-image regulariser, rather than located— it still does not ask where class mass is contested, nor does it address whether contested mass is in fact erroneous. No existing method exposes the competition that remains at inference as a measure of confidence in the class assignment of count mass, which is the gap this paper addresses.

3

which leaves the locally prominent class untouched, scaling less prominent mass down in proportion to how prominent it is. Figure 1 illustrates this behaviour for the daisy class. Faint daisy activations in the unfiltered prediction largely coincide with stronger buttercup density and are attenuated by prominence filtering. By contrast, isolated daisy peaks retain prominence values near 1, preserving that prominent predicted daisy mass. The example suggests that low prominence can localise cross-class leakage, although it does not establish that all spatially overlapping activation is erroneous. Prominence filtering reduces test MAE for GeTNuRi by 4.5% on Hicks and by 2.7% on iSAID. For DSACA on Hicks, it reduces MAE 8.0%, from 0.920 to 0.846. Improvements across two architectures and two visual domains suggest that residual class competition carries useful information about the reliability of class-wise density allocation. However, filtering deteriorates the test MAE of GeTNuRi on VisDrone by 0.87%. Low prominence is therefore not synonymous with error—contested density may also represent valid co-occurrence or differences in the relative scaling of class channels. We consequently interpret prominence as a diagnostic confidence proxy rather than a guaranteed correction rule.

Confidence

A multi-class density counter maps an image I to a non-negative density map D = F(I; θ) ∈ RC×H×W , ≥0 one channel per class, with the predicted count for P class c given by n̂c = h,w Dc,h,w . Nothing constrains the raw mass at a location to belong to a single class, and where several channels are active at once, their counts are in competition for the same evidence. We ask whether the degree of that compeConclusion tition predicts where its class-wise counts are wrong. 4 At each location (h, w), let D(1) denote the largest We introduced the prominence ratio, a spatially activation across the C channels. We define the resolved, training-free proxy for confidence in classprominence ratio of each class wise density allocation, and tested whether residual competition identifies unreliable density by attenuatDc,h,w ρc,h,w = ∈ [0, 1], (1) ing low-prominence mass in frozen counters. FilterD(1),h,w + ϵ ing reduces MAE for DSACA on Hicks and for GeTwhich is 1 for the locally prominent class and de- NuRi on iSAID and Hicks. Its slight degradation creases toward 0 for channels the model has left on VisDrone shows, however, that competition is comparatively unsupported for the evidence at that informative but not invariably erroneous—contested point. ρ is a property of a class at a location, not a mass may reflect either cross-class leakage or valid cocalibrated probability; only a description of how the occurrence. Future work should validate prominence model has distributed density mass across its chan- directly against spatial allocation error and establish nels at a point, computed without labels, training, it as a metric capable of distinguishing these cases. As a differentiable quantity, prominence may also or access to the model’s internals. To test the hypothesis directly we apply the sim- support competition-aware training and, ultimately, plest intervention consistent with it, attenuating confidence-aware, prompt-faithful open-vocabulary counting [8]. each channel by its own prominence ′ Dc,h,w = Dc,h,w ρc,h,w ,

(2) 2

References [1] A. S. Gomez, E. Aptoula, S. Parsons, and P. Bosilj. “Deep Regression Versus Detection for Counting in Robotic Phenotyping”. In: IEEE Robotics and Automation Letters 6.2 (2021), pp. 2902–2907. doi: 10 . 1109 / LRA . 2021 . 3062586. [2] W. Xu, D. Liang, Y. Zheng, J. Xie, and Z. Ma. “Dilated-Scale-Aware Category-Attention ConvNet for Multi-Class Object Counting”. In: IEEE Signal Processing Letters 28 (2021), pp. 1570–1574. doi: 10 . 1109 / LSP . 2021 . 3096119. [3] A. Michel, W. Gross, F. Schenkel, and W. Middelmann. “Class-Aware Object Counting”. In: Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV) Workshops. Jan. 2022, pp. 469–478. doi: 10.1109/WACVW54805.2022.00053. [4] V. O’Reilly, J. Cox, G. Leontidis, M. Hanheide, P. Bosilj, and J. M. Brown. “Getting the Numbers Right—Modelling Multi-Class Object Counting in Dense and Varied Scenes”. In: (July 2026). url: https://hdl.handle.net/ 10779/lincoln.32025327. [5] D. Hicks, M. Baude, C. Kratz, P. Ouvrard, and G. Stone. “Deep learning object detection to estimate the nectar sugar mass of flowering vegetation”. In: Ecological Solutions and Evidence 2.3 (2021), e12099. doi: 10.1002/26888319.12099. [6] P. Tarling, M. Cantor, A. Clapés, and S. Escalera. “Deep learning with self-supervision and uncertainty regularization to count fish in underwater images”. In: PLOS ONE 17.5 (May 2022), e0267759. doi: 10.1371/journal.pone. 0267759. [7] J. Gao, L. Zhao, and X. Li. “NWPU-MOC: A Benchmark for Fine-Grained Multicategory Object Counting in Aerial Images”. In: IEEE Transactions on Geoscience and Remote Sensing 62 (2024), pp. 1–14. doi: 10.1109/TGRS. 2024.3356492. [8] L. Ciampi, N. Messina, M. Pierucci, G. Amato, M. Avvenuti, and F. Falchi. “Mind the Prompt: A Novel Benchmark for Prompt-Based Class-Agnostic Counting”. In: 2025 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV). 2025, pp. 7970–7979. doi: 10.1109/WACV61041.2025.00774.

3

Related documents

Record · ID 1375047 · SHA-256 edd9233afd6cb74f
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive