Mushroom macro fungus identification method and system and storage medium

By collecting and processing morphological and environmental data of macrofungi in the order Agaricales, multimodal feature vectors are generated and identified using a Transformer model. This solves the problem of insufficient identification accuracy in existing methods, achieves higher-precision species identification and habitat adaptation suggestions, and supports ecological research and resource utilization.

CN121767719APending Publication Date: 2026-03-31NANJING INST OF ENVIRONMENTAL SCI MINIST OF ECOLOGY & ENVIRONMENT OF THE PEOPLES REPUBLIC OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-10
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing methods for identifying macrofungi in the order Agaricales fail to effectively integrate morphological characteristics with native environmental data, resulting in insufficient identification accuracy and making it difficult to meet the needs of large-scale, high-precision identification.

Method used

Morphological feature data and native habitat data of the target fungi are collected. Key morphological features are extracted through semantic segmentation. After normalizing the environmental data, a multimodal feature vector is generated and input into a pre-trained Transformer classification model for identification. The accuracy of identification is improved by combining habitat adaptation suggestions and manual review process.

Benefits of technology

By integrating morphological and environmental data, the accuracy of identifying macrofungi in the order Agaricales has been significantly improved, habitat adaptation suggestions have been provided, the protection and artificial cultivation of rare species have been supported, and the efficiency of ecological research and resource utilization has been enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121767719A_ABST
    Figure CN121767719A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of fungus identification, in particular to a mushroom macro fungus identification method and system and a storage medium. The method comprises the steps that morphological characteristic data and original habitat environment data of target fungi are collected, the morphological characteristic data comprise image data of pilei, gels and stipes, the original habitat environment data comprise temperature, humidity and soil pH value, and the morphological characteristic data and the original habitat environment data are used for obtaining morphological information and growth environment information of the target fungi. And semantic segmentation processing is performed on the morphological feature data, key morphological features are extracted, and normalization processing is performed on the original habitat environment data, so that an effective region is separated from the morphological feature data and an environment data format is unified. According to the method, the morphological characteristic data of the target fungi, including the image data of pilei, gels and stipes, and the original habitat environment data, including temperature, humidity and soil pH value, are collected, so that the morphological dimension and environment dimension of fungus identification are covered, and a comprehensive information basis is provided for accurate identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fungal identification technology, specifically to a method, system, and storage medium for identifying macrofungi in the order Agaricales. Background Technology

[0002] As highly efficient decomposers of organic matter, macrofungi in the order Agaricales participate in regulating the carbon and nitrogen cycles of forest soils and maintaining the stability of plant-fungus symbiotic networks. Simultaneously, many species possess extremely high economic value; edible fungi such as *Lentinula edodes* and *Tricholoma matsutake*, and medicinal fungi such as *Gnaphalium affine* and *Armillaria mellea*, are important targets for biological resource development. Furthermore, some macrofungi in the order Agaricales, such as *Tricholoma matsutake* and *Tricholoma mongolicum*, have been listed in the *National Key Protected Wild Plants List*, and their population dynamics directly reflect the health of the ecosystem. Therefore, accurate identification of their species is of great significance for ecological research, resource utilization, and conservation decision-making.

[0003] Traditional methods for identifying macrofungi in the order Agaricales rely on the morphological experience of taxonomists, judging their morphology by observing macroscopic features such as cap shape, gill arrangement, and stipe texture, combined with microscopic features such as spore morphology, size, and color. This method has limitations: firstly, subjective judgments of morphological characteristics are heavily influenced by expert experience; different taxonomists may describe the morphology of the same species differently, leading to inconsistent identification results; secondly, for species with highly similar morphologies, such as those in the genus *Gymnocladus*, the method may fail to achieve consistent results. Gymnopus With the genus *Fructus* Collybiopsis Some species are difficult to distinguish accurately based on morphological characteristics alone, and require verification using molecular biology techniques (such as ITS sequence analysis). However, molecular techniques are complex and costly, making them unsuitable for the rapid identification of large-scale samples.

[0004] With the development of computer vision and machine learning technologies, image-based fungal identification methods have gradually become a research hotspot. Existing methods mostly employ convolutional neural networks (CNNs) to extract features and classify macroscopic morphological images of fungi. The core idea is to learn the mapping relationship between morphological features and species labels through deep learning models. However, these methods also have the following drawbacks: First, they do not consider the importance of the fungal growth environment for species identification. Many macrofungi in the order Agaricales have highly similar morphological characteristics, but their growth environments (such as temperature, humidity, soil pH, and other native habitat factors) differ significantly. For example, *Tricholoma matsutake*... Tricholoma matsutakeIt grows only in mixed coniferous and broad-leaved forests at altitudes of 1600–3200 meters and requires soil moisture to be maintained at 60%–80%. Ignoring environmental factors will lead to a decrease in the accuracy of identifying similar species. Secondly, existing multimodal fusion methods, such as simple feature splicing, fail to effectively capture the contextual relationship between morphological features and environmental features. For example, a certain morphological feature, such as the distribution of cap scales, may be strongly correlated with specific temperature and humidity conditions, but simple splicing cannot uncover this potential relationship, resulting in low utilization of multimodal information.

