Authors N.Swetha KumariStudent, Gates Institute of Technology, Andhra Pradesh, IndiaG.BhargaviAssistant Professor, Gates Institute of Technology, Andhra Pradesh, IndiaB.VeereshStudent, Gates Institute of Technology, Andhra Pradesh, IndiaK.AnithaStudent, Gates Institute of Technology, Andhra Pradesh, IndiaM.VarshiniStudent, Gates Institute of Technology, Andhra Pradesh, IndiaK.VigneshStudent, Gates Institute of Technology, Andhra Pradesh, India Abstract Ensuring public safety at large gatherings requires real-time crowd density estimation and risk monitoring. This project leverages artificial intelligence (AI) and sensor-based technologies to estimate crowd density and assess security risks during public events. Using datasets, cameras, infrared (IR) sensors, ultrasonic sensors, and Raspberry Pi 5, the system provides accurate and real-time monitoring. The system processes live video footage from cameras and combines it with sensor data to estimate crowd density dynamically. AI algorithms analyze the data, detecting anomalies such as overcrowding or unusual movement patterns that may indicate security threats. Infrared and ultrasonic sensors enhance accuracy by measuring crowd proximity and density variations in low-visibility conditions. A desktop-based interface visualizes real-time data, alerting event organizers and security personnel to potential risks. A servo motor controls mechanical responses, such as automated barriers or alarms, triggered by predefined security thresholds. The SD card stores recorded data for post-event analysis and improving future security protocols. The buzzer provides instant audible alerts when security thresholds are exceeded, ensuring rapid response to critical situations. Raspberry Pi 5, acting as the central processing unit, integrates all components and runs AI-based algorithms efficiently. This system enhances public safety by providing intelligent, automated crowd monitoring and risk assessment, ensuring well-coordinated security measures for large-scale events. Keywords Datasets IR sensor Ultrasonic sensor SD card Buzzer desktop servomotor rasberry pi5 Citation of this Article N.Swetha Kumari, G.Bhargavi, B.Veeresh, K.Anitha, M.Varshini, & K.Vignesh. (2025). AI-Based Crowd Density Estimation and Prediction Using Raspberry pi-5. International Current Journal of Engineering and Science - ICJES, 4(3), 17-29. Article DOI: https://doi.org/10.47001/ICJES/2025.403003 Licence Copyright (c) 2026 International Current Journal of Engineering and Science. This work is licensed under a Creative Commons Attribution Non Commercial 4.0 International Licence. References I Global. (Jan. 26, 2022). Role of CCTV Cameras: Public, Privacy, and Protection. [Online].Available: https://www.ifsecglobal.com/video(Dec. 21, 2022). Perimeter Security. Video Analytics. Sensors. Property Protection. (N.D.) [Online]. Available: https://www.senstar.com/(Dec. 21, 2022). Crowd Detection—Occupancy Detection. [Online]. Available: https://senstar.com/products/video-analytics/crowd-detection/S. Overgaard. (Dec. 21, 2019). A Soccer Team in Denmark is Using Facial Recognition To Stop Unruly Fans. [Online]. Available: https://www.npr.org/2019/10/21/770280447/(Dec. 21, 2022). Just Walk Out. (N.D.) [Online]. Available: https://justwalkout.com/A.Hussain, T. Hussain, W. Ullah, and S. W. Baik, ‘‘Vision transformer and deep sequence learning for human activity recognition in surveillance videos,’’ Comput. Intell. Neurosci., vol. 2022, pp. 1–10, Apr. 2022.C.-Y. Wang, A. Bochkovskiy, and H.-Y.-M. Liao, ‘‘YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors,’’ in Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR), Jun. 2023, pp. 7464–7475.Y. Li, ‘‘Research and application of deep learning in image recognition,’’ in Proc. IEEE 2nd Int. Conf. Power, Electron. Comput. Appl. (ICPECA), Jan. 2022, pp. 994–999.E. B. Varghese, S. M. Thampi, and S. Berretti, ‘‘A psychologically inspired fuzzy cognitive deep learning framework to predict crowd behavior,’’ IEEE Trans. Affect. Comput., vol. 13, no. 2, pp. 1005–1022, Apr. 2022.G. Sreenu and M. A. S. Durai, ‘‘Intelligent video surveillance: A review through deep learning techniques for crowd analysis,’’ J. Big Data, vol. 6, no. 1, pp. 1–27, Dec. 2019.