An intelligent detection method for phenotypic characteristics of Ganoderma lucidum mycelium

The Ganoderma lucidum mycelium detection model is established through the YOLO algorithm, which realizes the automated detection of Ganoderma lucidum mycelium, solves the problems of low efficiency and large errors of traditional detection methods, and provides more accurate and efficient detection results.

CN118212394BActive Publication Date: 2024-10-08ZHEJIANG SHOUXIANGU BOTANICAL DRUG INST CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410285682.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-13
Publication Date
2024-10-08
Estimated Expiration
2044-03-13

AI Technical Summary

Technical Problem

Traditional Ganoderma mycelium detection methods rely on manual observation, are inefficient and error-prone, and cannot meet the needs of Ganoderma production.

Method used

The YOLO algorithm is used to establish a Ganoderma lucidum mycelium electronic image target detection model. Through image processing and feature extraction, automated mycelial phenotype detection is realized, including hyphal growth speed, pigment discrimination and antagonistic discrimination, and characteristic block images are generated and carried out. Classification.

Benefits of technology

The accuracy and efficiency of Ganoderma lucidum mycelium detection have been improved, manual subjective errors have been avoided, more objective detection results have been provided, and detection efficiency has been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118212394B_ABST
    Figure CN118212394B_ABST
Patent Text Reader

Abstract

The invention proposes an intelligent detection method for phenotypic characteristics of ganoderma lucidum mycelium, and relates to the technical field of edible fungus breeding and cultivation. The method comprises the following steps: collecting electronic images of ganoderma lucidum mycelium, processing the collected images, preparing a positioning data set, establishing a target detection model, combining an image processing algorithm, extracting mycelium, obtaining growth rate results of the extracted mycelium, removing sclerotia parts, performing pigment discrimination detection, and marking, performing antagonistic discrimination, extracting characteristic blocks, preparing a data set based on different image features, establishing a classification model, inputting characteristic block images of ganoderma lucidum mycelium into a trained classification model, performing mycelium bundle thickness discrimination, colony morphology discrimination, mycelium density discrimination, integrating information, and outputting result statistics. The invention can perform mycelium bundle thickness discrimination, colony morphology discrimination, and mycelium density discrimination by establishing a classification model and extracting characteristic blocks; and objectively and efficiently detect the phenotype of ganoderma lucidum mycelium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of edible fungus breeding and cultivation, and in particular to an intelligent detection method for phenotypic characteristics of ganoderma mycelium. Background Art

[0002] Ganoderma lucidum is a precious traditional Chinese medicine, and its quality and growth status have an important impact on its medicinal value and market competitiveness. The cultivation and processing of Ganoderma lucidum require full quality control, including the detection and analysis of Ganoderma lucidum mycelium. The traditional method of Ganoderma lucidum detection is to evaluate the appearance, color, texture, size and other characteristics of Ganoderma lucidum mycelium through manual observation and measurement to determine its quality. This method requires certain skills and experience, and the test results are subject to the subjective influence of the operator, which is prone to errors and low efficiency, and cannot meet the needs of Ganoderma lucidum production. With the development of machine vision technology, a new method has been provided for mycelium phenotypic detection, making automated and intelligent mycelium phenotypic detection possible.

[0003] Therefore, it is urgent to develop a technical method that can objectively and efficiently detect the phenotype of Ganoderma lucidum mycelium. Summary of the invention

[0004] In order to solve the technical problems existing in the prior art, the present invention provides a method for intelligently detecting the phenotypic characteristics of Ganoderma lucidum mycelium, comprising the following steps:

[0005] S1, collecting electronic images of Ganoderma lucidum;

[0006] S2, processing the collected electronic images of Ganoderma lucidum to prepare a Ganoderma lucidum electronic image positioning data set;

[0007] S3, establishing a Ganoderma lucidum electronic image target detection model based on the YOLO algorithm, inputting a Ganoderma lucidum electronic image positioning data set, training the Ganoderma lucidum electronic image target detection model, and obtaining a trained Ganoderma lucidum electronic image target detection model, wherein the trained Ganoderma lucidum electronic image target detection model includes a sclerotium positioning model and a mycelium positioning model;

[0008] S4, using the trained Ganoderma lucidum electronic image target detection model, performing image extraction on the Ganoderma lucidum electronic image to obtain a Ganoderma lucidum mycelium image without a culture dish;

[0009] S5, measuring morphological parameters of the image of the Ganoderma lucidum mycelium without the culture dish extracted in step S4, and obtaining the growth rate in combination with the growth time;

[0010] S6, performing pigment discrimination detection on the image of the Ganoderma lucidum mycelium without the culture dish extracted in step S4, and marking the pigment area;

[0011] S7, performing antagonistic discrimination on the image of the Ganoderma lucidum mycelium without the culture dish extracted in step S4;

[0012] S8, extracting characteristic blocks from the image of the Ganoderma lucidum mycelium without the culture dish extracted in step S4, to obtain a characteristic block image of the Ganoderma lucidum mycelium;

[0013] S9, according to the characteristic block image of the Ganoderma lucidum mycelium obtained in step S8, a characteristic data set is generated based on different image features;

[0014] S10, establishing a classification model, and inputting the characteristic block image of the mycelium obtained in step S9 into the Ganoderma lucidum mycelium classification model to perform mycelium discrimination and classification;

[0015] S11. Integrate the information and output the test results.

[0016] Furthermore, in step S2, the method for preparing the Ganoderma lucidum electronic image positioning data set comprises the following steps:

[0017] S21, cleaning and preprocessing the image;

[0018] S22, performing data enhancement processing on the image to simulate the images of Ganoderma lucidum mycelium under various environments;

[0019] S23, marking the positions of the mycelium and sclerotium of Ganoderma lucidum in the image, generating and storing positioning mark data, wherein each image corresponds to the position and size information of the mycelium and sclerotium of Ganoderma lucidum;

[0020] S24, randomly divide the cleaned data set into a positioning training set, a positioning test set and a positioning verification set according to the required ratio. Under different sets, create folders named after the category name to store the images.

[0021] Furthermore, the extraction of the Ganoderma lucidum mycelium image in step S4 includes the following steps:

[0022] S41, loading the electronic image of Ganoderma lucidum, using the target detection model of the electronic image of Ganoderma lucidum, using the positioning frame to locate the target of the Ganoderma lucidum mycelium, and obtaining the position and size information of the Ganoderma lucidum mycelium;

[0023] S42, according to the position and size information of the mycelium of Ganoderma lucidum, setting the interior of the positioning frame of the mycelium of Ganoderma lucidum as the target area, and setting other areas as black;

