Soil nematode automatic identification system and method based on microscopic image features

CN122157253APending Publication Date: 2026-06-05SICHUAN RES INST OF GIANT PANDA SCI +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SICHUAN RES INST OF GIANT PANDA SCI
Filing Date
2026-03-12
Publication Date
2026-06-05

Smart Images

  • Figure CN122157253A_ABST
    Figure CN122157253A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computer vision, in particular to a soil nematode automatic identification system and method based on microscopic image features, the system comprising: an image acquisition module, a structure representation module, a feature decoupling module, a attention weighting module, and an identification decision module.In the present application, the spatial offset vector is constructed by analyzing the target organ data and calculating the geometric barycenter and the gray centroid, the structural deflection of the nematode organ relative to the main body axis is accurately quantified, the initial features are orthogonally projected and separated by using the genus / species level phenotype prototype vector, the common feature interference is eliminated and the specific residual vector reflecting the difference between the groups is retained, the high response diagnosis area is defined by combining the gradient return mechanism, the attention weight of the feature dimension is adaptively assigned according to the activation amplitude, and the sensitive capture of the micro deformation is realized through the anisotropic weighted distance calculation, so as to avoid the subjective error of artificial observation and improve the accuracy of genus / species identification of the close related groups.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and in particular to an automatic identification system and method for soil nematodes based on microscopic image features. Background Technology

[0002] The field of computer vision technology aims to enable machines to simulate the human visual system, automatically acquiring, processing, understanding, and interpreting information from visual data such as images or videos. Core aspects include image classification, object detection, image segmentation, and feature extraction and matching, covering the entire process from low-level image signal processing to high-level semantic understanding. Specifically, this involves capturing raw visual data through sensors, using image processing algorithms such as denoising, enhancement, and transformation to optimize data quality, identifying key information points, lines, regions, or textures in images through feature extraction techniques, and utilizing machine learning or pattern recognition models, such as convolutional neural networks, to analyze, model, and infer features to complete recognition and measurement. For specific tasks such as measurement, tracking, or scene reconstruction, the traditional automated soil nematode identification system refers to the process of classifying and identifying nematodes in soil samples manually. The aim is to determine the genus and species of nematodes under a microscope. The traditional method involves inspectors placing the processed soil sample under a microscope and visually observing and locating individual nematodes. Based on their professional knowledge and taxonomic experience, inspectors carefully identify key morphological characteristics of the nematodes, such as body length, body width, stylet, esophageal bulb, and tail shape. The observed characteristics are then compared one by one with existing paper or electronic nematode classification keys and atlases. Through logical judgment and elimination, the classification of nematodes is determined.

[0003] Traditional soil nematode identification relies on manual visual observation by inspectors using microscopes. Due to differences in individual professional knowledge and taxonomic experience, there is a subjective bias in the identification of key morphological features such as nematode body length and internal organs. Visual fatigue caused by long-term high-intensity observation can easily lead to missed detections or misjudgments of minute structural features. Comparing each nematode to a paper atlas is cumbersome and time-consuming, and it is difficult to accurately quantify the subtle shifts in organ positions between closely related species. Logical elimination methods without data support cannot effectively cope with nonlinear deformation interference between individuals, resulting in difficulty in guaranteeing the stability and accuracy of identification results, and failing to meet the actual needs of rapid and high-throughput detection of large-scale soil samples. Summary of the Invention

[0004] To address the technical problems existing in the prior art, embodiments of the present invention provide an automatic identification system and method for soil nematodes based on microscopic image features.

[0005] On the one hand, an automated identification system for soil nematodes based on microscopic image features is provided, which includes: The image acquisition module captures samples to obtain two-dimensional digital images, statistically analyzes the distribution histogram of pixel grayscale intensity in the digital images, calculates the inter-class variance and selects segmentation reference points, aggregates connected pixels, calculates the second-order geometric moments of pixel distribution and fits the major axis direction, and obtains target organ image data. The structural characterization module parses the target organ image data, calculates the coordinate mean to locate the geometric centroid, uses gray-level weighting to locate the gray-level centroid, constructs a spatial vector pointing from the geometric centroid to the gray-level centroid, calculates the vector magnitude and the included angle, and obtains the structural offset feature vector. The feature decoupling module parses the target organ image data, combines it with the structural offset feature vector to construct an initial feature vector, removes the projection component of the initial feature vector on the genus-level prototype, and obtains the specific residual vector. Attention weighting module: convolves the target organ image data to generate multi-channel microscopic feature maps and temporary category activation data, calculates the channel weight coefficients of the activation data gradient, defines the diagnostic trait region, and assigns attention weight coefficients to each dimension of the specific residual vector based on the region amplitude. The identification decision module calculates the difference between the specific residual vector and the reference residual vector, and calculates the anisotropic weighted distance by combining the attention weight coefficient, and outputs soil nematode identification information.

[0006] As a further aspect of the present invention, the target organ image data includes an organ region pixel coordinate matrix, a gray-level intensity distribution matrix, and a region boundary mask index. The structural offset feature vector specifically includes the internal density distribution non-uniformity modulus, centroid spatial offset angle, and geometric gray-level center distance value. The specific residual vector includes genus-level prototype orthogonal components, interspecific morphological difference values, and residuals of de-common feature dimensions. The attention weight coefficient specifically refers to the diagnostic trait region significance factor, feature channel activation priority value, and dimension-specific contribution ratio. The soil nematode identification information includes the nematode species taxonomic name, identification confidence probability value, and relationship matching score.

[0007] As a further aspect of the present invention, the image acquisition module includes: The histogram statistics point selection submodule uses an optical microscope to photograph glass slide samples, acquires two-dimensional digital images, constructs a histogram of pixel gray intensity distribution, calculates the inter-class variance data of the foreground and background based on the gray level sequence, compares the variance values ​​at different positions, retrieves the maximum peak value in the sequence, locks the threshold data corresponding to the peak value, and obtains gray level segmentation reference points. The neighborhood determination and marking submodule traverses the pixel nodes of the two-dimensional digital image to extract gray values, compares the gray values ​​with the gray value segmentation reference points, traverses the pixel matrix to determine the connection relationship between the current pixel and its eight neighboring pixels, assigns a unique identifier, and aggregates adjacent and continuous pixel data to generate a connected aggregated pixel set. The regional information integration submodule traverses the spatial distribution of pixels based on the connected aggregated pixel set, calculates the second-order central moments of pixel coordinates within the set, analyzes the principal direction of the regional distribution, obtains the principal axis vector of the nematode body, scans the outermost edge pixels of the set, records the row and column index data of the edge pixels in the matrix coordinate system, defines the clipping range based on the extreme values ​​of the index data, extracts the position coordinate data and corresponding illumination intensity values ​​within the range, and obtains the target organ image data.

[0008] As a further aspect of the present invention, the structural characterization module includes: The geometric centroid localization submodule parses the target organ image data, traverses each pixel in the target area, extracts the row and column coordinate indices, counts the total number of pixels, performs cumulative summation on the row and column coordinates respectively, calculates the arithmetic mean result and locates the geometric centroid, and obtains the geometric centroid coordinates of the region. The gray-scale centroid calculation submodule extracts the gray-scale intensity values ​​of each pixel in the target organ image data based on the geometric centroid coordinates of the region. It uses the gray-scale intensity values ​​as weighting coefficients to perform a weighted average calculation on the pixel coordinates to locate the gray-scale centroid position of the region. It then spatially pairs and integrates the coordinate information of the gray-scale centroid and the geometric centroid to obtain dual centroid positioning data. The offset feature calculation submodule calls the dual centroid positioning data to construct a two-dimensional spatial displacement vector pointing from the geometric centroid to the gray-scale centroid. It uses coordinate difference calculation to solve the Euclidean distance modulus of the vector, introduces the nematode body principal axis direction vector as a reference, calculates the deflection angle of the displacement vector relative to the principal axis direction, integrates the modulus and angle data, and obtains the structural offset feature vector.