[0005] It is understandable that existing methods for identifying macrofungi in the order Agaricales suffer from insufficient accuracy in identifying similar species due to the lack of effective integration of morphological features and native environmental data, and the failure to uncover potential correlations between features. This makes it difficult to meet the demands for large-scale, high-precision identification. Therefore, the technical problem proposed in this invention is: how to improve the accuracy of identifying macrofungi in the order Agaricales by effectively integrating morphological features and native environmental data. Summary of the Invention

[0006] This invention discloses a method, system, and storage medium for identifying macrofungi in the order Agaricales, aiming to overcome at least one of the defects in the prior art.

[0007] To achieve the above objectives, the technical solution disclosed in this invention is as follows: According to one aspect of this disclosure, a method for identifying macrofungi in the order Agaricales is provided, comprising the steps of: Morphological data and native environment data of the target fungus were collected. The morphological data included image data of the cap, gills and stipe. The native environment data included temperature, humidity and soil pH. These data were used to obtain morphological information and growth environment information of the target fungus. Semantic segmentation is performed on morphological feature data to extract key morphological features, and the original environmental data is normalized to separate effective regions from morphological feature data and unify the environmental data format. By fusing key morphological features with normalized native environmental data, a multimodal feature vector is generated to integrate information from both morphological and environmental dimensions. The multimodal feature vectors are input into a pre-trained Transformer classification model, which outputs the species identification result of the target fungus and the corresponding confidence score. The pre-trained Transformer classification model learns the contextual association between multimodal features through multiple self-attention layers to improve the accuracy of target fungal species identification.

[0008] Furthermore, the morphological feature data was collected using a multi-view shooting method, including top view, side view and bottom view. At least three clear images were taken from each view to obtain morphological information of the target fungus from different angles.

[0009] Furthermore, the semantic segmentation process employs the U-Net deep learning model to segment the cap region, gill region, and stipe region, thereby accurately extracting key morphological parts of the target fungus.

[0010] Furthermore, key morphological features, including cap diameter, cap shape, gill density, stipe length, and stipe diameter, are used to quantify the morphological characteristics of the target fungus.

[0011] Furthermore, the native environmental data were normalized using the min-max normalization method, which maps temperature, humidity, and soil pH to the [0,1] interval to eliminate dimensional differences in the environmental data.

[0012] Furthermore, the fusion method involves concatenating the numerical vectors of key morphological features with the numerical vectors of normalized environmental data to generate multimodal feature vectors, which are used to preserve the original information of morphological and environmental data.

[0013] Furthermore, when the confidence level is higher than a preset threshold, the category identification result is output; when the confidence level is lower than the preset threshold, it is marked as a sample to be verified, which is used to distinguish the reliability of the identification result.

[0014] Furthermore, the output also includes habitat adaptation suggestions for the target fungus. These suggestions are generated based on native environmental data and the fungus's ecological habits, and are used to provide a reference for the protection or artificial cultivation of the fungus. When the Transformer classification model fails to output valid results, a manual review process is triggered, and multimodal feature data is sent to an expert terminal to process samples that the model cannot recognize.

[0015] According to another aspect of this disclosure, a system for identifying macrofungi of the order Agaricales is provided for implementing the above-described method for identifying macrofungi of the order Agaricales, comprising: The data acquisition module is used to collect morphological characteristic data and native environment data of the target fungus. The morphological characteristic data includes image data of the cap, gills and stipe, and the native environment data includes temperature, humidity and soil pH. The feature processing module is used to perform semantic segmentation on morphological feature data, extract key morphological features, and normalize the original environmental data. The multimodal fusion module is used to fuse key morphological features with normalized native environmental data to generate multimodal feature vectors. The identification module is used to input multimodal feature vectors into a pre-trained identification model and output the identification result of the target fungus species and the corresponding confidence level. The identification model is a classification model based on deep learning.

[0016] According to another aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method for identifying macrofungi of the order Agaricales.

[0017] The beneficial effects of this invention are: This invention collects morphological characteristic data of target fungi, including image data of the cap, gills, and stipe, as well as in-situ environmental data, including temperature, humidity, and soil pH. This covers both the morphological and environmental dimensions of fungal identification, providing a comprehensive information foundation for accurate identification. The morphological characteristic data reflects the phenotypic differences of fungi, while the in-situ environmental data reflects their ecological adaptability. The combination of these two data points can effectively distinguish between morphologically similar species with different ecological habits, such as shiitake mushrooms. Lentinus edodes With oyster mushrooms Pleurotus ostreatus The former prefers moderately decomposed wood and acidic soil, while the latter adapts to a wider range of saprophytic environments.