[0024] S43, graying the image obtained in S42;

[0025] S44, performing adaptive binarization processing on the grayscaled image of the mycelium portion of Ganoderma lucidum obtained in S43;

[0026] S45, performing image processing on the image obtained by the adaptive binarization in S44, removing the culture dish portion image from the Ganoderma lucidum mycelium portion image, and obtaining a mask;

[0027] S46, adding the mask obtained in S45 and the Ganoderma lucidum electronic image pixel by pixel to obtain a Ganoderma lucidum mycelium image without a culture dish.

[0028] Furthermore, in step S5, obtaining the growth rate in combination with the growth time includes the following steps:

[0029] S51, performing an adaptive binarization operation on the image of the Ganoderma lucidum mycelium without the culture dish extracted in step S4;

[0030] S52, obtaining the outer contour information of the image of the Ganoderma lucidum mycelium without the culture dish after the binarization operation through a contour detection algorithm;

[0031] S53, calculating the outer contour with the largest area among all the outer contour information obtained in S52;

[0032] S54, obtaining the diameter of the maximum outer contour through a circle fitting function;

[0033] S55, converting the pixel size of the diameter of the maximum outer contour into an actual size;

[0034] S56, calculating the growth rate, the growth rate is calculated by:

[0035]

[0036] Where r is the growth rate of the current sample, d is the growth time of the current sample, and m is the diameter of the current sample.

[0037] Furthermore, in step S6, the method for performing pigment discrimination detection on the image of Ganoderma lucidum mycelium without a culture dish comprises the following steps:

[0038] S61, loading the image of the Ganoderma lucidum mycelium without the culture dish obtained in S4, and inputting it into a sclerotium positioning model to perform sclerotium positioning;

[0039] S62, storing the position and size information of the located sclerotia;

[0040] S63, according to the stored sclerotium position and size information in S62, obtaining a sclerotium partial image in the Ganoderma lucidum mycelium image without a culture dish, and making the sclerotium partial image as a mask and performing an inversion operation;

[0041] S64, merging the mycelium image without the culture dish obtained in S4 with the mask obtained in S63 to obtain an RGB color image of the sterile nucleus and the culture dish;

[0042] S65, converting the RGB color image obtained in step S64 into an HSV color image;

[0043] S66, filtering out non-hyphae color parts from the HSV color mycelium image according to a preset HSV color threshold;

[0044] S67, filtering out targets with an area less than 1000 pixels in the non-hyphae color part;

[0045] S68, calculating the number of non-mycelium color parts remaining after filtration;

[0046] S69. The image with a non-hyphae color part of 1 and an area > 6000 or a number of non-hyphae color parts >= 2 is judged to have pigment.

[0047] Furthermore, in step S7, the method for antagonism determination includes the following steps:

[0048] S71, loading the mycelium image without the culture dish obtained in S4, inputting it into the sclerotium positioning model for target positioning, and obtaining the information of the sclerotium positioning frame;

[0049] S72, calculating the number of sclerotia according to the information of the positioning frame, and if the number of sclerotia is less than 2, directly determining that there is no antagonism;

[0050] S73, calculating the center position c1 of all sclerotia for the mycelium image with the number of sclerotia>=2;

[0051] S74, calculate the maximum distance r1 from c1 to a single sclerotium,

[0052] S75, draw a circle with radius r1 with c1 as the center;

[0053] S76, using the circle obtained in S75 as a mask and inverting it to obtain mask a;

[0054] S77, determining the center position c2 of the image of the Ganoderma lucidum mycelium without the culture dish obtained in step S4;

[0055] S78, calculating the shortest distance r2 from c2 to the outer contour of the mycelium image;

[0056] S79, draw a circle with c2 as the center and 80% of r2 as the radius and make it into mask b;

[0057] S710, merging mask a and mask b to obtain a new mask;

[0058] S711, adding the new mask obtained in S710 and the mycelium image without the culture dish obtained in S4 pixel by pixel to obtain a new image;

[0059] S712, converting the new image obtained in S711 into a grayscale image and performing binarization processing;

[0060] S713, covering the sclerotium part in the image obtained in S712 with white, and merging it with the new mask obtained in S710;

[0061] S714, extracting the maximum outer contour after performing a region growing method on the image obtained in S713;

[0062] S715 , matching the maximum outer contour extracted in S714 with the contour of the circle drawn in mask b. If the matching result is greater than 0.05, it is determined that an antagonism phenomenon exists; otherwise, it is determined that an antagonism phenomenon does not exist.

[0063] Furthermore, the region growing method described in step S714 includes:

[0064] S7141, extracting a connected domain from the image after the binarization processing in S712, and obtaining the centroid coordinates of the connected domain as a seed;

[0065] S7142, adding neighboring nodes around the seed node to the current region, and calculating a new seed node at the same time. If a new seed node exists in the current region, the current region is expanded to the location of the new seed node, otherwise the boundary of the current region is updated;

[0066] S7143. Repeat the previous step until all seed nodes are included in the region or the current region is no longer expanded, stop expanding, and extract the maximum outer contour of the final region image.

[0067] Furthermore, in step S8, the method for extracting the feature block is:

[0068] S81, loading the RGB color mycelium images of the sterile nucleus and the culture dish obtained in S6, and performing grayscale and binarization processing;

[0069] S82, randomly selecting non-repeated points in the binary image obtained in step S81;

[0070] S83, extracting blocks with each point as the center;

[0071] S84, removing blocks containing black pixels;

[0072] S85, extracting a preset number of feature blocks from each mycelium image;

[0073] S86, merging the feature blocks with the original image respectively to obtain new blocks;

[0074] S87. Save the obtained new block as the extracted feature block.

[0075] Furthermore, in step S9, the method for preparing the feature data set includes:

[0076] S91, classifying the mycelium images obtained in step S8 into corresponding folders respectively;

[0077] S92, establish data sets according to hyphae bundle thickness, hyphae density and colony morphology;

[0078] S93, performing data cleaning and preprocessing on the image;

[0079] S94, randomly dividing the cleaned data set into a feature training set, a feature test set, and a feature verification set according to the required proportions, and creating folders named after the category names in different sets for storing images;

[0080] Among them, the classification categories are as follows: hyphae bundle category is thick-medium-thin hyphae images, hyphae density is sparse-medium-dense hyphae images, colony morphology is close to the plate and slightly fluffy and fluffy hyphae images;

[0081] Furthermore, in step S10, the method for distinguishing mycelium is:

[0082] S101, extracting a plurality of feature blocks from the feature block image of the Ganoderma lucidum mycelium obtained in step S8;

