Skip to content

A Real-Time People Counting Algorithm using Ultrasonic Sensors

License

Notifications You must be signed in to change notification settings

PEOPLE-INSIDE/people-inside

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 

Repository files navigation




A real-time people counting system using ultrasonic sensors
Visit PEOPLE INSIDE »


PLATFORM BUILD STATUS MIT LICENSE

Table of contents

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.

Our Purpose

We are focusing on main purposes. We have three things to aim for : purpose

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.

Quick Start

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.

Getting Started

Installation Environment

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.

architecture

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.

environment case

3D Printed Chassis

L1-1 L1-2 L2-1 L2-2

Basic Principle

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.

principle graph

How To Use

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?

Classifiaction Algorithm

graph

Random Forest

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.

Performance

Hardware

Click to link detail Specification.

Software

Click to Download software.

Open source

  • 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.

Paper

  • 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]

Developers

We have a core project team composed of:

Amber Cho - Founder/Lead   GITHUB   LINK  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   GITHUB   LINK  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   GITHUB   LINK  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.

License

  • This project is licensed under the MIT License - see the LICENSE.md file for details.

Releases

No releases published

Packages

No packages published

Languages