[0018] Furthermore, by extracting key morphological features such as cap diameter and gill density through semantic segmentation, effective regions such as caps and gills in the morphological feature data can be effectively separated from invalid backgrounds such as soil and fallen leaves, avoiding interference from invalid information on the recognition results and improving the accuracy of morphological features. Normalization processing, such as min-max standardization, unifies the format of the original environmental data, eliminating the dimensional differences of environmental factors such as temperature, humidity, and soil pH, such as temperature in °C and humidity in % and ensuring the fusion of environmental data and morphological feature data.

[0019] Furthermore, by fusing key morphological features with normalized native environmental data to generate multimodal feature vectors, information from both morphological and environmental dimensions is integrated, overcoming the shortcomings of existing methods that rely on single features. By employing a pre-trained Transformer classification model, its multi-layered self-attention layers are used to learn the contextual relationships between multimodal features, such as the relationship between cap scale distribution and temperature and humidity. This effectively captures the potential relationships between morphological and environmental features, significantly improving the accuracy of identifying similar species, such as distinguishing species with similar morphology but different growth environments.

[0020] Furthermore, this invention distinguishes the reliability of identification results by outputting confidence scores and labels for the samples to be verified, providing a basis for subsequent manual verification. By outputting habitat adaptation suggestions, it provides scientific reference for fungal conservation (such as habitat restoration for rare species) or artificial cultivation (such as optimizing the cultivation environment of shiitake mushrooms). The technical solution of this invention solves the problem of insufficient accuracy in existing methods for identifying macrofungi in the order Agaricales, which fail to effectively integrate morphological and environmental data and fail to explore the correlation between features. It provides a more reliable method for identifying macrofungi species in the order Agaricales, helping to improve the efficiency of species identification in ecological research and providing a scientific basis for conservation decisions for rare species and habitat adaptation in artificial cultivation.

[0021] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, the preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings. Attached Figure Description

[0022] Figure 1 This is a flowchart of a method for identifying macrofungi in the order Agaricales according to an embodiment of the present invention. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] In embodiments of the present invention, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in embodiments of the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0025] The present invention provides the following preferred embodiments: Example 1: To address the insufficient accuracy in existing identification of macrofungi in the order Agaricales due to the ineffective integration of morphological and environmental data and the failure to uncover correlations between features, this example systematically collects morphological and environmental data, specifically processes features, integrates multimodal information, and utilizes deep model learning to achieve accurate species identification. Figure 1 The diagram illustrates the steps of a method for identifying macrofungi in the order Agaricales: S100: Collect morphological characteristic data and native environment data of the target fungus. The morphological characteristic data includes image data of the cap, gills and stipe. The native environment data includes temperature, humidity and soil pH value, which are used to obtain morphological information and growth environment information of the target fungus.

[0026] S200: Performs semantic segmentation on morphological feature data to extract key morphological features and normalizes the original environmental data to separate effective regions from morphological feature data and unify the environmental data format.

[0027] S300: It integrates key morphological features with normalized native environmental data to generate a multimodal feature vector, which is used to integrate information from both morphological and environmental dimensions.

[0028] S400: Input the multimodal feature vector into the pre-trained Transformer classification model, and output the target fungal species identification result and the corresponding confidence score. The pre-trained Transformer classification model learns the contextual association between multimodal features through multiple self-attention layers to improve the accuracy of target fungal species identification.

[0029] Specifically, morphological data and native habitat data of the target fungi were collected. Morphological data included images of the cap, gills, and stipe. These parts are the most species-specific morphological structures of macrofungi in the order Agaricales. Differences in their morphology, such as the outline of the cap, the arrangement of the gills, and the texture of the stipe, are core criteria for traditional taxonomy in distinguishing species, directly reflecting phenotypic differences. Native habitat data included temperature, humidity, and soil pH. These factors are key ecological constraints for the growth and reproduction of Agaricales fungi, and different species exhibit significant heterogeneity in their adaptability to these factors. For example, some species can only germinate within a specific temperature range or are only adapted to acidic soil environments. It is important to understand that collecting both morphological and environmental data simultaneously is necessary because morphologically similar species may exhibit significant differences in native habitat data due to different ecological habits. Combining both provides a more comprehensive information basis for species identification, avoiding misjudgments caused by relying on a single morphological feature.

[0030] Furthermore, semantic segmentation is performed on the morphological feature data to extract key morphological features, and normalization is applied to the in-situ environmental data. The purpose of semantic segmentation is to separate the effective regions (i.e., target parts such as the cap, gills, and stipe) from the invalid background (such as soil, fallen leaves, and weeds) in the original image of the morphological feature data, avoiding interference from invalid background information in subsequent feature extraction and ensuring that the extracted key morphological features accurately reflect the morphological essence of the target fungus. The purpose of normalization is to unify the format of the in-situ environmental data, eliminate the dimensional differences between different environmental factors such as temperature, humidity, and soil pH, and make the environmental data and morphological feature data compatible, laying the foundation for the subsequent integration of multimodal information. It is understandable that the feature processing step is a crucial link connecting data acquisition and multimodal fusion; its processing effect directly affects the accuracy of subsequent fusion and recognition. That is, the accuracy of semantic segmentation determines the reliability of key morphological features, and the consistency of normalization determines the compatibility of environmental data and morphological feature data.

