#Authors
@HuseyınKanat
#Dependencies
PyQt5: Used for creating the graphical user interface.
OpenCV (cv2): Utilized for image and video processing tasks.
NumPy: Employed for numerical operations and array manipulation.
Ultralytics YOLO: Utilized for object detection tasks.
#Overview
Smart Crowd Detection is a project developed as part of a CENG483(Behavioral Robotics) course term project. The aim of this project is a simultaneous and total bird’s eye heat map visualization that provides an intuitive visualization of high-traffic areas and tracks the movements of individuals with the help of YOLOv8 in the space using the homography transformation method over a single camera orientation by assigning different color intensities to different areas depending on the density of pedestrian traffic, the heat map can provide valuable information on space usage and passenger behavior by highlighting areas with high activity or traffic congestion.
Perpective transformation on a frame
We utilized PyQt5 to create a simple user interface for the program.
When you run the program, in order to perform the perpective transformation process more effectively, you need to select the corners of the ground as upper left, upper right, lower right and lower left, respectively.
After clicking the “Start Analyze” button, the top-left window of the three windows that will open only displays the selected background (the heatmap background to be created), the top-right window displays the normal state of the selected video, and the bottom-left window displays the instantaneous heatmap generated while the video is streaming. Upon completion of the video or clicking the “Finish Process” button, it displays the total heatmap generated.
If you believe that the video stream is progressing slowly, you can adjust the DETECTION_FREQUENCY variable to determine how often the process should be repeated, in terms of frames. Additionally, you can use the program simultaneously via your mobile phone’s camera.