Karst landform crop unmanned aerial vehicle image recognition system based on multi-scale features
By constructing a hierarchical feature database and a multi-scale feature fusion module, combined with an improved target detection neural network, the problem of low crop identification efficiency in complex karst landform areas was solved, achieving high-precision and fast crop identification, especially for small targets and rare crops.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUIZHOU QIANJULONG TECH CO LTD
- Filing Date
- 2026-02-27
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies are inefficient in identifying crops in areas with fragmented farmland and complex backgrounds, such as karst landforms. They are difficult to achieve progressive local focusing from coarse to fine, and existing detection models are difficult to balance accuracy and speed, especially in terms of the ability to identify small targets and rare crops.
A hierarchical crop feature database is constructed, and a multi-scale feature fusion module and an improved target detection neural network model are adopted. An association network is built through localization lines and logical nodes to achieve dynamic matching analysis layer by layer and locally. Combined with channel attention mechanism and meta-learning dynamic sampling strategy, the accuracy of feature extraction and recognition is improved.
It significantly improves the accuracy of identifying small-scale, fragmented, and rare crops, and enables rapid and precise crop identification in complex backgrounds, making it suitable for large-scale, real-time UAV agricultural monitoring tasks.
Smart Images

Figure CN122157046A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of crop identification technology, specifically to a UAV image recognition system for crops in karst landforms based on multi-scale features. Background Technology
[0002] With global population growth and increasing demands for food security, leveraging drones and artificial intelligence for precision agricultural monitoring is crucial. However, in areas with fragmented farmland and complex backgrounds, such as karst topography, existing technologies face a dual bottleneck: First, traditional feature databases employ a flat structure with mixed feature storage, making it impossible to achieve progressive local focusing from coarse to fine during recognition. This results in a large amount of ineffective computation, low recognition efficiency, and susceptibility to background interference, limiting the accuracy of identifying small targets and fragmented plots. Second, existing detection models struggle to balance accuracy and speed—single-stage detectors like YOLO are fast but weak in detecting small targets, while two-stage detectors like Faster R-CNN offer high accuracy but poor real-time performance, and lightweight models often sacrifice generalization ability. Furthermore, all models are limited by sample scarcity and class imbalance, resulting in insufficient ability to identify rare crops.
[0003] To address these issues, we propose a UAV image recognition system for karst landform crops based on multi-scale features. Summary of the Invention
[0004] The purpose of this invention is to provide a UAV image recognition system for karst landform crops based on multi-scale features, so as to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a multi-scale feature-based UAV image recognition system for karst landform crops, comprising: The feature database construction module is used to construct a hierarchical crop feature database, wherein the crop feature database includes multiple storage areas for storing feature data of different crop types, each storage area contains multiple feature layers, and multiple feature layers located in the same storage area are associated with each other. The image acquisition and preprocessing module is used to acquire remote sensing images of the area to be identified by the UAV, and to perform geometric correction, spectral correction and standardized slice preprocessing on the remote sensing images to obtain the images to be analyzed. The feature extraction and matching module is used to communicate with the feature database construction module, and is used to extract the current feature data of the current crop from the image to be analyzed based on the improved target detection neural network model, and to perform layer-by-layer and local dynamic matching analysis between the current feature data and the feature data of the corresponding storage area in the crop feature database based on the correlation relationship. The recognition result output module is used to output the type, location, and boundary information of crops in the area to be identified based on the analysis results of the feature extraction and matching module.
[0006] Preferably, the step of constructing a hierarchical crop feature database includes: constructing a corresponding storage area for each target crop type; setting multiple feature layers along the vertical direction in each storage area, the multiple feature layers being arranged from top to bottom, and the feature data stored in the upper feature layer and the feature data stored in the lower feature layer maintaining positional mapping consistency based on a unified coordinate system; wherein, each feature layer is used to store feature data of one type of the corresponding crop type, and the type of feature data includes at least contour features and texture features; establishing an association relationship between multiple feature layers located in the same storage area, the association relationship including a positioning line running through adjacent feature layers, the positioning line being used to associate feature points representing the same physical structure or region in different feature layers.
[0007] Preferably, the feature extraction and matching module includes: The feature extraction unit is used to extract the current feature data of the current crop from the image to be analyzed based on the improved target detection neural network model; the improved target detection neural network model is the MFAYOLO model, which integrates a multi-scale feature fusion module in its backbone feature extraction network; The dynamic matching analysis unit is used to perform layer-by-layer and local matching between the current feature data and the feature data of the target storage area; The result determination unit is used to determine the type of the current crop based on the matching degree of the features of each layer in the iterative analysis process.
[0008] Preferably, the multi-scale feature fusion module includes: multiple parallel feature extraction branches, each branch using convolutional kernels of different sizes to capture spatial features in different directions and receptive fields; and a channel attention mechanism submodule, used to weight the features extracted by the multiple branches, adaptively strengthening key channel features and suppressing non-key information.
[0009] Preferably, the dynamic matching analysis unit includes: The comparison subunit is used to determine the initial matching point on the first feature layer of the target storage area based on the current feature data, and to deploy multiple logical nodes on the initial matching point; based on the comparison results, it identifies abnormal points and connects the abnormal points to form an initial feature network; The migration subunit is used to migrate the logical nodes in the initial feature network to the corresponding points in the next feature layer corresponding to the abnormal points, based on the positioning line, so as to form the influence area on the corresponding feature layer. The analysis subunit is used to compare the current feature data with the feature data stored in the corresponding feature layer again within the influence area, identify new abnormal points, and drive the logic node to continue to migrate and focus downstream along the positioning line to the feature layer. This process is iteratively executed until the preset identification stop condition is met.
[0010] Preferably, the feature extraction and matching module further includes a computing power binding unit, which is used to divide computing resources into multiple discrete computing power units and dynamically bind each logical node to one computing power unit; wherein, the spatial distribution of the logical nodes dynamically represents the real-time allocation of computing power in the feature layer network; the logical nodes are only deployed on the points and migration paths actually occupied by the feature data.
[0011] Preferably, the improved target detection neural network model is trained using a dynamic sampling strategy based on meta-learning; the dynamic sampling strategy includes: during the training process, dynamically adjusting the sampling weight of each category according to the loss in training, and increasing the sampling probability of categories with larger losses.
[0012] Preferably, the dynamic sampling strategy based on meta-learning specifically includes: during model training, monitoring the training loss of each crop category in real time; dynamically calculating and updating the sampling weights of each category based on the loss, wherein categories with larger losses are assigned higher sampling weights to increase their probability of being sampled in subsequent training batches, and categories with smaller losses are assigned lower sampling weights; and weighting the training data according to the updated sampling weights to construct each training batch.
[0013] Compared with the prior art, the beneficial effects of the present invention are: By constructing a hierarchical feature database with consistent location mapping and utilizing a network of connections built from positioning lines and logical nodes, this invention achieves layer-by-layer, progressive analysis of features from contours to textures. After identifying anomalies through high-level feature comparison, the system automatically shifts the focus of analysis along the positioning lines to the next layer of finer feature regions for targeted verification. This coarse-to-fine, progressively focusing mechanism effectively removes interference from complex backgrounds, focusing on the essential characteristics of crop targets. This significantly improves the accuracy of identifying small-scale, fragmented, and rare crops in complex karst landscapes characterized by fragmentation, anomalies, and danger. The Multi-Scale Feature Fusion (MFA) module integrated into Backbone enhances the model's ability to capture and discriminate features at different scales and directions through multi-branch convolutional kernels of different sizes and channel attention mechanisms. This enables the model to extract discriminative crop features more robustly from complex image backgrounds, providing a high-quality data foundation for subsequent fine matching. After providing initial candidates in the front-end feature extraction (MFAYOLO model), it quickly eliminates crop species storage areas that do not match the current image. Within the selected storage areas, it performs in-depth analysis only on the local features covered by the activated association network. This achieves a unity of rapid target screening and fine analysis, and while ensuring accuracy, it achieves better overall inference efficiency than traditional single-stage or dual-stage detectors, making it more suitable for large-scale, real-time UAV agricultural monitoring tasks. Attached Figure Description
[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a system structure block diagram of the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] For examples, please refer to Figure 1 The karst landform crop UAV image recognition system based on multi-scale features described in this embodiment includes: The feature database construction module is used to construct a hierarchical crop feature database, wherein the crop feature database includes multiple storage areas for storing feature data of different crop types, each storage area contains multiple feature layers, and multiple feature layers located in the same storage area are associated with each other. The steps for constructing a hierarchical crop feature database include: constructing a corresponding storage area for each target crop type; setting multiple feature layers along the vertical direction in each storage area, with the multiple feature layers arranged from top to bottom, and the feature data stored in the upper feature layer and the feature data stored in the lower feature layer maintaining positional mapping consistency based on a unified coordinate system; wherein, each feature layer is used to store feature data of one type for the corresponding crop type, and the type of feature data includes at least contour features and texture features; establishing the association relationship between multiple feature layers located in the same storage area, the association relationship including positioning lines running through adjacent feature layers, the positioning lines being used to associate feature points representing the same physical structure or region in different feature layers; It should be noted that multiple progressive and top-down feature layers are set up in the storage area. Various independent feature data are mapped and stored in the corresponding feature layers according to the actual positional correspondence of the physical structure of the crop. During storage, the positional mapping of related feature data in different feature layers is kept consistent. Position mapping consistency refers to the fact that feature data points representing the same physical structure or region in different feature layers have corresponding spatial position information based on a unified coordinate reference. Ensuring position mapping consistency involves: establishing a unified coordinate system; labeling the spatial positions of feature points or regions in different feature data based on the unified coordinate system; recording the spatial position information based on the unified coordinate system when storing feature data in the corresponding feature layer; and ensuring that when the data from the lower feature layer is vertically shifted upwards to the upper feature layer, the two layers of feature data can be accurately superimposed and fused based on the aforementioned position mapping consistency. Specifically, the process involves acquiring sample information of crops, partitioning the crops based on this information, marking key feature points in each region, and generating corresponding feature data based on these marked feature points. Each storage area corresponds to a type of crop, and each storage area includes multiple feature layers. Each feature layer stores one type of feature data for the crop type within that storage area. For example, if a feature layer is located in the rice crop category, and the rice crop's feature data is divided into leaf outline feature data, leaf texture feature data, and stem feature data, then a storage area containing three feature layers is configured for the rice crop. One feature layer stores leaf outline feature data, one stores leaf texture feature data, and another stores stem feature data. Each feature layer corresponds to one type of feature data, and the multiple layers are progressively layered from top to bottom. The distribution of multiple feature data within the feature layers is based on the actual location of the rice's feature data, and the data is then distributed and stored in the corresponding feature layers. In this system, the positional distribution of multiple feature data points corresponds one-to-one with the positional distribution of actual rice feature data. For example, leaf texture feature data can be completely embedded in leaf outline feature data, but it needs to be split into two layers and distributed and stored in the corresponding feature layers. After storage, only the leaf texture is moved vertically downwards. When the leaf texture feature data is regressed vertically upwards, the positional relationship between the leaf outline feature data and the leaf texture feature data will not change. The crop feature database has at least outline feature layer, texture feature layer, and stem feature layer. The database contains multiple crop types, each crop type corresponds to multiple layers, and each layer corresponds to different features. The multiple feature layers are progressive, and the positional distribution of multiple feature data points between feature layers is split and distributed in the corresponding feature layers according to the actual positional correspondence of the feature data of the corresponding crop, so that the positional distribution of multiple feature data points in the feature layers corresponds one-to-one with the positional distribution of the actual feature data.
[0018] The steps for establishing associations between multiple feature layers located in the same storage area, including multiple positioning lines and an association network, include: identifying and determining the points in each feature layer used to characterize the key locations of the feature structure, and establishing communication connections between multiple points in each feature layer; connecting specific points in the upper feature layer with corresponding points in the lower feature layer according to the spatial correspondence of feature data between adjacent feature layers, forming multiple positioning lines running through the layers (positioning lines are used to maintain the spatial or logical consistency of corresponding feature points between different feature layers); laying multiple logical nodes on the corresponding points in the first feature layer, and pairing two points located at both ends of the same positioning line and belonging to adjacent feature layers according to the positioning lines to form a point-to-point pair; and establishing a communication link through the corresponding positioning line for each point-to-point pair.
[0019] Based on the current feature data collected by the UAV, multiple logical nodes are deployed at the points corresponding to the feature data in the first feature layer; the current feature data is compared with the feature data in the first feature layer to identify abnormal points and connect them to form a feature network; the logical nodes in the feature network are migrated to the affected points in the next feature layer along the positioning line. Based on the migrated logical nodes, the affected points are connected to form an affected area, and the computing power units bound to the logical nodes are focused on this area; within the affected area, the current feature data is compared with the feature data of this layer again to identify new abnormal points, and the logical nodes are driven to continue migrating and focusing to deeper layers along the positioning line; the comparison, migration and focusing process is iteratively executed until the identification stopping condition is met; Positioning lines are established between adjacent feature layers. Multiple points are set on each feature layer, and communication connections are established between these points. Based on the feature data of the first feature layer, multiple logical nodes are deployed at the corresponding points in the first feature layer. The current feature data is compared with the feature data of the first feature layer, and the points containing the different feature data are identified as outliers. Multiple outliers are connected to form a feature network. Based on the communication connections between the points, the multiple logical nodes are moved from the positioning lines corresponding to the outliers to the points corresponding to the next feature layer. The points in the next feature layer corresponding to the outliers are identified as influencing points. The communication connection between midpoints involves laying logical nodes, moved down from the positioning line, on the affected points. Multiple affected points are connected to form an affected area. Then, the feature data corresponding to multiple logical nodes in the affected area are compared with the current feature data. Inconsistent feature data from the second comparison is identified, determining the corresponding abnormal points in the second layer and the corresponding affected area in the third layer. The logical nodes are then moved further down, and each logical node is bound to the system's computing power. Wherever a logical node moves, the system's computing power is distributed there. The logical nodes not only mark the distribution points of feature data in each feature layer but also carry corresponding operational data based on changes in their position. The computing power compares different feature data and analyzes it anytime, anywhere. Logical nodes don't need to cover all points in the entire feature layer; they only need to cover the points occupied by the feature data. These points allow for positional mapping of feature data across multiple feature layers (positional mapping here means that all feature data from a downstream feature layer can be completely embedded into an upstream feature layer; different feature layers correspond to different types of feature data, and these different types of feature data are stored hierarchically, but they reside on the same coordinate axis). Positioning lines are used to determine the specific location of the downstream feature data within the upstream feature layer, facilitating subsequent logical nodes to analyze anomalies. The corresponding points are found from the downstream feature layer for local analysis, reducing the overall computational load. A logical node management terminal is configured for each storage area. This terminal allocates logical nodes to the first feature layer and binds them to the system's computing power. The system's computing power is divided into multiple units, with each logical node corresponding to one unit of computing power. The distribution of logical nodes indicates the corresponding computing power at that location. Logical nodes are bound to the system's discrete computing power units, and the spatial distribution of logical nodes dynamically represents the real-time allocation of system computing power in the feature layer network. Logical nodes are only deployed at the points actually occupied by the feature data and along the migration path, without needing to cover all points.Meanwhile, the logical node management terminal includes a logical node library for storing logical nodes. Each crop type's storage area is configured with a logical node management terminal, used to allocate and reclaim logical nodes from the logical node library. After a single identification task is completed, all logical nodes are reclaimed to the logical node library for reuse. Logical nodes can be initially assigned to corresponding locations. Once the feature data in the storage area is compared with the current feature data, the logical node is reclaimed to the logical node library for the next crop identification. This allows for more refined analysis of crop feature data, thereby improving the accuracy of crop identification.
[0020] The coverage of logical nodes on the model corresponding to multiple feature levels in the storage area is not comprehensive; it only covers the corresponding feature data. For example, if the feature data of the first layer is a contour, then only a certain number of logical nodes are laid on the contour. The logical nodes only cover the contour and are not laid inside the contour. However, points are set inside the contour, and the points of the upstream feature layer and the points of the downstream feature layer are located by positioning lines. In this way, logical nodes can move to the position of abnormal points and find the affected area of the downstream feature layer from the abnormal points according to the positioning lines. After the contour features of the first layer are compared, the contour comparison results of the first feature layer are obtained, and the positions where the overall similarity meets the threshold but there are local differences are obtained. Then, the multiple logical nodes laid on the leaf contour lines in the first feature layer are extended along the positioning lines (the positioning lines are the current feature data and the wheel in the storage area). When comparing contour data, the positioning lines corresponding to logical nodes at inconsistent positions are used to establish the precise spatial embedding position of the feature data of the downstream feature layer in the upstream feature layer. This ensures that the feature data of different layers correspond in position under the same coordinate system, thereby supporting the logical nodes to move to the corresponding points of the next feature layer along the positioning lines. The points corresponding to the abnormal points in the next feature layer are then covered. For example, if the texture is divided into a main branch and multiple branches, and the point corresponding to the abnormal point is located on one of the branches, then all logical nodes are moved along the positioning lines to the point corresponding to that branch. This branch is then used as the affected area and compared again with the current feature data to identify the abnormal points in the second feature layer. The logical nodes are continuously moved to the downstream feature layers for comparison, and refined identification is performed at each feature layer to improve the accuracy of identification.
[0021] It should be noted that logical nodes are discrete logical nodes pre-set on key feature structures or regions within each feature layer of the crop hierarchical feature database. They represent abstract anchor points or access points for feature data at that location. Each logical node is associated with its precise spatial location information in a unified coordinate system, ensuring consistency in the location mapping of cross-layer data. They possess states such as "activated" and "inactive." The activated state is usually triggered by the feature matching process and is the starting point for initiating association and feature extraction. As the endpoint of the positioning line, it can carry or associate the index, summary, or key descriptor of the local feature data at its location. The positioning line is a virtual line segment or logical link pre-established in the hierarchical feature database, used to connect a pair of corresponding logical nodes between two adjacent feature layers, serving as a fixed channel for the construction of the association network and the propagation of activation signals. All cross-layer logical node associations must be established through pre-defined positioning lines. These positioning lines together form the static skeleton of inter-layer associations in the feature database, defining possible association paths between feature levels. The association network is a temporary, cross-feature layer network structure dynamically generated during crop identification based on the real-time matching requirements of current feature data and the database. It consists of multiple "active" logical nodes connected by positioning lines. It does not exist in advance but is formed during the identification process, starting with several logical nodes triggered by the initial matching, and propagating the activation state to adjacent layers through positioning lines. Along the association network, local feature data anchored by activated logical nodes can be accurately extracted from each layer for fusion or comparison, realizing progressive local analysis. Through positioning lines and logical node association networks, features at different levels (such as contours, textures, and stem systems) are closely associated spatially and logically. This not only makes the database itself a structured feature map, but also enables the precise and automatic extraction of feature data of the required level and range along the association path during the recognition process. It has the ability to adaptively adjust the required range and can dynamically expand or shrink the feature extraction area according to the current matching degree, thus realizing the intelligence and precision of feature calling. Specifically, the logical nodes contained in the association network in the first feature layer are projected into the second feature layer. The projected logical nodes are then connected to obtain the influence area. Feature data from the second feature layer within the influence area is then captured and fused into the first feature layer according to spatial correspondence. The captured information is then fused into the corresponding positions in the first feature layer. Next, desired local areas are selected sequentially from the influence area, and these selected local areas are compared with the corresponding crop image information, and then compared with the current feature data. Each pair of point points can communicate with each other through positioning lines. When a logical node... When a point is located within a feature network, corresponding feature networks will automatically form between other logical nodes. The required local regions are then selected sequentially from these feature networks. These selected local regions are compared with the corresponding crop image information, and the captured information is fused into the corresponding position in the first feature layer. Multiple feature layers, from the first to the last, represent different types of feature data, progressing progressively. The feature data of a later feature layer can be completely embedded into the previous feature layer. After merging, a new feature information containing richer features is formed. For example, let's assume the first feature layer is the contour layer and the second feature layer is the texture layer. Furthermore, the second texture layer can be completely embedded in the contour layer. After the two are merged, the resulting new contour layer containing the texture layer represents standard crop information for the corresponding crop type. The third layer can be completely embedded in the second layer, and the first layer can locally extract features from the second layer, while the second layer can also locally extract local features from the third layer, and so on, layer by layer. This process is used to fuse multiple local features from multiple layers into a new set of local crop information, which is then compared with the current crop information. When the similarity between the current crop information and a certain feature layer reaches a predetermined standard, the two are considered to be completely different. The region is used as the feature extraction range for the next feature layer to locally extract and fuse features from multiple feature layers, forming complete local feature information that can be compared with the current crop information. Through a hierarchical feature database and a layer-by-layer screening activation mechanism, only key, small-scale local features are compared and analyzed at each identification stage. This avoids the global calculation of the entire image or all feature data in traditional methods, and can quickly eliminate a large number of irrelevant crop types and feature regions, reducing the amount of data processing per comparison, thereby achieving a faster identification response. It is especially suitable for large-scale or real-time agricultural monitoring scenarios.
[0022] The image acquisition and preprocessing module is used to acquire remote sensing images of the area to be identified by the UAV, and to perform geometric correction, spectral correction and standardized slice preprocessing on the remote sensing images to obtain the images to be analyzed. The feature extraction and matching module is used to communicate with the feature database construction module, and is used to extract the current feature data of the current crop from the image to be analyzed based on the improved target detection neural network model, and to perform layer-by-layer and local dynamic matching analysis between the current feature data and the feature data of the corresponding storage area in the crop feature database based on the correlation relationship. The feature extraction and matching module includes: The feature extraction unit is used to extract the current feature data of the current crop from the image to be analyzed based on the improved target detection neural network model; the improved target detection neural network model is the MFAYOLO model, whose backbone feature extraction network integrates a multi-scale feature fusion module; The MFAYOLO model generally follows the YOLO Backbone-Neck-Head structure. The Backbone extracts multi-scale features from the input image; the Neck fuses shallow detail information and deep semantic information through the Feature Pyramid Network (FPN) and Path Aggregation Network (PAN) structures; the Head mainly performs object classification, bounding box regression, and confidence prediction. The dynamic matching analysis unit is used to perform layer-by-layer and local matching between the current feature data and the feature data of the target storage area; The result determination unit is used to determine the type of the current crop based on the matching degree of the features of each layer in the iterative analysis process. The multi-scale feature fusion module includes: multiple parallel feature extraction branches, each branch using convolutional kernels of different sizes to capture spatial features of different directions and receptive fields; and a channel attention mechanism submodule, which is used to weight the features extracted by the multiple branches, adaptively strengthening key channel features and suppressing non-key information. Specifically, the Backbone (feature extraction unit): Its core is a deep CNN containing modules such as Conv, C3k2, SPPF, and C2PSA. It is responsible for extracting multi-level, multi-scale feature maps (low-level - details or texture, high-level - semantics or abstraction) from the original input image. This part is the foundation of the entire model. The Neck receives the multi-scale feature maps output from the Backbone and performs multi-scale feature fusion and enhancement through structures such as Feature Pyramid Network (FPN) and Path Aggregation Network (PAN). Its key role is to effectively combine features rich in deep semantic information with features rich in shallow spatial details, improving the model's ability to detect targets at different scales (especially small targets). The Head receives the features fused from the Neck and performs target classification (predicting class probabilities), bounding box regression (predicting center point coordinates, width, and height), and confidence prediction (predicting the probability of target presence) in parallel. The final output is the detection result.
[0023] Depthwise Separable Convolution (DWC) is an efficient convolution operation that decomposes standard convolution into two steps: depthwise convolution and pointwise convolution. This decomposition reduces computational cost and the number of parameters, making it particularly suitable for resource-constrained scenarios. MFAYOLO extensively uses DWC in its backbone, effectively reducing model complexity and inference energy consumption while maintaining feature extraction capabilities.
[0024] The C3k2 module uses two C3k modules, and the C3k modules are variable convolution kernels of the C3 modules. The main purpose is to extract more complex feature representations.
[0025] The SPP module achieves multi-scale feature fusion by parallelizing multiple large-size pooling kernels (such as 5×5, 9×9, 13×13). To improve efficiency, MFAYOLO uses its optimized version, SPPF (Fast Spatial Pyramid Pooling). The core innovation of SPPF is to use serial small pooling kernels (such as 5×5) instead of parallel large pooling kernels. Three consecutive 5*5 max pooling operations (step=1, fill=2) are equivalent to one 13*13 pooling operation in the receptive field, which can reduce computation and memory usage.
[0026] In complex karst environments, effectively distinguishing crops from distracting elements (bare rock, weeds) is crucial. Standard convolutional operations treat features equally across all spatial locations, lacking the ability to focus on key regions. To address this, MFAYOLO integrates a C2PSA (C2Position-SensitiveAttention) module into its backbone. This module introduces a position-sensitive self-attention mechanism, with its core component, PSABlock, comprising Multi-Head Self-Attention (MHSA) and a Feed-Forward Network (FFN). MHSA dynamically calculates the correlation weights between any two locations within the feature map, enabling the model to adaptively focus on spatial regions and feature channels highly relevant to crop identification while suppressing irrelevant or highly distracting background regions (such as bare rock). FFN is used for further nonlinear transformations and feature integration. Through this mechanism, C2PSA significantly enhances the model's feature discrimination ability and robustness in complex environments. Traditional channel attention mechanisms (such as the SE module) capture channel dependencies only through global pooling, lacking modeling of spatial location sensitivity; while spatial attention mechanisms (such as CBAM) can enhance spatial features, they often rely on local convolutions and are difficult to model long-range dependencies. Although standard self-attention in Transformer can capture global context, it has high computational complexity and limited ability to capture local details, and is easily affected by irrelevant features in complex backgrounds. To accurately and effectively capture the detailed features of fragmented landforms in karst regions and suppress background interference, an MFA module was added to Backbone. This module reduces computational cost and parameter count through depthwise separable convolutions, aiming to improve the model's computational efficiency in feature extraction tasks. To enhance the model's feature extraction capabilities at different scales, a multi-scale branch was designed for feature fusion. Each branch uses symmetric grouped convolutions. The MFA uses convolution kernels of different sizes (such as 1*7, 7*1, 1*11, etc.) to capture spatial features in different directions and receptive fields, enhancing the model's adaptability to multi-scale targets by adding multi-scale branches. YOLO11-AE performs well in capturing local features. Due to the complex and diverse background of Guizhou karst landforms and uneven lighting, a channel attention mechanism was added. This mechanism first compresses the feature map through global average pooling to generate global information for each channel. To enable the model to adaptively judge situations such as shadow coverage based on global scene information, two 1*1 convolution operations are used to generate channel attention weights. By generating weight maps using activation functions (SiLU) and sigmoid functions, the model can adaptively adjust the attention given to channels, strengthen the learning of key channel features, suppress the influence of unimportant information, and better understand the context module, thereby enabling the model to better focus on crop targets in complex contexts. The dynamic matching analysis unit includes: The comparison subunit is used to determine the initial matching point on the first feature layer of the target storage area based on the current feature data, and to deploy multiple logical nodes on the initial matching point; based on the comparison results, it identifies abnormal points and connects the abnormal points to form an initial feature network; The migration subunit is used to migrate the logical nodes in the initial feature network to the corresponding points in the next feature layer corresponding to the abnormal points, based on the positioning line, so as to form the influence area on the corresponding feature layer. The analysis subunit is used to compare the current feature data with the feature data stored in the corresponding feature layer again within the influence area, identify new abnormal points, and drive the logic node to continue to migrate and focus downstream along the positioning line. This process is iteratively executed until the preset identification stop condition is met. The feature extraction and matching module further includes a computing power binding unit, which is used to divide computing resources into multiple discrete computing power units and dynamically bind each logical node to one computing power unit; wherein, the spatial distribution of the logical nodes dynamically represents the real-time allocation of computing power in the feature layer network; the logical nodes are only deployed at the points and migration paths actually occupied by the feature data; Specifically, the association network dynamically formed by activated logical nodes in the upper feature layer is projected along the positioning line to the adjacent lower feature layer; based on the projection, a local area to be compared is defined in the lower feature layer as the influence area, and feature data is extracted only within this influence area and compared with the current feature data to achieve cross-layer local feature data extraction and analysis; the logical node scheduling unit is specifically used to ensure that logical nodes are deployed only at the points actually occupied by the feature data and on their migration path along the positioning line; wherein, the spatial distribution of logical nodes dynamically represents the real-time allocation of system computing power in the feature layer network, and the location of the logical node is the focal point of the corresponding computing power unit; In the lower feature layer, the local area to be compared is defined as the influence area, including: mapping the logical nodes in the current feature layer association network to the adjacent feature layer according to the positioning lines and position mapping consistency in the association relationship, to obtain a set of mapping points; in the adjacent feature layer, the set of mapping points is connected according to the preset connection rules to form an influence area, the influence area of the current feature data in the target feature layer is determined, the logical nodes located in the influence area are activated, and the logical nodes located in another feature layer corresponding to the logical nodes are associated with each other according to the positioning lines to obtain an association network; The steps for generating a relational network based on activated logical nodes and the relationships within the storage area, and extracting corresponding crop feature data from the feature layers covered by the influence area based on the relational network as the target crop feature data corresponding to the current feature data, include: determining the activated logical nodes in the first feature layer, connecting the activated logical nodes to form the feature network of the first feature layer; activating the logical nodes in the second feature layer corresponding to the logical nodes in the feature network of the first feature layer based on point-to-point pairs, connecting the activated logical nodes in the second feature layer to obtain the influence area of the second feature layer; propagating the activation state of the activated logical nodes down to the next lower feature layer along the positioning line to form a relational network of multiple feature layers; comparing the current feature data with the first feature layer of the database, and selecting the target crop feature data based on the specified relationships. When a preset similarity threshold is met and the current feature data corresponds to multiple potential crop types, the logical node corresponding to the feature difference point in the first feature layer is activated. Based on the activated logical node in the first feature layer, the corresponding logical node in the next adjacent feature layer is activated synchronously through a positioning line. In the next feature layer, the activated logical nodes are connected to form an influence region. The current feature data is compared with the feature data in the influence region. When the similarity condition and the number of potential types condition are met again, the logical node corresponding to the feature difference point in that layer is activated, and the activation and association continue to propagate to the next feature layer. The above steps are repeated until a preset stopping condition is met. The crop feature data corresponding to the preset stopping condition is taken as the target crop feature data corresponding to the current feature data.
[0027] Specifically, the current feature data is compared with the feature data of the first feature layer in the database. If the similarity reaches a preset threshold, and the current feature data corresponds to two or more potential crop types, then the logical nodes corresponding to the feature points in the first feature layer that differ from the current feature data are activated. Simultaneously, the corresponding logical nodes in the second feature layer, connected by positioning lines, are activated. The activated corresponding logical nodes are then connected in the second feature layer to form a new influence area. The current feature data is then compared again with the feature data in this new influence area of the second feature layer. If the similarity reaches the next threshold... If the potential crop types corresponding to the current feature data are still two or more, then activate the logical nodes corresponding to the feature points in the second feature layer that differ from the current feature data; based on the activated logical nodes in the second feature layer, associate and activate the corresponding logical nodes in the next feature layer to form a new influence area in the next feature layer; repeat the above steps, comparing, filtering and activating layer by layer until the preset stopping condition is met, forming a complete association network covering multiple feature layers. The preset stopping condition includes at least one of the following: reaching the deepest feature layer; the potential crop types corresponding to the current feature data are reduced to one; the similarity is lower than a certain threshold. For example, a crop feature database contains storage areas for rice, wheat, corn, and other crops. Rice feature layers (taking a three-layer configuration as an example): First feature layer (leaf outline feature layer): Stores standard outline polygonal data of rice leaves. Each outline consists of a series of logical nodes, marking key locations such as the leaf tip, leaf margin bend point, and leaf base. Second feature layer (leaf texture feature layer): Stores texture feature data of rice leaves, such as the density, width, and spacing of parallel veins. Logical nodes in this layer are marked on key nodes of the leaf veins and precisely connected to corresponding spatial locations on the first layer outline (such as the center of an area near a leaf margin point) via positioning lines. Third feature layer (stem feature layer): Stores morphological feature data of rice stems and tillering points. Logical nodes are marked at stem nodes, tillering points, etc., and connected to leaf base outline points in the first layer and texture logical nodes in the corresponding areas of the second layer via positioning lines. Object to be identified (current feature data): An image of a crop taken by a drone in a field. The initial extracted feature data shows that the leaves are lanceolate and of medium length—similar to the leaf outline features of rice and certain wheat varieties. The current feature data (lanceolate, medium-length leaf outline) is compared with the first feature layer (outline layer) of all species in the database. Similarity calculations show an 85% similarity to the "rice" outline and an 82% similarity to "wheat variety A," both exceeding the preset first-layer similarity threshold (e.g., 80%). At this point, the similarity to "corn" is only 40%, and it is excluded. The current feature data corresponds to multiple potential species (rice, wheat). The logical nodes corresponding to the differences in the current leaf outline in the first feature layer of rice and wheat are activated. For example, if the leaf tip angle of the current leaf is slightly blunter than that of standard rice but slightly sharper than that of standard wheat, then the logical node marked near the leaf tip position is activated. Simultaneously, the activated logical nodes (leaf tip, a specific leaf edge point, etc.) are connected to form an initial feature network in the first feature layer. This feature network roughly delineates the contour difference areas that require further detailed examination. Based on the positioning lines, the corresponding logical nodes in the second feature layer (texture layer) that are directly connected to the activated logical nodes in the first layer (such as the leaf tip difference point) are automatically and synchronously activated. The positioning lines ensure that the "logical node of the leaf tip in the contour layer" and the "logical node of the leaf tip texture in the texture layer" physically represent the same location. During comparison, the "overall texture" is not compared abstractly, but the texture of the same leaf tip area is compared precisely. This consistent positional mapping eliminates feature misalignment comparisons, greatly improving the effectiveness and accuracy of the comparison. For example, the leaf vein texture logical node corresponding to the leaf tip area is activated. Forming an influence area: In the second layer, all activated texture logical nodes are connected to form an influence area. This area is no longer the entire leaf texture, but focuses on the texture of the leaf tip and its surrounding area.Further comparison: More refined texture features (such as vein morphology) are extracted from the corresponding location (leaf tip region) of the current crop image and then compared with the second layer of influence regions in the database (i.e., leaf tip texture data of rice and wheat). Results and reactivation: The comparison revealed that the leaf veins in the leaf tip region of the current leaf are parallel and clear, highly matching the texture features of rice (90% similarity), while the matching degree with the leaf tip texture of wheat (which may be more blurred or have subtle interlacing) is lower (75%). Since the similarity condition is met again (both exceed the second layer threshold of 70%) and the potential species are still two (rice and wheat), new feature difference point logical nodes in the second layer are activated. For example, the difference points representing the parallelism and spacing of leaf veins are activated. Association propagation: These newly activated differential point logical nodes in the second layer continue to propagate activation signals to the third layer (stem layer) via positioning lines. In the third feature layer (stem layer), logical nodes related to the texture differential points in the second layer (e.g., stem node logical nodes connecting leaf bases) are activated and connect to form new influence regions—this time focusing on the stem nodes connecting this specific leaf. An attempt is made to extract the morphology of this stem node (e.g., whether it is swollen, whether it has pubescence) from the current image. Then, it is compared with the features of corresponding parts of rice and wheat in the database. Suppose the current image shows obvious pubescence at the stem node—a typical feature of rice, while wheat is usually smooth in this area. After this comparison, the similarity of rice rises to 95%, while the similarity of wheat plummets to 60%, below the third layer threshold (e.g., 85%). The stopping condition is met: if the potential species converge to one (rice) and the similarity reaches a high-level threshold, then propagation to the lower layers (if any) stops. A dynamically activated logical node and localization line network connects from the first layer (leaf tip contour difference points) to the second layer (leaf tip region texture difference points) and then to the third layer (specific stem node feature points connecting the leaves). The current crop is determined to be rice. The entire recognition process does not perform a global comparison of all contour and texture data of the entire leaf with the entire stem system data. Instead, it starts with the most obvious contour clues (first layer), finds contradictions (rice and wheat are difficult to distinguish), and then finds more refined physical evidence (second layer texture) along the preset clues (localization lines). After comparison again, it focuses on more critical related parts (third layer stem nodes), and finally makes an accurate judgment using decisive features (hairs). It does not simply look for similar points, but actively seeks and activates difference points. When rice and wheat are difficult to distinguish in terms of contour, it does not compare the entire leaf, but automatically focuses on the local features that can maximize their distinction (such as leaf tip texture and stem node hairs).The first layer calculates only contour similarity, quickly eliminating completely unrelated species like corn. The second layer calculates only the texture similarity of local areas at the leaf tips of rice and wheat, drastically reducing the amount of data. The third layer calculates only the morphological similarity of specific stem nodes in rice and wheat, reducing unnecessary calculations and improving the efficiency of crop identification. When a key logical node is missing (e.g., a stem node in the third layer is occluded and cannot be identified), it immediately knows: "I need a supplementary photo that captures this stem node." Therefore, it can generate instructions to guide the drone to adjust its angle for a supplementary photo, reducing the problem of inaccurate identification due to incomplete information from a single image.
[0028] It should be noted that satisfying the similarity condition and the potential crop number condition means that in the comparison of each feature layer, the similarity between the current feature data and the feature data of that layer reaches the threshold set by that layer, and the current feature data still corresponds to at least two potential crop types based on the feature judgment of that layer. The preset stopping conditions include reaching the deepest feature layer, the potential crop types converging to one, or the similarity falling below the minimum threshold. After the comparison and screening of each layer, only the logical nodes representing feature differences are activated, and the influence region of that layer is constructed or updated based on these logical nodes. The influence region is used for the comparison of the next layer.
[0029] Specifically, when comparing the current feature data with the feature data in the database, once the similarity reaches the corresponding threshold and there are two or more types of the current feature data, the logical nodes that are different from the feature data in the database are activated, and the logical nodes at the opposite end are also activated, forming the influence area of the next feature layer. Then, the influence area is compared with the current feature data again, and logical nodes that are different from the current feature data in the influence area are reactivated when the similarity reaches the corresponding threshold and there are two or more types of the current feature data (the propagation of activation is unidirectional, that is, it only propagates from the upper feature layer to the directly adjacent lower feature layer), and associated to form a new feature network, which serves as the influence area of the next layer. This process is repeated layer by layer, with local selection performed at each layer, thereby reducing the amount of computation when comparing features and improving the efficiency of the comparison.
[0030] By setting up a network of connections between positioning lines and logical nodes, features at different levels are spatially and logically linked to construct a hierarchical feature database. This allows for layer-by-layer filtering of feature data in the crop feature database, comparing and analyzing only key, small-scale local features at each identification stage. This avoids the global calculation of the entire image or all feature data in traditional methods, and can quickly eliminate a large number of irrelevant crop types and feature regions, reducing the amount of data processing per comparison. This results in a faster identification response and improves the efficiency and accuracy of crop type identification.
[0031] The dynamic analysis engine invokes an improved object detection neural network model to perform the extraction of the current feature data. The improved object detection neural network model includes a Backbone feature extraction network, a Neck feature fusion network, and a Head detection network connected in sequence. The Backbone feature extraction network integrates a multi-scale feature fusion module, which includes: multiple parallel feature extraction branches, each branch using a convolutional kernel of a different size; and a channel attention mechanism submodule, used to adaptively weight the features extracted by the multiple branches.
[0032] The improved target detection neural network model is trained using a dynamic sampling strategy based on meta-learning. The dynamic sampling strategy includes: during training, dynamically adjusting the sampling weight of each category according to the loss in training, and increasing the sampling probability of categories with larger losses. The dynamic sampling strategy based on meta-learning specifically includes: during model training, monitoring the training loss of each crop category in real time; dynamically calculating and updating the sampling weights of each category based on the loss, wherein categories with larger losses are assigned higher sampling weights to increase their probability of being sampled in subsequent training batches, and categories with smaller losses are assigned lower sampling weights; and weighting the training data according to the updated sampling weights to construct each training batch. Specifically, the dataset suffers from an imbalance in data volume among different crop categories, resulting in poor model recognition performance for categories with very limited data. To address this, a meta-learning-based dynamic weight sampling strategy is employed, which mainly includes a meta-learning weight sampler, data weighting, and a meta-learning callback mechanism.
[0033] This strategy dynamically adjusts the sampling weights of each class based on the loss and gradient during training. For classes with high loss and difficult learning, their sampling probability is increased; conversely, for classes with low loss and easy learning, their sampling probability is appropriately decreased. The meta-learning sampler primarily assists in dynamically adjusting the class weights and updates the sampling weights of each class based on gradient and loss information during training. Specifically, the meta-learning rate is adjusted with each update based on changes in loss, gradient, or training period. The specific adjustment method is as follows: The first step is adaptive learning rate adjustment, which is achieved by calculating the difference between the current loss and the previous loss. To update the meta-learning rate, the update method is defined as follows: (1) in This represents the average class loss for the current period. The average loss of the previous period is used to subtract the current period's loss from the previous period's loss, resulting in a decrease in the loss. If the learning rate is greater than 0, and the loss decreases, then the learning rate is increased; if the loss increases, then the learning rate is decreased. The specific adjustment methods are as follows: (2) Similarly, The meta-learning rate is adjusted based on the gradient. If the gradient difference is large, the learning rate is increased; if the gradient difference is small, the learning rate is decreased. The gradient difference is represented by the following formula. : (3) in and These are the parameters in the current training period t and the parameters in the previous training period, respectively. gradient components, The threshold representing the gradient change is the gradient norm of the model parameter θ, used as the basis for determining the adjustment of the learning rate.
[0034] (4) in, This is the lower threshold of the gradient difference, taken as 0.5 times the average gradient difference of the previous few periods. This is the upper threshold of the gradient difference, taken as 1.5 times the average gradient difference of the previous few periods. It can be set to a fixed value in the initial stage, such as... =0.01, =0.1; After each training cycle, calculate the average loss of the model on the entire validation set (or training set). and average gradient , used for updating formulas (3) and (4); The training cycle decay strategy gradually decreases the learning rate as the training cycle increases. Its formula is: (5) in The initial learning rate, The total number of training cycles. The current period number is used for the meta-learning rate. The decay rate. The base learning rate (the learning rate used when updating model parameters) can remain unchanged, or it can also use the same decay strategy.
[0035] During training, the weights of each class need to be updated based on the adjustment of the meta-learning rate, using the following formula: (6) in, Indicates in cycle Category sampling weights, No. Cycle Category The average loss, This represents the maximum value of the loss across all categories in the current period. The dynamically adjusted meta-learning rate is used to adjust the meta-weights after updating the weights. Activation and normalization are performed to ensure that the weights are positive and within a reasonable range. To avoid zero values, a smoothing term is added. The definition is as follows: (7) Among them, the smoothing term Taking the minimum value is only used to avoid zero values and does not affect the relative size of the weights. To support dynamic sampling, a weighted method is designed. This method weights each category based on a meta-learning sampler and supports dynamic updating of the category sampling weights during training. The specific details are as follows: First, the number of instances for each category is counted, and the category label information is recorded. The statistical formula is as follows: (8) in For category The number of samples, For the first The true class label of each sample For the total number of all tags, This is an indicator function; it returns 1 if the condition is true, and 0 otherwise.
[0036] The weights of each category are updated through meta-weight sampling, adjusting the sampling probability of the category based on the meta-learned weights of the current training epoch. For each sample... The corresponding category weight is selected based on the maximum weight: (9) in, For the sample Sampling weights, It is a category index, then it is normalized to a probability function: MFAYOLO's bounding box loss (BboxLoss) is determined by The loss consists of the Distribution Focal Loss (DFL) loss. The loss function is used to calculate the intersection-union ratio (overlap ratio) between the predicted and ground truth bounding boxes. The DFL loss can reduce the model's sensitivity to annotation noise during training, improving overall detection accuracy. In bounding box regression, the following method is used... The loss function measures the difference between the predicted bounding box and the ground truth bounding box. In tradition Based on this, center point distance penalty and aspect ratio consistency penalty are added to provide a more comprehensive evaluation. The following is... The complete calculation formula: (10) in, , It is the sample index (used for summation). This is the category index, where C is the total number of categories and N is the total number of samples in the training set. It is a category The sampling weight, wi is the sample Sampling weights, It is a sample The probability of being selected. It is a category The number of samples, the number of samples belonging to the rare category ( Larger samples have a higher sampling probability; samples belonging to common categories ( (Small) obtains a lower sampling probability, and the sampling distribution is dynamically adjusted according to the importance of the category; Weighted sampling significantly increases the sampling frequency of rare classes, thus mitigating class imbalance. To automatically update meta-weights during training, a meta-learning callback mechanism is designed. This callback function updates the class weights at the end of each validation cycle, allowing the sampling strategy to be adjusted based on the model's performance on the validation set.
[0037] , , in It is the intersection-union ratio of the two bounding boxes. This represents the square of the Euclidean distance between the center points of the two boxes. It is the square of the diagonal length of the smallest bounding box. The weighting coefficient is defined as follows: , It is the aspect ratio consistency parameter, defined as , These are the width and height of the actual frame. These are the width and height of the prediction box, respectively. The range of values for is [-1, 1], therefore the loss function... The value range is [0, 2].
[0038] The Distribution Focal Loss (DFL) loss is a loss function used for bounding box regression. It improves the accuracy and robustness of the regression by modeling the uncertainty of the bounding box coordinates. Traditional bounding box regression (such as...) or The loss function assumes the coordinates are fixed values and is sensitive to annotation noise. DFL uses bounding box coordinates (such as center point) as the basis for its loss function. , or width ,high The model is based on a discrete probability distribution, which mainly aims to make the model predict that the coordinate value falls within a discrete interval around its true value. probability distribution The loss function DFL calculates the predicted distribution and the true distribution (usually approximated by the Dirac delta function, i.e., the distribution corresponding to the true coordinates). The model uses weighted cross-entropy loss. This modeling approach enables the model to learn coordinate uncertainties, making it more robust to situations with blurred karst boundaries and subtle labeling errors, thus contributing to more stable and accurate bounding box predictions. Through DFL loss, the model can more effectively learn the precise location of the bounding box while reducing sensitivity to extreme or anomalous labels, improving overall object detection performance. DFL loss is the sum of weighted cross-entropy losses: (11) Here, the sample-level weights are denoted as The interpolation weights are denoted as , , The model is for the first The discrete distribution of bounding box predictions (probability vectors normalized by softmax), where It is the preset number of discrete bins (such as 16 or 32). In It is a one-hot label vector (only 1 at the corresponding bin position). It is the prediction probability vector, let the original target value be... By mapping to the discrete interval [0, K-1] through a linear transformation, we obtain... ,in and These are the scaling and translation parameters. Then... , It is the left bin interpolation weight. It is the right bin interpolation weight. This represents the integer part of the target encoding, i.e., the left boundary of the distribution. Indicates the right boundary of the distribution. Indicates the weight of the left boundary. Indicates the right boundary weight. Let cross-entropy be the loss function. It is a weighting factor used to assign different importance to different bounding box losses. It represents the number of bounding boxes.
[0039] The classification loss uses the binary cross-entropy loss, which can be expressed by the following formula: (12) in, Indicates the number of samples. Indicates the sample index. Indicates the total number of categories. Indicates the first The first sample Similar to real-world labels, The first output of the model represents the... Class prediction probability, The denominator represents a small constant to prevent division by zero. This represents the number of positive labels for the sample. For multi-class classification (rice, corn, flue-cured tobacco, sorghum), a Sigmoid activation function is used in conjunction with... It allows each target to belong to multiple low-probability predictions simultaneously (although crops are mutually exclusive in this study), and in practice, its training stability has been found to be superior to... ; The loss function of the improved object detection neural network model includes CIoU loss and DFL loss for bounding box regression, and binary cross-entropy loss for classification; wherein, CIoU loss is used to measure the degree of overlap between the predicted box and the ground truth box, the distance between the center points, and the consistency of the aspect ratio; and DFL loss improves the robustness of regression and tolerance to annotation noise by modeling the bounding box coordinates as a discrete probability distribution. A high-resolution remote sensing dataset was constructed based on the DJI Movik 3E UAV platform. The dataset primarily includes four common crops: rice, corn, flue-cured tobacco, and sorghum. The acquired images cover multiple growth stages of these crops, from vigorous growth to early maturity, to capture the spectral characteristics of the crops at different growth stages. Each image has undergone data preprocessing, including geometric and spectral corrections, to ensure its accuracy and comparability. These image data were collected at different altitudes and in different geographical regions, making them highly representative and suitable for crop identification research in diverse environments.
[0040] To ensure the rigor of model evaluation and its generalization ability, a dataset covering multiple typical topographic regions in Guizhou Province was selected. The data originated from areas with significant elevation differences, such as Bijie, Zunyi, and Anshun, thus encompassing diverse farmland spatial structures and environmental contexts. The dataset was randomly divided in an 8:2 ratio, ensuring that 80% of the images were used exclusively for training and 20% for testing. This step was performed before tiling, guaranteeing complete spatial independence between the training and testing sets. To maximize data utilization and ensure high-quality training data, the training images underwent standardized tiling during preprocessing. Each image was cut into 1024×1024 pixel image files, with a 20% overlap. This avoids the "boundary effect" between tiles, effectively preserving information at adjacent tile boundaries and ensuring the integrity of the target crop within the tiles, thereby preventing errors during model training. This processing effectively enhances data continuity and spatial consistency, improving the reliability of training and testing. This process generated 164,280 training images and 63,880 test images. The data set was divided in a balanced manner, taking into account different crop types and growth stages, so as to maximize the comprehensiveness and completeness of the data set.
[0041] The recognition result output module is used to output the type, location, and boundary information of crops in the area to be identified based on the analysis results of the feature extraction and matching module.
[0042] To ensure the efficiency and reliability of the experiment, meticulous design and optimization were carried out in terms of hyperparameter settings and hardware configuration. Setting appropriate hyperparameters can significantly improve the detection rate of small object detection tasks; the selection of hyperparameters was based on extensive tuning experiments to ensure that the model could achieve optimal performance during training. Specific hyperparameter settings, such as initial learning rate, weight decay factor, optimizer type, number of iterations, and batch size, are listed in Table 1.
[0043] Table 1 Hyperparameter Settings Parameter categories Parameter settings Initial learning rate 0.01 Weight decay factor 0.0005 Optimizer SGD Number of iterations 100 Batch size 16 In the fields of machine learning and computer vision, the selection of evaluation metrics is of decisive importance, directly impacting the evaluation and optimization of model performance. Appropriate evaluation metrics ensure the effectiveness and reliability of a model on a specific task. For example, in image classification, accuracy and precision are commonly used evaluation standards; while in object detection, in addition to accuracy, recall and mean average precision (mAP) must also be considered. Furthermore, a multi-metric evaluation system provides a more comprehensive view of model performance, facilitating more informed decision-making in complex tasks.
[0044] In image segmentation tasks, to comprehensively evaluate the performance of different YOLO architectures, three YOLO-based models—YOLOv8, YOLOv11, and YOLOv13—were selected. Comparative experiments were conducted on the standard version (n) and mini-version (s) of each model. Evaluation metrics included precision (P), recall (R), and two commonly used mAP metrics (mAP50 and mAP50-90). By comparing these metrics, we can gain a deeper understanding of the performance of each model in segmentation tasks and analyze the advantages and disadvantages of different models. The experimental results and their detailed analysis are presented below.
[0045] Table 2. Comparison Experiment Results of Crop Identification Models method P R mAP50 mAP50-90 FLOPs Speed Yolov8(n) 82.1 75.9 81.9 61.3 14.8 21.2 Yolov8(s) 84.3 75.5 83.0 62.4 46.1 30.9 Yolov11(n) 82.0 78.6 83.6 63.2 10.5 13.0 Yolov11(s) 85.7 80.8 86.3 66.4 35.8 15.9 Yolov13(n) 82.8 74.1 81.6 67.7 10.3 9.4 MFAYOLO(n) 82.5 79.8 85.6 63.4 11 15.3 MFAYOLO(s) 86.4 81.9 87.1 67.6 38.1 17.65 To further evaluate the practical application potential of the models, Table 2 compares the complexity (FLOPs) and inference speed (Speed, in FPS) of each model. It can be seen that the MFAYOLO(s) proposed in this application achieves the highest detection accuracy (mAP50: 87.1%) while its inference speed (17.65 FPS) is significantly better than the benchmark model YOLOv11(s) (15.9 FPS) at the same accuracy level. Although the FLOPs of MFAYOLO(s) (38.1G) are only slightly higher than those of YOLOv11(s) (35.8G), its faster inference speed indicates that the depthwise separable convolution (DWC) and efficient multi-scale fusion module (MFA) design used in the model can improve the efficiency and expressive power of feature extraction with only a small amount of additional computational overhead. This result proves that MFAYOLO has successfully achieved synergistic optimization of accuracy and speed, rather than sacrificing efficiency for improved accuracy, making it more suitable for field monitoring tasks requiring real-time performance.
[0046] Furthermore, this application also designs cross-regional generalization experiments. To objectively verify the model's adaptability to entirely new geographical regions, it specifically designs using all data from a certain region (such as Zunyi City) as an independent test set, while the training set uses Bijie City and Anshun City. This "reserve region" verification method can more realistically simulate the model's performance in unknown environments during practical applications.
[0047] Table 3. Comparative experimental results of models based on the region leave-out method As shown in Table 3, when the model is tested in an unknown geographical area (such as Bijie), the performance of all models (taking mAP50 as an example) decreases to varying degrees. The lightweight model YOLOv8(n) shows the most significant decrease, with a relative decrease of 9.52%, followed by YOLOv11(s) with a decrease of 3.82%. The MFA-YOLO(s) used in this application shows the smallest performance decrease, at only 2.41%, demonstrating a clear advantage in cross-regional generalization ability.
[0048] To further evaluate the performance of different YOLO architectures in complex segmentation tasks, the following visualizations of the image segmentation results of YOLOv11, YOLOv13, and MFAYOLO will be presented. These visualizations provide a more intuitive comparison of each model's performance in multi-object detection, complex background handling, and fine-grained object segmentation. The visualizations will help reveal the differences in performance among different models when handling overlapping, occluded, and similarly shaped objects, especially their fine-grained segmentation capabilities when dealing with different categories of objects such as crops (e.g., rice, corn, sorghum, and tobacco). YOLOv11 achieves good results in relatively simple object segmentation tasks, but it has limitations in segmentation accuracy and detail capture in multi-object overlap and complex backgrounds. YOLOv13, as the latest architecture, significantly outperforms YOLOv11 in complex scenes, particularly in multi-scale and small object segmentation, but it still lags slightly behind in accuracy and detail. In contrast, MFAYOLO demonstrates superior performance in segmenting multiple targets, complex backgrounds, and fine-grained targets. It can effectively segment targets that are difficult to detect, and its performance is most outstanding in the recognition of target edges and details.
[0049] This application primarily focuses on the optimization and comparison of the YOLO series framework. The main reason is that the YOLO series, as a representative model for single-stage object detection, has significant advantages in balancing accuracy and speed, making it particularly suitable for agricultural monitoring scenarios with high real-time requirements, such as UAV imagery. The improved modules (MFA and C2PSA) proposed in this application mainly enhance the YOLO backbone structure. Their design principles (such as multi-scale fusion and lightweight attention) are highly synergistic with the YOLO architecture, aiming to address the core challenges of small targets, complex backgrounds, and class imbalance in karst terrain. Therefore, comparing only the YOLO series components (as shown in Tables 2 and 3) can more directly and clearly verify the effectiveness of the proposed improvements.
[0050] The proposed MFAYOLO model integrates multi-scale feature extraction and meta-learning strategies, effectively overcoming the complex challenge of crop identification in karst landform areas. This model significantly improves feature extraction accuracy through multi-scale convolution and channel attention mechanisms; simultaneously, the meta-learning strategy dynamically adjusts the learning rate, enhancing the ability to identify rare categories and robustness to environmental changes. Experimental results show that MFAYOLO(s) achieves the best detection accuracy (mAP50: 87.1%) and superior inference efficiency (17.65 FPS) in UAV image recognition of typical crops. It significantly outperforms existing models in terms of both accuracy and speed, providing solid technical support for precision agriculture decision-making and food security monitoring, and possesses significant theoretical and applied value.
[0051] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0052] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A UAV image recognition system for crops in karst landforms based on multi-scale features, characterized in that, include: The feature database construction module is used to construct a hierarchical crop feature database, wherein the crop feature database includes multiple storage areas for storing feature data of different crop types, each storage area contains multiple feature layers, and multiple feature layers located in the same storage area are associated with each other. The image acquisition and preprocessing module is used to acquire remote sensing images of the area to be identified by the UAV, and to perform geometric correction, spectral correction and standardized slice preprocessing on the remote sensing images to obtain the images to be analyzed. The feature extraction and matching module is used to communicate with the feature database construction module, and is used to extract the current feature data of the current crop from the image to be analyzed based on the improved target detection neural network model, and to perform layer-by-layer and local dynamic matching analysis between the current feature data and the feature data of the corresponding storage area in the crop feature database based on the correlation relationship. The recognition result output module is used to output the type, location, and boundary information of crops in the area to be identified based on the analysis results of the feature extraction and matching module.
2. The UAV image recognition system for karst landform crops based on multi-scale features according to claim 1, characterized in that: The steps for constructing a hierarchical crop feature database include: constructing a corresponding storage area for each target crop type; setting multiple feature layers along the vertical direction in each storage area, the multiple feature layers being arranged from top to bottom, and maintaining positional mapping consistency between the feature data stored in the upper feature layer and the feature data stored in the lower feature layer based on a unified coordinate system; wherein, each feature layer is used to store feature data of one type for the corresponding crop type, and the type of feature data includes at least contour features and texture features; establishing association relationships between multiple feature layers located in the same storage area, the association relationships including positioning lines running through adjacent feature layers, the positioning lines being used to associate feature points representing the same physical structure or region in different feature layers.
3. The UAV image recognition system for karst landform crops based on multi-scale features according to claim 1, characterized in that: The feature extraction and matching module includes: The feature extraction unit is used to extract the current feature data of the current crop from the image to be analyzed based on the improved target detection neural network model; the improved target detection neural network model is the MFAYOLO model, which integrates a multi-scale feature fusion module in its backbone feature extraction network; The dynamic matching analysis unit is used to perform layer-by-layer and local matching between the current feature data and the feature data of the target storage area; The result determination unit is used to determine the type of the current crop based on the matching degree of the features of each layer in the iterative analysis process.
4. The UAV image recognition system for karst landform crops based on multi-scale features according to claim 3, characterized in that: The multi-scale feature fusion module includes: multiple parallel feature extraction branches, each branch using convolutional kernels of different sizes to capture spatial features in different directions and receptive fields; and a channel attention mechanism submodule, which is used to weight the features extracted by the multiple branches, adaptively strengthening key channel features and suppressing non-key information.
5. The UAV image recognition system for karst landform crops based on multi-scale features according to claim 3, characterized in that: The dynamic matching analysis unit includes: The comparison subunit is used to determine the initial matching point on the first feature layer of the target storage area based on the current feature data, and to deploy multiple logical nodes on the initial matching point; based on the comparison results, it identifies abnormal points and connects the abnormal points to form an initial feature network; The migration subunit is used to migrate the logical nodes in the initial feature network to the corresponding points in the next feature layer corresponding to the abnormal points, based on the positioning line, so as to form the influence area on the corresponding feature layer. The analysis subunit is used to compare the current feature data with the feature data stored in the corresponding feature layer again within the influence area, identify new abnormal points, and drive the logic node to continue to migrate and focus downstream along the positioning line to the feature layer. This process is iteratively executed until the preset identification stop condition is met.
6. The UAV image recognition system for karst landform crops based on multi-scale features according to claim 1, characterized in that: The feature extraction and matching module further includes a computing power binding unit, which is used to divide computing resources into multiple discrete computing power units and dynamically bind each logical node to one computing power unit; wherein, the spatial distribution of the logical nodes dynamically represents the real-time allocation of computing power in the feature layer network; the logical nodes are only deployed on the points and migration paths actually occupied by the feature data.
7. The UAV image recognition system for karst landform crops based on multi-scale features according to claim 3, characterized in that: The improved target detection neural network model is trained using a dynamic sampling strategy based on meta-learning. The dynamic sampling strategy includes: during training, dynamically adjusting the sampling weight of each category based on the loss of each category during training, and increasing the sampling probability of categories with larger losses.
8. The UAV image recognition system for karst landform crops based on multi-scale features according to claim 7, characterized in that: The dynamic sampling strategy based on meta-learning specifically includes: during model training, monitoring the training loss of each crop category in real time; dynamically calculating and updating the sampling weights of each category based on the loss, wherein categories with larger losses are assigned higher sampling weights to increase their probability of being sampled in subsequent training batches, and categories with smaller losses are assigned lower sampling weights; and weighting the training data according to the updated sampling weights to construct each training batch.