Accurate fig detection in complex environments is a significant challenge. Small targets, occlusion, and similar backgrounds are considered the main obstacles in intelligent harvesting. To address this, this study proposes Fig-YOLO, an improved YOLOv11n-based detection algorithm with multiple targeted architectural innovations. First, a Spatial–Frequency Selective Convolution (SFSConv) module is introduced into the backbone to replace conventional convolution, enabling joint modeling of spatial structures and frequency-domain texture features for more effective discrimination of figs from visually similar backgrounds. Second, an enhanced bi-branch attention mechanism (EBAM) is incorporated at the network’s terminal stage to strengthen the representation of key regions and improve robustness under severe occlusion. Third, a multi-branch dynamic sampling convolution (MFCV) module replaces the original C3k2 structure in the feature fusion stage, capturing figs of varying sizes through dynamic sampling and residual deep-feature fusion. Experimental results show that Fig-YOLO achieves precision, recall, and mAP@0.5 of 89.2%, 78.4%, and 87.3%, respectively, substantially outperforming the baseline YOLOv11n. Further evaluation confirms that the model maintains stable performance across varying fruit sizes, occlusion levels, lighting conditions, and data sources. Fig-YOLO’s innovations offer solid support for intelligent orchard monitoring and harvesting.
Geographical origin identification of fragrant pears is crucial for ensuring fruit quality, protecting regional brand value, and maintaining market order. However, pears from different origins often exhibit highly similar appearance and physicochemical properties, making rapid and nondestructive identification challenging for traditional methods. This study proposes a hyperspectral origin identification method based on an enhanced one-dimensional convolutional neural network (ECNN-1D) incorporating an Efficient Channel Attention (ECA) mechanism, using visible–near-infrared (Vis–NIR) and short-wave infrared (SWIR) spectral data. To address the technical challenges of highly similar spectra, redundant features, and complex information distribution, ECNN-1D enhances discriminative spectral feature representation, overcoming limitations of conventional machine learning and standard deep learning models in feature extraction and classification stability. Systematic comparisons with machine learning models (LDA, RF, KNN, SVM) and deep learning models (VGG-1D, ResNet-1D, CNN-1D) showed that while all models performed well on Vis–NIR spectra, ECNN-1D achieved the highest test accuracy of 98.94% and F1 score of 98.95% on the more challenging SWIR spectra, outperforming other approaches. These results indicate that ECNN-1D enables high-precision, nondestructive origin identification of fragrant pears, with potential cost advantages, providing a reliable technical solution for fruit traceability and quality supervision.