Queue video analysis using object detection
Overview
The project was made during a Data Product Hack, which was held offline at ITMO University between 3th and 10th September 2022 as part of an AI-powered video analytics track.
The main purpose of the idea is to analyze the number of people standing in a queue, collect data, and notify the personnel when there is a need to call one more cashier.
Solution
The overall scheme contains two servers:
- Client's side - a camera with an object detection and a small computer for sending POST data (not in this repository);
- Server side - a Django based webserver, which receives an API requests via Django REST framework.
The client’s side should make a POST requests to
- count - the number of people currently in a queue;
- warning_flag - True if the number of people exceeds 5;
- user - the ID number of a registered user;
- camera - the ID number of a camera, which belongs to a registered user;
- date - time when the data was sent.
When the call is successfully received and processed by Django REST framework, the data is being written into SQL database.
Result
To manage the list of locations and preview the data received current web server was developed.
Each camera has its own page with all the statistics during the day or week. It gives an opportunity to analyze the number of people visited, how many people left the store due to a big queue, etc.
When the camera sends a warning_flag, a message in Telegram Bot appears.