Smart Crowd Analyzer
Smart Crowd Analyzer
Submitted by:
2017-EE-02 Mehrunisa Ashraf
2017-EE-07 Hamda Anees
2017-EE-24 Haris Rafique
2017-EE-36 Shahkar Ul Hassan
Supervised by:
Dr. Ubaid Ullah Faiz
Sir Ali Shafique
Abstract i
1 Introduction 1
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Brief Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Project Proposal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Problem Statement 2
3 Literature Review 3
3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.2 Global use of People Counting Systems . . . . . . . . . . . . . . . . . . . . . 3
3.3 Project Research . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.4 Classification of people Counting Systems . . . . . . . . . . . . . . . . . . . . 4
3.5 Project Proposal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.6 Project Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
5 Methodology/Architecture 8
5.1 Door Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1.1 Bi-Directional Counter . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1.2 Age Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1.3 Gender Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.1.4 Height detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.1.5 Emotion detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.1.6 Group of People Detection . . . . . . . . . . . . . . . . . . . . . . . . 9
5.1.7 Regular Customer Detection . . . . . . . . . . . . . . . . . . . . . . . 9
5.1.8 Staff Exclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.1.9 Heat map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.2 Analysis Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.2.1 Statistics Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.2.2 Sales Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
ii
Table of Content iii
7 Block Diagram 13
8 Flow Chart 14
9 Work Division 15
9.1 Research-Base Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
9.2 Hardware/Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
10 Costing 16
10.1 Project Equipment Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
References 17
Chapter 1
Introduction
1.1 Background
Over the last decade, retailers are facing significant obstacles, such a staff planning, unavailabil-
ity of stocks, accumulation of unwanted items, and the inability to accurately forecast demand,
etc. It has been known, that without adequate preparation and strategy, the attempt to capture
more of the market is useless.
1
Chapter 2
Problem Statement
Over the last decade, retailers are facing significant obstacles, such a staff planning, unavailabil-
ity of stocks, accumulation of unwanted items, and the inability to accurately forecast demands,
etc. It has been known, that without adequate preparation and strategy, the attempt to capture
more of the market is useless.
This problem is targeting many major manufacturing companies, store managers (supermarket
and shopping malls), retailer, shipping companies, transportation office, hospitals and medical
care facilities etc. When a customer shops from a store, many questions come in mind of re-
tailers such as what items were purchased? At what time? How long did they shop? and so,
that retailers struggle to understand what data to focus on. To make it more difficult, nowadays
trend changes within a couple of seconds. Customer have an abundance of choices to make and
their preferences changes according to the trend at that moment, making it harder for retailers,
to keep up with the comping changes in the trend as well as customer’s shopping behavior.
Complex retail operations and management is also not an easy task for retailers. All these
problems result in poor performance/sales, and ultimately, result in profit loss. Thus, to prevent
these issues, we propose an effective method, based on crowd features analysis and AI, for better
retail operations, customer satisfaction, and profit.
2
Chapter 3
Literature Review
3.1 Overview
The notion of a simple people counter can go a long extends in solving pesky situations we,
as humans, encounter. For instance, a supermarket company, being unaware of how many cus-
tomers visit during the peak hours of the market itself, can transpire into problems such as
attaining lack of analysis regarding which stocks are more coveted, followed by the more un-
popular choices, which ultimately leads to the wastage of stock items, sales stagnation, and may
lead to a loss in overall profit for the company running the market.
3
Chapter 3. Literature Review 4
CCTV people counters rely on installing software into existing CCTV systems. As CCTV
systems typically use one camera to count people, they suffer from reduced accuracy due to a
lack of depth perception and interference from environmental factors such as shadows. instal-
lations are typically aimed at security concerns and are often not positioned in the optimal way
for people counting duties. There is also a growing concern over privacy and GDPR compliance
due to the fact CCTV cameras capture images of people’s faces, which enables identification.
Stereo vision people counting systems use two cameras to provide depth perception and im-
proved counting accuracy compared with single-camera solutions. Stereovision is more expen-
sive than other people counting technologies and is still limited by environmental conditions
such as ambient lighting conditions. [4] It must be understood that each method has its lim-
itations, which, due to the nature of the equipment, typically concerns accuracy and privacy
protection of people moving around a space.
business and security applications. Unlike the classic sensor-based implementations, these ones
allow for more versatile functionalities, (such as emotional detection, individual tracking as
well as group detection, bi-directional counter, age, height, gender determination, along with
that, regular customer detection and staff exclusion solution has also been employed, for better
functioning of people counter system.
3.7 Conclusion
Through this project we gain deep insights into our retail operations and helps in producing
marketing initiatives and develop a comprehensive understanding of customer behavior and in-
teraction within our stores or in shopping malls and public environments.[4] Which will help in
increases sales and create mass productivity, hence, business will flourish. This project will also
aid our investors in tracking their business especially when they have a chain stores.
• Stock Management
• Sales Conversion
• Visual Surveillance
Further improvements can be made in data collection section, such as setting goals, and main-
tain customer record with the products and creating a backup on Cloud. In case of Security, we
can add Tracking detector and an Object detector, in case of theft.
In Public sector, our project can be utilized in such a way, it may help during voting period.
Managing data which will ease the workers and will save time in generating result. Similarly, it
can be used in Administration Sector such as NADRA. Or in daily used public service system
such as, in bus terminals.
Adopting deep learning algorithms, the product features an accuracy of 97% or greater, a smart
crowd analyzer that tops the industry of crowd analysis devices.
Chapter 4
• Detect the regular customers, for bridging the gap between retailers and customers. Also
generating some discounts or priority for them.
• Omit staff from detection, in order to make counting of customers more precise.
• Detect groups of people visiting a shop. Hence, will be able to comprehend the days/ the
month, when families or groups mostly visit a shop/retail.
7
Chapter 5
Methodology/Architecture
We will use openFrameworks C++ application on the Raspberry Pi handling the camera input,
image abstraction, tracking and people counting. We will:
3. Detect the Gender, Emotions, Age, height and Groups of people by algorithms.
The methodology adopted for the features are categorized as the following below:
8
Chapter 5. Methodology/Architecture 9
time and will compare it with models on which the system would be trained. LBP descriptor
variations and a dropout-SVM classifier will be used to increase the accuracy of detection. [1]
will be detected and will be matched with previously-stored datasets. If the following match is
true, his entry/exit will be excluded from the total visitor traffic count, delivering real visitor
count. With this technique, we will be receiving only pure conversion results
• Stock Management
• Staff Management
• Discount/Deals Management
• Combination of embedded features such as group counting, age, height, gender determi-
nation, regular customer detection, staff exclusion.
• In Group Detection, our study has the capability to count groups of people rather than
picking them off as individuals. It will comprehend the number of families/groups that
11
Chapter 6. Project Milestones and Deliverables 12
visit a specific location and a specific time and using Machine Learning algorithms may
introduce family/friends discounts on specific days/timings.
• The People Counting algorithm will distinguish the person from entering and leaving a
particular place, so that they are not counted twice in the total.
• Physical traits of crowd such as age, height, and gender, will result in generating data,
such as comprehending what sort of age group is interested in certain products, coupled
with the dominant gender of the people.
• Furthermore, it will generate an accurate retail statistics report, monitoring the transac-
tions, number of visitors, and management of staff schedule, and stock, also providing
public space design suggestions and visual surveillance service, on daily/weekly/month-
ly/yearly basis.
This study hopes to benefit its retailers, with deep insights into retail operations and motivate
effective marketing initiatives that would increment their sales. This study is also helpful for re-
searchers and socialists, helping them develop a comprehensive understanding of customer be-
havior and interaction within stores or in shopping malls and public environments. This project
also targets enthusiastic investors, interested in tracking their business especially when they have
chain stores.
Chapter 7
Block Diagram
Database
Age and
Gender
Estimation
Image Face Normalized Feature
Aquisition Detection Images Extraction
Face
Image Face Face
Feature
Aquisition Detection Recognition
Extraction Regular
Customer
Detection
Training
Set
13
Chapter 8
Flow Chart
Completion
14
Chapter 9
Work Division
A work-division strategy was introduced for implementing on the project. The purpose of this
strategy is to distribute tasks fairly among each member according to their capability. After
proper planning and consultation, we categorized our project work into two main fractions:-
1. Research-based
2. Hardware/Implementation
9.2 Hardware/Implementation
After careful planning and research work, each member started implementation of their follow-
ing tasks. Meetings and detailed online discussion hours were also arranged to achieve the goals.
15
Chapter 10
Costing
The table below shows the price of the hardware equipment and materials purchased for the
completion of the project. This list is made after carefully analyzing the project requirements
and the market values of the materials.
16
References
[3] Nithya Roopa. S. ”emotion recognition from facial expression using deep learn-
ing”,international journal of engineering and advanced technology (ijeat), pg.2249 – 8958,
vol. 8, issue 6. August 2019.
[4] Dr Anuradha S G Shivashree G. ”crowd analysis using computer vision techniques”, in-
ternational journal of engineering research in computer science and engineering (ijercse)
,vol 5, issue 4, april 2018. [Online]. Available:https://ieeexplore.ieee.org/
document/5562657/, Accessed June 20, 2020.
[5] G. Levi T. Hassner. “age and gender classification using convolutional neural net-
works”, ieee workshop on analysis and modeling of faces and gestures (amfg),
ieee conference on computer vision and pattern recognition (cvpr),boston, 2015.
[Online]. Available:https://talhassner.github.io/home/projects/cnn_
agegender/CVPR2015_CNN_AgeGenderEstimation.pdf, Accessed June 20,
2020.
[6] R. Zhang Y. Zhao, J. Qi. ”cbhe: Corner-based building height estimation for com-
plex street scene images”, www ’19:the world wide web conference, pg. 2436-2447,
may 13–17, 2019. [Online]. Available:https://dl.acm.org/doi/10.1145/
3308558.3313394, Accessed June 20, 2020.
17