Edible mushroom high-throughput phenotype identification method, device and equipment based on artificial intelligence

By collecting two-dimensional images and three-dimensional coordinate datasets of edible fungi, preprocessing and image segmentation were performed to extract color and texture features, construct relevant feature matrices, and generate comprehensive high-dimensional features by fusing the three-dimensional coordinate datasets. This solved the problem of insufficient three-dimensional features for two-dimensional image recognition of edible fungi under photosensitive cultivation conditions, and enabled accurate identification of pedigree and internal state discrimination of edible fungi.

CN122067010APending Publication Date: 2026-05-19WUHAN GOOALGENE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN GOOALGENE TECH CO LTD
Filing Date
2026-01-31
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies lack sufficient two-dimensional image recognition for stereo features in light-sensitive cultivation environments for edible fungi, resulting in low accuracy in modal detection.

Method used

A high-throughput phenotypic identification method for edible fungi based on artificial intelligence was adopted. By collecting two-dimensional images and three-dimensional coordinate datasets of edible fungi, preprocessing and image segmentation were performed to extract color and texture features and construct relevant feature matrices. The three-dimensional coordinate dataset was used as the query vector and the two-dimensional phenotypic features were used as the key vector. The attention weight map was generated by normalization using the Softmax function to achieve the fusion of two-dimensional contour features and three-dimensional coordinate datasets. Finally, a comprehensive high-dimensional feature was generated and combined with a deep learning model to complete the identification of edible fungi species.

Benefits of technology

This method enables accurate identification of edible fungi phenotypes under photosensitive conditions, adapts to the detection requirements of photosensitive cultivation environments for edible fungi, improves the accuracy of detection modalities, and can determine the internal state of edible fungi.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122067010A_ABST
    Figure CN122067010A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of edible mushroom cultivation, and provides an artificial intelligence-based edible mushroom high-throughput phenotype identification method, which comprises the following steps of: acquiring a two-dimensional image and a three-dimensional coordinate data set of edible mushrooms; performing preprocessing and image segmentation on the two-dimensional image to generate two-dimensional contour features of the edible mushrooms; extracting color and texture features of the edible mushrooms from the two-dimensional contour features of the edible mushrooms, and constructing a related feature matrix to associate the two-dimensional contour features of the edible mushrooms with the three-dimensional coordinate data set; taking the three-dimensional coordinate data set as a query vector, taking the two-dimensional phenotypic feature as a key vector and a value vector, calculating the similarity of the query vector and the key vector, carrying out Softmax function normalization, generating an attention weight map, fusing the two-dimensional contour feature and the three-dimensional coordinate data set, and generating a comprehensive high-dimensional feature; and constructing an identification model, and inputting comprehensive high-dimensional image features to complete edible mushroom variety identification. According to the method, the features in the two-dimensional image are combined with the three-dimensional coordinate data set, so that accurate identification of the phenotype of the edible fungi is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of edible fungi cultivation technology, and in particular to a high-throughput phenotypic identification method, apparatus and equipment for edible fungi based on artificial intelligence. Background Technology

[0002] Edible fungi, as a high-protein, low-fat, high-quality food, are experiencing continuous market demand growth, driving the cultivation industry towards large-scale and precision manufacturing. With the development of artificial intelligence, computer vision technology has been widely applied and developed. Therefore, in the edible fungi cultivation process, identifying the species of edible fungi and monitoring their growth status are crucial steps to ensure cultivation efficiency and product quality.

[0003] Currently, machine vision technology can achieve automated identification by acquiring two-dimensional images, extracting surface features, and combining them with machine learning models to complete classification, thus realizing the automatic identification of edible fungi phenotypes. However, there is a core technical bottleneck in the cultivation of edible fungi: most edible fungi have photophobic growth characteristics, and the cultivation environment needs to be kept in low light or dark conditions to avoid light inhibiting mycelial growth and affecting fruiting body development. Therefore, this environmental factor leads to problems such as low contrast and blurred details when acquiring two-dimensional images, resulting in inaccurate extraction of surface color, texture, and other features.

[0004] Therefore, a high-throughput phenotypic identification method, device, and equipment based on artificial intelligence are proposed to solve the technical problem of low detection modality accuracy caused by insufficient stereoscopic features in two-dimensional image recognition under photosensitive cultivation environment of edible fungi. Summary of the Invention

[0005] In view of this, the present invention proposes a high-throughput phenotypic identification method, device and equipment for edible fungi based on artificial intelligence, which solves the technical problem of low detection modality accuracy caused by insufficient stereoscopic features in two-dimensional image recognition under light-sensitive cultivation environment of edible fungi.

[0006] This invention proposes a high-throughput phenotypic identification method for edible fungi based on artificial intelligence, comprising: S1: Collect two-dimensional images and three-dimensional coordinate datasets of edible fungi; S2: Preprocess and segment the two-dimensional image to generate two-dimensional contour features of edible fungi; S3: Extract the color and texture features of the edible fungi from the two-dimensional contour features of the edible fungi, and construct a related feature matrix to associate the two-dimensional contour features of the edible fungi with the three-dimensional coordinate dataset; Using a three-dimensional coordinate dataset as the query vector and two-dimensional phenotypic features as the key and value vectors, an attention weight map is generated by calculating the similarity between the query vector and the key vector and normalizing it using the Softmax function. This achieves the fusion of the two-dimensional contour features and the three-dimensional coordinate dataset, ultimately generating a comprehensive high-dimensional feature. S4: Construct an identification model and input the comprehensive high-dimensional image features to complete the identification of edible fungi species.

