Efforts to combat the recent spread of infectious diseases require innovative solutions for characterizing their transmission. This study introduces a system for helping people maintain safe distances from one another, thereby decreasing the transmission of infectious diseases in crowded public spaces. Real-time video footage from surveillance cameras was processed by the cutting-edge “You Only Look Once” ver. 8 (YOLOv8) computer vision model, which can detect and segment individuals in images. YOLOv8 was combined with an embedded system that includes an Atmel 8-bit AVR microcontroller and an Arduino Uno board, a buzzer, and an LCD. This proposed system can generate alerts when people breach the set social distancing limit of 0.5 m. Its new network design increases human detection to an accuracy range of 97%–98%. This proposed system was trained on 70% of the dataset, and validation and testing were performed on 15% and 15% of the dataset, respectively. Combining deep learning with embedded systems creates an intelligent vision-based monitoring system for crowded spaces, addressing key issues pertaining to disease transmission reduction and public health protection. The proposed system can be implemented at a low cost, such as by simply using a resource-constrained embedded device or a microcontroller. This approach overcomes the functional challenge of utilizing artificial intelligence-based surveillance in a scalable, decentralized, and economical manner. In general, the proposed system has a high frame per second rate, which is satisfactory for real-time operation on edge hardware. The novelty of this method relies on the use of the YOLOv8 model to achieve precise performance while balancing accuracy and speed on edge/embedded devices for practical, real-world epidemic control.