Rat infestations in rice crops in Indonesia cause losses of approximately 5% of total national production, equivalent to 4 million tons per year, with an estimated value of IDR 18 trillion. Conventional methods such as chemical poisons and electric traps have limitations and pose risks to the environment and human safety. This study develops a Smart Electric Fence powered by renewable energy and integrated with Artificial Intelligence for safe and sustainable rat pest mitigation. The human and rat detection system applies a Convolutional Neural Network (CNN) approach using the YOLOv8 algorithm, implemented on a Raspberry Pi to automatically control the electric fence relay. The system is powered by solar panels. A dataset of 7,712 images was divided into training, validation, and testing sets. Evaluation results show 64.4% precision, 100% recall, and 64.4% accuracy, enabling real-time object detection.
Copyrights © 2025