Solution for Analyzing and Estimating the Queue Size
When customers wait in line, it’s bad for morale. It reduces customer loyalty and profits while impeding productivity.
It also impacts working processes.
In one local office of a global company, a growing workforce resulted in long lines in the company cafeteria at peak times. As a result, employees wasted time and experienced declining productivity.
To overcome this challenge, DataArt’s team developed a continuous tracking system which included the following image processing steps:
DataArt team chose OpenCV library to work with video which was streamlined from a camera with around a 1600x1200 pixel resolution.
Each frame got into the data processing pipeline. In many videos, the objects change much slower than the frames change (e.g. a person can stay in the same place in line for couple of minutes, but the video runs on ~30 frames per second), so at the first step the processing pipeline detected the objects/scene difference between sequential frames. It reduced the number of images (frames) for further processing and was connected with a limited amount of hardware resources.
The system developed is highly flexible and was designed to process both the entire video streaming and a certain number of images chosen according to specified criteria.
The next step in processing was the engagement of a neural network trained to find and detect people in the image. The result of this step in our case was the number of people found in a certain area of the image. For more complex cases, information on location can also be used.
The number of people found was processed during the next step, in which historical data was used for corrections (the previous several weeks - the same time, the previous few minutes). This allowed deviation recognition and more accurate data on the actual number of people in line displayed in real time.
The solution analyses the size of a line, displays the status in the internal corporate system and allows the employees to plan their lunch time correspondingly. As a result, the line became shorter and the employees were able to efficiently use their lunch time with no influence on their productivity.
- TensorFlow + Keras (CNN)
- Pandas (TS analysis)
- Deployment: Ubuntu / Docker