Measuring People-Flow Through Doorways using Easy-to-Install IR Array Sensors Hessam Mohammadmoradi * , Sirajum Munir † , Omprakash Gnawali * , Charles Shelton † Computer Science Department, University of Houston, Houston, TX * Bosch Research and Technology Center, Pittsburgh, PA † Email: hmoradi@cs.uh.edu, sirajum.munir@us.bosch.com, gnawali@cs.uh.edu,charles.shelton@us.bosch.com Abstract—People counting has many applications in smart buildings. For example, adjusting HVAC systems based on the number of occupants in each room can save a significant amount of energy. In addition, security and safety of the building can be managed by determining the number and location of occupants. Different technologies and sensing platforms have proposed for accurate and efficient people counting. However, these solutions are expensive, hard to deploy, or privacy invasive. We investigate the possibility of placing an 8×8 IR array sensor at the doorways and counting the number of people inside rooms. Our solution is real-time, inexpensive, privacy preserving with much less deployment constraints compared to its competitors. The proposed solution deals with realistic and dynamic changes in the sensing environment by leveraging a combination of Otsu’s thresholding and modeling thermal noise distribution. We evaluated our solution via several controlled and uncontrolled real-world environments. The results show an average of 93% accuracy in estimating the number of occupants in rooms. I. I NTRODUCTION Improving energy efficiency of buildings has been an active area of research for many years and there is a global effort to reduce energy waste. Energy consumed in buildings is a large fraction of the total energy consumed by commercial and residential sectors (40% in the U.S. [5]). HVAC sys- tems are usually the most energy consuming components in buildings (40% as in [23]). Recent advance in Internet of Things (IoT) technologies has started a new era in modern building management. Various types of sensing platforms are being deployed to understand the in-depth behavior of the occupants for efficient building energy and occupant comfort management. Technology that can accurately estimate the number of occupants in a room could become a key enabler for many applications in this space. For example, the estimated number of occupants in the building can be used to control HVAC systems and save a significant amount of energy (25% as in [3]). Occupancy estimation is also valuable in other areas such as safety and marketing. There are several people counting solutions proposed by research community or industry sector. People counting using RGB cameras is accurate but often raises privacy concerns and may not be deployed in many residential and commercial buildings. Break-Beam sensors are the cheapest people count- ing solution available commercially. They use breaks in active IR signals to detect objects when they pass through a door and break the signal. However, there are tight restrictions regarding the placement of Break-Beam sensors at the doorway (specific height and pointing directly to each other) that make them hard and even impossible to deploy in some scenarios. Ultrasonic sensor based solutions require a significant amount of training to achieve reasonable occupancy estimation accuracy. Besides, ultrasonic waves usually are not pet-friendly. High-resolution thermal imagers are accurate; but price for commercial thermal imagers starts at $250 which is prohibitively expensive for large scale deployments. In this paper, we use a low resolution (8×8 pixels) IR array sensor to count the number of people inside a room. The main idea is deploying an IR array sensor on sides or top of the doorway and counting entrance and exit events. The solution extracts and tracks humans from captured IR images using their temperature difference compared to the background. Our solution is lightweight and runs on a Raspberry Pi Zero (costs only $5) which makes it an affordable solution for large scale deployments, e.g., commercial buildings, academic buildings, hospitals, restaurants, and shopping centers. The IR array sensor costs less than $22 and consumes ∼4.5 mA in its active times. The IR array sensor can be mounted on top of the door or on either side of the door as long as people walk inside its field of view. The placement and orientation of the sensor do not have to be as constrained as a Break-Beam sensor-based solution. The solution has almost no privacy concerns as the resolution is so low and human body temperature is so similar, it is almost impossible to identify occupants using our sensor. To the best of our knowledge, this is the first work that places low-power low-resolution IR array sensors on doorways to estimate the number of people inside the room. The contributions of this paper are as follows: • We develop a real-time occupancy estimation solution that is easier to deploy compared to similar solutions, privacy preserving, and very inexpensive by using low resolution IR array sensors. • We perform a range of micro-benchmarks to understand the characteristics of the sensor and analyze its perform- ance under different deployment scenarios. • We have deployed our solution in a commercial building and also in an academic building containing diverse types of doors and dynamic environments due to HVAC operations and movement of people. We observe that our solution achieves 93% accuracy in occupancy estimation in real-time.