[0007] Based on the above technical solution, preferably, in step S2: The preprocessing specifically involves: using a filter kernel and Gaussian filtering algorithm to denoise the two-dimensional image, correcting illumination differences through grayscale histogram equalization, scaling the image to a predetermined pixel size, and using bilinear interpolation to maintain image resolution.

[0008] Based on the above technical solution, preferably, in step S3, The color features are extracted from the red-green-blue color space to the hue-saturation-brightness color space. The features include three color feature vectors: hue, saturation, and brightness. The relevant feature matrix is ​​the Pearson correlation coefficient matrix.

[0009] Based on the above technical solution, preferably, the cross-modal matching is calibrated using three-dimensional coordinates: the coordinate sequence of contour points corresponding to the two-dimensional contour features is projected onto the three-dimensional ultrasound point cloud space, so that the center of the two-dimensional contour coincides with the geometric center of the three-dimensional ultrasound point cloud, and the matching degree is calculated using a cosine similarity algorithm; it also includes a graded processing step for mismatch in overlap degree, specifically: A threshold for interval matching is set. If the calculated matching degree is greater than or equal to the interval matching degree threshold, the overlap of the two-modal data is determined to be matched, and the process proceeds to the subsequent feature fusion stage. If the matching degree falls within the interval matching degree threshold, the two-dimensional contour coordinate sequence is rotated and the matching degree is verified. If the calculated matching degree is lower than the interval matching degree threshold, the sample is marked as an invalid sample and excluded from the subsequent process to ensure the consistency of different modal data.

[0010] Based on the above technical solution, preferably, in step S3, the similarity between the query vector and the key vector is calculated by the cosine similarity algorithm, and a dynamic deviation compensation coefficient is introduced, which is adaptively adjusted according to the specific type of edible fungus.

[0011] Based on the above technical solution, preferably, in step S3, a relevant feature matrix is ​​introduced to reflect the overall correlation between two-dimensional surface features and three-dimensional features, and a dynamic deviation compensation coefficient is introduced, which is adaptively adjusted according to the specific type of edible fungus.

[0012] Based on the above technical solution, preferably, step S5 is also included: To determine the internal state of edible fungi, the following steps are taken: Two-dimensional contour features are retrieved, surface morphology features are extracted, and contour convexity, surface flatness, and local depressions are analyzed. Areas with abnormal depressions or irregular contours are marked as suspected hollow areas. The three-dimensional coordinate dataset of the suspected hollow associated areas is extracted, and the standard three-dimensional coordinate dataset of normal edible fungi in the database is set as the standard threshold. The internal state of edible fungi is determined based on the relationship between the three-dimensional coordinate dataset of the suspected hollow associated areas and the standard threshold.

[0013] Based on the above technical solution, preferably, when judging the internal state of edible fungi, the volume of the hollow region is used to calculate the ratio of the volume of the hollow region to the total volume of the edible fungi using a voxel counting algorithm.

[0014] On the other hand, the present invention also provides an artificial intelligence-based high-throughput phenotyping device for edible fungi, which applies the aforementioned artificial intelligence-based high-throughput phenotyping method for edible fungi, including: The data acquisition module is used to acquire two-dimensional images and three-dimensional coordinate datasets of edible fungi. The data acquisition module includes an image acquisition unit and an ultrasonic acquisition unit. The image acquisition unit is used to acquire multi-angle two-dimensional images of edible fungi, and the ultrasonic acquisition unit is used to detect the internal structure of edible fungi and generate a three-dimensional coordinate dataset. The image processing module is connected to the data acquisition module and is used to preprocess the two-dimensional image, segment the image and extract features to generate two-dimensional contour features of edible fungi. At the same time, it extracts the surface morphology features from the two-dimensional contour features and performs cross-modal matching between the two-dimensional contour features and the three-dimensional coordinate dataset. Based on the attention mechanism, it adaptively calculates the fusion weight, performs weighted correction and fusion on the two types of features, and generates comprehensive high-dimensional features. The deep learning identification module is connected to the image processing module and is used to receive the comprehensive high-dimensional features, complete the identification of edible fungi species through a preset deep learning model, and output the species identification results and confidence levels.

[0015] On the other hand, the present invention also provides an electronic device, including a processor and a memory; the memory has a stored computer program, wherein the computer program, when executed by the processor, implements the aforementioned artificial intelligence-based high-throughput phenotypic identification method for edible fungi.