[0083] S102, loading each obtained feature block into the classification model in sequence for prediction;

[0084] S103, screening out the prediction results of each feature block whose prediction probability is greater than the preset probability and saving them;

[0085] S104: Calculate the average probability of the prediction results saved in the previous step, and take the category that appears most frequently in the saved prediction results as the final judgment result.

[0086] Furthermore, in step S104, if there is a situation where there are the most tied categories, the category with the highest average probability is taken as the final judgment result; if there is a category with no saved results, its average is recorded as 0; if the probability of no category in the saved prediction results is greater than the preset probability, the average prediction results of all feature blocks are calculated, and the category with the highest average probability is taken as the final judgment result.

[0087] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0088] 1. By setting a target detection model, the present invention can accurately and efficiently detect the mycelium growth rate, mycelium pigment discrimination, and mycelium antagonism discrimination of the electronic image of Ganoderma lucidum, avoid errors caused by subjective factors of personnel, and obtain detection results more objectively.

[0089] 2. The present invention extracts characteristic block images of Ganoderma lucidum mycelium, creates a characteristic data set based on different image features, and establishes a classification model to perform mycelium discrimination more objectively and accurately.

[0090] 2. The present invention integrates the algorithm's detection result information system through the persistent storage operation of data, so that the picture information can be viewed in a table form, and the mycelium phenotypic parameters in different pictures can be displayed in batches, thereby improving the detection efficiency in the Ganoderma lucidum mycelium quality detection link. BRIEF DESCRIPTION OF THE DRAWINGS

[0091] Figure 1 A method flow chart of a preferred embodiment of the present invention;

[0092] Figure 2 This is an example diagram of mycelium extraction according to a preferred embodiment of the present invention, wherein a is an image to be detected, and b is an extracted mycelium image;

[0093] Figure 3 This is an example diagram of pigment detection according to a preferred embodiment of the present invention, wherein a is the image to be detected, and b is the image of the pigment portion after the detection and extraction.

[0094] Figure 4 This is an example diagram of non-antagonism in antagonism detection in a preferred embodiment of the present invention, wherein a is a non-antagonistic Ganoderma lucidum mycelium image, b is an extracted mycelium image, c is an extracted feature region, d is a result of regional growth, and e is an extracted parameter profile.

[0095] Figure 5 This is an example diagram of antagonism in antagonism detection in a preferred embodiment of the present invention, wherein a is an image of Ganoderma lucidum mycelium with antagonism, b is an extracted mycelium image, c is an extracted feature region, d is a result of regional growth, and e is an extracted parameter profile.

[0096] Figure 6 This is an example diagram of feature block extraction of a preferred embodiment of the present invention, wherein a is the image to be detected, b is the extracted mycelium image, c is the image with the central part removed, d is a randomly generated block, and e is the extracted feature block.

[0097] Figure 7 This is an image of Ganoderma lucidum mycelium to be detected according to a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0098] The following will be combined with the attached Figure 1-7The technical solution of the present invention is described clearly and completely. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0099] The present invention proposes an intelligent detection method for phenotypic characteristics of Ganoderma lucidum mycelium, such as Figure 1 As shown in the figure, the YOLO model is used to efficiently monitor the image of Ganoderma lucidum mycelium, including the following steps:

[0100] S1. Collecting an electronic image of Ganoderma lucidum, wherein the electronic image of Ganoderma lucidum includes mycelium, a culture dish, and sclerotia on the mycelium;

[0101] S2, processing the collected electronic images of Ganoderma lucidum, locating the mycelium and sclerotium on the electronic images of Ganoderma lucidum, and preparing a Ganoderma lucidum electronic image positioning data set;

[0102] S3, establishing a Ganoderma lucidum electronic image target detection model based on the YOLO algorithm, inputting a Ganoderma lucidum electronic image positioning data set, training the target detection model, and obtaining a trained Ganoderma lucidum electronic image target detection model, wherein the trained Ganoderma lucidum electronic image target detection model includes a sclerotium positioning model and a mycelium positioning model;

[0103] S4, using the trained Ganoderma lucidum electronic image target detection model, extracting the mycelium image without a culture dish from the Ganoderma lucidum electronic image to be detected;

[0104] S5, measuring morphological parameters of the image of mycelium without a culture dish extracted in step S4, and obtaining the growth rate in combination with the growth time;

[0105] S6, performing pigment discrimination detection on the image without culture dish hyphae extracted in step S4, and marking the pigment area;

[0106] S7, performing antagonistic discrimination on the image of mycelium without culture dish extracted in step S4;

[0107] S8, extracting characteristic blocks from the mycelium image without culture dish extracted in step S4 to obtain a characteristic block image of Ganoderma lucidum mycelium;

[0108] S9, according to the characteristic block image of the Ganoderma lucidum mycelium obtained in step S8, a characteristic data set is generated based on different image features;

[0109] S10, inputting the characteristic block image of the mycelium obtained in step S8 into the mycelium classification model to perform mycelium identification, the mycelium identification includes mycelium bundle thickness identification, colony morphology identification, mycelium density identification, and classification;

[0110] S11. Integrate the information and output the test results.

[0111] In a preferred embodiment, in step S2, the method for preparing the Ganoderma lucidum electronic image positioning data set comprises the following steps:

[0112] S21. Clean and preprocess the images, including removing duplicate images, unifying image sizes, and formatting, to ensure the integrity and accuracy of the data set;

[0113] S22, performing data enhancement processing on the image to simulate the images of Ganoderma lucidum mycelium under various environments;

[0114] S23, marking the positions of the mycelium and sclerotium of Ganoderma lucidum in the image, generating and storing positioning mark data, wherein each image corresponds to the position and size information of the mycelium and sclerotium of Ganoderma lucidum;

[0115] S24, randomly divide the cleaned data set into a positioning training set, a positioning test set, and a positioning verification set according to any desired ratio, such as 7:2:1. Under different sets, create folders named after the category name to store the images;

[0116] Among them, the classification categories are as follows: hyphae bundle categories are thick, medium, and thin hyphae images; hyphae density is sparse, medium, and dense hyphae images; colony morphology is close to the plate, slightly fluffy, and fluffy hyphae images;

[0117] In a preferred embodiment, in step S4, the extraction of the culture dish-free mycelium image comprises the following steps:

[0118] S41, loading the electronic image of Ganoderma lucidum, using the target detection model of the electronic image of Ganoderma lucidum, using the positioning frame to locate the target of the Ganoderma lucidum mycelium, and obtaining the position and size information of the Ganoderma lucidum mycelium;

