A real-time people counting system using ultrasonic sensors
Visit PEOPLE INSIDE »
University students takes classes according to the fixed timetable. At the meal time, too many people crowd into a cafeteria. Sometimes we must go to another cafeteria because there are no enough table. To take matters worse, we don't have much time, because another class begins soon. To have lunch, we have to wait for a seat in the cafeteria or go out to look for another cafeteria. After all, it's a fool's errand. From now we want to avoid this, We want to check the number of indoor people in advance. So, we made it, PEOPLE-INSIDE.
PEOPLE INSIDE is a real-time people counting system using ultrasonic sensors. It uses only four inexpensive ultrasonic sensors to determine the number of indoor personnel. And you can see this number in real time through the application.
In other words, our system aims to measure indoor congestion metrics. This can be apply to all indoor rooms as well as university cafeterias.
We are focusing on main purposes. We have three things to aim for :
You don't have to waste any more of your time by checking the number of indoor people with an application.
PEOPLE-INSIDE can be used for various purposes. The use of it is yours.
Only use four inexpensive ultrasonic sensors to determine the number of people.
git clone https://github.com/PEOPLE-INSIDE/people-inside
\projects\arduino
- Include two type of our Arduino source code (Classification / Random Forest)
\projects\mobile_app
- Include our Android mobile application for display the number of people.
\projects\3d_modeling
- Include our 3d model chassis for Arduino and ultrasonic sensors.
\projects\dataset
- Include our all signal dataset for training decision trees.
Before you use our system, make sure the environment fits perfectly. This is a list of necessary things.
- Arduino UNO
UNO
becomes the main body to connect the sensors. - Ultrasonic sensors You need four ultrasonic sensors. And these must positioned parallel aligned in two pairs. Prepare inexpensive one which like
HC-SR06
we used. - Batteries If you want to connect wirelessly, you need a battery to supply power.
- Wifi Shield & Server It is necessary to send data to the application. The server can use what you want.
- Application To view the processed data directly.
We prepared a picture of the architecture. It will help you understand the system.
And this picture depicts our actual test environment.
On the right is the arduino case we made. We recommend you using a 3D printer when making your own.
The basic principle what PEOPLE-INSIDE used, is to distinguish between IN and OUT of the person or people.
Suppose the sensors in the following figures, A and B. If the A sensor detects a person first, it means IN. And the reverse, of course it means OUT.
The right-hand side is actually a graph of the serial data that the sensor recognizes. x axis is time and y axis is measured distance. The blue one is the serial data of the A sensor and the yellow one is the B sensor's. You can figure the measured distance of the A sensor decreased first.
So, if you interpret the graph, you can see that the person initially did IN. And then he or she did OUT.
Before you use PEOPLE-INSIDE software, you have two options. Both methods are suggested, so you just pick what you want.
- Classification Algorithm Classification algorithm that classifies Serial datas which one is IN and OUT.
- Random Forest Machine Learning with data sets what we collected.
Did you choose?
Second method is classificate using Random Forest (RF) which is one of machine learning algorithm. RF is ensemble method of decision trees. It gives pretty high performance. We provide 2800(1400 each class) dataset, and already implementated in example code our pre-train RF model by this dataset. Pre-train model was trained by Treebagger function of MATLAB software, and the number of trees are 50.
The model that we provide is perfect adapted in our environment, so it might shows bad performance in your testbed. Therefore, if you don't want use our RF model, then you can collect your own dataset and train model.
Click to link detail Specification.
- Arduino UNO X 1
- HC-SR04 Ultrasonic Sensor X 4
- PHPoC Wi-Fi Shield X 1
- Jumper Cable (as much as you need)
- Arduino Chassis (3D printed)
- Battery X 1
- Android Mobile Phone
Click to Download software.
- Arduino 1.8.2 (Arduino IDE Sketch)
- Android Studio 2.3.2 (Android programming IDE)
- MATLAB R2017a (License needed)
For signal processing - Web Server
Hosting - Hostinger
PHP
MySQL
-
Arduino
Open-source electronic prototyping platform enabling users to create interactive electronic objects. -
PHPoC
PHPoC Shield for Arduino connects Arduino to Ethernet or Wi-Fi networks. -
NewPing
NewPing is Arduino IDE library for easy control ultrasonic sensors. -
SPI
Serial Peripheral Interface (SPI) is a synchronous serial data protocol used by microcontrollers for communicating with one or more peripheral devices quickly over short distances. -
Sketchup
SketchUp is 3D modeling software that's easy to learn and incredibly fun to use.
- A Real-Time People Counting Algorithm using Ultrasonic Sensors (2016), [pdf]
- Design and Performance Comparison of Machine Learning Model for Time Series Data Classification (2017), [pdf]
We have a core project team composed of:
Amber Cho - Founder/Lead westbro00@naver.com
Amber is a Software Engineer and UI Designer. She always wants to be a competent developer than now, so she is coding today as well. And that her effort are contributing to the team.
Chris Yang - Founder/Lead ysm0622@gmail.com
Chris is a Software Engineer, UI Designer, and author of many technical books & tutorials. He oversees the project direction, maintenance and organizes the planning and development efforts of the team.
Martin Kim - Founder/Lead skins346@naver.com
Martin is a Software Engineer, UI Designer, and author of many technical books & tutorials. He oversees the project direction, maintenance and organizes the planning and development efforts of the team.
- This project is licensed under the MIT License - see the LICENSE.md file for details.