[0009] As a further aspect of the present invention, the feature decoupling module includes: The geometric feature splicing submodule parses the target organ image data, scans the extreme value data of edge pixel coordinates, calculates the length and width geometric parameters of the target region, calls the structural offset feature vector, splices and recombines the length and width geometric parameters with the vector in terms of numerical dimensions, and constructs an initial feature vector containing external contour and internal deformation information. The projection component calculation submodule, based on the initial feature vector and combined with the preset genus-level phenotypic prototype vector, performs vector dot product operation, analyzes the directional similarity between the two, calculates the orthogonal projection component of the initial feature vector in the direction of the prototype vector, quantifies the intensity value of the genus-level common features, and obtains common projection component data. The residual vector acquisition submodule calls the initial feature vector and the common projection component data, maps the projection component data back to the feature space, constructs a common feature vector, performs vector subtraction operation in the feature space, removes the common feature vector from the data dimension of the initial feature vector, and obtains the specific residual vector.

[0010] As a further aspect of the present invention, the process of combining a preset genus-level phenotypic prototype vector, performing a vector dot product operation, and analyzing the directional similarity between the two specifically involves: Access the nematode taxonomy feature database, retrieve historical confirmed sample data that matches the current identification task, calculate the statistical average value of the historical confirmed sample data on each feature dimension, and reorganize the statistical average value according to the dimension order to construct the genus-level phenotypic prototype vector. Establish a dimension traversal index for the feature space, read the feature values ​​of the initial feature vector item by item according to the dimension traversal index, and simultaneously read the standard baseline values ​​of the genus-level phenotypic prototype vector at the same dimension index position. The feature values ​​of the initial feature vector are multiplied by the standard reference values ​​of the genus-level phenotypic prototype vector to obtain the single-dimensional collaborative response value. The single-dimensional collaborative response values ​​generated in all dimensions are then summed to generate the total unnormalized vector inner product. The sum of squares of the values ​​of each dimension is calculated for the initial feature vector, and the arithmetic square root is processed on the calculation result to obtain the norm of the sample vector. The sum of squares of the values ​​of each dimension is calculated for the genus-level phenotypic prototype vector, and the arithmetic square root is processed on the calculation result to obtain the norm of the prototype vector. Multiply the norm of the sample vector with the norm of the prototype vector to construct a spatial normalization factor. Then, use the spatial normalization factor to perform a division operation on the total inner product of the vectors to obtain the cosine similarity coefficient. The cosine similarity coefficient is determined as a quantitative index that characterizes the directional consistency between the initial feature vector and the genus-level phenotypic prototype vector in the multidimensional feature space.

[0011] As a further aspect of the present invention, the attention-granting module includes: The gradient weight calculation submodule performs multi-layer convolution and global pooling operations on the target organ image data to generate multi-channel microscopic feature maps and temporary category activation data. It calculates the gradient values ​​of the activation data relative to the microscopic feature maps, performs global average pooling on the gradient values, calculates the average gradient response of each channel, and obtains the channel weight coefficients. The diagnostic region localization submodule calls the channel weight coefficients and the microscopic feature map, performs a linear weighted superposition operation on each channel of the feature map, filters out the data range in the superposition result whose response intensity exceeds the preset reference standard, maps the data range to the original image coordinate system, defines the geometric range covered by the high response coordinates, and uses it as the diagnostic morphology region. The attention weight allocation submodule calculates the average activation amplitude of each feature channel within the diagnostic trait region, constructs the response intensity level, calls the specific residual vector, establishes a mapping transformation matrix between the number of feature channels and the number of vector dimensions, allocates the mapped and transformed numerical weights according to the response intensity level as the vector dimension, and obtains the attention weight coefficients.

[0012] As a further aspect of the present invention, the process of defining the geometric range covered by high-response coordinates by mapping the data range to the original image coordinate system and the data range exceeding the preset reference standard in the filtering and superposition results is as follows: The numerical matrix contained in the superposition result is analyzed, the activation intensity values ​​of all pixels in the matrix are traversed, the arithmetic mean and standard deviation of all activation intensity values ​​are calculated, the arithmetic mean and standard deviation are superimposed by the addition operation, and an adaptive activation filtering threshold is constructed as the preset reference standard. The activation intensity value of each pixel in the superposition result is compared with the adaptive activation filtering threshold. Target pixels with activation intensity values ​​greater than the adaptive activation filtering threshold are filtered out. The row index data and column index data of the target pixels in the matrix are extracted to generate a high-response feature index set. The image resolution attribute contained in the target organ image data is used as the original size parameter, the feature layer resolution attribute of the microscopic feature map is extracted as the feature size parameter, and the original size parameter is divided by the feature size parameter to calculate the horizontal scaling ratio and vertical scaling ratio of the image space size, and obtain the spatial mapping projection coefficient. Based on the spatial mapping projection coefficients, perform a multiplication amplification transformation on the row index data and column index data in the high-response feature index set to restore the discrete coordinates of the feature layer to the original image coordinate system and obtain the original image projection coordinate points; The extreme values ​​of the original image projection coordinates in the horizontal and vertical directions are statistically analyzed. A minimum bounding geometric rectangle containing all projection coordinates is constructed, and the pixel area covered by the minimum bounding geometric rectangle is defined as the diagnostic morphology region.

[0013] As a further aspect of the present invention, the identification decision module includes: The difference data calculation submodule calls the specific residual vector, retrieves the reference residual vector of the known nematode species pre-stored in the database, performs a dimension-by-dimensional subtraction operation between the test vector and the reference residual vector in the feature space, calculates the numerical deviation between the test sample and the reference standard in each feature channel, and obtains the dimensional difference data. The weighted distance calculation submodule performs a square operation on the deviation values ​​of each dimension based on the dimensional difference data, calls the attention weight coefficient to perform a weighted multiplication on the squared difference values, accumulates the weighted calculation results of all dimensions, and performs a square root operation on the sum to obtain the anisotropic weighted distance. The minimum distance determination submodule traverses the numerical sequence of the anisotropic weighted distance, retrieves the minimum value in the sequence through numerical comparison, identifies the associated nematode species label and determines it as the category of the current sample, obtains the classification result, and outputs soil nematode identification information.

[0014] On the other hand, an automatic identification method for soil nematodes based on microscopic image features, which is executed based on the aforementioned automatic identification system for soil nematodes based on microscopic image features, includes the following steps: S1: Capture samples to obtain two-dimensional digital images, statistically analyze the distribution histogram of pixel gray intensity in the digital images, calculate the inter-class variance and select segmentation reference points, aggregate connected pixels, calculate the second-order geometric moments of pixel distribution and fit the long axis direction to obtain target organ image data. S2: Analyze the target organ image data, calculate the coordinate mean to locate the geometric centroid, use gray-level weighting to locate the gray-level centroid, construct a spatial vector pointing from the geometric centroid to the gray-level centroid, calculate the vector magnitude and the included angle, and obtain the structural offset feature vector. S3: Analyze the target organ image data, combine it with the structural offset feature vector, construct an initial feature vector, remove the projection component of the initial feature vector on the genus-level prototype, and obtain the specific residual vector; S4: Convolve the target organ image data to generate multi-channel microscopic feature maps and temporary category activation data, calculate the channel weight coefficients of the activation data gradient, define the diagnostic trait region, and assign attention weight coefficients to each dimension of the specific residual vector based on the region amplitude. S5: Calculate the difference between the specific residual vector and the reference residual vector, combine the attention weight coefficient, calculate the anisotropic weighted distance, and output soil nematode identification information.