[0031] Furthermore, key morphological features are fused with normalized native habitat data to generate a multimodal feature vector. The core of this fusion is integrating information from both morphological and environmental dimensions, enabling the model to simultaneously utilize the phenotypic features (morphology) and ecological adaptation features (environment) of the target fungus for identification. It's important to understand that a single morphological feature may lead to similarity due to convergent evolution between species; for example, different species may have similar cap shapes. Similarly, a single environmental feature may cause confusion due to overlapping ecological niches; for example, different species may grow in the same temperature range. However, combining these two aspects effectively distinguishes these situations. For instance, two species may have similar cap shapes, but their growth humidity ranges may differ significantly. The fused multimodal feature vector simultaneously contains both types of information, providing the model with a more comprehensive basis for judgment.

[0032] Furthermore, the multimodal feature vectors are input into a pre-trained Transformer classification model, which outputs the species identification result of the target fungus and the corresponding confidence score. The core of the Transformer classification model is a multi-layered self-attention layer, which learns the contextual relationships between multimodal features. For example, the cap diameter may have a potential relationship with temperature features (e.g., the cap diameter of some species increases with increasing temperature), and the gill density may have a potential relationship with humidity features (e.g., the gill density of some species increases with increasing humidity). The self-attention layer can capture these relationships, thus identifying species more accurately. Pre-training allows the model to learn the general relationships between multimodal features on a large dataset of fungi in the order Mushrooms, enabling the model to process new samples faster and more accurately. The confidence score output reflects the model's uncertainty about the identification result, providing a basis for the reliability of subsequent judgments.

[0033] The benefit of this embodiment lies in the effective fusion of morphological and environmental data, and the discovery of potential correlations between multimodal features, thus solving the accuracy problem caused by single or unrelated features in existing methods. It is important to understand that each step revolves around "fusion of morphological and environmental data" and "discovery of correlations between features." Data collection is the foundation, feature processing is preparation, fusion is integration, and the Transformer classification model is the core. These steps form a logical closed loop, collectively achieving accurate identification of macrofungi in the order Agaricales. Through systematic process design, the model can fully utilize information from morphological and environmental data, improving identification accuracy and providing a feasible technical solution for species identification of macrofungi in the order Agaricales.

[0034] Example 2: To address the issue that single-view photography may miss morphological details of the target fungus, resulting in incomplete extraction of key morphological features, this example optimizes the method of acquiring morphological feature data by using multi-view photography to obtain image data of the cap, gills, and stipe.

[0035] Specifically, the morphological data collection covered top, side, and bottom views, with at least three clear images captured from each view. It's important to understand that different views capture morphological details of different parts of the target fungus: the top view primarily reflects the overall outline of the cap, scale distribution, color gradient, and surface texture. This information is used to distinguish cap shapes such as round, oval, or irregular, and surface features such as smoothness, scales, or hairiness; the side view focuses on displaying the length and diameter variations of the stipe, the connection between the stipe and cap (central, lateral, or eccentric), and the cap thickness. These features effectively reflect stipe morphological differences such as columnar, club-shaped, or spindle-shaped; the bottom view focuses on the arrangement of gills (adnate, decurrent, or free), density, and color. As an important reproductive structure of fungi in the order Agaricales, the morphological differences of gills are one of the core bases for species identification.

[0036] Furthermore, taking at least three clear images from each perspective is to avoid information loss caused by shooting angle deviations, uneven lighting, or partial obstruction such as fallen leaves covering the edge of the cap in a single image. By complementing each other with multiple images, the integrity and reliability of morphological feature data are ensured. For example, the three images from the top perspective can be taken from directly above, slightly to the left, and slightly to the right, respectively, covering the entire area of ​​the cap and avoiding misjudgment of the cap shape due to tilted shooting angles; the three images from the side perspective can be taken from the front, left, and right, comprehensively reflecting the morphology of the stipe and the connection between the cap and the stipe; the three images from the bottom perspective can be taken from directly below, slightly to the front, and slightly to the back, ensuring that the arrangement and density of the gills are completely captured.

[0037] Furthermore, morphological feature data acquired through multi-view photography can provide more comprehensive image information for subsequent semantic segmentation processing, ensuring that the extraction of key morphological features such as cap diameter and gill density is based on the complete target area, thus avoiding feature extraction errors caused by missing morphological information.

[0038] The advantage of this embodiment is that it obtains morphological information of the target fungus from different angles through multi-view shooting, providing a complete image foundation for the accurate extraction of key morphological features and helping to improve the reliability of morphological feature data.

[0039] Example 3: To address the problem of inaccurate extraction of key morphological parts caused by interference from background information such as soil, fallen leaves, and weeds in the original morphological feature image, this example clarifies the model selection and segmentation objects for semantic segmentation processing, and uses the U-Net deep learning model to segment the cap region, gill region, and stipe region.