[0119] S42, according to the position and size information of the mycelium of Ganoderma lucidum, setting the interior of the positioning frame of the mycelium of Ganoderma lucidum as the target area, and setting other areas as black;

[0120] S43, graying the image obtained in S42;

[0121] S44, performing adaptive binarization processing on the grayscaled image of the mycelium of Ganoderma lucidum obtained in S43, so that the image becomes an image of the mycelium of Ganoderma lucidum including the white area, i.e., the marked area, and the black area of ​​the non-mycelium image of the culture dish image;

[0122] S45, performing image processing on the image obtained by the adaptive binarization in S44, removing the culture dish portion image from the Ganoderma lucidum mycelium portion image, and obtaining a mask;

[0123] S46, adding the mask obtained in S45 and the Ganoderma lucidum electronic image pixel by pixel to obtain a Ganoderma lucidum mycelium image without a culture dish.

[0124] In a preferred embodiment, in step S5, obtaining the growth rate in combination with the growth time includes the following steps:

[0125] S51, performing an adaptive binarization operation on the image of the Ganoderma lucidum mycelium without the culture dish extracted in step S4;

[0126] S52, obtaining the outer contour information of the image of the Ganoderma lucidum mycelium without the culture dish after the binarization operation through a contour detection algorithm;

[0127] S53, calculating and obtaining the outer contour with the largest area among all the outer contour information;

[0128] S54, obtaining the diameter of the maximum outer contour through a circle fitting function;

[0129] S55, converting the pixel size of the diameter of the maximum outer contour into the actual size according to the ratio between the actual size and the pixel points of the image captured by the mycelium phenotype instrument;

[0130] S56, calculating the growth rate, the growth rate is calculated by:

[0131]

[0132] Among them, r is the growth rate of the current sample, d is the growth time of the current sample, and m is the diameter of the current sample;

[0133] The growth rate information of different mycelium is calculated and the samples are graded according to different temperatures.

[0134] In a preferred embodiment, in step S6, the method for performing pigment discrimination detection on an image comprises the following steps:

[0135] S61, loading the image of the Ganoderma lucidum mycelium without the culture dish obtained in S4, and inputting it into a sclerotium positioning model to perform sclerotium positioning;

[0136] S62, storing the position and size information of the located sclerotia;

[0137] S63, according to the stored sclerotium position and size information in S62, obtaining a sclerotium partial image in the Ganoderma lucidum mycelium image without a culture dish, and making the sclerotium partial image as a mask and performing an inversion operation;

[0138] S64, merging the mycelium image without the culture dish obtained in S4 with the mask obtained in S63 to obtain an RGB color mycelium image of the sterile nucleus and the culture dish;

[0139] S65, converting the RGB color mycelium image of Ganoderma lucidum obtained in step S64 into an HSV color mycelium image of Ganoderma lucidum;

[0140] S66, filtering out non-mycelium color parts from the HSV color Ganoderma lucidum mycelium image obtained in step S65 according to a preset HSV color threshold;

[0141] S67, filtering out targets with an area less than 1000 pixels in the non-hyphae color part;

[0142] S68, calculating the number of non-mycelium color parts remaining after filtration;

[0143] S69. The image with a number of non-hyphae color parts of 1 and an area of ​​>6000 or a number of non-hyphae color parts of >=2 is judged as having pigment.

[0144] In a preferred embodiment, in step S7, the method for antagonism determination includes the following steps:

[0145] S71, loading the mycelium image without the culture dish obtained in S4, inputting it into the sclerotium positioning model for target positioning, and obtaining the information of the sclerotium positioning frame;

[0146] S72, calculating the number of sclerotia according to the information of the positioning frame, and if the number of sclerotia is less than 2, directly determining that there is no antagonism;

[0147] S73, calculating the center position c1 of all sclerotia for the mycelium image with the number of sclerotia>=2;

[0148] S74, calculate the maximum distance r1 from c1 to a single sclerotium,

[0149] S75, draw a circle with radius r1 with c1 as the center;

[0150] S76, using the circle obtained in S75 as a mask and inverting it to obtain mask a;

[0151] S77, determining the center position c2 of the mycelium image without the culture dish obtained in step S4;

[0152] S78, calculating the shortest distance r2 from c2 to the outer contour of the mycelium image;

[0153] S79, draw a circle with c2 as the center and 80% of r2 as the radius and make it into mask b;

[0154] S710, merging mask a and mask b to obtain a new mask;

[0155] S711, adding the new mask obtained in S710 and the mycelium image without the culture dish obtained in S4 pixel by pixel to obtain a new image;

[0156] S712, converting the new image obtained in S711 into a grayscale image and performing binarization processing;

[0157] S713, covering the sclerotium part in the image obtained in S712 with white, and merging it with the new mask obtained in S710;

[0158] S714, extracting the maximum outer contour after performing a region growing method on the image obtained in S713;

[0159] S715. Match the maximum outer contour extracted in S714 with the contour of the circle drawn in mask b, and determine whether there is an antagonism based on the matching result. If the matching result is greater than 0.05, it is determined that there is an antagonism; if the matching result is less than 0.05, it is determined that there is no antagonism.

[0160] In a preferred embodiment, the region growing method described in step S714 includes:

[0161] S7141, extracting a connected domain from the image after the binarization processing in S712, and obtaining the centroid coordinates of the connected domain as a seed;

[0162] S7142, adding neighboring nodes around the seed node to the current region, and calculating a new seed node at the same time. If a new seed node exists in the current region, the current region is expanded to the location of the new seed node, otherwise the boundary of the current region is updated;

[0163] S7143. Repeat the previous step until all seed nodes are included in the region or the current region is no longer expanded, stop expanding, and extract the maximum outer contour of the final region image.

[0164] In a preferred embodiment, in step S8, the method for extracting the feature block is:

[0165] S81, loading the RGB color mycelium images of the sterile nucleus and the culture dish obtained in S6, and performing grayscale and binarization processing;

[0166] S82, randomly selecting non-repeated points in the binary image obtained in step S81;

[0167] S83, extracting blocks with each point as the center;

[0168] S84, removing blocks containing black pixels;

[0169] S85, extracting a preset number of feature blocks from each mycelium image;

[0170] S86, merging the feature blocks with the original image respectively to obtain new blocks;

[0171] S87. Save the obtained new block as the extracted feature block.

[0172] In a preferred embodiment, in step S9, the method for preparing the feature data set includes:

[0173] S91, classifying the mycelium images into corresponding folders according to the features of the mycelium images obtained in S8;

