---
title: Occupancy-Based Detection Models
url: https://www.emergentmind.com/topics/occupancy-based-detection-model
type: topic
---

# Occupancy-Based Detection Models

Searching arXiv for the cited occupancy-model papers to ground the synthesis.
An occupancy-based detection model is a model class in which occupancy is treated as the latent or explicit target of inference and detection is the mechanism by which occupancy becomes observable. In statistical ecology, the canonical formulation separates occupancy probability from detection probability under imperfect observation, and repeated surveys are used to identify both components [1804.08694]. In building analytics, the same broad label is applied to binary or count inference from environmental sensors, smart-meter traces, appliance usage, thermal imagery, or hybrid deep architectures [2203.04750], [2212.11396], [2308.14114], [2505.08336]. In autonomous driving and 3D perception, occupancy denotes voxelized spatial structure or semantic occupancy, which is then used to improve object detection in bird’s-eye-view or monocular 3D pipelines [2308.13794], [2507.21358], [2305.15694]. This suggests that “occupancy-based detection model” is not a single algorithm but a recurring modeling pattern: occupancy is the target state, while detection may be statistical, sensor-driven, or spatially geometric.

## 1. Statistical definition and canonical formulation

The classical occupancy model is the single-season ecological model in which sites are visited repeatedly and occupancy is latent. In the homogeneous case, there are $S$ sites and $K$ visits per site, occupancy status is constant over visits under the closure assumption, sites are independent, and conditional on occupancy, detections across visits are independent Bernoulli trials with common detection probability $p$ [1804.08694]. For site $i$, the detection history is $y_i=(y_{i1},\ldots,y_{iK})$, with $y_{ij}\in\{0,1\}$, and the occupancy probability is $\psi$. The probability of at least one detection at an occupied site is
\[
\theta = 1 - (1-p)^K.
\]

A central feature of the model is mixture structure at the all-zero history. An all-zero detection history may arise either because a site is unoccupied or because it is occupied but never detected. In the homogeneous formulation, the aggregated likelihood can be written as
\[
L(\psi, p) \;\propto\; (1-\psi\theta)^{f_0}\,\psi^{S - f_0}\,p^{y}\,(1-p)^{O K - y},
\]
where $f_0$ is the number of sites with no detections, $O=S-f_0$ is the number of sites with at least one detection, and $y$ is the total number of detections across sites [1804.08694].

The heterogeneous single-season model extends this formulation by allowing both occupancy and detection probabilities to depend on covariates. The site-specific occupancy and detection probabilities are modeled as
\[
\mathrm{logit}(\psi_i) = z_i^\top \alpha, \qquad \mathrm{logit}(p_{it}) = x_{it}^\top \beta,
\]
with closure, conditional independence, no false positives, and independence across sites retained as the standard assumptions [1803.11354]. In this setting, $\theta_i = 1-\prod_{t=1}^{K}(1-p_{it})$ is site-specific, and orthogonality no longer holds globally.

A Bayesian variant replaces purely likelihood-based selection with intrinsic priors and explicit model-space priors that account for test multiplicity and respect polynomial hierarchy when higher-order terms are considered [1508.07403]. In that framework, occupancy indicators $z_i$ and detection outcomes $y_{ij}$ are linked through latent probit variables, and candidate occupancy and detection models are explored with stochastic search over admissible model spaces.

## 2. Two-stage estimation and partial likelihood

A defining methodological contribution in the homogeneous model is the orthogonal reparameterization
\[
\eta = \psi \theta = \psi \left\{1-(1-p)^K\right\},
\]
which turns the likelihood into a form that separates a binomial component in $\eta$ from a conditional component in $p$ [1804.08694]. The resulting log-likelihood is
\[
\ell(\eta, p) \;=\; f_0\log(1-\eta) + (S-f_0)\log\eta \;+\; y\log p + (O K - y)\log(1-p) - O \log\theta,
\]
and the cross-derivative satisfies
\[
\frac{\partial^2 \ell}{\partial \eta\,\partial p} \;=\; 0.
\]
This yields a natural two-stage inference procedure: first estimate $p$ by maximizing the conditional likelihood over sites with at least one detection, then estimate $\eta$ as $O/S$, and back-transform to $\psi$.