[0015] The beneficial effects of the technical solutions provided by the embodiments of the present invention include at least the following: By analyzing target organ data and calculating the geometric centroid and gray-scale centroid to construct spatial offset vectors, the structural deflection of nematode organs relative to the body's main axis is accurately quantified. The initial features are orthogonally projected and separated using genus-level phenotypic prototype vectors, eliminating interference from common features and retaining specific residual vectors reflecting interspecies differences. Combined with gradient backpropagation mechanisms, high-response diagnostic regions are defined. Attention weights for feature dimensions are adaptively allocated based on activation amplitude. Anisotropic weighted distance calculations enable the keen capture of minute deformations, avoiding subjective errors from manual observation and improving the accuracy of identifying closely related species. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.

[0017] Figure 1 This is a schematic diagram of an automatic soil nematode identification system based on microscopic image features provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the system framework of the present invention; Figure 3 This is a flowchart of the image acquisition module in this invention; Figure 4 This is a flowchart of the structural characterization module in this invention; Figure 5 This is a flowchart of the feature decoupling module in this invention; Figure 6 This is a flowchart of the attention-weighting module in this invention; Figure 7 This is a flowchart of the identification decision module in this invention; Figure 8 This is a flowchart of an automatic identification method for soil nematodes based on microscopic image features provided in an embodiment of the present invention. Detailed Implementation

[0018] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0019] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0020] This invention provides an automatic soil nematode identification system based on microscopic image features, such as... Figure 1-2 The diagram shown illustrates an automated soil nematode identification system based on microscopic image features. The system includes: The image acquisition module captures samples to obtain two-dimensional digital images, statistically analyzes the distribution histogram of pixel grayscale intensity in the digital images, calculates the inter-class variance and selects segmentation reference points, aggregates connected pixels, calculates the second-order geometric moments of pixel distribution and fits the major axis direction, and obtains target organ image data. The structural characterization module analyzes the target organ image data, calculates the coordinate mean to locate the geometric centroid, uses gray-level weighting to locate the gray-level centroid, constructs a spatial vector pointing from the geometric centroid to the gray-level centroid, calculates the vector magnitude and the included angle, and obtains the structural offset feature vector. The feature decoupling module parses the target organ image data, combines the structural offset feature vector to construct the initial feature vector, removes the projection component of the initial feature vector on the genus-level prototype, and obtains the specific residual vector. Attention weighting module: convolves target organ image data, generates multi-channel microscopic feature maps and temporary category activation data, calculates the gradient of activation data to generate channel weight coefficients, defines diagnostic trait regions, and assigns attention weight coefficients according to the region amplitude of each dimension of the specific residual vector. The identification decision module calculates the difference between the specific residual vector and the reference residual vector, combines the attention weight coefficient, calculates the anisotropic weighted distance, and outputs soil nematode identification information.

[0021] The target organ image data includes the organ region pixel coordinate matrix, gray intensity distribution matrix, and region boundary mask index. The structural offset feature vector specifically includes the internal density distribution non-uniformity modulus, centroid spatial offset angle, and geometric gray center distance value. The specific residual vector includes genus-level prototype orthogonal components, interspecific morphological difference values, and residuals of de-common feature dimensions. Note that the weight coefficients specifically refer to the diagnostic trait region significance factor, feature channel activation priority value, and dimension-specific contribution ratio. The soil nematode identification information includes the nematode species taxonomic name, identification confidence probability value, and relationship matching score.

[0022] Specifically, such as Figure 2 , 3 As shown, the image acquisition module includes: The histogram statistics point selection submodule uses an optical microscope to photograph glass slide samples, acquires two-dimensional digital images, constructs a histogram of pixel gray intensity distribution, calculates the inter-class variance data of the foreground and background based on the gray level sequence, compares the variance values ​​at different positions, retrieves the maximum peak value in the sequence, locks the threshold data corresponding to the peak value, and obtains gray level segmentation reference points. Using a charge-coupled device (CCD) camera mounted on an industrial-grade optical microscope, soil samples on a glass slide are scanned in multiple fields under preset white balance parameters and exposure time to acquire a 2048 x 2048 pixel two-dimensional digital grayscale image. The system then preprocesses the input raw image data, including removing random salt-and-pepper noise using a median filtering algorithm and enhancing image contrast through histogram equalization. Subsequently, the system performs grayscale histogram statistics, creating an array of length 256 to store the number of pixels corresponding to each grayscale level from 0 to 255. The system iterates through each pixel in the image, reads its grayscale value, and counts and accumulates it at the corresponding index position in the array. After completing the full image statistics, the system uses the statistical results to... The inter-class variance data is calculated to determine the optimal segmentation threshold. Specifically, each gray level from 0 to 255 is assumed as a potential segmentation threshold in turn. For each assumed threshold, the image pixels are divided into foreground and background classes. The occurrence probability distribution and average gray value of these two classes of pixels are calculated respectively. Then, the inter-class variance value under the current threshold is calculated using the variance formula. The calculation logic is: the proportion of foreground pixels multiplied by the square of the difference between the average gray value of the foreground and the global average gray value, plus the proportion of background pixels multiplied by the square of the difference between the average gray value of the background and the global average gray value. The system records the inter-class variance values ​​corresponding to all assumed thresholds and compares these values ​​to find the maximum peak value in the search sequence. The gray level corresponding to the maximum peak value is locked as the gray level segmentation reference point. For example, in a simplified image region containing 100 pixels, if there are 20 pixels with a gray level of 50 and 80 pixels with a gray level of 150, and the global average gray level is 130, and assuming a threshold of 100, the foreground pixel ratio is 0.2, the background pixel ratio is 0.8, the foreground average gray level is 50, and the background average gray level is 150, substituting these values ​​into logical operations, the foreground contribution is 0.2 multiplied by 6400, which equals 1280, and the background contribution is 0.8 multiplied by 400, which equals 320. The calculated inter-class variance is 1600. The system iterates through the data to confirm whether this value is a peak value, thus determining the final segmentation reference point as 100 to ensure the accuracy of subsequent segmentation.

