2. What’s occupancy?
Three dimensions
Most common:
• Binary/Head counts
• At the room level
• Time resolution app dependent
Heisenberg’s principle
• Δoccupants × Δtime × Δspace ≥ min. cost
• Costs: $$$ and privacy
15/02/2016 BASTIEN PIETROPAOLI 2
3. Summary
Existing approaches
• Sensor used
• Example of existing approaches
Our approach
• Seeking a simpler solution
• Small deployment
• Saving energy
Binary occupancy, the classic
Machine learning
• What features?
• Linear regression
• Results
• Exploring the parameters
Pros and cons/Conclusion
15/02/2016 BASTIEN PIETROPAOLI 3
4. Summary
Existing approaches
• Sensor used
• Example of existing approaches
Our approach
• Seeking a simpler solution
• Small deployment
• Saving energy
Binary occupancy, the classic
Machine learning
• What features?
• Linear regression
• Results
• Exploring the parameters
Pros and cons/Conclusion
15/02/2016 BASTIEN PIETROPAOLI 4
5. Sensors used for occupancy detection
CO2 / VOC
Pros: Detect people independently of their activity,
• Cons: Expensive, low time resolution, not suitable for open spaces, highly sensitive to ventilation
PIRs
• Pros: Cheap, already deployed, well-known
• Cons: Binary events, noisy peaks, cannot detect still people
Sound
• Pros: ?
• Cons: Sensitive to external noises
Cameras
• Pros: Highly reliable
• Cons: Privacy concerns, sensitive to obstruction and luminosity changes, computationally demanding
15/02/2016 BASTIEN PIETROPAOLI 5
6. Existing approaches (1/3)
Counters at key places
• Pairs of PIR sensors
• Modified PIR sensors
• Cameras
• Wireless sensing
Pros
• Simple in principle
• Cost effective
Cons
• Error prone
• Propagated errors
15/02/2016 BASTIEN PIETROPAOLI 6
Zappi et al. 2010 Lin et al. 2011
Erickson et al. 2013
Hutchins et al. 2007
9. Summary
Existing approaches
• Sensor used
• Example of existing approaches
Our approach
• Seeking a simpler solution
• Small deployment
• Saving energy
Binary occupancy, the classic
Machine learning
• What features?
• Linear regression
• Results
• Exploring the parameters
Pros and cons/Conclusion
15/02/2016 BASTIEN PIETROPAOLI 9
10. Seeking a simpler solution
Required qualities
• Cheap
• Short training set
• Simple models
• Privacy friendly
• Reliable head counts
15/02/2016 BASTIEN PIETROPAOLI 10
The solution
we need!
11. Our (ridiculously) small deployment
PIR sensors
• One office
• Two sensors
• Four people
First to test binary occupancy
• Integration to Wi-Fi sniffer project
• Indoor localisation improvement
15/02/2016 BASTIEN PIETROPAOLI 11
12. Save energy, keep reactivity
Wireless sensor nodes
• Limited batteries
• Wireless com’ consuming too much
Needs
• Reactivity
• All the events
Solution
• Send a sequence start message
• A message every 5s maximum
• Over 11 days: 99727 msgs sent for 198842 events
15/02/2016 BASTIEN PIETROPAOLI 12
13. Summary
Existing approaches
• Sensor used
• Example of existing approaches
Our approach
• Seeking a simpler solution
• Small deployment
• Saving energy
Binary occupancy, the classic
Machine learning
• What features?
• Linear regression
• Results
• Exploring the parameters
Pros and cons/Conclusion
15/02/2016 BASTIEN PIETROPAOLI 13
16. Summary
Existing approaches
• Sensor used
• Example of existing approaches
Our approach
• Seeking a simpler solution
• Small deployment
• Saving energy
Binary occupancy, the classic
Machine learning
• What features?
• Linear regression
• Results
• Exploring the parameters
Pros and cons/Conclusion
15/02/2016 BASTIEN PIETROPAOLI 16
17. What features?
Intuition
• More people = more motion events
• Integration might help
• Take the number of events!
Enough data?
Correlated enough?
15/02/2016 BASTIEN PIETROPAOLI 17
Int.
time 15s 30s 60s 90s 300s 900s 1800s
Corr. 0.741 0.803 0.846 0.866 0.909 0.929 0.928
18. Machine learning?
Supervised, unsupervised?
Which method?
Training set?
Enough features?
Let’s test the simplest: linear
regression
15/02/2016 BASTIEN PIETROPAOLI 18
My colleagues
when I explain
how to use it.
Ground truth system
made of two buttons.
19. Linear regression, the simplest
A matrix of features: nb of motion events
at various degrees
A vector of real measurements: our
occupancy ground truth
A closed-form solution
Super fast prediction!
15/02/2016 BASTIEN PIETROPAOLI 19
𝑋 =
1 𝑥1,1 ⋯ 𝑥1,𝑛
⋮ ⋱ ⋮
1 𝑥 𝑚,1 ⋯ 𝑥 𝑚,𝑛
𝑌 =
𝑦1
⋮
𝑦 𝑚
Θ =
𝜃0
⋮
𝜃 𝑛
= (𝑋 𝑇
𝑋)−1
𝑋 𝑇
𝑌
𝑌 = 𝑋Θ 𝑦𝑖 = 𝜃0 +
𝑗=1
𝑛
𝜃𝑗. 𝑥𝑖,𝑗with
22. Visualising the results (1/4)
Seeking the best parameter combination
• Integration time
• Degree of the polynomial used
Various criteria
• RMSE
• Accuracy
• Accuracy with tolerance
Results averaged over all the days used to learn
15/02/2016 BASTIEN PIETROPAOLI 22
23. Visualising the results (2/4)
RMSE
• Good estimate mixing both mean error
and standard deviation of the error
Best
• Degree 2
• 900s integration
15/02/2016 BASTIEN PIETROPAOLI 23
24. Visualising the results (3/4)
Accuracy (when rounded)
• Proportion of correct estimates
Best
• Degree 1
• 900s integration
15/02/2016 BASTIEN PIETROPAOLI 24
25. Visualising the results (4/4)
Accuracy with tolerance 1
• Take the floor or the ceiling of the
estimates
• Discriminate binary occupancy
Best
Degree 2
900s integration
15/02/2016 BASTIEN PIETROPAOLI 25
26. Does the day matter?
Acceptable difference between worst and best day
The best day tends to be the same for all the
parameter sets
The ordering of parameter sets tend to be
respected for worst, average and best
15/02/2016 BASTIEN PIETROPAOLI 26
Int. Time Worst Average Best
15s 75.19% 77.08% 77.77%
30s 76.68% 78.97% 80.18%
45s 77.13% 79.49% 81.04%
60s 77.68% 79.83% 81.59%
90s 78.04% 79.99% 81.95%
120s 78.47% 80.18% 82.36%
150s 78.41% 80.29% 82.31%
180s 78.38% 80.33% 82.37%
300s 78.09% 80.43% 82.39%
600s 79.02% 81.30% 83.42%
900s 79.29% 81.56% 83.63%
1200s 79.66% 81.45% 83.42%
1800s 78.86% 81.09% 82.83%
27. Summary
Existing approaches
• Sensor used
• Example of existing approaches
Our approach
• Seeking a simpler solution
• Small deployment
• Saving energy
Binary occupancy, the classic
Machine learning
• What features?
• Linear regression
• Results
• Exploring the parameters
Pros and cons/Conclusion
15/02/2016 BASTIEN PIETROPAOLI 27
28. Pros and cons
Requires only one type of sensor
Well-known sensors
Cheap and commonly deployed sensors
Simple model
Computationally extra light
Accurate with a small training set
Sensitive to sensor placement
Model might be specific to the room
Might not work in all types of environments
15/02/2016 BASTIEN PIETROPAOLI 28
29. Conclusion
We did it!
• Small training set
• Computationally light
• Model easily understood
• Cheap sensors
• Acceptable accuracy
15/02/2016 BASTIEN PIETROPAOLI 29
30. Thanks for your
attention! Questions?
CONTACT: BASTIEN.PIETROPAOLI@GMAIL.COM/@CIT.IE
15/02/2016 BASTIEN PIETROPAOLI 30
Editor's Notes
Here, real-time head counts at the room level.
Peaks around 9pm: not noise, the security guard not tapping!
Increased validity time = increased presence recall, reduced precision
Occulted (0, 0) as it would cover the entire figure.
Supervised or unsupervised: unsupervised might be difficult, impossible to distinguish clear classes.
Which method: certainly not classification, we need to infer a number, not a class
Training set: shouldn’t be too massive, hard to acquire ground truth
Used one day to learn the parameters, here, the August 10th.
Overall results not too bad. RMSE of 0.9 over the presence time is equivalent to the best results found in the bibliography.
Nights and days are correctly discriminated.
Peaks when people arrive in the morning. Might be due to sensor placement, with overlapping fields of view.
Criteria: no clear standard criterion in the literature.
If groundtruth == 0 and estimate ceiling == 1, not okay. Needs to be rounded at 0.
If groundtruth >= 1 and estimate floor == 0, not okay. Needs to be rounded at groundtruth.
Table for degree 2
Sensor placement: artificially increased event counts due to overlapping fields of views.
Specific: to be further experimented.
Environments: for instance, in a kitchen, would it work? Different types of activites will induce different levels of counts, might work, might not.
Cheap sensors commonly deployed in recent buildings.
Small training set: 1 day is doable, even for each room. Can even be redone if necessary.
Computationally light, scalable, a whole building can be managed by an embedded PC.
Accuracy at least as good as anything else found in the literature.