The conditional likelihood for detection in the homogeneous case is
\[
\ell_p(p) \;=\; y\log p + (O K - y)\log(1-p) - O \log\!\left\{1-(1-p)^K\right\},
\]
with $\widehat p$ defined as its maximizer. The occupancy estimator then becomes
\[
\widehat \psi \;=\; \frac{O/S}{\,1-(1-\widehat p)^K\,}.
\]
A further simplification is the partial-likelihood estimator
\[
\widetilde p \;=\; \frac{y-O}{b},
\]
where $b$ is the total number of post-first-detection occasions across detected sites, giving
\[
\widetilde \psi \;=\; \frac{O/S}{\,1-(1-\widetilde p)^K\,}.
\]
The paper reports that $\widetilde p$ is unbiased conditional on $b$, $\widetilde \psi$ is consistent under the homogeneous model, and the efficiency relative to full MLE is near or above $90\%$ in many scenarios [1804.08694].

In the heterogeneous model, the same logic is retained but orthogonality is lost. Detection is first estimated with a conditional likelihood based only on sites with at least one detection,
\[
\ell_{\mathrm{det}}(\beta) = \sum_{i:w_i=1} \left[\sum_{t=1}^{K} \{ y_{it}\log p_{it} + (1-y_{it})\log(1-p_{it})\} - \log \theta_i \right],
\]
and occupancy is then estimated by treating $w_i=1\{\sum_t y_{it}>0\}$ as Bernoulli with success probability $\eta_i=\psi_i\widehat\theta_i$ [1803.11354]. The occupancy score is
\[
S_\alpha(\alpha; \widehat\beta) = \sum_{i=1}^{S} z_i (w_i - \psi_i \widehat\theta_i) (1-\psi_i) / (1-\psi_i \widehat\theta_i),
\]
and an iterative weighted least squares update follows the generalized linear model template. This reduction in parameter space is presented as the practical advantage of the two-stage approach for covariate-rich occupancy analysis [1803.11354].

## 3. Sensor-driven occupancy detection in buildings and homes

In buildings, occupancy-based detection models are framed as supervised classification or regression over environmental, electrical, or temporal signals rather than as latent-state mixture models. A representative environmental-sensing study recorded continuous measurements of $\mathrm{CO_2}$, VOC, light, temperature, and humidity in a $17{,}000$ sqft open office space for around four months and evaluated SVM, Gaussian Naive Bayes, Logistic Regression, Random Forest Classifier, and K-Nearest Neighbors for binary occupancy detection [2203.04750]. The study found that $\mathrm{CO_2}_{\text{inhale}}$ is consistently highly informative for single offices, that VOC is a strong indicator in some cases, and that combined features such as $\mathrm{CO_2}+\mathrm{VOC}$ improve performance, especially in the conference room [2203.04750].

A related line of work studies smart-meter-based detection. ABODE-Net formulates occupancy detection as time-series classification on $60$-minute windows with input tensors $X_i\in\mathbb{R}^{1\times F\times T}$, where in the reported experiments $F=3$ and $T=60$, using features $\{$power consumption, $P_{\text{time}}$, $P_{\text{day}}\}$ [2212.11396]. The model comprises a Fully Convolutional Network feature extractor, a Parallel Attention block that combines temporal, variable, and channel attention,
\[
M_{PA} = (H \oplus O_{TA} \oplus O_{VA}) \odot O_{CA},
\]
and a classification head with Global Max Pooling, a fully connected layer with spectral normalization, and softmax output [2212.11396]. On ECO, the reported average performance across four cases is Accuracy $0.8649$ and F1 $0.8198$; on NIOM, the corresponding averages are Accuracy $0.9176$ and F1 $0.8643$ [2212.11396].