[0040] It's important to understand that the U-Net deep learning model, with its encoder-decoder structure and skip connection mechanism, exhibits excellent performance in image segmentation tasks, especially suitable for segmentation tasks requiring precise spatial localization. The encoder extracts high-level semantic features of the image step by step through convolutional and pooling layers. The decoder maps the semantic features back to the original image resolution through deconvolutional layers and fuses the spatial information from different levels of the encoder with the semantic features of the decoder through skip connections, thereby achieving accurate pixel-level segmentation.

[0041] Furthermore, in the morphological feature segmentation task of macrofungi in the order Agaricales, the U-Net model can effectively distinguish target regions such as caps, gills, and stipes from background regions: for the cap region, the model achieves segmentation by recognizing the color difference between the cap and the background, such as the cap being darker in color than the soil in color, and the edge contour, such as the circular or elliptical boundary of the cap; for the gill region, the model achieves segmentation by capturing the arrangement pattern of the gills, such as parallel or bifurcated arrangement, and texture features, such as dense or sparse lines; for the stipe region, the model achieves segmentation by recognizing the columnar shape of the stipe and its connection relationship with the cap, such as the base of the stipe contacting the soil while the top is connected to the cap.

[0042] Furthermore, the segmented cap, gill, and stipe regions accurately reflect the morphological structure of the target fungus, providing a precise regional basis for subsequent extraction of key morphological features. For example, extracting the cap diameter requires accurate cap boundaries; without semantic segmentation, soil or fallen leaves in the original image may be misidentified as part of the cap, leading to an overestimation of the cap diameter. Similarly, extracting gill density requires clear gill regions; without semantic segmentation, weeds in the background may interfere with the gill count, resulting in inaccurate gill density calculations. Using the U-Net model for segmenting key morphological regions effectively avoids interference from background information, ensuring that the extraction of key morphological features is based on the actual target region.

[0043] The advantage of this embodiment is that the U-Net deep learning model accurately segments the cap region, gill region, and stipe region, providing a reliable regional basis for the accurate extraction of subsequent key morphological features and helping to improve the accuracy of morphological feature data.

[0044] Example 4: To address the problem of subjective morphological feature descriptions leading to ineffective integration with native environmental data, this example defines the specific content and quantification methods of key morphological features, specifying key morphological features as cap diameter, cap shape, gill density, stipe length, and stipe diameter.

[0045] It is important to understand that the quantification of key morphological features is a prerequisite for the integration of morphological features with native environmental data. Only by converting morphological features into objective numerical values ​​can they be effectively integrated with normalized environmental data (temperature, humidity, soil pH).

[0046] Specifically, cap diameter refers to the maximum straight-line distance between two points on the cap's edge, calculated from the boundaries of segmented cap regions. It objectively reflects differences in cap size; for example, the cap diameter of shiitake mushrooms is typically 5–15 cm, while that of oyster mushrooms is typically 3–10 cm. Cap shape is quantified by the geometric features of the cap's outline, such as using the ratio of the major to minor axes of an ellipse fit or polygonal approximation, such as using triangles, quadrilaterals, or polygons with multiple sides to describe the outline. This effectively distinguishes cap shape types, such as round, elliptical, fan-shaped, or irregular shapes. Gill density refers to the number of gills per unit area, calculated by counting the number of gills in segmented gill regions and dividing by the number of gills. The area of ​​the gills reflects the density of the gills; for example, the gill density of *Tricholoma matsutake* is relatively high, while that of *Tricholoma longifolia* is relatively low. The stipe length is the straight-line distance from the base of the stipe (where it contacts the soil) to the bottom of the cap (where it connects to the stipe). Measured by dividing the stipe area, it objectively reflects the differences in stipe length; for example, the stipe length of *Enoki mushroom* is typically 10–20 cm, while that of *Shiitake mushroom* is typically 3–8 cm. The stipe diameter is the straight-line distance from the middle of the stipe; measured by dividing the stipe area, it reflects the variation in stipe thickness; for example, the stipe diameter of *King oyster mushroom* is typically 3–5 cm, while that of *Oyster mushroom* is typically 1–2 cm.

[0047] Furthermore, these quantified key morphological features can objectively reflect the morphological differences of the target fungi, avoiding the errors of subjective judgments such as "larger cap" or "longer stipe" in traditional morphological identification. For example, a quantified value for cap shape, such as an elliptic fit of 0.85, accurately describes the degree of ellipticity of the cap, while the subjective description "the cap is elliptical" cannot distinguish the differences in the degree of ellipticity between different species; a quantified value for gill density, such as 15 gills per square centimeter, accurately reflects the density of the gills, while the subjective description "the gills are dense" cannot be compared numerically. By quantifying key morphological features, the morphological feature data and the native environment data have the same numerical format, providing a feasible basis for the subsequent generation of multimodal feature vectors.