[0023] The neighborhood determination and marking submodule traverses the pixel nodes of the two-dimensional digital image to extract gray values, compares the gray values ​​with the gray value segmentation reference points, traverses the pixel matrix to determine the connection relationship between the current pixel and its eight neighboring pixels, assigns a unique identifier, and aggregates adjacent and continuous pixel data to generate a connected aggregated pixel set. After obtaining the segmentation reference points, binarization and connected component analysis are performed on the two-dimensional digital image. This process first traverses each pixel node in the image matrix, extracts its grayscale value, and compares it with the grayscale segmentation reference points. If the grayscale value of the current pixel is less than that of the segmentation reference point, it is marked as a target foreground pixel and assigned a value of 1; otherwise, it is marked as a background pixel and assigned a value of 0. After binarization, the system starts the connectivity scanning program, using a two-pass scanning algorithm to traverse the pixel matrix. In the first pass, the system determines the current foreground pixel and its eight neighboring pixels (i.e., the top left, top right, and top right) in row-major order. The system analyzes the connection relationships of pixels in eight directions: top right, left, right, bottom left, bottom right, and bottom right. If a pixel with an assigned identifier exists in its eight-neighborhood, the current pixel is merged into the set to which that identifier belongs. If multiple different identifiers exist in the neighborhood, their equivalence pairs are recorded. If no labeled pixel exists in the neighborhood, a new unique identifier is assigned. During the second scan, the system parses the equivalence pair table and merges all temporary identifiers with equivalence relationships into the smallest root identifier, thus completing the aggregation of adjacent and continuous pixel data and generating a connected aggregated pixel set. For example, when processing a 3x3 pixel matrix, assuming the pixels in the first row, second column and the second row, second column are both foreground points, and the rest are background points, during the scan, the pixel in the first row, second column is assigned identifier A. When scanning the second row, second column, the system detects that the pixel directly above it already has identifier A, determines that the two satisfy the eight-neighborhood connection relationship, and therefore directly labels the pixel in the second row, second column as identifier A as well, thus aggregating these two vertically adjacent pixels into the same connected region, ensuring the complete extraction of the nematode morphology.

[0024] The regional information integration submodule traverses the spatial distribution of pixels based on the connected aggregated pixel set, calculates the second central moment of the pixel coordinates within the set, analyzes the main direction of the regional distribution, obtains the main axis vector of the nematode body, scans the outermost edge pixels of the set, records the row index data and column index data of the edge pixels in the matrix coordinate system, defines the clipping range based on the extreme values ​​of the index data, extracts the position coordinate data and corresponding illumination intensity values ​​within the range, and obtains the target organ image data. Based on a connected aggregated pixel set, the system performs deep geometric analysis and region clipping operations. First, it iterates through the spatial distribution of all pixels within the set, accumulating the row and column coordinates of each pixel. Simultaneously, it calculates the sum of squares of the row and column coordinates, as well as the sum of the products of the row and column coordinates. Using these statistical data, it calculates the second-order central moments of the pixel coordinates within the set, specifically including the second-order central moments in the row direction, column direction, and mixed second-order central moments. Then, it constructs a covariance matrix based on the second-order central moment data and analyzes the eigenvalues ​​and eigenvectors of this matrix. The direction of the eigenvector corresponding to the largest eigenvalue is defined as the principal direction of the region distribution, thereby obtaining the principal axis vector of the nematode's body. Next, the system scans the outermost edge pixels of the set, recording the minimum row index, maximum row index, minimum column index, and maximum column index of the edge pixels in the matrix coordinate system through comparison operations. Based on the extreme values ​​of these index data, it defines the clipping range, constructs a minimum bounding rectangle containing the target connected domain, extracts the positional coordinate data and corresponding original illumination intensity values ​​within this range, and integrates them to generate the target organ image data. For example, as shown in Table 1, the system extracts the coordinate data of some key pixels in a connected region. When calculating the principal axis, if the second central moment of the row direction is 200, the second central moment of the column direction is 50, and the mixed second central moment is 80, the system substitutes it into the feature value calculation logic and solves that the angle of the principal axis direction corresponding to the largest feature value is about 32 degrees. The unit vector in this direction is determined as the principal axis vector of the nematode body. At the same time, a target area of ​​120 x 60 pixels is cropped according to the edge index, providing a calibrated data basis for subsequent feature analysis.

[0025] Table 1. Pixel coordinates and intensity data of connected regions

[0026] As shown in Table 1, some pixel data extracted from the connected regions in the embodiments are listed. The system calculates the second moment and determines the principal axis direction based on these coordinates.

[0027] Specifically, such as Figure 2 , 4 As shown, the structural characterization module includes: The geometric centroid localization submodule parses the target organ image data, traverses each pixel in the target region, extracts the row and column coordinate indices, counts the total number of pixels, performs cumulative summation on the row and column coordinates respectively, calculates the arithmetic mean result, locates the geometric centroid, and obtains the geometric centroid coordinates of the region. The system performs pure geometric center localization on the parsed target organ image data. This process ignores the differences in grayscale intensity of pixels and only focuses on the topological structure of the morphology. The system traverses every valid pixel in the target area, extracts its row and column coordinate indices in the cropped local coordinate system, sets a counter to count the total number of pixels in the area, and sets up two accumulation registers to perform accumulation and summation operations on the row and column coordinates of all valid pixels respectively. After the traversal is completed, the system uses a division operation to divide the sum of the row coordinates by the total number of pixels to obtain the geometric mean position in the row direction, and to divide the sum of the column coordinates by the total number of pixels to obtain the geometric mean position in the column direction. The coordinate pair formed by these two average values ​​is the geometric centroid coordinate of the region. For example, if the target area contains 4 pixels with coordinates of 10,10, 10,11, 11,10, 11,11, the system first calculates the total number of pixels as 4. The sum of the row coordinates is 10 + 10 + 11 + 11 = 42, and the sum of the column coordinates is 10 + 11 + 10 + 11 = 42. After performing a division operation, the centroid coordinates in the row direction are 42 divided by 4, which equals 10.5, and the centroid coordinates in the column direction are 42 divided by 4, which equals 10.5. The final geometric centroid coordinates are 10.5, 10.5, which accurately reflect the balance center of the target organ in terms of geometry.

[0028] The gray-scale centroid calculation submodule extracts the gray-scale intensity values ​​of each pixel in the target organ image data based on the geometric centroid coordinates of the region. It then uses the gray-scale intensity values ​​as weighting coefficients to perform a weighted average calculation on the pixel coordinates to locate the gray-scale centroid position of the region. Finally, it spatially pairs and integrates the coordinate information of the gray-scale centroid and the geometric centroid to obtain dual centroid positioning data. Based on the geometric centroid, optical density information is introduced to locate the mass center. The system, based on the determined geometric centroid coordinates of the region, retraces every pixel in the target organ image data and extracts the gray intensity value of each pixel. To eliminate the influence of uneven background illumination, the system first inverts or normalizes the gray values ​​so that their values ​​are proportional to the material density. Then, the processed gray intensity values ​​are used as weighting coefficients to weight and accumulate the row and column coordinates of each pixel. At the same time, the sum of the weighting coefficients of all pixels is calculated. The gray centroid row coordinates are obtained by dividing the weighted sum of row coordinates by the weighted sum of column coordinates, and the gray centroid column coordinates are obtained by dividing the weighted sum of column coordinates by the weighted sum of column coordinates. Finally, the calculated gray centroid coordinates are spatially paired and integrated with the previously obtained geometric centroid coordinates to generate dual centroid positioning data containing coordinate information of both points. For example, continuing with the previous case of 4 pixels, if the grayscale weights corresponding to these 4 pixels are 1, 2, 1, and 4 respectively, and the total weight is 8, the weighted sum of the row coordinates is 10 x 1 + 10 x 2 + 11 x 1 + 11 x 4 = 85, and the weighted sum of the column coordinates is 10 x 1 + 11 x 2 + 10 x 1 + 11 x 4 = 86. After performing a division operation, the grayscale centroid row coordinate is 85 divided by 8 = 10.625, and the grayscale centroid column coordinate is 86 divided by 8 = 10.75. The system integrates these coordinates with the geometric centroid 10.5, 10.5, clarifying the center offset caused by uneven internal density distribution.

