Occupancy estimation and activity recognition in smart buildings using open set domain adaptation
Ons Abderrahim, Jawher Dridi, Manar Amayri, Nizar Bouguila · Journal of Building Engineering · 2025
Smart buildings (SB) optimize energy use to help the world achieve better sustainability while supporting energy efficiency goals and reversing climate change. Successful occupancy estimation (OE) along with activity recognition (AR) provides essential functionality to accomplish these objectives through the modification of building systems (BS), including heating and lighting. However, developing robust models for SB tasks is challenged by the scarcity of labeled data. Thus, the need for domain adaptation, that aims at adapting a model trained on one domain (source) to perform well on a different domain (target). Traditional closed-set domain adaptation (CSDA) methods have a critical limitation: they assume shared classes between source and target domains, which is unrealistic in many applications. Open Set Domain Adaptation (OSDA) provides a more realistic solution, assuming that only a few categories are available in both domains, making OSDA methods more suitable for SB. This paper presents four novel OSDA approaches: OSDA by backpropagation, OSDA with soft rejection, Unknown Aware Domain Adversarial Learning (UADAL) for OSDA, and Adjustment and Alignment (ANNA) for unbiased OSDA, to address these challenges. Evaluated on offices and residential apartment datasets, our top-performing method achieves 92% accuracy, a 0.89 F1-score on known classes, and an 85% unknown-class detection rate. These techniques differentiate between known and unknown target classes through adversarial training, reducing negative transfer, and improving feature alignment. The OSDA methodologies show notable improvements through testing on SB datasets. This indicates that OSDA implementation in SB can result in significant energy savings and improved sustainability. The code is available in this repository: https://github.com/ons-abderrahim/OSDA-to-Improve-Occupancy-Estimation-and-Activity-Recognition-in-Smart-Buildings .