[0048] The advantage of this embodiment is that by defining key morphological features such as cap diameter, cap shape, gill density, stipe length, and stipe diameter, it achieves an objective expression of morphological information, provides a numerical basis for the effective integration of morphological features and native environmental data, and helps to improve the integration efficiency of multimodal information.

[0049] Example 5: To address the problem that native environmental data cannot be effectively integrated with morphological feature data due to differences in dimensionality, this example clarifies the normalization process and uses the min-max standardization method to map temperature, humidity, and soil pH to the [0,1] interval.

[0050] Specifically, min-max standardization transforms the original data into values ​​within the target range through a linear transformation. The formula is that the normalized value equals the difference between the original value and the minimum value, divided by the difference between the maximum and minimum values. It's important to understand that temperature, humidity, and soil pH have significantly different dimensions: temperature is typically measured in degrees Celsius, ranging from 5 to 30°C; humidity is measured as a percentage, ranging from 0% to 100%; and soil pH is dimensionless, ranging from 0 to 14. Directly using these different dimensions for fusion might lead to a situation where a particular feature's large value range dominates the subsequent model's feature learning, weakening the weight of morphological features. Min-max standardization maps these three values ​​to the [0,1] interval, effectively eliminating dimensional differences and ensuring consistent numerical ranges for each environmental factor. For example, if the native temperature of a certain fungus is 20℃, and the minimum temperature is 5℃ and the maximum temperature is 30℃, then the normalized value is (20-5) / (30-5)=0.6; if the humidity is 85%, the normalized value is 0.85; if the soil pH is 6.5, and the minimum pH is 0 and the maximum pH is 14, then the normalized value is 6.5 / 14≈0.464.

[0051] The advantage of this embodiment is that the normalized environmental data and the quantized values ​​of key morphological feature data, such as cap diameter and gill density, have the same numerical range, providing a unified scale basis for the subsequent generation of multimodal feature vectors. The min-max normalization method eliminates the dimensional differences in environmental data, providing a unified numerical scale for the effective fusion of morphological features and environmental data.

[0052] Example 6: To address the issue of potential loss of original morphological or environmental data information during the fusion process, this example optimizes the generation method of multimodal feature vectors by concatenating the numerical vectors of key morphological features with the numerical vectors of the normalized original environmental data.

[0053] Specifically, the numerical vector of key morphological features consists of quantified morphological features such as cap diameter, cap shape, gill density, stipe length, and stipe diameter, with each feature corresponding to a numerical dimension; the numerical vector of normalized native environmental data consists of the values ​​of temperature, humidity, and soil pH after min-max standardization, with each environmental factor corresponding to a numerical dimension.

[0054] Furthermore, the splicing process involves concatenating two vectors sequentially to form a longer multimodal feature vector. The first few dimensions correspond to key morphological features, while the latter few dimensions correspond to normalized environmental data. It's important to understand that this splicing method completely preserves the original numerical information of the morphological and environmental data without any weighting or transformation, thus avoiding information loss due to improper feature fusion. For example, the key morphological feature vector of a fungus might be [0.5 (cap diameter), 0.7 (cap shape), 0.6 (gill density), 0.4 (stipe length), 0.3 (stipe diameter)], and the normalized environmental data vector might be [0.6 (temperature), 0.85 (humidity), 0.464 (pH)]. The spliced ​​multimodal feature vector would then be [0.5, 0.7, 0.6, 0.4, 0.3, 0.6, 0.85, 0.464]. The values ​​of each dimension retain information about the original features. The Transformer model can learn the relationships between these dimensions through a self-attention mechanism, such as the relationship between cap diameter and temperature, and the relationship between gill density and humidity.

[0055] The advantage of this embodiment is that by generating multimodal feature vectors through splicing, the original information of morphological and environmental data is fully preserved, providing a complete input foundation for the model to learn the correlation between features.

[0056] Example 7: To address the issue of inconsistent reliability in model identification results, this example optimizes the output logic by introducing a confidence threshold judgment mechanism. Specifically, the Transformer classification model outputs the species identification result of the target fungus and its corresponding confidence score. When the confidence score is higher than a preset threshold, the species identification result is directly output; when the confidence score is lower than the preset threshold, the sample is marked as a sample to be validated. It is important to understand that the confidence score reflects the model's uncertainty about the identification result; a higher value indicates a higher degree of confidence in the result. The preset threshold is set based on the model's validation results on the training data. Typically, a value that balances precision and recall is chosen. For example, if the validation set shows that the model's misclassification rate is low and can cover most correct samples when the threshold is set to 0.7, then 0.7 is used as the preset threshold. For samples with a confidence score higher than 0.7, the identification result is considered reliable and is directly output; for samples with a confidence score lower than 0.7, the model may not be able to accurately identify them due to atypical morphological characteristics (such as damaged caps), incomplete environmental data (such as failure to measure soil pH), or being a rare species, and these samples are marked as samples to be validated. The species of samples to be verified can be confirmed by supplementing data such as taking images from more perspectives, measuring missing environmental factors, or manual review, so as to avoid misjudgment.