[0029] The offset feature calculation submodule calls the dual centroid positioning data to construct a two-dimensional spatial displacement vector from the geometric centroid to the gray-scale centroid. It uses coordinate difference calculation to solve the Euclidean distance modulus of the vector, introduces the nematode body principal axis direction vector as a reference, calculates the deflection angle of the displacement vector relative to the principal axis direction, integrates the modulus and angle data, and obtains the structural offset feature vector. By calling the dual centroid localization data and the nematode's body principal axis vector, the system performs refined structural feature quantization. First, the system constructs a two-dimensional spatial displacement vector pointing from the geometric centroid to the gray-level centroid. The row component of this vector is the gray-level centroid row coordinate minus the geometric centroid row coordinate, and the column component is the gray-level centroid column coordinate minus the geometric centroid column coordinate. Using the Pythagorean theorem, the system performs a square root operation on the sum of the squares of the row and column components to solve for the Euclidean distance modulus of the vector, thereby quantifying the degree of structural asymmetry. Subsequently, the system introduces the nematode's body principal axis direction vector obtained during the image acquisition stage as a reference. Using the vector dot product formula and the modulus product formula, the system calculates the cosine value of the angle between the displacement vector and the principal axis direction vector, and solves for the deflection angle of the displacement vector relative to the principal axis direction using the inverse cosine function. The system then standardizes and combines the calculated modulus data and angle data to obtain the structural offset feature vector. For example, if the geometric centroid is 10.5, 10.5 and the grayscale centroid is 10.625, 10.75, then the displacement vector is 0.125, 0.25. Calculating its magnitude, which is the square root of the sum of the squares of 0.125 and 0.25, yields approximately 0.2795. If the nematode's body principal axis vector is 1, 0, i.e., horizontally to the right, then the cosine of the angle between the displacement vector and the principal axis is 0.125 divided by 0.2795, which is approximately 0.447. The corresponding deflection angle is approximately 63.4 degrees. The system stores 0.2795 and 63.4 degrees as key feature parameters in the structural offset feature vector.

[0030] Specifically, such as Figure 2 , 5 As shown, the feature decoupling module includes: The geometric feature stitching submodule parses the target organ image data, scans the extreme value data of edge pixel coordinates, calculates the length and width geometric parameters of the target region, calls the structural offset feature vector, and stitches and reassembles the length and width geometric parameters with the vector in terms of numerical dimensions to construct an initial feature vector containing external contour and internal deformation information. The target organ image data is analyzed, and the extreme value data of edge pixel coordinates are scanned and extracted, including the leftmost, rightmost, topmost, and bottommost coordinate points. These extreme values ​​are used to calculate geometric parameters such as the major axis length, minor axis length, aspect ratio, rectangularity, and compactness of the target region. Then, the structural offset feature vector containing modulus and angle information is called. The length and width geometric parameters are used as the basic dimensions, and the modulus and angle values ​​in the structural offset feature vector are used as the extended dimensions. The numerical dimensions are spliced ​​and recombined. Through normalization processing, the values ​​of all dimensions are mapped to a uniform magnitude range, and an initial feature vector containing information on external contour morphology and internal structural deformation is constructed. For example, if the calculated major axis length is 120 pixels, the minor axis length is 60 pixels, the aspect ratio is 2.0, and the modulus of the structural offset feature vector is 0.2795 and the angle is 63.4 degrees, the system arranges these data in order to construct a vector of dimension 5: 120, 60, 2.0, 0.2795, 63.4. After normalization, an initial feature vector with values ​​between 0 and 1 is generated, such as 0.8, 0.4, 0.5, 0.1, 0.35. This vector comprehensively represents the morphological features of the current sample.

[0031] The projection component calculation submodule, based on the initial feature vector and combined with the preset genus-level phenotypic prototype vector, performs vector dot product operation, analyzes the directional similarity between the two, calculates the orthogonal projection component of the initial feature vector in the direction of the prototype vector, quantifies the intensity value of the genus-level common features, and obtains common projection component data. Access the nematode taxonomy feature database, retrieve historical confirmed sample data matching the current identification task, calculate the statistical average values ​​of these samples in each feature dimension, and reorganize the statistical average values ​​according to the dimensional order to construct the genus-level phenotypic prototype vector. Then, establish a dimensional traversal index for the feature space, read the feature values ​​of the initial feature vector and the standard baseline values ​​of the genus-level phenotypic prototype vector item by item according to the index, perform multiplication operations to obtain the single-dimensional co-response values, and accumulate them to generate the total unnormalized vector inner product. At the same time, calculate the norm of the two vectors, that is, the arithmetic square root of the sum of the squares of the values ​​in each dimension. Use the product of the two norms as the space normalization factor, and calculate the cosine similarity coefficient by dividing the total vector inner product by the space normalization factor. This coefficient is directly defined as a quantitative index characterizing the directional consistency between the initial feature vector and the genus-level phenotypic prototype vector in the multidimensional feature space. For example, as shown in Table 2, if the initial feature vectors are 1 and 2, the genus-level phenotypic prototype vectors are 2 and 1, the total inner product calculated by the system is 1 multiplied by 2 plus 2 multiplied by 1, which equals 4. The norm of the sample vector is √5, approximately 2.236, the norm of the prototype vector is also 2.236, the spatial normalization factor is 5, and the final calculated cosine similarity coefficient is 4 divided by 5, which equals 0.8, indicating that the two have a high degree of consistency in the feature direction.

[0032] Table 2 Example Data Table for Vector Projection Calculation

[0033] Table 2 shows the intermediate data in the calculation process. The system calculates the similarity based on the cumulative result of 1.255 and the norm product.

[0034] The residual vector acquisition submodule calls the initial feature vector and common projection component data, maps the projection component data back to the feature space, constructs the common feature vector, performs vector subtraction operation in the feature space, removes the common feature vector from the data dimension of the initial feature vector, and obtains the specific residual vector. First, the cosine similarity coefficient is used as a scalar strength factor and multiplied by the normalized genus-level phenotypic prototype vector. Alternatively, the projection formula can be used directly, where the projected component equals the total inner product divided by the square of the prototype vector norm and then multiplied by the prototype vector. This maps the projected component data back to the feature space, constructing a common feature vector with dimensions completely consistent with the initial feature vector. This vector represents the general feature part of the sample that belongs only to the "genus" level. Then, a dimension-wise vector subtraction operation is performed in the feature space, subtracting the value of the corresponding dimension of the common feature vector from the data dimension of the initial feature vector to eliminate the interference of common features. The remaining difference vector is the specific residual vector. For example, if the initial feature vector is 3, 4, the genus-level phenotypic prototype vector is 1, 0, the calculated projection component data (i.e., the projection length in the prototype direction) is 3, the common feature vector constructed by mapping back to the feature space is 3, 0, and the subtraction operation is performed, 3 minus 3 equals 0, 4 minus 0 equals 4, and the obtained specific residual vector is 0, 4. This vector clearly reveals the unique variation of the sample in the direction perpendicular to the common feature, that is, the vertical specificity.