[0174] S92, establish data sets according to hyphae bundle thickness, hyphae density and colony morphology;

[0175] S93, performing data cleaning and preprocessing on the image;

[0176] S94, randomly dividing the cleaned data set into a feature training set, a feature test set, and a feature verification set according to the required proportions, and creating folders named after the category names in different sets for storing images;

[0177] Among them, the classification categories are as follows: hyphae bundle category is thick-medium-thin hyphae images, hyphae density is sparse-medium-dense hyphae images, colony morphology is close to the plate and slightly fluffy and fluffy hyphae images;

[0178] In a preferred embodiment, in step S10, the method for identifying mycelium is:

[0179] S101, extracting a plurality of feature blocks from the feature block image of the Ganoderma lucidum mycelium obtained in step S8;

[0180] S102, establishing a classification model, loading hyphae density, hyphae bundle thickness, and colony morphology of each feature block obtained in turn into the classification model for prediction; the classification model is established based on YOLO, hyperparameters are configured, and the model is trained using feature training set data, and the model is tested using feature test set data to evaluate the performance of the model;

[0181] S103, screening out the prediction results of each feature block whose prediction probability is greater than a preset probability and saving them; the preset probability is preferably 0.6;

[0182] S104: Calculate the average probability of the prediction results saved in the previous step, and take the category that appears most frequently in the saved prediction results as the final judgment result.

[0183] In a preferred embodiment, in step S104, if there is a situation where there are the most tied categories, the category with the highest average probability is used as the final judgment result; if there is a category with no saved results, its average is recorded as 0; if the probability of no category in the saved prediction results is greater than the preset probability, the average prediction results of all feature blocks are calculated, and the category with the highest average probability is used as the final judgment result.

[0184] According to a preferred embodiment of the present invention, the intelligent detection method for phenotypic characteristics of Ganoderma lucidum mycelium of the present invention is described in detail below in conjunction with an embodiment.

[0185] Example 1

[0186] According to a preferred embodiment of the present invention, the detection of the growth rate of the Ganoderma mycelium of the present invention is described in detail through this embodiment.

[0187] Taking the growth rate of Ganoderma lucidum mycelium after culturing at 30°C in the dark for 6 days as an example, the grading standard is shown in Table 1. Figure 2 ( Figure 2 ) where a is the image to be detected, and b is the extracted image of Ganoderma lucidum mycelium without a culture dish.

[0188] Load image a to locate the mycelium target and obtain the position and size information of the mycelium;

[0189] Set the inside of the positioning frame of the Ganoderma lucidum mycelium as the target area, and set the other areas to black;

[0190] Grayscale the image;

[0191] Perform adaptive binarization processing;

[0192] The mask is obtained by removing part of the image of the culture dish through dilation, corrosion, opening and closing operations, etc.

[0193] The mask and image a are added pixel by pixel to obtain the Ganoderma lucidum mycelium image b without the culture dish;

[0194] Perform an adaptive binarization operation on image b;

[0195] Use contour detection algorithm to obtain all outer contour information;

[0196] Calculate and obtain the maximum outer contour information;

[0197] Use the circle fitting function to obtain the diameter information of the maximum outer contour;

[0198] According to the ratio between the actual size and pixel points of the image taken by the mycelium phenotype instrument, the pixel size of the diameter was converted into the actual size to obtain a mycelium diameter of 71 mm;

[0199] According to the relationship between the culture time and temperature of the mycelium, the corresponding growth rate of the mycelium was calculated to be 11.83 mm / d, which was classified as fast.

[0200] Table 1. Grading standards for mycelium growth rate at 30°C

[0201] Mycelium: Growth rate at 30℃, mm / d ≤6.68 6.69~9.00 ≥9.01 level slow middle quick

[0202] Embodiment 2:

[0203] According to a preferred embodiment of the present invention, the detection of the pigment of the Ganoderma mycelium of the present invention is described in detail through this embodiment.

[0204] Take the detection of pigments in a portion of Ganoderma mycelium as an example. Figure 3 In the figure, a is the image to be detected, and b is the image of the pigment part after the detection and extraction. The operation steps are as follows:

[0205] Load image a to locate the mycelium target and obtain the position and size information of the mycelium;

[0206] Binarization, expansion and corrosion are performed on the acquired parameters to cut out the mycelium part image;

[0207] Set the inside of the positioning frame of the Ganoderma lucidum mycelium as the target area, and set the other areas to black;

[0208] Grayscale the image;

[0209] Perform adaptive binarization processing;

[0210] The mask is obtained by removing part of the image of the culture dish through dilation, corrosion, opening and closing operations, etc.

[0211] The mask and image a are added pixel by pixel to obtain the image of Ganoderma lucidum mycelium without culture dish;

[0212] Calculate the area of ​​the hyphae portion;

[0213] Remove the core part;

[0214] Convert to HSV color space;

[0215] The non-hyphae color parts are filtered out by thresholding;

[0216] Filter targets with small areas;

[0217] Extract the screened pigment area and calculate the area;

[0218] The target number is calculated to be 38;

[0219] Image a is determined to contain pigment.

[0220] Example 3

[0221] According to a preferred embodiment of the present invention, the Ganoderma mycelium antagonism detection of the present invention is described in detail through this embodiment.

[0222] Take the antagonism between two Ganoderma mycelium as an example. Figure 4 In the figure, a is the image of non-antagonistic Ganoderma mycelium, b is the extracted mycelium image, c is the extracted feature region, d is the result of regional growth, and e is the extracted parameter profile. Figure 5 In the figure, a is the image of antagonistic Ganoderma mycelium, b is the extracted mycelium image, c is the extracted feature region, d is the result of regional growth, and e is the extracted parameter profile.

[0223] Load image a to locate the mycelium target and obtain the position and size information of the mycelium;

[0224] Binarization, expansion and corrosion are performed on the acquired parameters to cut out the mycelium part image;

[0225] Load image a to locate the bacterial core and obtain the position and size information of the bacterial core;

[0226] Calculate the center coordinates of each bacterial core;

[0227] Calculate the center coordinates of all bacterial centers according to the center coordinates of each bacterial center;

[0228] Calculate the shortest distance from the center coordinates of all fungus centers to the mycelium boundary;

[0229] After adjusting the coordinates and the shortest distance obtained previously, the circle is intercepted to obtain image c;

[0230] Perform a resizing operation on image c;

[0231] Perform mean shift to filter out unnecessary information;

[0232] Perform grayscale operation;

[0233] Extract the connected domain of the image and obtain the coordinates of the particles as seeds;