[0057] The advantage of this embodiment is that by judging the reliability of the identification results through a confidence threshold, the credibility of the overall identification results is improved.

[0058] Example 8: To address the issue that simply outputting species information in the identification results is insufficient for practical applications and that the model cannot handle complex samples, this example optimizes the output content and anomaly handling process. In addition to species identification results and confidence levels, the output results also include habitat adaptation suggestions for the target fungus. These suggestions are generated based on native environmental data and the fungus's ecological habits. When the Transformer classification model cannot output valid results, a manual review process is triggered, sending multimodal feature data to an expert terminal.

[0059] It is important to understand that the generation of habitat adaptation recommendations needs to combine native environmental data (such as the native temperature, humidity, and soil pH of the fungus) and ecological habits recorded in the literature (such as a certain species can only grow in acidic soil). For example, if the native temperature of a certain fungus is 15-25℃, the humidity is above 80%, and the soil pH is 5.5-6.5, then the habitat adaptation recommendation is to maintain the native temperature range when protecting the species, and to simulate its native humidity and pH conditions when artificially cultivating it.

[0060] Furthermore, when the model fails to output valid results, such as extremely low confidence or no species having a confidence level exceeding the preset threshold, it indicates that the sample may belong to a rare species, have abnormal morphology, or have insufficient data. In this case, a manual review process is triggered, and multimodal feature data (key morphological feature vectors, normalized environmental data vectors, and original images) are sent to the expert terminal. The expert, by viewing the images, analyzing the feature data, and drawing on their own classification experience, provides recognition results to supplement the model's deficiencies.

[0061] The advantage of this embodiment is that it provides a reference for practical applications by outputting habitat adaptation suggestions, and improves the practicality of the method by handling samples that the model cannot identify through a manual review process.

[0062] Example 9: In order to systematically implement the method for identifying macrofungi in the order Agaricales into an executable architecture, this example provides an identification system for macrofungi in the order Agaricales. This system covers all aspects of the identification process through modular design.

[0063] Specifically, the data acquisition module, as the system's input layer, is used to collect morphological characteristic data and native environment data of the target fungus. The morphological characteristic data includes image data of the cap, gills, and stipe. These images are taken from multiple perspectives, such as the top, side, and bottom, using a high-resolution camera to ensure that the morphological details of different parts of the target fungus are captured. The native environment data includes temperature, humidity, and soil pH. These data are acquired in real time by sensors deployed in the native environment. The temperature sensor collects the ambient temperature, the humidity sensor collects the relative humidity of the air, and the soil pH sensor is inserted into the soil surface to measure the acidity and alkalinity.

[0064] Furthermore, the feature processing module, as a data processing layer, is used to preprocess the collected data: for morphological feature data, the U-Net deep learning model is used for semantic segmentation to accurately segment the cap region, gill region, and stipe region from the background, and key morphological features, such as cap diameter, cap shape, gill density, stipe length, and stipe diameter, are extracted based on the segmented regions; for native environmental data, the min-max normalization method is used to map temperature, humidity, and soil pH to the [0,1] interval to eliminate the dimensional differences of each environmental factor and make the environmental data and morphological feature data have a unified numerical scale.

[0065] Furthermore, the multimodal fusion module, as an information integration layer, is used to fuse key morphological features with normalized original environmental data. Specifically, it concatenates the numerical vectors of key morphological features with the numerical vectors of normalized environmental data in sequence to generate multimodal feature vectors. This concatenation method completely preserves the original information of morphological features and environmental data without any weighting or transformation of the data.

[0066] Furthermore, the identification module, as the decision output layer, is used to perform classification and identification. It inputs multimodal feature vectors into a pre-trained deep learning classification model, which is trained on a large number of macrofungi samples from the order Agaricales. This model is able to learn the correlation between multimodal features and output the species identification result of the target fungus and the corresponding confidence score. The confidence score reflects the degree of confidence of the model in the identification result.

[0067] The advantage of this embodiment lies in the tight logical connection between its modules. The data acquisition module provides basic data for subsequent processing, the feature processing module prepares standardized data for the fusion step, the fusion module provides comprehensive features for the identification step, and the identification module outputs the final result to the system. This modular design enables the systematic application of the identification method, providing an executable system architecture for the identification of macrofungi in the order Agaricales.

[0068] Example 10: To enable the identification method for macrofungi of the order Agaricales to be repeatedly executed on a computer device, this example provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements all the steps of the macrofungi identification method: First, it collects morphological feature data and native environment data of the target fungus, where the morphological feature data includes image data of the cap, gills, and stipe, and the native environment data includes temperature, humidity, and soil pH; then, it performs semantic segmentation on the morphological feature data to extract key morphological features and normalizes the native environment data; then, it fuses the key morphological features with the normalized native environment data to generate a multimodal feature vector; finally, it inputs the multimodal feature vector into a pre-trained identification model and outputs the target fungus species identification result and the corresponding confidence score.