[0035] Specifically, such as Figure 2 , 6 As shown, note that the weighting module includes: The gradient weight calculation submodule performs multi-layer convolution and global pooling operations on the target organ image data to generate multi-channel microscopic feature maps and temporary class activation data. It calculates the gradient values ​​of the activation data relative to the microscopic feature maps, performs global average pooling on the gradient values, calculates the average gradient response of each channel, and obtains the channel weight coefficients. A deep convolutional neural network containing multiple convolutional layers, batch normalization layers, and ReLU activation functions is constructed. The specific structure includes an input layer, five consecutive residual convolutional blocks, and a global average pooling layer at the end. The system inputs the target organ image data into the network to generate a multi-channel microscopic feature map, typically with 512 channels, and corresponding temporary class activation data. Then, the backpropagation algorithm is used to calculate the gradient value of the temporary class activation data relative to the last layer of microscopic feature map. This gradient value reflects the sensitivity of each pixel in the feature map to the final classification result. Global average pooling is performed on the gradient values, that is, the average of all gradient values ​​in each channel is calculated, and the average gradient response of each channel is calculated. Finally, a channel weight coefficient vector with a length equal to the number of channels is obtained. For example, when processing an image of a nematode's head, the network generates 512 7x7 feature maps. The system calculates the gradient of the classification score with respect to these 512 feature maps. If the average gradient of channel 35 is 0.8 and the average gradient of channel 40 is 0.01, it indicates that the texture features extracted from channel 35 are crucial to the current classification. The system uses 0.8 as the weight coefficient for channel 35 for subsequent weighted stacking.

[0036] The diagnostic region localization submodule calls the channel weight coefficients and microscopic feature maps, performs a linear weighted superposition operation on each channel of the feature map, filters out the data range in the superposition results whose response intensity exceeds the preset reference standard, maps the data range to the original image coordinate system, defines the geometric range covered by the high response coordinates, and uses it as the diagnostic feature region. The system uses weighted feature maps to locate diagnostically significant anatomical regions. It then performs a linear weighted superposition of the microscopic feature maps and channel weight coefficients, multiplying each channel's feature map by its corresponding weight coefficient and summing the results to obtain a single-channel heatmap. The system iterates through the activation intensity values ​​of all pixels within the heatmap matrix, calculating the arithmetic mean and standard deviation of all activation intensity values. This arithmetic mean and standard deviation are then superimposed to construct an adaptive activation screening threshold, which serves as a preset reference standard. Finally, the activation intensity value of each pixel in the superimposed result is compared to this threshold. The system compares and selects target pixels with activation intensities greater than a threshold. It then extracts the row and column indices of these pixels in the matrix to generate a high-response feature index set. Subsequently, it calls the original resolution parameters (e.g., 2048x2048) and feature layer resolution parameters (e.g., 7x7) of the target organ image data, calculates the horizontal and vertical scaling ratios (e.g., 292.5 times), and performs a multiplicative amplification transformation on the index set using spatial mapping projection coefficients to map the coordinates back to the original image coordinate system. It then statistically analyzes the extreme values ​​of the projected coordinate points in the original image and constructs a minimum bounding rectangle. The area covered by this rectangle is defined as the diagnostic trait region. For example, if the heatmap mean is 0.3 and the standard deviation is 0.1, the adaptive threshold is 0.4. The system selects all regions greater than 0.4, finding that they correspond to the stylet of the nematode in the original image. Therefore, the rectangular region containing the stylet is defined as the diagnostic trait region.

[0037] The attention weight allocation submodule calculates the average activation amplitude of each feature channel within the diagnostic trait region, constructs the response intensity level, calls the specific residual vector, establishes a mapping transformation matrix between the number of feature channels and the number of vector dimensions, and allocates the mapped and transformed numerical weights according to the response intensity level as each dimension of the vector to obtain the attention weight coefficient. Based on the diagnostic trait region, the corresponding region is cropped from the original multi-channel microscopic feature map, and the average activation amplitude of each feature channel within this region is calculated to obtain a high-dimensional (e.g., 512-dimensional) activation intensity vector. To solve the dimension mismatch problem, the system pre-establishes a mapping transformation matrix between the number of feature channels (e.g., 512) and the dimension of the specific residual vector (e.g., 10). This matrix is ​​usually composed of the weight parameters of the fully connected layer. The system calls the specific residual vector, multiplies the high-dimensional activation intensity vector by the mapping transformation matrix, performs a dimension reduction transformation, and obtains a weight vector with the same dimension as the residual vector. Then, the response intensity level is constructed according to the magnitude of the transformed values, and corresponding numerical weights are assigned to each dimension of the specific residual vector to obtain the attention weight coefficients. For example, if the channel activation vector, after matrix transformation, has a mapping value of 0.9 for the dimension of "aspect ratio" and 0.2 for the dimension of "offset angle", the system will assign a high weight of 0.9 to the "aspect ratio" dimension and a low weight of 0.2 to the "offset angle" dimension in the residual vector. This means that in the current diagnostic region (such as a needle), the aspect ratio feature of the geometric shape is more indicative of classification than the internal offset feature.

[0038] Specifically, such as Figure 2 , 7 As shown, the identification decision module includes: The differential data calculation submodule calls the specific residual vector, retrieves the reference residual vector of the known nematode species in the database, performs a dimension-by-dimensional subtraction operation between the test vector and the reference residual vector in the feature space, calculates the numerical deviation between the test sample and the reference standard in each feature channel, and obtains the dimensional difference data. The system invokes the decoupled specific residual vector and simultaneously accesses the nematode classification database to retrieve pre-stored reference residual vectors for known nematode species (such as *Caenorhabditis elegans* and *Caenorhabditis elegans*). Each reference vector is a standard template generated through statistical analysis of a large number of confirmatory samples. The system performs a dimension-wise subtraction operation between the specific residual vector of the test sample and each reference residual vector in the feature space, calculating the numerical deviation between the test sample and the reference standard in each feature channel, generating a series of dimensional difference data. For example, if the specific residual vector of the test sample is 0.1, 0.5, and the reference residual vector for a certain species in the database is 0.12, 0.48, the system performs a subtraction operation. The deviation in the first dimension is 0.1 minus 0.12, which equals -0.02, and the deviation in the second dimension is 0.5 minus 0.48, which equals 0.02. These tiny numerical deviations accurately record the subtle differences between the test individual and the standard species.

[0039] The weighted distance calculation submodule performs a square operation on the deviation values ​​of each dimension based on the dimensional difference data, calls the attention weight coefficient to perform weighted multiplication on the squared difference values, accumulates the weighted calculation results of all dimensions and performs a square root operation on the sum to obtain the anisotropic weighted distance; The system uses difference data and attention weights to measure similarity. Based on the acquired dimensional difference data, the system performs a square operation on the deviation value of each dimension to eliminate the influence of sign and amplify larger deviations. Then, it calls the attention weight coefficients generated by the attention weight allocation submodule to perform weighted multiplication on the squared difference values. That is, for each dimension, its squared difference is multiplied by the corresponding attention weight. The core of this step is to make the feature dimensions with high diagnostic value (high weight) dominate the distance calculation. Finally, the system accumulates the weighted calculation results of all dimensions and performs a square root operation on the sum to obtain the anisotropic weighted distance. For example, continuing the previous example, with differences of 0.0004 and 0.0004 respectively, if the attention weight of the first dimension is 0.9 and the attention weight of the second dimension is 0.2, the weighted results are 0.0004 multiplied by 0.9 equals 0.00036 and 0.0004 multiplied by 0.2 equals 0.00008, respectively. The sum is 0.00044, and the anisotropic weighted distance obtained after square root is approximately 0.021. The smaller this distance value, the higher the similarity between the sample and the reference category.