Another smart-meter model uses hourly aggregate data from the ECO dataset and combines a Bi-LSTM branch with a Transformer encoder in parallel [2308.14114]. The per-hour occupancy probability is
\[
p_t = \sigma(f_\theta(x_{t-w:t})),
\]
and the decision rule is $\hat y_t=\mathbb{1}[p_t\ge \tau]$ [2308.14114]. The reported main result for the hybrid Transformer–Bi-LSTM concatenation is Accuracy $0.9166$, Precision $0.9323$, Recall $0.9623$, F1 $0.9470$, and ROC-AUC $0.9331$ under $10$-fold cross-validation [2308.14114].

Occupancy has also been inferred directly from technical information of electric appliances in smart residential buildings. In that work, occupancy detection is posed on multivariate time-series from smart meters, appliance controllers, lighting, HVAC, and environmental sensors, resampled to $15$-minute intervals [2209.11520]. A kernelized SVM and an autoencoder-based classifier are evaluated using confusion-matrix metrics. Reported results include Accuracy $0.984$ in Room 1, $0.983$ in Room 2, $0.957$ for Room 1 and 2 combined with SVM, and $0.964$ for Room 1 and 2 combined with the autoencoder-based method; the aggregate detection range is $95.7$–$98.4\%$ [2209.11520]. The same study reports occupancy-aware control reducing total power at the $75$th, $50$th, and $25$th percentiles by $11.1\%$, $12.4\%$, and $13.1\%$, respectively [2209.11520].

Generalizability has become a distinct research question in residential settings. On environmental sensor data from the KTH Live-In Lab, Logistic Regression, SVM, and an attention-enhanced LSTM were evaluated on same-apartment, cross-apartment, and synthetic data [2604.14841]. With all features, the same-apartment test results are LR: Precision $0.8396$, Recall $0.8807$, F1 $0.8597$, Accuracy $0.8412$, ROC AUC $0.9164$; SVM: Precision $0.8099$, Recall $0.9133$, F1 $0.8585$, Accuracy $0.8184$, ROC AUC $0.9028$; LSTM: Precision $0.8436$, Recall $0.8885$, F1 $0.8655$, Accuracy $0.8333$, ROC AUC $0.9100$ [2604.14841]. On cross-apartment data, the LSTM shows the strongest generalization capability, summarized in the abstract as Accuracy of approximately $0.84$ and F1 score of approximately $0.85$ [2604.14841].

## 4. Vision and thermal occupancy detection

Thermal imaging has been adopted where privacy constraints limit RGB deployment. One thermal-image occupancy counting system combines intensity-based and motion-based human segmentation using difference catcher, connected component labeling, noise filter, and memory propagation [2110.07796]. Frames are sampled every two seconds, cropped to $200\times100$, processed with an illumination mask and Gaussian filtering, and then segmented via k-means thresholding and frame differencing [2110.07796]. Across six experiments under Over Lighting, Local Lighting, Multiple People, and Thermal Noises conditions, the reported accuracies are $66.7$, $71.4$, $66.7$, $74.3$, $80.0$, and $70.6$, for an average accuracy of $71.6\%$ [2110.07796].

A later thermal approach casts occupancy as face detection in low-resolution thermal imagery. Using a FLIR C3-X compact thermal camera at resolution $128\times96$, mounted on the upper bezel of a computer monitor in a single-occupant office, frames were captured every $10$ seconds throughout a single workday and annotated with face bounding boxes [2505.08336]. A YOLOv5 model pretrained on COCO was fine-tuned end-to-end for $250$ epochs, and occupancy was inferred from whether at least one face detection exceeded confidence threshold $\tau=0.9$:
\[
N_t = \sum_i \mathbb{1}\{s_i^t > \tau\}, \qquad O_t = \mathbb{1}\{N_t \ge 1\}.
\]
On the $968$-image test subset, the reported results are Precision $1.000$, Recall $0.984$, mAP@0.5 $0.991$, and mAP@[0.5:0.95] $0.975$, with only $12$ occupied images missed and false positives effectively suppressed at $\tau=0.9$ [2505.08336].