[0234] Add neighboring nodes around the seed node to the current region and calculate new seed nodes. If there is a new seed node in the current region, expand the current region to the location of the new seed node, otherwise update the boundary of the current region.

[0235] Repeat the previous step until all seed nodes are included in the region or the current region is no longer expanded, stop expanding, calculate the final region image and set it to white;

[0236] Cover the core part with white;

[0237] Perform expansion, erosion, opening, and closing operations to remove redundant parts;

[0238] Perform contour recognition and calculation, extract the maximum contour and draw it on the original image to obtain image e;

[0239] Shape-match the largest contour to the circle;

[0240] get Figure 4 The matching degree of a in is 2.8459448419226874e-05.

[0241] Figure 5 The matching degree of a is 0.9028680808846028;

[0242] According to the result parameters, Figure 4 The image of the mycelium of Ganoderma lucidum without antagonism is shown in the middle a. Figure 5 Middle a is an image of antagonistic Ganoderma mycelium.

[0243] Example 4

[0244] According to a preferred embodiment of the present invention, the feature block extraction of the present invention is described in detail through this embodiment.

[0245] Take the extraction of a characteristic block of Ganoderma lucidum mycelium as an example. Figure 6 In the figure, a is the image to be detected, b is the extracted mycelium image, c is the image with the central part removed, d is the randomly generated block, and e is the extracted feature block.

[0246] Load image a to locate the mycelium target and obtain the position and size information of the mycelium;

[0247] Binarization, expansion, and corrosion are performed on the acquired parameters to cut out the mycelium part image to obtain image b;

[0248] Calculate the center and radius of image b, remove the central part, and only keep the edge of the mycelium to obtain image c;

[0249] Grayscale and binarize image c;

[0250] Randomly select non-repeating points in the binary image;

[0251] Extract blocks with points as the center;

[0252] Eliminate blocks containing black pixels;

[0253] A certain amount of feature blocks are extracted from each mycelium image to obtain image d;

[0254] Merge the blocks obtained in the previous step with the original image to obtain multiple new block images e;

[0255] Save the resulting block.

[0256] Embodiment 5:

[0257] According to a preferred embodiment of the present invention, the information statistics process of the present invention is described in detail through this embodiment.

[0258] Take the detection image Image1 as an example, where Image1 is Figure 7 Shown

[0259] Create a csv file through python programming, add a header to it, read the image Image1 and print the image information.

[0260] The Ganoderma lucidum mycelium phenotype detection algorithm is called to obtain the results of each indicator and write them into the file. The detection results of Image1 are shown in Table 2. The diameter parameter unit is millimeter, the growth rate unit is mm / d, and the numbers behind the mycelium density, colony morphology, and mycelium bundle thickness detection results are the model prediction probabilities.

[0261] Table 2. Results of various indicators of Ganoderma mycelium phenotype detection

[0262] Serial number Image Name diameter Growth rate level Whether there is pigment Mycelium density Mycelial Antagonism Colony morphology Thickness of mycelium bundle 1 Image1 88 30℃14.67 quick No pigment Thin 0.77 No antagonism Fluffy 0.76 Medium 0.70

[0263] Embodiment 6:

[0264] According to a preferred embodiment of the present invention, the detection of the density of the Ganoderma mycelium of the present invention is described in detail through this embodiment.

[0265] Take the detection of the density of a portion of Ganoderma mycelium as an example. Figure 7 For the image to be detected, the operation steps are as follows:

[0266] Grayscale the image;

[0267] Load image a to locate the mycelium target and obtain the position and size information of the mycelium;

[0268] Binarization, expansion and corrosion are performed on the acquired parameters to cut out the mycelium part image;

[0269] Calculate the center and radius of the image in the previous step, remove the central part, and only keep the edge of the mycelium;

[0270] Randomly extract 9 feature blocks and save them;

[0271] The obtained blocks are input into the trained classification model for prediction;

[0272] Filter out the prediction results with prediction probability greater than 0.6 for each feature block and save them;

[0273] The prediction results of the previous step are averaged and the category that appears most frequently in the saved results is used as the final judgment result. If there is a tie for the most categories, the category with the highest average probability is used as the final judgment result. If there is a category with no saved results, its average is recorded as 0. If the probability of no category in the saved prediction results is greater than 0.6, the average prediction results of the 9 feature blocks are calculated and the category with the highest average probability is used as the final judgment result.

[0274] The hyphae density category of the image is calculated to be sparse;

[0275] Embodiment 7:

[0276] According to a preferred embodiment of the present invention, the data set production of the present invention is described in detail through this embodiment.

[0277] The steps for making target positioning dataset are as follows:

[0278] Clean and preprocess the images, including removing duplicate images, unifying image sizes, and formatting, to ensure the integrity and accuracy of the data set;

[0279] Perform data enhancement processing on the image to simulate the images of Ganoderma mycelium in various environments;

[0280] Create a dataset file in the VOC2007 format, save the annotation result information in the Annotations folder, store the image files in the JPEGImages folder, and fill in the category information in the predefined_classes.txt file.

[0281] Mark the positions of the mycelium and sclerotium of Ganoderma lucidum in the image, generate and store positioning mark data, and each image corresponds to the position and size information of the mycelium and sclerotium of Ganoderma lucidum;

[0282] The cleaned data set is randomly divided into training set, test set and validation set according to 7:2:1. Under different sets, create folders named after the category to store images;

[0283] Create a yaml file and fill in the location information of the relevant training files and the categories that need to be detected;

[0284] The steps for making the classification data set are as follows:

[0285] Load the image to locate the target of mycelium and obtain the position and size information of mycelium;

[0286] Binarization, expansion and corrosion are performed on the acquired parameters to cut out the mycelium part image;

[0287] Calculate the center and radius of the image in the previous step, remove the central part, and only keep the edge of the mycelium;

[0288] Randomly select non-repeating points in the binary image;

[0289] Extract blocks with points as the center;

[0290] Eliminate blocks containing black pixels;

[0291] Extract a certain amount of feature blocks from each mycelium image;

[0292] Merge the blocks obtained in the previous step with the original image to obtain new blocks;

[0293] Save the resulting block;

[0294] Classify mycelium images into corresponding folders according to their characteristics;

[0295] The dataset is randomly divided into training set, test set and validation set according to the ratio of 7:2:1. Under different sets, folders named after categories are created to store images.

[0296] Among them, the classification categories are as follows: hyphae bundle category is thick-medium-thin hyphae images, hyphae density is sparse-medium-dense hyphae images, colony morphology is close to the plate and slightly fluffy and fluffy hyphae images;