[0040] The minimum distance determination submodule traverses the numerical sequence of anisotropic weighted distances, retrieves the minimum value in the sequence through numerical comparison, identifies the associated nematode species label and determines the category of the current sample, obtains the classification result, and outputs soil nematode identification information. The system iterates through the anisotropic weighted distance sequence corresponding to all comparison species. This sequence contains distance data between the sample to be tested and all known nematode species in the database. The system performs a numerical comparison operation, retrieves the minimum value in the sequence, and locks the nematode species label associated with the minimum value. A confidence threshold (e.g., 0.1) is set. If the minimum value is less than the threshold, the label is confirmed as the final category of the current sample, and the classification result is obtained and soil nematode identification information including genus name, species name, and confidence level is output. If the minimum value is greater than the threshold, "unclassified" or "approximate species" is output. For example, as shown in Table 3, the system calculates the distance between the sample to be tested and species A to be 0.021, the distance with species B to be 0.15, and the distance with species C to be 0.88. Through comparison, it is found that 0.021 is the minimum value and is lower than the judgment threshold of 0.1 (here it is assumed that the threshold meets the condition, or the system selects the relatively minimum). The system determines that the sample belongs to species A and outputs an identification report.

[0041] Table 3. Distance Comparison Table for Nematode Species Identification

[0042] Table 3 shows the final distance calculation results in the embodiments. The system determines that the sample belongs to category A based on the minimum distance of 0.021.

[0043] Please see Figure 8 The automatic identification method for soil nematodes based on microscopic image features is executed based on the aforementioned automatic identification system for soil nematodes based on microscopic image features, and includes the following steps: S1: Capture samples to obtain two-dimensional digital images, statistically analyze the distribution histogram of pixel gray intensity in the digital images, calculate the inter-class variance and select segmentation reference points, aggregate connected pixels, calculate the second-order geometric moments of pixel distribution and fit the long axis direction to obtain target organ image data. S2: Analyze the target organ image data, calculate the coordinate mean to locate the geometric centroid, use gray-level weighting to locate the gray-level centroid, construct a spatial vector pointing from the geometric centroid to the gray-level centroid, calculate the vector magnitude and angle, and obtain the structural offset feature vector. S3: Analyze the target organ image data, combine it with the structural offset feature vector, construct the initial feature vector, remove the projection component of the initial feature vector on the genus-level prototype, and obtain the specific residual vector; S4: Convolve the target organ image data to generate multi-channel microscopic feature maps and temporary category activation data, calculate the activation data gradient to generate channel weight coefficients, define diagnostic trait regions, and assign attention weight coefficients based on the region amplitude as each dimension of the specific residual vector. S5: Calculate the difference between the specific residual vector and the reference residual vector, combine the attention weight coefficient, calculate the anisotropic weighted distance, and output soil nematode identification information.

[0044] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. An automatic identification system for soil nematodes based on microscopic image features, characterized in that, The system includes: The image acquisition module captures samples to obtain two-dimensional digital images, statistically analyzes the distribution histogram of pixel grayscale intensity in the digital images, calculates the inter-class variance and selects segmentation reference points, aggregates connected pixels, calculates the second-order geometric moments of pixel distribution and fits the major axis direction, and obtains target organ image data. The structural characterization module analyzes the body length, body width, body shape, body surface features and target organ image data, including mouthpiece, esophagus type, reproductive system and tail, calculates the coordinate mean to locate the geometric centroid, uses gray-level weighting to locate the gray-level centroid, constructs a spatial vector pointing from the geometric centroid to the gray-level centroid, calculates the vector magnitude and the included angle, and obtains the structural offset feature vector. The feature decoupling module parses the target organ image data, combines it with the structural offset feature vector to construct an initial feature vector, removes the projection component of the initial feature vector at the family / genus level prototype, and obtains the specific residual vector. Attention weighting module: convolves the target organ image data to generate multi-channel microscopic feature maps and temporary category activation data, calculates the channel weight coefficients of the activation data gradient, defines the diagnostic trait region, and assigns attention weight coefficients to each dimension of the specific residual vector based on the region amplitude. The identification decision module calculates the difference between the specific residual vector and the reference residual vector, and calculates the anisotropic weighted distance by combining the attention weight coefficient, and outputs soil nematode identification information.

2. The automatic soil nematode identification system based on microscopic image features according to claim 1, characterized in that, The target organ image data includes an organ region pixel coordinate matrix, a gray-level intensity distribution matrix, and a region boundary mask index. The structural offset feature vector specifically includes the internal density distribution non-uniformity modulus, centroid spatial offset angle, and geometric gray-level center distance value. The specific residual vector includes family / genus-level prototype orthogonal components, interspecific morphological difference values, and residuals of de-common feature dimensions. The attention weight coefficient specifically refers to the diagnostic trait region significance factor, feature channel activation priority value, and dimension-specific contribution ratio. The soil nematode identification information includes the nematode species taxonomic name, identification confidence probability value, and relationship matching score.

3. The automatic soil nematode identification system based on microscopic image features according to claim 1, characterized in that, The image acquisition module includes: The histogram statistics point selection submodule uses an optical microscope to photograph glass slide samples, acquires two-dimensional digital images, constructs a histogram of pixel gray intensity distribution, calculates the inter-class variance data of the foreground and background based on the gray level sequence, compares the variance values ​​at different positions, retrieves the maximum peak value in the sequence, locks the threshold data corresponding to the peak value, and obtains gray level segmentation reference points. The neighborhood determination and marking submodule traverses the pixel nodes of the two-dimensional digital image to extract gray values, compares the gray values ​​with the gray value segmentation reference points, traverses the pixel matrix to determine the connection relationship between the current pixel and its eight neighboring pixels, assigns a unique identifier, and aggregates adjacent and continuous pixel data to generate a connected aggregated pixel set. The regional information integration submodule traverses the spatial distribution of pixels based on the connected aggregated pixel set, calculates the second-order central moments of pixel coordinates within the set, analyzes the principal direction of the regional distribution, obtains the principal axis vector of the nematode body, scans the outermost edge pixels of the set, records the row and column index data of the edge pixels in the matrix coordinate system, defines the clipping range based on the extreme values ​​of the index data, extracts the position coordinate data and corresponding illumination intensity values ​​within the range, and obtains the target organ image data.

4. The automatic soil nematode identification system based on microscopic image features according to claim 3, characterized in that, The structural characterization module includes: The geometric centroid localization submodule parses the target organ image data, traverses each pixel in the target area, extracts the row and column coordinate indices, counts the total number of pixels, performs cumulative summation on the row and column coordinates respectively, calculates the arithmetic mean result and locates the geometric centroid, and obtains the geometric centroid coordinates of the region. The gray-scale centroid calculation submodule extracts the gray-scale intensity values ​​of each pixel in the target organ image data based on the geometric centroid coordinates of the region. It uses the gray-scale intensity values ​​as weighting coefficients to perform a weighted average calculation on the pixel coordinates to locate the gray-scale centroid position of the region. It then spatially pairs and integrates the coordinate information of the gray-scale centroid and the geometric centroid to obtain dual centroid positioning data. The offset feature calculation submodule calls the dual centroid positioning data to construct a two-dimensional spatial displacement vector pointing from the geometric centroid to the gray-scale centroid. It uses coordinate difference calculation to solve the Euclidean distance modulus of the vector, introduces the nematode body principal axis direction vector as a reference, calculates the deflection angle of the displacement vector relative to the principal axis direction, integrates the modulus and angle data, and obtains the structural offset feature vector.

