In response to the low accuracy and slow detection speed of chili recognition in natural environments, this study proposes a chili pepper object detection method based on the improved YOLOv8n. Evaluations were conducted among YOLOv5n, YOLOv6n, YOLOv7-tiny, YOLOv8n, YOLOv9, and YOLOv10 to select the optimal model. YOLOv8n was chosen as the baseline and improved as follows: (1) Replacing the YOLOv8 backbone with the improved HGNetV2 model to reduce floating-point operations and computational load during convolution. (2) Integrating the SEAM (spatially enhanced attention module) into the YOLOv8 detection head to enhance feature extraction capability under chili fruit occlusion. (3) Optimizing feature fusion using the dilated reparam block module in certain C2f (CSP bottleneck with two convolutions). (4) Substituting the traditional upsample operator with the CARAFE(content-aware reassembly of features) upsampling operator to further enhance network feature fusion capability and improve detection performance. On a custom-built chili dataset, the F0.5-score, mAP0.5, and mAP0.5:0.95 metrics improved by 1.98, 2, and 5.2 percentage points, respectively, over the original model, achieving 96.47%, 96.3%, and 79.4%. The improved model reduced parameter count and GFLOPs by 29.5% and 28.4% respectively, with a final model size of 4.6 MB. Thus, this method effectively enhances chili target detection, providing a technical foundation for intelligent chili harvesting processes.
In this study, the implementation of traditional machine learning models in the intelligent management of swine is explored, focusing on the impact of LDA preprocessing on pig facial recognition using an SVM. Through experimental analysis, the kernel functions for two testing protocols, one utilizing an SVM exclusively and the other employing a combination of LDA and an SVM, were identified as polynomial and RBF, both with coefficients of 0.03. Individual identification tests conducted on 10 pigs demonstrated that the enhanced protocol improved identification accuracy from 83.66% to 86.30%. Additionally, the training and testing durations were reduced to 0.7% and 0.3% of the original times, respectively. These findings suggest that LDA preprocessing significantly enhances the efficiency of individual pig identification using an SVM, providing empirical evidence for the deployment of SVM classifiers in mobile and embedded systems.