[0297] Embodiment 8:

[0298] According to a specific embodiment of the present invention, the model training results of the present invention are described in detail.

[0299] The mycelium positioning model was used to test the test set, using 55 test set images, and the test results are shown in Table 4. The core positioning model was used to test the test set, using 24 test set images, and the test results are shown in Table 3. In the table, mAP represents the area of ​​the closed area formed after the precision and recall are used as two-axis plots, mAP50 represents the average mAP with a threshold greater than 0.5, and mAP50-95 represents the threshold of 0.5 to the mAP threshold of 0.95, with an interval of 0.05, and 10 mAP values ​​are obtained, and then the ten values ​​are averaged.

[0300] The colony morphology classification model was used for the test set test, using 242 test set images, and the test results are shown in Table 5. The hyphae density classification model was used for the test set test, using 111 test set images, and the test results are shown in Table 6. The hyphae bundle thickness classification model was used for the test set test, using 188 test set images, and the test results are shown in Table 7. In the table, top-1_acc refers to the highest accuracy rate that the predicted category matches the actual result, and top-5_acc refers to the accuracy rate that the predicted category contains the actual result.

[0301] Table 3. Detection results of sclerotium model on the test set

[0302] category Number of images Number of instances P Precision R recall mAP50 mAP50-95 Sclerotium 24 26 1 0.96 0.968 0.75

[0303] Table 4. Detection results of mycelium localization model on the test set

[0304] category Number of images Number of instances P Precision R recall mAP50 mAP50-95: Mycelium 55 55 0.987 1 0.995 0.953

[0305] Table 5. Detection results of colony morphology classification model on the test set

[0306] category Number of images <![CDATA[ top1_acc ]]> <![CDATA[ top5_acc ]]> All Categories 242 0.905 1 Colony morphology_closely attached 81 0.914 1 Colony morphology_slightly fluffy 74 0.905 1 Colony morphology_fluffy 87 0.897 1

[0307] Table 6. Detection results of hyphae density classification model on the test set

[0308] category Number of images <![CDATA[ top1_acc ]]> <![CDATA[ top5_acc ]]> All Categories 111 0.856 1 Mycelium density 45 0.822 1 Mycelium density_fine 33 1 1 Mycelium density_medium 33 0.758 1

[0309] Table 7. Detection results of hyphae bundle thickness classification model on the test set

[0310] category Number of images <![CDATA[ top1_acc ]]> <![CDATA[ top5_acc ]]> All Categories 188 0.973 1 Mycelium bundle_thick 54 0.963 1 Mycelium bundle_fine 74 0.986 1 Mycelium bundle_Medium 60 0.967 1

[0311] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. An intelligent detection method for phenotypic characteristics of Ganoderma lucidum mycelium, characterized in that: The following steps are involved: S1, collecting electronic images of Ganoderma lucidum; S2, processing the collected electronic images of Ganoderma lucidum to prepare a Ganoderma lucidum electronic image positioning data set; S3, establishing a Ganoderma lucidum electronic image target detection model based on the YOLO algorithm, inputting a Ganoderma lucidum electronic image positioning data set, training the Ganoderma lucidum electronic image target detection model, and obtaining a trained Ganoderma lucidum electronic image target detection model, wherein the trained Ganoderma lucidum electronic image target detection model includes a sclerotium positioning model and a mycelium positioning model; S4, using the trained Ganoderma lucidum electronic image target detection model, performing image extraction on the Ganoderma lucidum electronic image to obtain a Ganoderma lucidum mycelium image without a culture dish; S5, measuring morphological parameters of the image of the Ganoderma lucidum mycelium without the culture dish extracted in step S4, and obtaining the growth rate in combination with the growth time; S6, performing pigment discrimination detection on the image of the Ganoderma lucidum mycelium without the culture dish extracted in step S4, and marking the pigment area; S7, performing antagonistic discrimination on the image of the Ganoderma lucidum mycelium without the culture dish extracted in step S4; S8, extracting characteristic blocks from the image of the Ganoderma lucidum mycelium without the culture dish extracted in step S4, to obtain a characteristic block image of the Ganoderma lucidum mycelium; S9, according to the characteristic block image of the Ganoderma lucidum mycelium obtained in step S8, a characteristic data set is prepared based on different image features; S10, establishing a classification model, and inputting the characteristic block image of the mycelium obtained in step S9 into the Ganoderma lucidum mycelium classification model to identify the mycelium and perform classification; S11. Integrate the information and output the test results.

2. The intelligent detection method for phenotypic characteristics of Ganoderma lucidum mycelium according to claim 1, characterized in that: In step S2, the method for preparing a Ganoderma lucidum electronic image positioning data set comprises the following steps: S21, cleaning and preprocessing the image; S22, performing data enhancement processing on the image to simulate the images of Ganoderma lucidum mycelium under various environments; S23, marking the positions of the mycelium and sclerotium of Ganoderma lucidum in the image, generating and storing positioning mark data, wherein each image corresponds to the position and size information of the mycelium and sclerotium of Ganoderma lucidum; S24. Randomly divide the cleaned data set into a positioning training set, a positioning test set, and a positioning verification set according to the required ratio. Under different sets, create folders named after the category name to store the images.

3. The intelligent detection method for phenotypic characteristics of Ganoderma lucidum mycelium according to claim 1, characterized in that: The extraction of the Ganoderma lucidum mycelium image in step S4 includes the following steps: S41, loading the electronic image of Ganoderma lucidum, using the target detection model of the electronic image of Ganoderma lucidum, using the positioning frame to locate the target of the Ganoderma lucidum mycelium, and obtaining the position and size information of the Ganoderma lucidum mycelium; S42, according to the position and size information of the mycelium of Ganoderma lucidum, setting the interior of the positioning frame of the mycelium of Ganoderma lucidum as the target area, and setting other areas as black; S43, graying the image obtained in S42; S44, performing adaptive binarization processing on the grayscaled image of the mycelium portion of Ganoderma lucidum obtained in S43; S45, performing image processing on the image obtained by the adaptive binarization in S44, removing the culture dish portion image from the Ganoderma lucidum mycelium portion image, and obtaining a mask; S46, adding the mask obtained in S45 and the Ganoderma lucidum electronic image pixel by pixel to obtain a Ganoderma lucidum mycelium image without a culture dish.

