Real time detection of trash and faces for smart city environmental monitoring
摘要
Maintaining environmental cleanliness in public spaces remains a persistent challenge for modern smart cities. This paper presents a real-time dual-model computer vision system designed for simultaneous detection of trash and human facial regions to support privacy-aware environmental monitoring. The system integrates YOLOv8x for robust detection of litter-related objects and YOLOv8n-face for localizing facial regions as indicators of human presence, achieving 25–35 frames per second with sub-50 ms latency on GPU-enabled (CUDA-capable) edge hardware. On standard CPU configurations, the system achieves 8–18 FPS with latency in the range of 55–125 ms depending on core count, making it suitable for near-real-time and batch-processing deployments. In contrast to surveillance-oriented approaches, the system does not identify individuals or retain identifiable facial imagery; instead, detected facial regions are immediately anonymized, and all facial examples used in this manuscript are AI-generated for illustration. The framework processes both images and video streams, automatically detecting waste objects from 16 predefined categories while securely generating anonymized facial crops for audit and compliance workflows. Experimental evaluation using diverse urban footage demonstrates reliable performance under varying illumination conditions, occlusions, and crowd densities. A per-category analysis confirms high detection confidence for common litter items such as bottles and cups (avg. confidence > 0.79), while smaller or less frequent categories such as remotes and books yield lower confidence scores (avg. confidence 0.41–0.47), underscoring the importance of confidence-threshold tuning for operational deployment. This work contributes to sustainable smart city infrastructure by providing an automated, edge-deployable tool for environmental monitoring that preserves citizen privacy while supporting responsible AI practices.