[0069] It's important to understand that a computer-readable storage medium is a carrier of a computer program. This can take various forms, such as a hard drive, USB flash drive, optical disc, flash memory, or cloud storage, enabling the program to be stored, transmitted, and retrieved. The steps of the computer program correspond one-to-one with the stages of the recognition method, ensuring the repeatability and portability of the recognition method. Regardless of the computer device, as long as the program is read and executed, the same recognition process can be achieved. For example, when identifying a large fungus of the order Agaricales, simply connect the storage medium to the computer device, run the program, and the program will guide the user to collect morphological images and environmental data, automatically process, fuse, and identify the data, and output the results.

[0070] The advantage of this embodiment is that by storing the computer program on a computer-readable storage medium, the method for identifying macrofungi in the order Agaricales can be run on a computer device, thereby improving the operability and accessibility of the method.

[0071] Although the present invention has been specifically described above with reference to preferred embodiments, it should be understood that the present invention is not limited to the embodiments described above. Various modifications and variations can be made by those skilled in the art without departing from the spirit of the present invention, and such modifications and variations should fall within the scope defined by the appended claims and their equivalents.

Claims

1. A method of identifying a mushroom order macrofungi, characterized by the steps of The method comprises the following steps: Collecting morphological feature data and original habitat environment data of the target fungus, wherein the morphological feature data comprises image data of a cap, gills and a stem, and the original habitat environment data comprises temperature, humidity and soil pH value, so as to obtain morphological information and growth environment information of the target fungus; Performing semantic segmentation processing on the morphological feature data to extract key morphological features, and performing normalization processing on the original habitat environment data, so as to separate effective areas from the morphological feature data and unify the format of the environment data; Fusing the key morphological features and the normalized original habitat environment data to generate a multi-modal feature vector, so as to integrate information in the morphological and environmental dimensions; Inputting the multi-modal feature vector into a pre-trained Transformer classification model to output a species identification result of the target fungus and a corresponding confidence, wherein the pre-trained Transformer classification model learns the context association between multi-modal features through multiple self-attention layers, so as to improve the accuracy of the species identification of the target fungus.

2. The method for identifying a mushroom order macrofungi according to claim 1, wherein The morphological feature data is collected by using a multi-view shooting mode, including a top view, a side view and a bottom view, at least three clear images are shot for each view, so as to obtain morphological information of the target fungus from different angles.

3. The method for identifying a mushroom order macrofungi according to claim 1, wherein The semantic segmentation processing adopts a U-Net deep learning model to segment the cap area, the gill area and the stem area, so as to accurately extract key morphological parts of the target fungus.

4. The method for identifying a mushroom order macrofungi according to claim 1, wherein The key morphological features include a cap diameter, a cap shape, a gill density, a gill color, a stem length and a stem diameter, so as to quantify the morphological features of the target fungus.

5. The method for identifying a mushroom order macrofungi according to claim 1, wherein The normalization processing on the original habitat environment data adopts a min-max standardization method to map the temperature, humidity and soil pH value to the interval [0, 1], so as to eliminate the dimensional difference of the environment data.

6. The method for identifying a mushroom order macrofungi according to claim 1, wherein The fusion mode is to splice the numerical vector of the key morphological features and the numerical vector of the normalized environment data to generate a multi-modal feature vector, so as to retain the original information of the morphological and environmental data.

7. The method for identifying a mushroom order macrofungi according to claim 1, wherein When the confidence is higher than a preset threshold, the species identification result is output; when the confidence is lower than the preset threshold, the sample is marked as a to-be-verified sample, so as to distinguish the reliability of the identification result.

8. The method for identifying a mushroom order macrofungi according to claim 1, wherein The output result further comprises habitat adaptation suggestions of the target fungus, which are generated based on the original habitat environment data and the ecological habits of the fungus, so as to provide a reference for the protection or artificial cultivation of the fungus; When the Transformer classification model cannot output an effective result, an artificial review process is triggered, and the multi-modal feature data is sent to an expert terminal, so as to process samples that cannot be identified by the model.

9. A system for identifying Agaricomycetes for implementing the method for identifying Agaricomycetes according to any one of claims 1 to 8, characterized in that, The method comprises the following steps: A data collection module is configured to collect morphological feature data and original habitat environment data of a target fungus, wherein the morphological feature data comprises image data of a cap, gills and a stem, and the original habitat environment data comprises temperature, humidity and soil pH value; A feature processing module is configured to perform semantic segmentation processing on the morphological feature data to extract key morphological features, and perform normalization processing on the original habitat environment data. A multi-modal fusion module is configured to fuse the key morphological features and the normalized native habitat environment data to generate a multi-modal feature vector. An identification module is configured to input the multi-modal feature vector into a pre-trained identification model to output a species identification result of the target fungus and a corresponding confidence level, the identification model being a classification model based on deep learning.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the steps of the mushroom identification method of any one of claims 1 to 8.