4. The intelligent detection method for phenotypic characteristics of Ganoderma lucidum mycelium according to claim 1, characterized in that: In step S5, obtaining the growth rate in combination with the growth time includes the following steps: S51, performing an adaptive binarization operation on the image of the Ganoderma lucidum mycelium without the culture dish extracted in step S4; S52, obtaining the outer contour information of the image of the Ganoderma lucidum mycelium without the culture dish after the binarization operation through a contour detection algorithm; S53, calculating the outer contour with the largest area among all the outer contour information obtained in S52; S54, obtaining the diameter of the maximum outer contour through a circle fitting function; S55, converting the pixel size of the diameter of the maximum outer contour into an actual size; S56, calculating the growth rate, the growth rate is calculated by: Where r is the growth rate of the current sample, d is the growth time of the current sample, and m is the diameter of the current sample.

5. The intelligent detection method for phenotypic characteristics of Ganoderma lucidum mycelium according to claim 1, characterized in that: In step S6, the method for performing pigment discrimination detection on the image of Ganoderma lucidum mycelium without a culture dish comprises the following steps: S61, loading the image of the Ganoderma lucidum mycelium without the culture dish obtained in S4, and inputting it into a sclerotium positioning model to perform sclerotium positioning; S62, storing the position and size information of the located sclerotia; S63, according to the stored sclerotium position and size information in S62, obtaining a sclerotium partial image in the Ganoderma lucidum mycelium image without a culture dish, and making the sclerotium partial image as a mask and performing an inversion operation; S64, merging the mycelium image without the culture dish obtained in S4 with the mask obtained in S63 to obtain an RGB color image of the sterile nucleus and the culture dish; S65, converting the RGB color image obtained in step S64 into an HSV color image; S66, filtering out non-hyphae color parts from the HSV color mycelium image according to a preset HSV color threshold; S67, filtering out targets with an area less than 1000 pixels in the non-hyphae color part; S68, calculating the number of non-mycelium color parts remaining after filtration; S69. The image with a non-hyphae color part of 1 and an area > 6000 or a number of non-hyphae color parts >= 2 is judged to have pigment.

6. The intelligent detection method for phenotypic characteristics of Ganoderma lucidum mycelium according to claim 1, characterized in that: In step S7, the method for antagonism determination includes the following steps: S71, loading the mycelium image without the culture dish obtained in S4, inputting it into the sclerotium positioning model for target positioning, and obtaining the information of the sclerotium positioning frame; S72, calculating the number of sclerotia according to the information of the positioning frame, and if the number of sclerotia is less than 2, directly determining that there is no antagonism; S73, calculating the center position c1 of all sclerotia for the mycelium image with the number of sclerotia>=2; S74, calculate the maximum distance r1 from c1 to a single sclerotium, S75, draw a circle with radius r1 with c1 as the center; S76, using the circle obtained in S75 as a mask and inverting it to obtain mask a; S77, determining the center position c2 of the image of the Ganoderma lucidum mycelium without the culture dish obtained in step S4; S78, calculating the shortest distance r2 from c2 to the outer contour of the mycelium image; S79, draw a circle with c2 as the center and 80% of r2 as the radius and make it into mask b; S710, merging mask a and mask b to obtain a new mask; S711, adding the new mask obtained in S710 and the mycelium image without the culture dish obtained in S4 pixel by pixel to obtain a new image; S712, converting the new image obtained in S711 into a grayscale image and performing binarization processing; S713, covering the sclerotium part in the image obtained in S712 with white, and merging it with the new mask obtained in S710; S714, extracting the maximum outer contour after performing a region growing method on the image obtained in S713; S715 , matching the maximum outer contour extracted in S714 with the contour of the circle drawn in mask b. If the matching result is greater than 0.05, it is determined that an antagonism phenomenon exists; otherwise, it is determined that an antagonism phenomenon does not exist.

7. The intelligent detection method for phenotypic characteristics of Ganoderma lucidum mycelium according to claim 6, characterized in that: The region growing method described in step S714 includes: S7141, extracting a connected domain from the image after the binarization processing in S712, and obtaining the centroid coordinates of the connected domain as a seed; S7142, adding neighboring nodes around the seed node to the current region, and calculating a new seed node at the same time. If a new seed node exists in the current region, the current region is expanded to the location of the new seed node, otherwise the boundary of the current region is updated; S7143. Repeat the previous step until all seed nodes are included in the region or the current region is no longer expanded, stop expanding, and extract the maximum outer contour of the final region image.

8. The intelligent detection method for phenotypic characteristics of Ganoderma lucidum mycelium according to claim 1, characterized in that: In step S8, the method for extracting the feature block is: S81, loading the RGB color mycelium images of the sterile nucleus and the culture dish obtained in S6, and performing grayscale and binarization processing; S82, randomly selecting non-repeated points in the binary image obtained in step S81; S83, extracting blocks with each point as the center; S84, removing blocks containing black pixels; S85, extracting a preset number of feature blocks from each mycelium image; S86, merging the feature blocks with the original image respectively to obtain new blocks; S87. Save the obtained new block as the extracted feature block.

9. The intelligent detection method for phenotypic characteristics of Ganoderma lucidum mycelium according to claim 1, characterized in that: In step S9, the method for preparing the feature data set includes: S91, classifying the mycelium images obtained in step S8 into corresponding folders respectively; S92, establish data sets according to hyphae bundle thickness, hyphae density and colony morphology; S93, performing data cleaning and preprocessing on the image; S94, randomly dividing the cleaned data set into a feature training set, a feature test set, and a feature verification set according to the required proportions, and creating folders named after the category names in different sets for storing images; Among them, the classification categories are as follows: mycelium bundle category is thick-medium-fine mycelium image, mycelium density is sparse-medium-dense mycelium image, colony morphology is close to the plate and slightly fluffy and fluffy mycelium image.

10. The intelligent detection method for phenotypic characteristics of Ganoderma lucidum mycelium according to claim 1, characterized in that: In step S10, the method for distinguishing mycelium is: S101, extracting a plurality of feature blocks from the feature block image of the Ganoderma lucidum mycelium obtained in step S8; S102, loading each obtained feature block into the classification model in sequence for prediction; S103, screening out the prediction results of each feature block whose prediction probability is greater than the preset probability and saving them; S104: Calculate the average probability of the prediction results saved in the previous step, and take the category that appears most frequently in the saved prediction results as the final judgment result.

11. The intelligent detection method for phenotypic characteristics of Ganoderma lucidum mycelium according to claim 10, characterized in that: In step S104, if there is a situation where there are the most categories in parallel, the category with the highest average probability is used as the final judgment result; if there is a category with no saved results, its average is recorded as 0; if the probability of no category in the saved prediction results is greater than the preset probability, the average prediction results of all feature blocks are calculated, and the category with the highest average probability is used as the final judgment result.