Project Demo

Story
As elevators become more and more indispensable in people’s lives, safety has become more of a concern. Overloading is an important contributing factor to elevator accidents. Most existing elevators use weight sensors to determine the total load in an elevator, and those systems can sometimes fail. Additionally, their maintenance is expensive. To avoid such accidents, we are going to design a proof-of-concept device which can count passengers in real-time at high speed, and can give an alert if the number of people in an elevator is above a threshold. This device can be attached anywhere in the elevator. And compared with existing technology, its implementation cost is low, and maintenance is easy.How does it work?
In this prototype, we only consider two floors, the ground floor and the 2nd floor. After all the passengers enter the elevator, someone needs to press the close button. Then we count the number of passengers, and if it is above the threshold the device will sound an alarm. Thus, some people can leave the elevator, before it will begin ascending. If the number of people detected is not above the threshold, the elevator will move on. The threshold passenger limit can be set by the user in the code, and should be set based on the size and capacity of the elevator. In addition to the overload alert, we also provide elevator statistics. This means that the device can upload the count in elevators with the specific time stamp to a database or spreadsheet for tracking. The count will be always updated after pressing the close button in the elevator. One of the interesting aspects of this data is that it can be easily visualised by any graphs or charts. So, it can be useful for any person who analyses elevator usage and pedestrian movement. Here is an example of the passenger count data coming from the device, when it is viewed in Excel.
Clustered Column

Line chart

Pie chart

Nicla Vision
In this project, we are using the Nicla Vision, a tiny AI board from Arduino. It features a 2MP color camera, and has the intelligence to process and extract useful information from anything it sees.
Data collection and Labeling
For the data collection, we mounted the board on a tripod and connected it to a laptop using a lengthy USB cable. The below image shows the data acquisition setup.
Impulse Design
This is the machine learning pipeline for this project:

Model Training
Here is our Neural Network training settings and architecture for generating the model:

Model Testing
It’s time to test the model. First, we used the test data which we separated earlier and got around 84% accuracy. That is not great, but seems to be fine in this use case.
Test 1

Test 2

Test 3

Deployment
Now we have our ML model, and it has been tested, so we need to deploy it to our Nicla Vision. We just created an Arduino library by pressing the Build button, and a Zip file will be downloaded.
Additional Hardware and Casing
In addition to the Nicla Vision, we used a buzzer and a LED to create an alarm.



TeraTerm




