Multi-Camera Person Detection & Heatmap
Multi-Camera Person Detection & Heatmap
Abstract—This paper outlines a technical method for video there aren’t many well-annotated picture datasets created
analysis that may be used to identify persons in footage specifically for the construction industry in widely used open
from several CCTV cameras and provide a heatmap of that databases.
information for a certain floor layout. The analysis of customer
and employee behavior in retail and office settings, as well as A Heatmap is a graphical representation of data where
motion tracking and advertising effectiveness research, can all values are depicted by color. The more congested data is
be aided by the automatic creation of people density maps. at a particular location, the hotter will be the color used to
With the use of video recordings made by common video represent this data. From the heatmap, we can easily find
surveillance cameras, density maps were created. We made
the areas that are more attractive to customers or visitors.
advantage of CCTV cameras, which are dispersed across a retail
establishment. Because the Yolov5 object detection algorithm we can get info about which places of a retail store are
may produce findings more quickly, we have chosen to employ crowded and which are less crowded. Also, we can analyze
it for human detection. Additionally, due to the short inference this over time. Like, At which time of the day or which
time, it is appropriate for real-time applications. day of the week do people come the most. This info will
Index Terms—Object Detection, YOLO, Heatmap, KDE,
help businesses with further analysis [4]. In this work, we
Homography Transform.
represent a scalable solution for real-time human detection
I. I NTRODUCTION and heatmap generation on a floor layout in order to generate
useful business insights such as customer behavior, shopping
Real-time human detection is one of the most fundamental pattern, etc.
tasks in computer vision and it has become one of the most
popular research topics in different fields over the last few II. R ELATED W ORKS
years since it has numerous commercial applications [1].
Over the past few decades, human identification, tracking, In the past, person detection in surveillance videos was
and segmentation have been the subject of substantial re- done manually. The task of identifying people in images has
search. Although several algorithms have been put out, there gained significant attention due to the increasing importance
are still issues in the discipline. There are additional obstacles of biometrics and surveillance. Deepak et al. [5] developed
in detecting and tracking for the object class of humans. an algorithm based on the background subtraction method
First, because the human body can move freely at numerous for real-time object detection using Faster-R-CNN. Kajabad
joints, the way people look can change depending on the et al. [6] describe a people detection approach using a
angle from which they are viewed as well as how their body deep learning method. They also proposed an algorithm to
parts are positioned. People also wear a range of clothing find the hot zones of people’s movement in the image.
and accessories, which when combined can create hundreds Parzych et al. [7] explained how to create a density map
of different combinations of hues, textures, materials, and of people’s movement from video footage analysis in a
fashions. salesroom. However, their detection method is based on
Detection of humans from surveillance cameras can be people’s movement activity which can be implemented only if
done by various techniques [2] including Motion Based there are continuous movements. Punn et al. [8] used Yolov3
detection and Deep Learning based detection. Deep learning with deepsort tracking technique to detect people in order to
person detection algorithms have advanced quickly in re- monitor social distancing. Khan et al. [9] used Yolo, Faster-R-
cent years, considerably enhancing both detection speed and CNN, and SSD for identifying hotspots of people to mitigate
accuracy. Deep learning-based computer vision technology the transmission of the coronavirus.
outperforms conventional image processing and recognition However, none of these works, address the question of
techniques in terms of detection speed, algorithm robustness, how to locate the congested region on a 2-Dimensional
and feature extraction without manual design [3]. Due to the floor layout. Existing literature only describes how to create
fact that deep learning techniques are data-hungry, a specific a heatmap of persons across single-camera photos, making it
image dataset for the construction industry is needed in order impossible to combine data obtained from multiple cameras.
to apply object detection on building sites. Because of the To the best of our knowledge, this is the first paper that
complexity and dynamic nature of construction activities, describes a full pipeline of detecting people from camera
it is difficult to gather and annotate images, which is why images and mapping the information on a floorplan taken
Authorized licensed use limited to: University of Bolton. Downloaded on February 13,2024 at 20:39:56 UTC from IEEE Xplore. Restrictions apply.
261
Fig. 1: FloorPlan and Camera positions of a Retail Outlet Fig. 3: YOLOv5 Model Architecture
Authorized licensed use limited to: University of Bolton. Downloaded on February 13,2024 at 20:39:56 UTC from IEEE Xplore. Restrictions apply.
262
0.09 0.18
0.8
0.08 0.16
Loss
Loss
0.07
0.14
0.06
0.12
0.05 0.6
0.10
0.04
0.03 0.08
0 25 50 75 100 125 150 175 200 0 25 50 75 100 125 150 175 200
Epochs Epochs
0.4
(a) Bounding box loss (b) Objectness loss
train 0.2
validation
0.025 0.8
0.020 0.6
0.0
mAP
Loss
0.015
0.4
0.010
2 0 2 4 6 8 10 12 14
0.2
0.005
(a) Kernel Density Estimator
0 25 50 75 100 125 150 175 200 0 25 50 75 100 125 150 175 200
Epochs Epochs
200 200
Image 1 Image 2
150
150
100
H H 2.5
5.0
7.5
10.0
7.5
10.0
(x1´, y1´) (x2´, y2´)
(b) Colourmap
Fig. 6: Heatmap Generation
Fig. 5: Coordinate Transformation
Authorized licensed use limited to: University of Bolton. Downloaded on February 13,2024 at 20:39:56 UTC from IEEE Xplore. Restrictions apply.
263
V. C ONCLUSIONS
In this paper, we present a method to detect people and
find the hot zones in the floorplan in real time from a CCTV
Authorized licensed use limited to: University of Bolton. Downloaded on February 13,2024 at 20:39:56 UTC from IEEE Xplore. Restrictions apply.