Real time trespassing detection using YOLOv5 and ONXX deployed through a streamlit web application

View at publisher
Authors: Vinay Kumar, Saurabh Sharma, Praveen Kumar Mannepalli
Cited by: 0

Abstract

Conventional monitoring techniques, which mostly rely on human observation, are frequently ineffective, prone to mistakes, and unable to respond in real time especially when detecting unauthorized human trespassing in restricted areas. This study uses the YOLOv5 object detection model to propose a real-time human trespassing detection system in order to overcome these issues. To train the model for identifying human presence in limited locations, a custom labeled dataset was produced using XML annotations and analyzed using pandas. After training and evaluation, the YOLOv5 model was exported in ONNX format for deployment. The system achieved strong detection performance, with a precision of 94.2%, recall of 92.7% and mean average precision of 94.8%, running in real time at 20-25 FPS on a GPU-enabled local machine. The trained model was incorporated into an intuitive web application utilizing Streamlit to show its practical usefulness. This allowed for live object recognition and webcam-based surveillance in real-time.

Fields of Study & Subjects

Advanced Neural Network Applications Video Surveillance and Tracking Methods Smart Agriculture and AI

Publication details

Journal / source
CRC Press eBooks
Pages
110–116
Publication date
30 January 2026
Language
EN
Document type
Book chapter