An Internet of Things (IoT)-Driven Hybrid Random Forest–Long Short-Term Memory (LSTM) Framework for Real-Time Pest Infestation Prediction in Smart Poultry Farms
Abstract
The research introduces a novel Internet of Things (IoT)-based hybrid intelligent approach that can detect and predict pest infestations in poultry farms (IoTHISDPIPF). In this context, the research combines IoT-based smart sensors with an ESP32 microcontroller and cloud computing to continuously collect data on temperature, humidity, methane gas levels, atmospheric pressure, motion, sound frequency, and water level. In the suggested Random Forest (RF)-Long Short-Term Memory (LSTM) model, static and temporal features are considered, where RF performs feature selection, feature importance analysis, and preliminary classification, and then LSTM is used to capture the temporal dependencies and infestation pattern. The model’s performance is assessed by using stratified k-fold cross-validation, repeating experiments, conducting tests on statistical significance, and benchmarking against the most advanced predictive models described from 2023 to 2025. These show that the improved RF-LSTM model surpasses the baseline model with respect to prediction stability and infestation identification, with competitive values of accuracy, precision, recall, F1 score, sensitivity, specificity, and receiver operating characteristic-area under the curve. Moreover, a user-friendly mobile graphical user interface allows for real-time visualization and monitoring of the process, as well as timely notifications. This approach ensures scalability and economic efficiency when integrated into smart agriculture systems. Though the findings are promising, class imbalance, variability of the environment, and generalization pose challenges for further research that require larger data sets of different origins.