A distinct computer-vision application appears in seat-level library monitoring. The reported system is a serial dual-channel model in which Faster R-CNN detects persons and AlexNet classifies objects versus no-objects in seat tiles where no person is detected [2306.16080]. Seat state is then inferred as In-use, Occupied-by-belongings, or Vacant. The mixed synthetic-real training set for person detection reduced average training loss from $1.2659$ to $0.6165$, a $51\%$ reduction, relative to real-only training, and the AlexNet classifier achieved accuracy $0.936$ on the binary tile classification task [2306.16080].

These thermal and vision-based formulations share an immediate-response interpretation of occupancy: the target is estimated per frame or per short interval, and occupancy is the presence, count, or occupancy-related state of people or objects in the field of view. A plausible implication is that privacy-preserving imaging, especially low-resolution thermal sensing, has become a distinct design axis rather than merely a sensor substitution [2505.08336], [2110.07796].

## 5. Occupancy as a spatial representation in 3D detection

In autonomous driving, “occupancy” refers not to human presence in a room but to whether cells in discretized 3D space are empty or occupied, possibly with semantic labels. SOGDet defines occupancy as a voxel grid $V\in\mathbb{R}^{X\times Y\times Z}$ and semantic occupancy as
\[
Occ \in \mathbb{R}^{O\times X\times Y\times Z},
\]
where $O$ is the number of semantic classes [2308.13794]. The framework augments a BEV detector with a 3D semantic-occupancy branch and fuses occupancy and detection features via bidirectional adapters:
\[
F_{od} = (1-\lambda)\, G_{C\to D}(F_{oc}) + \lambda\, F_{od}, \qquad
F_{oc} = (1-\lambda)\, G_{D\to C}(F_{od}) + \lambda\, F_{oc},
\]
with $\lambda=0.9$ [2308.13794]. On the nuScenes test set with ResNet-101, the reported results are $57.8$ NDS / $47.1$ mAP for SOGDet-BO and $58.1$ NDS / $47.4$ mAP for SOGDet-SE [2308.13794].

Collaborative Perceiver develops the same occupancy-guided principle further by generating Local-Density-aware Dense Occupancy ground truth, extracting Voxel-Height-Guided Sampling features, and fusing global and local context [2507.21358]. The joint objective is
\[
\sum_{i=1}^{N_i} \left[ \mathcal{L}_{det}(B_i, \hat B_i) + \beta \cdot \mathcal{L}_{occ}(V_i, \hat V_i)\cdot \mathcal{W}_v^i \right],
\]
with $\beta=0.9$ [2507.21358]. On the nuScenes test set, CoP achieves $49.5\%$ mAP and $59.2\%$ NDS [2507.21358]. The occupancy branch is auxiliary in training but designed to produce more robust BEV representations for detection.