[0016] The artificial intelligence-based high-throughput phenotypic identification method, apparatus, and equipment for edible fungi provided by this invention have the following advantages compared to existing technologies: 1. Ultrasonic waves are not limited by lighting conditions and can detect the external contours of edible fungi. The three-dimensional coordinate dataset can accurately reflect the three-dimensional morphological characteristics of objects and will not have an adverse effect on the growth of edible fungi. It can adapt to the detection needs of edible fungi cultivation environment that is sensitive to light. Furthermore, by combining the features in the two-dimensional image with the three-dimensional coordinate dataset, accurate comprehensive high-dimensional features can be constructed to achieve accurate identification of edible fungi phenotypes and meet the needs of automated industry. 2. Project the coordinate sequence of contour points corresponding to the two-dimensional contour features onto the three-dimensional ultrasonic point cloud space, so that the center of the two-dimensional contour coincides with the geometric center of the three-dimensional ultrasonic point cloud, and use the cosine similarity algorithm to calculate the matching degree to ensure the consistency of cross-modal data. 3. Determine the internal state of edible fungi. By retrieving two-dimensional contour features, extract surface morphology features, analyze contour convexity, surface flatness, and local depressions, and mark areas with abnormal depressions or irregular contours as suspected hollow areas. Extract the three-dimensional coordinate dataset of the suspected hollow related areas, and set the standard three-dimensional coordinate dataset of normal edible fungi in the database as the threshold. Determine the internal state of edible fungi based on the relationship between the three-dimensional coordinate dataset of the suspected hollow related areas and the threshold. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art 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.

[0018] Figure 1 This is a flowchart of a high-throughput phenotypic identification method for edible fungi based on artificial intelligence, according to the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0020] In the description of the embodiments of the present invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "connected" and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in the embodiments of the present invention based on the specific circumstances.

[0021] In the description of the embodiments of the present invention, it should be noted that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", and "outer" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of the present invention.

[0022] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0023] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0024] The following disclosure provides numerous different embodiments or examples for implementing various structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed. Additionally, examples of various specific processes and materials are provided in this invention; however, those skilled in the art will recognize the applicability of other processes and / or the use of other materials.

[0025] The technical solution was explained in detail. Most edible fungi have photophobic growth characteristics and the cultivation environment needs to be kept in a low light or dark environment to avoid light inhibiting mycelial growth and affecting fruiting body development. Therefore, this environmental factor leads to problems such as low contrast and blurred details when acquiring existing two-dimensional images, resulting in inaccurate extraction of surface color, texture and other features.

[0026] like Figure 1 As shown, this invention provides a high-throughput phenotypic identification method for edible fungi based on artificial intelligence, comprising: S1: Collect two-dimensional images and three-dimensional coordinate datasets of edible fungi; S2: Preprocess and segment the two-dimensional image to generate two-dimensional contour features of edible fungi; S3: Perform cross-modal matching on the two-dimensional contour features and three-dimensional coordinate dataset of the edible fungi, and adaptively calculate the fusion weights based on the attention mechanism. Then, perform weighted correction and fusion on the two types of parameters to generate a comprehensive high-dimensional feature; wherein: S31: The cross-modal matching includes: extracting the color and texture features of the edible fungus from the two-dimensional contour features of the edible fungus, and constructing a related feature matrix to associate the two-dimensional contour features of the edible fungus with the three-dimensional coordinate dataset; S32: The adaptive calculation of attention weights and fusion specifically includes: based on the cross-modal matching results, using the three-dimensional coordinate dataset as the query vector and the two-dimensional phenotypic features as the key vector and value vector, by calculating the similarity between the query vector and the key vector and normalizing it through the Softmax function, an attention weight map is generated, thereby realizing the fusion of the two-dimensional contour features and the three-dimensional coordinate dataset, and finally generating a comprehensive high-dimensional feature; S4: Input the comprehensive high-dimensional image features and complete the identification of edible fungi species through a deep learning identification model.

[0027] In step S1, a low-light industrial CCD camera, paired with a ring diffuse light source, is used to acquire images from three angles: directly above the sample and on both horizontal sides. Three images are acquired from each angle. After removing blurry and reflective images, clear images are retained as the original two-dimensional image dataset. Simultaneously, a high-frequency ultrasonic scanner is used to perform non-destructive detection on edible fungi in a matrix scanning manner, acquiring parameters such as ultrasonic echo intensity, propagation speed, and attenuation coefficient to generate a three-dimensional coordinate dataset. This dataset is synchronously stored in a data server and associated with the sample identification code. Without damaging the photosensitive growth environment of edible fungi, both two-dimensional images and three-dimensional coordinate datasets of edible fungi are acquired simultaneously, compensating for the lack of single-modal information.

[0028] Ultrasound can detect the external contours of edible fungi without being limited by lighting conditions. The three-dimensional coordinate dataset can accurately reflect the three-dimensional morphological characteristics of objects without adversely affecting the growth of edible fungi. It can adapt to the detection needs of light-sensitive cultivation environments for edible fungi. Furthermore, by combining the features in two-dimensional images with the three-dimensional coordinate dataset, accurate comprehensive high-dimensional features can be constructed to achieve precise identification of edible fungi phenotypes and meet the needs of automated industries.

[0029] In step S2, the preprocessing specifically involves: using a filter kernel and a Gaussian filtering algorithm to denoise the two-dimensional image, correcting illumination differences through grayscale histogram equalization, scaling the image to a predetermined pixel size, and using bilinear interpolation to maintain the image resolution.