5. The automatic soil nematode identification system based on microscopic image features according to claim 4, characterized in that, The feature decoupling module includes: The geometric feature splicing submodule parses the target organ image data, scans the extreme value data of edge pixel coordinates, calculates the length and width geometric parameters of the target region, calls the structural offset feature vector, splices and recombines the length and width geometric parameters with the vector in terms of numerical dimensions, and constructs an initial feature vector containing external contour and internal deformation information. The projection component calculation submodule, based on the initial feature vector and combined with the preset family / genus-level phenotypic prototype vector, performs vector dot product operation, analyzes the directional similarity between the two, calculates the orthogonal projection component of the initial feature vector in the direction of the prototype vector, quantifies the intensity value of the common features at the genus level, and obtains common projection component data. The residual vector acquisition submodule calls the initial feature vector and the common projection component data, maps the projection component data back to the feature space, constructs a common feature vector, performs vector subtraction operation in the feature space, removes the common feature vector from the data dimension of the initial feature vector, and obtains the specific residual vector.

6. The automatic soil nematode identification system based on microscopic image features according to claim 5, characterized in that, The process of combining preset family / genus-level phenotypic prototype vectors, performing vector dot product operations, and analyzing the directional similarity between the two is specifically as follows: Access the nematode taxonomy feature database, retrieve historical confirmed sample data that matches the current identification task, calculate the statistical average value of the historical confirmed sample data on each feature dimension, and reorganize the statistical average value according to the dimension order to construct the family / genus level phenotypic prototype vector; Establish a dimensional traversal index for the feature space, read the feature values ​​of the initial feature vector item by item according to the dimensional traversal index, and simultaneously read the standard baseline values ​​of the family / genus-level phenotypic prototype vector at the same dimensional index position. The feature values ​​of the initial feature vector are multiplied by the standard baseline values ​​of the family / genus level phenotypic prototype vector to obtain the single-dimensional collaborative response value. The single-dimensional collaborative response values ​​generated in all dimensions are then summed to generate the total unnormalized vector inner product. The sum of squares of the values ​​of each dimension is calculated for the initial feature vector, and the arithmetic square root is processed on the calculation result to obtain the sample vector norm. The sum of squares of the values ​​of each dimension is calculated for the family / genus-level phenotypic prototype vector, and the arithmetic square root is processed on the calculation result to obtain the prototype vector norm. Multiply the norm of the sample vector with the norm of the prototype vector to construct a spatial normalization factor. Then, use the spatial normalization factor to perform a division operation on the total inner product of the vectors to obtain the cosine similarity coefficient. The cosine similarity coefficient is determined as a quantitative index that characterizes the directional consistency between the initial feature vector and the family / genus-level phenotypic prototype vector in the multidimensional feature space.

7. The automatic soil nematode identification system based on microscopic image features according to claim 5, characterized in that, The attention-weighting module includes: The gradient weight calculation submodule performs multi-layer convolution and global pooling operations on the target organ image data to generate multi-channel microscopic feature maps and temporary category activation data. It calculates the gradient values ​​of the activation data relative to the microscopic feature maps, performs global average pooling on the gradient values, calculates the average gradient response of each channel, and obtains the channel weight coefficients. The diagnostic region localization submodule calls the channel weight coefficients and the microscopic feature map, performs a linear weighted superposition operation on each channel of the feature map, filters out the data range in the superposition result whose response intensity exceeds the preset reference standard, maps the data range to the original image coordinate system, defines the geometric range covered by the high response coordinates, and uses it as the diagnostic morphology region. The attention weight allocation submodule calculates the average activation amplitude of each feature channel within the diagnostic trait region, constructs the response intensity level, calls the specific residual vector, establishes a mapping transformation matrix between the number of feature channels and the number of vector dimensions, allocates the mapped and transformed numerical weights according to the response intensity level as the vector dimension, and obtains the attention weight coefficients.

8. The automatic soil nematode identification system based on microscopic image features according to claim 7, characterized in that, The process of mapping the data range whose response intensity exceeds the preset reference standard in the filtering and overlay results, and defining the geometric range covered by the high response coordinates, is as follows: The numerical matrix contained in the superposition result is analyzed, the activation intensity values ​​of all pixels in the matrix are traversed, the arithmetic mean and standard deviation of all activation intensity values ​​are calculated, the arithmetic mean and standard deviation are superimposed by the addition operation, and an adaptive activation filtering threshold is constructed as the preset reference standard. The activation intensity value of each pixel in the superposition result is compared with the adaptive activation filtering threshold. Target pixels with activation intensity values ​​greater than the adaptive activation filtering threshold are filtered out. The row index data and column index data of the target pixels in the matrix are extracted to generate a high-response feature index set. The image resolution attribute contained in the target organ image data is used as the original size parameter, the feature layer resolution attribute of the microscopic feature map is extracted as the feature size parameter, and the original size parameter is divided by the feature size parameter to calculate the horizontal scaling ratio and vertical scaling ratio of the image space size, and obtain the spatial mapping projection coefficient. Based on the spatial mapping projection coefficients, perform a multiplication amplification transformation on the row index data and column index data in the high-response feature index set to restore the discrete coordinates of the feature layer to the original image coordinate system and obtain the original image projection coordinate points; The extreme values ​​of the original image projection coordinates in the horizontal and vertical directions are statistically analyzed. A minimum bounding geometric rectangle containing all projection coordinates is constructed, and the pixel area covered by the minimum bounding geometric rectangle is defined as the diagnostic morphology region.

9. The automatic soil nematode identification system based on microscopic image features according to claim 7, characterized in that, The identification decision module includes: The difference data calculation submodule calls the specific residual vector, retrieves the reference residual vector of the known nematode species pre-stored in the database, performs a dimension-by-dimensional subtraction operation between the test vector and the reference residual vector in the feature space, calculates the numerical deviation between the test sample and the reference standard in each feature channel, and obtains the dimensional difference data. The weighted distance calculation submodule performs a square operation on the deviation values ​​of each dimension based on the dimensional difference data, calls the attention weight coefficient to perform a weighted multiplication on the squared difference values, accumulates the weighted calculation results of all dimensions, and performs a square root operation on the sum to obtain the anisotropic weighted distance. The minimum distance determination submodule traverses the numerical sequence of the anisotropic weighted distance, retrieves the minimum value in the sequence through numerical comparison, identifies the associated nematode species label and determines it as the category of the current sample, obtains the classification result, and outputs soil nematode identification information.

10. An automatic identification method for soil nematodes based on microscopic image features, characterized in that, The automatic soil nematode identification system based on microscopic image features according to any one of claims 1-9 includes the following steps: S1: Capture samples to obtain two-dimensional digital images, statistically analyze the distribution histogram of pixel gray intensity in the digital images, calculate the inter-class variance and select segmentation reference points, aggregate connected pixels, calculate the second-order geometric moments of pixel distribution and fit the long axis direction to obtain target organ image data. S2: Analyze the target organ image data, calculate the coordinate mean to locate the geometric centroid, use gray-level weighting to locate the gray-level centroid, construct a spatial vector pointing from the geometric centroid to the gray-level centroid, calculate the vector magnitude and the included angle, and obtain the structural offset feature vector. S3: Analyze the target organ image data, combine it with the structural offset feature vector, construct an initial feature vector, remove the projection component of the initial feature vector at the family / genus level prototype, and obtain the specific residual vector; S4: Convolve the target organ image data to generate multi-channel microscopic feature maps and temporary category activation data, calculate the channel weight coefficients of the activation data gradient, define the diagnostic trait region, and assign attention weight coefficients to each dimension of the specific residual vector based on the region amplitude. S5: Calculate the difference between the specific residual vector and the reference residual vector, combine the attention weight coefficient, calculate the anisotropic weighted distance, and output soil nematode identification information.