OccupancyM3D brings the idea to monocular 3D detection. It learns occupancy in both frustum and 3D space from synchronized raw sparse LiDAR during training, with frustum and 3D occupancy predictions used as multiplicative gates:
\[
\mathbf{Fru_3} = \mathbf{O_{fru} \odot \mathbf{Fru_2}, \qquad
\mathbf{V_3} = \mathbf{O_{3d} \odot \mathbf{V_2}.
\]
The overall training loss is
\[
\mathcal{L}=\mathcal{L}_{org}+\lambda\, \mathcal{L}_{occupancy}, \qquad \lambda=1.
\]
On KITTI Car test, the reported AP$_{3D}|R40$ at IoU $=0.7$ is $25.55/17.02/14.79$ for Easy/Moderate/Hard, and the paper reports large gains relative to CaDDN [2305.15694].

A radar-based dynamic occupancy grid map uses yet another occupancy representation: the frame of discernment is
\[
\Omega=\{F,S,D\},
\]
with evidential masses over free space, static occupancy, dynamic occupancy, unclassified occupancy, and unknown [2008.03696]. Multiple radar sensors are fused into a $50$ m by $50$ m grid with resolution $d_G=0.2$ m, and dynamic cells are selected as
\[
I_C = \{ i \in I \mid m(D^i) \ge \epsilon_{D,\min} \;\land\; m(D^i) > m(S^i)\}.
\]
In a quantitative scenario, the radar-based mean squared error for x-direction velocity estimation is $0.138$ m/s versus $1.350$ m/s for the lidar-based comparator [2008.03696].

This family of methods uses occupancy not as the final output for end users, but as an intermediate structural prior for downstream detection. That use is conceptually different from ecological or building occupancy estimation, but the common formal device remains the same: space is partitioned, occupancy is inferred per partition, and detection is improved by exploiting that structured representation.

## 6. Evaluation criteria, design trade-offs, and limitations

Across domains, evaluation depends on what occupancy denotes. In ecological models, the principal concern is bias, consistency, efficiency, and identifiability of $\psi$ and $p$ under imperfect detection [1804.08694], [1803.11354]. In building and residential models, confusion-matrix metrics dominate: Accuracy, Precision, Recall, F1, and sometimes ROC-AUC or RMSE for occupancy counts [2209.11520], [2308.14114], [2403.06643], [2604.14841]. In 3D perception, occupancy-guided detectors are judged with mAP, NDS, and occupancy metrics such as SSC.mIoU or SC.IoU [2308.13794], [2507.21358].

Several recurring trade-offs are explicit in the literature. First, there is a detectability–complexity trade-off. The two-stage occupancy estimators are computationally light and numerically stable, but partial likelihood discards first-detection timing information and can incur a small efficiency loss [1804.08694]. Second, there is a sensor-availability–accuracy trade-off. In residential environmental sensing, $\mathrm{CO_2}$ and its slope contribute most to accuracy, and acceptable performance is achievable with only $\mathrm{CO_2}$ features, favoring lower-cost deployments [2604.14841]. In naturally ventilated classrooms, spatial $\mathrm{CO_2}$ features such as vertical difference and horizontal difference substantially improve state detection and quantity detection relative to room-average temporal features alone [2403.06643]. Third, there is a privacy–fidelity trade-off. RGB-based computer vision offers immediate response and strong accuracy, but low-resolution thermal imagery is specifically adopted to mitigate privacy risks while maintaining strong detection performance [2505.08336].

Several limitations recur as well. Homogeneous ecological models may be unrealistic under site or visit heterogeneity, and partial likelihood may underperform relative to full joint hierarchical models when random effects or covariate-driven heterogeneity are strong [1804.08694]. Building models often depend on room-specific or household-specific signatures, so cross-building or cross-apartment transfer can degrade unless explicit generalization measures are built in [2212.11396], [2604.14841]. Thermal imaging models are sensitive to face visibility, side-face orientations, and domain shift across rooms or mounting positions [2505.08336]. Occupancy-guided 3D detectors rely on expensive or dataset-specific supervision and add training-time complexity; finer voxel resolution improves accuracy but raises memory and compute requirements [2507.21358], [2305.15694].

A common misconception is that occupancy detection is intrinsically tied to a single sensing modality or a single mathematical form. The literature does not support that view. In one branch, occupancy is a latent Bernoulli state with imperfect repeated detection [1804.08694]. In another, it is a binary label inferred from electrical, environmental, or thermal signals [2209.11520], [2212.11396], [2505.08336]. In another, it is a semantic or dynamic spatial field that regularizes 3D object detection [2308.13794], [2008.03696]. The unifying principle is instead architectural: occupancy is treated as the state that must be inferred, while the detection model specifies how observations, covariates, or spatial features reveal that state.

Source: https://www.emergentmind.com/topics/occupancy-based-detection-model