Human–wildlife conflict (HWC) remains a significant challenge in Kenya, particularly in communities bordering wildlife conservancies, where interactions between humans and wild animals result in crop destruction, livestock loss, human casualties, and retaliatory killing of wildlife. Conventional mitigation approaches such as electric fencing and physical barriers are often expensive, difficult to maintain, and ecologically disruptive. This project presents the design and implementation of an IoT- and machine learning–based virtual fencing system aimed at mitigating human–wildlife conflict through real-time detection and alerting.
The system integrates computer vision, radar sensing, and IoT technologies to detect wildlife and human intrusions without the use of physical barriers. A Raspberry Pi 5 serves as the central processing unit, running a YOLO-based object detection model(YOLOv11) trained to identify wildlife species, specifically giraffes and zebras, using camera imagery. Human intrusion is detected using an RD-03D mmWave radar sensor capable of measuring movement, distance, speed, and angle under diverse environmental conditions. A NEO-6M GPS module provides location data, while aSIM800L GSM module transmits SMS alerts containing detection and location information to relevant authorities. The study demonstrates that an IoT- and ML-driven virtual fencing system offers a cost-effective, scalable, and environmentally friendly alternative to physical fencing, with strong potential to enhance early warning capabilities and reduce human–wildlife conflict in rural and conservancy-adjacent regions.
Results
The figure 1 and figure 2 below shows the classification inference levels under different postures of detection. The model classified the giraffe in the range of 70-90% indicating a level of high accuracy offered.
The figure 3 below presents SMS output received by the GSM module. It shows that through radar detection the range of a human is detected and through the GPS module using a coordinate system the latitude and longitude range.
The system integrates computer vision, radar sensing, and IoT technologies to detect wildlife and human intrusions without the use of physical barriers. This project demonstrates that an IoT- and ML-driven virtual fencing system offers a cost-effective, scalable, and environmentally friendly alternative to physical fencing, with strong potential to enhance early warning capabilities and reduce human–wildlife conflict in rural and conservancy-adjacent regions.









Comments