[0030] The Gaussian filtering denoising method used here employs a 3×3 filter kernel to suppress image noise in low-light environments. The formula is as follows: ;Formula 1 in, For the filter kernel in coordinates The weight value at that location, The standard deviation is 0.8 to 1.2, and is adaptively adjusted according to the image noise intensity. This formula calculates the weight of each position of the filter kernel using a Gaussian function, performs a weighted average of the image pixels, smooths random noise while preserving edge details, and can solve the problem of obvious image noise in light-sensitive environments, thus improving image clarity.

[0031] During the actual filming process, edible fungi are photographed from different angles. The lighting on the fungi varies depending on the angle, so grayscale histogram equalization is used to correct these lighting differences in images taken from different angles. The formula is as follows: ;Formula 2 in, H′ ( k (This refers to the grayscale levels after equalization) k pixel values, Let i be the number of pixels at gray level i in the original image. N The total number of pixels in the image is given by formula 2. Formula 2 maps the cumulative probability distribution to a uniform distribution by statistically analyzing the grayscale distribution of the original image, expands the dynamic range of grayscale values, makes details in dark areas clearer, eliminates the influence of uneven lighting, and ensures the consistency of color and texture feature extraction.

[0032] The preprocessed image is scaled to a predetermined pixel size, such as 512×512 pixels, and bilinear interpolation is used to maintain resolution, achieving normalization in pixel size, as shown in the following formula: ;Formula 3; in, These are the pixel coordinates of the scaled image. These are the coordinates of four adjacent pixels in the original image. For interpolation coefficients, 0≤u, v≤1; Formula 3 calculates the target pixel value by weighted average of four adjacent pixels, balancing scaling speed and image detail preservation, and unifying the image size of all samples, providing standardized input for subsequent feature extraction.

[0033] In step 31, based on the two-dimensional image obtained in step S2, the color features are converted from the red-green-blue color space to hue, saturation, and brightness; the color features include three feature vectors: hue, saturation, and brightness, and the related feature matrix is ​​the Pearson correlation coefficient matrix.

[0034] Suppose that the red, green, and blue components of a pixel in a two-dimensional image have values ​​ranging from 0 to 255 for red brightness, green brightness, and blue brightness, respectively. First, calculate three key intermediate parameters: Maximum value = max(red brightness, green brightness, blue brightness) Minimum value = min(red brightness, green brightness, blue brightness) Brightness difference = maximum value - minimum value; Wherein, brightness V= saturation = ; Hue (H) basic angle formula: Basic angle = ; Correction rule: If the maximum value = red brightness, the corresponding component difference = green brightness - blue brightness, that is, hue = base angle. If it is negative, add 360°. If the maximum value = green brightness, then the corresponding component difference = blue brightness - red brightness, that is, hue = base angle + 120°; If the maximum value = blue brightness, then the corresponding component difference = red brightness - green brightness, and hue = base angle + 240°; If the brightness difference = 0 (grayscale pixel): hue = 0°, the color types are quantified by angle. For example, red is about 0°, green is about 120°, and blue is about 240°. This can be completely unaffected by light intensity, ensuring that the color differences of edible fungi can still be accurately distinguished under low light.

[0035] The surface texture of edible fungi, such as cap wrinkles, stem patterns, and gill density, is a key feature for distinguishing species. A combination of global and local texture methods is used to ensure comprehensive capture of texture information. Specific steps include: Converting HSV images to grayscale images retains only the luminance channel information. Since luminance is robust to illumination, the grayscale value range is 0-255, laying the foundation for texture extraction. Focusing on the global texture patterns of edible fungi surfaces, parameter settings were adapted to the texture scale of edible fungi: pixel distances of 1 and 2 pixels, and angles of 0°, 45°, 90°, and 135° were selected to cover the texture in all directions. Four feature parameters—contrast, correlation, energy, and uniformity—were extracted, forming 4×2×4=32 GLCM feature vectors. Construct a Pearson correlation coefficient matrix M, and correlate color feature vectors, texture feature vectors, and 3D ultrasound feature vectors. Specifically, it is composed of parameters such as ultrasonic echo intensity, propagation velocity, and attenuation coefficient, and the matrix elements are... Indicates the first The first feature and the second The correlation coefficient of each feature is given by the following formula:

[0036] ;

[0037] Features and covariance, , Features and standard deviation Features , The mean.

[0038] Calculate the linear correlation between two features, with a value ranging from -1 to 1. The closer the absolute value is to 1, the stronger the correlation. Based on the linear correlation between the two features, redundant features can be eliminated. If the correlation coefficient threshold is set to ≥0.85, one of the features is removed, retaining only the effective feature subset. At the same time, the correlation between two-dimensional surface features and three-dimensional ultrasonic features is established, laying the foundation for cross-modal matching.

[0039] The cross-modal matching is calibrated with three-dimensional coordinates: the coordinate sequence of contour points corresponding to the two-dimensional contour features is projected onto the three-dimensional ultrasound point cloud space, so that the center of the two-dimensional contour coincides with the geometric center of the three-dimensional ultrasound point cloud, and the matching degree is calculated by using the cosine similarity algorithm to ensure the consistency of data from different modalities.

[0040] The sequence of contour point coordinates of two-dimensional contour features By projecting onto a 3D ultrasonic point cloud space and aligning the 2D and 3D spaces using coordinate transformation formulas, the goal of adding color and texture to edible fungi onto a colorless 3D coordinate dataset is achieved.

[0041] in, The spatial coordinates of the three-dimensional ultrasonic point cloud. The coordinates of the two-dimensional contour points, k This is a scaling factor, determined based on the ratio of the actual sample size to the image pixels. The coordinates are the geometric center coordinates of the three-dimensional ultrasonic point cloud; after calibration, the center of the two-dimensional contour coincides with the geometric center of the three-dimensional point cloud, and the coordinate deviation is ≤0.1mm.

[0042] The cosine similarity algorithm is used to calculate the effective feature subset in two dimensions. and three-dimensional ultrasound feature vectors The matching degree is calculated using the following formula:

[0043] in, The dot product of two vectors. Given the magnitudes of the two vectors, calculate the cosine of the angle between them, with a value ranging from -1 to 1. The closer the value is to 1, the more consistent the directions of the two vectors are, and the higher the matching degree. Only retain valid pairs with a similarity greater than or equal to 0.7 between the two vectors to ensure that the two-dimensional surface features and the three-dimensional internal features belong to the same edible fungus sample, thus ensuring the consistency of cross-modal data.

[0044] The similarity between the query vector and the key vector is calculated using a cosine similarity algorithm, while a dynamic deviation compensation coefficient is introduced, which is adaptively adjusted according to the specific type of edible fungus.

[0045] Similarity calculation: using three-dimensional ultrasound feature vectors As the query vector Q, a subset of two-dimensional effective features As key vector K and value vector V, the similarity between Q and K is calculated using the cosine similarity algorithm, as shown in the following formula:

[0046] The cosine similarity formula in the above cross-modal matching is used to quantify the correlation between the query vector (3D ultrasound features) and the key vector (2D surface features); determine the correlation between 3D ultrasound features and 2D surface features, and provide a basis for attention weight allocation.

[0047] The specific steps for handling overlap mismatch are as follows: A threshold for interval matching is set. If the calculated matching degree is greater than or equal to the threshold, the bimodal data overlap is considered to be matched, and the process proceeds to the subsequent feature fusion stage. If the matching degree falls within the threshold, rotation correction is performed on the 2D contour coordinate sequence, and the matching degree is verified. If the calculated matching degree is lower than the threshold, the sample is marked as invalid and excluded from subsequent processes to ensure the consistency of data from different modalities. An interval matching degree threshold of 0.5~0.7 is set to identify minor mismatches caused by spatial calibration deviation or feature redundancy, and the following correction operations are performed:

[0048] Coordinate fine-tuning optimization: Perform rigid body transformation (including rotation within ±5°, scaling within 0.9-1.1 times, and small translation within ±2 pixels) on the two-dimensional contour coordinate sequence, recalculate the contour center and perform three-dimensional coordinate calibration, and verify the matching degree again; in this embodiment, if the matching degree is 0.65 after the initial calibration, after rotating the two-dimensional contour by 3° and fine-tuning the translation vector, the matching degree is improved to 0.73, which meets the threshold requirement.

[0049] Feature redundancy removal: Based on the Pearson correlation coefficient matrix, redundant features in the two-dimensional features with a correlation coefficient of less than 0.3 with the three-dimensional ultrasound features (such as high-frequency noise textures and abnormal color features under illumination interference) are removed, thus simplifying the feature set. The matching degree is recalculated after dimensioning to ensure the effectiveness of the feature vector.

[0050] If a severe mismatch occurs, that is, even if the matching degree is <0.5; When the match score is below 0.5, it is determined to be a serious mismatch caused by data acquisition error or sample abnormality, and the following actions are taken: Data acquisition verification and re-acquisition: Check whether there are problems such as sample displacement, two-dimensional image blurring, ultrasound scan offset, environmental interference (such as sudden light changes, uneven application of ultrasound coupling agent) in the sample acquisition process. If it is confirmed that there is an acquisition error, re-execute the data acquisition in step S1, the preprocessing and segmentation in step S2 for the sample, and repeat the coordinate calibration and matching degree verification process of this embodiment.

[0051] Invalid sample labeling and exclusion: If the matching degree is still lower than 0.5 after two resampling and calibration, the sample is labeled as "invalid sample" and excluded from subsequent feature fusion and identification processes to avoid low-quality data interfering with model training and identification accuracy.

[0052] Variety-specific manual verification: For thin-walled hollow varieties such as enoki mushrooms and silver enoki mushrooms, if the matching degree is abnormally low, manual verification is initiated. Combined with the actual morphological characteristics of the sample (such as abnormal ultrasound data caused by hollow stipes) to determine whether it is caused by the inherent characteristics of the variety. If it is confirmed that there is no collection error, the matching degree threshold of the variety can be appropriately lowered (not lower than 0.6) to ensure variety suitability.

[0053] The above-mentioned hierarchical processing strategy can effectively solve the problem of mismatch in overlap, ensure the consistency and effectiveness of cross-modal data, and provide reliable data support for subsequent accurate feature fusion and category identification.

[0054] Softmax normalization generates initial weights: The similarity results are normalized using the Softmax function to generate an attention weight map. W init The formula is as follows:

[0055] Ki For the first i Each key vector (two-dimensional feature) m The number of key vectors. e is a natural constant; the similarity value is mapped to the interval [0,1] and the sum of all weights is 1 to achieve weight normalization; this normalization converts the similarity into attention weights that can be used directly. The larger the weight value, the higher the contribution of the corresponding two-dimensional surface features to the three-dimensional ultrasound features.

[0056] Dynamic deviation compensation coefficient , The dynamic deviation compensation coefficient is adjusted adaptively based on the type of edible fungus. Specifically, it is adjusted according to the solid and dense internal structure of edible fungi. The value is negatively correlated with the two-dimensional and three-dimensional characteristics of the variety; the higher the correlation, the better for solid and dense varieties. The smaller the value, the lower the correlation. The larger the value, the more accurately it compensates for the similarity calculation deviation caused by the variety. For example, if the thick-fleshed type of shiitake mushroom is set to 0.05 and the thin-fleshed type is set to 0.07, it still falls within the corresponding range and meets the adaptive adjustment requirements. The initial weights are adjusted using the following formula; ; ; ; ; in, W1′ The corrected two-dimensional feature weights, W2′ The corrected three-dimensional ultrasound feature weights, M avg For the relevant feature matrix M The average eigenvalues, For matrix MThe eigenvalues; the average eigenvalues ​​of the relevant feature matrix reflect the overall correlation between two-dimensional and three-dimensional features. Combined with a dynamic deviation compensation coefficient, the weights are fine-tuned. If the overall correlation is high, i.e. M avg If the correlation is large, the weight of the two-dimensional feature should be increased appropriately; if the overall correlation is low, the weight of the three-dimensional ultrasound feature should be increased appropriately. This can solve the problem of unreasonable weight allocation caused by the difference in correlation between the two-dimensional and three-dimensional features of different types of edible fungi, and improve the targeting of the fused features.

[0057] The corrected two-dimensional effective feature subset With three-dimensional ultrasound feature vectors By concatenating the components, an initial fused feature vector is obtained. .

[0058] Policy-level fusion: This is achieved through two parallel fully connected layers (each with 256 neurons) to respectively... and Perform feature mapping and output feature confidence scores Score1 (two-dimensional feature confidence) and Score2 (three-dimensional feature confidence), combined with corrected weights. W1′ , W2′ Calculate the final comprehensive high-dimensional features The formula is as follows:

[0059] Where Map() is the feature mapping function of the fully connected layer. , W This is the weight matrix. b For bias terms, φ The ReLU activation function is used. This feature mapping function achieves deep fusion of two-dimensional and three-dimensional features through weighted summation, while also enhancing the expressive power of the features. It integrates two-dimensional surface features and three-dimensional internal features to generate comprehensive high-dimensional features with dimensions of 256-512, taking into account both surface and internal information, and providing comprehensive feature support for accurate identification.

[0060] The deep learning discrimination model uses the Transformer architecture to fuse the two-dimensional phenotypic features of edible fungi with the multimodal features of the three-dimensional coordinate dataset.

[0061] A deep learning identification model is built using the Transformer architecture to achieve multimodal feature fusion and accurate identification of edible fungi species. The model structure includes: Deep learning identification model architecture: The model integrates high-dimensional features The input layer consists of an input layer, a feature extraction layer, and a classification layer. Input layer: Receives comprehensive high-dimensional features of dimensions 256-512. The features obtained after multimodal fusion are directly input into the model.

[0062] Feature extraction layer: It contains two Transformer encoders and uses a combination of multi-head attention and feedforward network to mine the complex interactions between multimodal features from the comprehensive high-dimensional features of the input, and generate more discriminative high-level features. It is the core link to improve the accuracy of identification and the core processing unit of the learning and discrimination model.

[0063] The classification layer maps the high-level features generated by the feature extraction layer to the probability distribution of each edible fungus species, outputting the final species identification result. It is the final step in the model calculation and uses Softmax: probability normalization and interpretability to transform the output of the fully connected layer into a probability value between 0 and 1, and the sum of the probabilities of all species is 1, which intuitively reflects the probability that the sample belongs to each species. For example, the probability that the sample is a shiitake mushroom is 92%, making the identification result more interpretable.

[0064] The training strategy of initializing model weights using transfer learning is adopted, with the cross-entropy loss function as the optimization objective. The Adam optimizer dynamically adjusts the learning rate (initially 1e-4, decaying to 0.5 every 10 rounds) and combines it with an early stopping strategy to avoid overfitting. A species determination probability threshold of 85% is set. If the species probability output by the model is ≥85%, the edible fungus species identification result and confidence level are directly output; if <85%, it is fed back to the manual review stage.

[0065] Existing edible fungi phenotyping methods can only identify the species of edible fungi, but cannot determine the internal state of the fungi at the same time. The aforementioned artificial intelligence-based high-throughput phenotyping system and method for edible fungi also includes step S5: To determine the internal state of edible fungi, the following steps are taken: Two-dimensional contour features are retrieved, surface morphology features are extracted, and contour convexity, surface flatness, and local depressions are analyzed. Areas with abnormal depressions or irregular contours are marked as suspected hollow areas. The three-dimensional coordinate dataset of the suspected hollow associated areas is extracted, and the standard three-dimensional coordinate dataset of normal edible fungi in the database is set as a threshold. The internal state of edible fungi is determined based on the relationship between the three-dimensional coordinate dataset of the suspected hollow associated areas and the threshold.

[0066] First, mark the suspected hollow areas: By retrieving the two-dimensional contour features generated in step S2, extract surface morphology features, such as contour convexity, surface flatness, and local depressions. At the same time, use the contour curvature algorithm to calculate the curvature k of the contour points, as shown in the following formula:

[0067] in, Let the first derivative of the coordinates of the contour points with respect to the arc length be denoted as . For the second derivative, set the curvature threshold. k 0 And determine based on the type of edible fungus, if the curvature of a certain contour point k ≥ k 0 If the point is located in the region, it is marked as a suspected hollow associated region. The curvature is calculated using this formula, and the degree of curvature of the contour is quantified. The greater the curvature, the more uneven the contour. This formula can quickly locate the associated region where there may be hollow on the surface, thus narrowing the analysis scope of the subsequent three-dimensional coordinate dataset.

[0068] Samples of normal edible fungi of the same variety without hollow centers were selected from the database, with no fewer than 50 normal samples. The echo intensity I, propagation time t, and attenuation rate α were extracted from their three-dimensional coordinate datasets, and the mean values ​​of each parameter were calculated. , , and standard deviation , , Set a threshold: Echo intensity threshold: The echo intensity in the hollow area is lower than that in the normal area; Propagation time threshold: The ultrasound propagation time is longer in the hollow region than in the normal region; Attenuation rate threshold: The ultrasonic attenuation rate in the hollow region is higher than that in the normal region.

[0069] based on An abnormal threshold is set in principle to ensure that 99.7% of the parameters of normal samples fall within the threshold range, thereby reducing misjudgments; a three-dimensional ultrasound parameter standard for normal edible fungi is established to provide a basis for judging the internal state.

[0070] Internal state determination: Extract the 3D coordinate dataset of suspected hollow associated regions and obtain the echo intensity. Dissemination time Attenuation rate If any of the following conditions are met, the region is determined to be a hollow region: ; ; ; When determining the internal state of edible fungi, a voxel counting algorithm is used to count the volume of hollow regions. Total volume of edible fungi The proportion, ,like If the output is ≥5%, the output has a hollow state; otherwise, the internal state of the output is normal.

[0071] Voxel counting formula: ; The volume of a single voxel. The method counts the number of voxels in hollow areas; calculates the volume percentage by counting the number of voxels in hollow areas to quantify the degree of hollowness; accurately determines whether hollowness exists inside edible fungi and the severity of hollowness, thus expanding the function of the identification method.

[0072] It should be noted that the artificial intelligence-based high-throughput phenotyping device for edible fungi provided in this application embodiment and the artificial intelligence-based high-throughput phenotyping method for edible fungi provided in this application embodiment are based on the same application concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned artificial intelligence-based high-throughput phenotyping method for edible fungi, and the repeated parts will not be described again.

[0073] An electronic device provided in this application includes a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements the above-mentioned artificial intelligence-based high-throughput phenotypic identification method for edible fungi.

[0074] Specifically, the processor may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor may also include onboard memory for caching purposes. The processor may be a single processing unit or multiple processing units for performing different actions of the method flow according to embodiments of this application.

[0075] Memory can be any medium capable of containing, storing, transmitting, propagating, or transmitting instructions. For example, memory can include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, instruments, or propagation media. Specific examples of memory include: magnetic storage devices such as magnetic tape or hard disk drives (HDDs); optical storage devices such as optical discs (CD-ROMs); and also random access memory (RAM) or flash memory; and / or wired / wireless communication links.

[0076] This application also provides a computer-readable medium storing a computer program thereon, which, when executed by a processor, implements the aforementioned artificial intelligence-based high-throughput phenotypic identification method for edible fungi. This computer-readable medium may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into that device / apparatus / system. The aforementioned computer-readable medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.

[0077] According to embodiments of this application, a computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wired, optical fiber, radio frequency signals, etc., or any suitable combination thereof.

[0078] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments and / or claims of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application. Therefore, the scope of this application should not be limited to the above embodiments, but should be defined not only by the appended claims, but also by their equivalents. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this invention should be included within the protection scope of this invention.

Claims

1. A high-throughput phenotypic identification method for edible fungi based on artificial intelligence, characterized in that, include: S1: Collect two-dimensional images and three-dimensional coordinate datasets of edible fungi; S2: Preprocess and segment the two-dimensional image to generate two-dimensional contour features of edible fungi; S3: Extract the color and texture features of the edible fungi from the two-dimensional contour features of the edible fungi, and construct a related feature matrix to associate the two-dimensional contour features of the edible fungi with the three-dimensional coordinate dataset; Using a three-dimensional coordinate dataset as the query vector and two-dimensional phenotypic features as the key and value vectors, an attention weight map is generated by calculating the similarity between the query vector and the key vector and normalizing it using the Softmax function. This achieves the fusion of the two-dimensional contour features and the three-dimensional coordinate dataset, ultimately generating a comprehensive high-dimensional feature. S4: Construct an identification model and input the comprehensive high-dimensional image features to complete the identification of edible fungi species.

2. The high-throughput phenotypic identification method for edible fungi based on artificial intelligence as described in claim 1, characterized in that, In step S2: The preprocessing specifically involves: using a filter kernel and Gaussian filtering algorithm to denoise the two-dimensional image, correcting illumination differences through grayscale histogram equalization, scaling the image to a predetermined pixel size, and using bilinear interpolation to maintain image resolution.

3. The high-throughput phenotypic identification method for edible fungi based on artificial intelligence as described in claim 1, characterized in that, In step S3, The color features are extracted from the red-green-blue color space to the hue-saturation-brightness color space, and the features include three color feature vectors: hue, saturation, and brightness; the correlation feature matrix is ​​the Pearson correlation coefficient matrix.

4. The high-throughput phenotypic identification method for edible fungi based on artificial intelligence as described in claim 3, characterized in that, The cross-modal matching is calibrated using three-dimensional coordinates: the coordinate sequence of contour points corresponding to the two-dimensional contour features is projected onto the three-dimensional ultrasound point cloud space, so that the center of the two-dimensional contour coincides with the geometric center of the three-dimensional ultrasound point cloud, and the matching degree is calculated using a cosine similarity algorithm; it also includes a graded processing step for mismatch in overlap degree, specifically: Set an interval matching degree threshold. If the calculated matching degree is greater than or equal to the interval matching degree threshold, determine that the bimodal data overlap degree matches and proceed to the subsequent feature fusion stage. If the matching degree falls within the interval matching degree threshold, the two-dimensional contour coordinate sequence is rotated and the matching degree is verified. If the calculated matching degree is lower than the interval matching degree threshold, the sample is marked as an invalid sample and excluded from subsequent processes to ensure the consistency of data from different modalities.

5. The high-throughput phenotypic identification method for edible fungi based on artificial intelligence as described in claim 1, characterized in that, In step S3, the similarity between the query vector and the key vector is calculated using a cosine similarity algorithm, while a dynamic deviation compensation coefficient is introduced. This dynamic deviation compensation coefficient is adaptively adjusted according to the specific type of edible fungus.

6. The high-throughput phenotypic identification method for edible fungi based on artificial intelligence as described in claim 5, characterized in that, In step S3, a correlation feature matrix is ​​introduced to reflect the overall correlation between two-dimensional surface features and three-dimensional features, and a dynamic deviation compensation coefficient is introduced, which is adaptively adjusted according to the specific type of edible fungus.

7. The high-throughput phenotypic identification method for edible fungi based on artificial intelligence as described in claim 1, characterized in that, It also includes step S5: To determine the internal state of edible fungi, the following steps are taken: Two-dimensional contour features are retrieved, surface morphology features are extracted, and contour convexity, surface flatness, and local depressions are analyzed. Areas with abnormal depressions or irregular contours are marked as suspected hollow areas. The three-dimensional coordinate dataset of the suspected hollow associated areas is extracted, and the standard three-dimensional coordinate dataset of normal edible fungi in the database is set as the standard threshold. The internal state of edible fungi is determined based on the relationship between the three-dimensional coordinate dataset of the suspected hollow associated areas and the standard threshold.

8. The high-throughput phenotypic identification method for edible fungi based on artificial intelligence as described in claim 7, characterized in that, When determining the internal state of edible fungi, a voxel counting algorithm is used to calculate the ratio of the volume of the hollow region to the total volume of the edible fungi.

9. A high-throughput phenotypic identification device for edible fungi based on artificial intelligence, characterized in that, The application of the artificial intelligence-based high-throughput phenotypic identification method for edible fungi as described in any one of claims 1-8 includes: The data acquisition module is used to acquire two-dimensional images and three-dimensional coordinate datasets of edible fungi. The data acquisition module includes an image acquisition unit and an ultrasonic acquisition unit. The image acquisition unit is used to acquire multi-angle two-dimensional images of edible fungi, and the ultrasonic acquisition unit is used to detect the internal structure of edible fungi and generate a three-dimensional coordinate dataset. The image processing module is connected to the data acquisition module and is used to preprocess the two-dimensional image, segment the image and extract features to generate two-dimensional contour features of edible fungi. At the same time, it extracts the surface morphology features from the two-dimensional contour features and performs cross-modal matching between the two-dimensional contour features and the three-dimensional coordinate dataset. Based on the attention mechanism, it adaptively calculates the fusion weight, performs weighted correction and fusion on the two types of features, and generates comprehensive high-dimensional features. The deep learning identification module is connected to the image processing module and is used to receive the comprehensive high-dimensional features, complete the identification of edible fungi species through a preset deep learning model, and output the species identification results and confidence levels.

10. An electronic device, characterized in that, It includes a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements the artificial intelligence-based high-throughput phenotypic identification method for edible fungi as described in any one of claims 1-8.