A method and system for quantitatively detecting cauliflower head one-two level peduncle phenotype
Patent Information
- Application Number
- CN202611340113.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-01
- Publication Date
- 2026-10-30
AI Technical Summary
但现有植物表型分析方法更多集中于叶片、果实、根系或整株植株等对象,对于花椰菜花球背面花梗结构的实例识别和表型参数量化研究较少
(1)本发明针对花椰菜花球背面花梗结构复杂、花梗之间存在粘连和交错的问题,采用实例轮廓标注方式构建专用数据集,并基于实例分割模型实现花梗实例级分割,能够提高单个花梗识别和边界提取的准确性;
Smart Images

Figure CN123015985A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of smart agriculture technology, specifically relating to a method and system for quantitative detection of the primary and secondary pedicel phenotypes of cauliflower heads. Background Technology
[0002] Cauliflower is an important cruciferous vegetable crop, with its flower head being its main commercial organ. Phenotypic traits such as flower head morphology, branching structure, and color are closely related to variety breeding and commercial quality evaluation. The structure of the pedicel on the back of the flower head reflects its developmental status, branching density, and morphological differences between varieties. Flower head color is also an important indicator for evaluating its appearance quality. Therefore, objective and rapid quantitative analysis of the phenotypic parameters of cauliflower flower heads and pedicels is of great significance for cauliflower phenotypic research and variety breeding.
[0003] Traditional phenotypic measurements of cauliflower florets rely heavily on manual observation, measurement, and recording. While simple to perform, these methods suffer from high subjectivity, low efficiency, and poor repeatability. When dealing with large sample sizes, manual measurement is not only time-consuming and labor-intensive but also easily influenced by the operator's experience, measurement angle, and recording method, making it difficult to meet the needs of large-scale variety screening and high-throughput phenotypic analysis.
[0004] With the development of digital image processing and computer vision technologies, quantifying plant phenotypic parameters using image analysis methods has gradually become an important research direction in the agricultural field. Existing methods typically obtain target regions through image thresholding, edge detection, and contour extraction, and further calculate morphological parameters such as area, perimeter, length, and width. However, the pedicel structure on the back of the cauliflower head is complex, exhibiting phenomena such as intertwined branches, adhesion, occlusion, and unclear hierarchy. Traditional image processing methods are easily affected by background interference, changes in lighting, and blurred target boundaries, making it difficult to achieve fine-grained differentiation of individual pedicel instances.
[0005] In recent years, deep learning-based object detection and image segmentation technologies have been widely applied in the field of agricultural image recognition. Instance segmentation models can simultaneously obtain target category, location, and pixel-level mask information, making them suitable for segmentation and recognition tasks of complex agricultural targets. However, existing plant phenotypic analysis methods focus more on objects such as leaves, fruits, roots, or the entire plant, with limited research on instance recognition and phenotypic parameter quantification of the pedicel structure on the back of the cauliflower head. Especially in scenarios with complex, adhered, and intertwined pedicels, accurately quantifying the morphological and color parameters of a single pedicel remains a significant technical challenge.
[0006] Therefore, constructing a method and system that can accurately segment flower stalk instances, accurately quantify morphological and color parameters, and export visualized results is a technical problem that urgently needs to be solved in the field of cauliflower phenotypic analysis and smart breeding. Summary of the Invention
[0007] Technical problems to be solved To address the shortcomings of existing technologies, this invention provides a method and system for quantitative detection of the primary and secondary pedicel phenotypes of cauliflower heads. This method can quickly achieve pedicel instance segmentation and accurate quantification of morphological and color parameters, and is applicable to multiple fields such as plant phenotypic analysis and smart agriculture.
[0008] The present invention provides a method for quantitative detection of primary and secondary floret phenotypic characteristics of cauliflower heads, comprising the following steps: S1. Select cauliflower varieties with different inbred lines, cultivate them under the same growing environment, and harvest the samples to be tested at the head maturity stage; S2. Use an image acquisition device to photograph the back of the cauliflower head to obtain an RGB image of the back of the head; S3. Perform instance contour annotation on the primary and secondary stems in the captured RGB image of the flower ball, and obtain a dataset that can be used for model training through one or more preprocessing operations such as image cropping, dataset partitioning, data augmentation, and annotation format conversion. S4. Construct a lightweight instance segmentation model, and train the lightweight instance segmentation model using the cauliflower flower head and flower stalk dataset to obtain the model weights for flower stalk instance segmentation. S5. Input the RGB image of the cauliflower head to be tested into a lightweight instance segmentation model loaded with model weights to obtain the mask region of a single instance for each cauliflower sample; extract the morphological parameters and color parameters of the flower stalk based on the instance mask of the image, and construct the color quantization model of the first-level stalk and the second-level stalk based on the color parameters. S6. Construct a visual interactive platform to realize functions such as image import, image preprocessing, offline model inference, result display, phenotypic parameter quantification and data export. Furthermore, in step S1, during the sample collection process, cauliflowers with intact heads, no obvious mechanical damage, and clear pedicel structures from each variety are selected as the test samples to improve the reliability of subsequent image acquisition and phenotypic parameter quantification. Furthermore, in step S2, the camera magnification and shooting distance are fixed during the shooting process so that the imaging field of view of the image acquisition device covers the back area of the complete cauliflower head, thereby obtaining an image of the back of the head containing the complete pedicel structure; Furthermore, in step S3, during the annotation process, each identifiable flower stalk is treated as an independent instance and its closed contour is annotated, and a consistent category label is used for flower stalks of the same type. Further, in step S4, the instance segmentation model is the YOLO11n instance segmentation model. The lightweight improvement involves replacing the C3k2 modules in the backbone and neck networks of the YOLO11n instance segmentation model, as well as the C2PSA module at the end of the backbone network, with C3Ghost modules; replacing the standard convolutional modules used to generate P5-scale features in the backbone and neck networks with GhostConv modules; setting the number of output channels for the P5-scale features of the backbone network to 768; replacing the standard convolutional modules in the P1 / 2 and P2 / 4 stages of the backbone network with SMDE detail enhancement modules; and replacing the upsampling module in the neck network with a dynamic upsampling module. Through these methods, while reducing the number of model parameters and the size of the weight file, the segmentation accuracy of the cauliflower primary and secondary stem instance masks is maintained as much as possible. Further, in step S5, the morphological parameters include five items: flower stalk length, flower stalk width, aspect ratio, outline perimeter, and outline area; the color parameters include six items: the mean and standard deviation of each of the R, G, and B channels in the RGB color space; six items: the circular mean and standard deviation of the H channel and the mean and standard deviation of each of the S and V channels in the HSV color space; eight items: the mean and standard deviation of each of the L, a, b, and chromaticity C in the Lab color space; two items: the mean and standard deviation of the color difference ΔE between each pixel in the instance area and the Lab color in the instance; three items: the mean of the normalized RGB components r, g, and b; and three items: the mean of the R / G, R / B, and G / B color channel ratios. In the above steps, based on morphological parameters, the ratio coefficient between pixel size and actual size is calculated according to the actual size of the input reference object. The ratio coefficient is used to convert the flower stem length, flower stem width, and contour perimeter into actual length parameters, and the contour area into actual area parameters. Based on 28 color parameters, the color quantization models of the corresponding first-level stem and second-level stem are obtained through data standardization, PCA dimensionality reduction analysis, membership function calculation, normalization, and 0-100 mapping operations, respectively.
[0009] The present invention provides a quantitative detection system for the primary and secondary pedicel phenotypes of cauliflower heads, used for implementing the quantitative detection method for the primary and secondary pedicel phenotypes of cauliflower heads as described above, comprising: Image acquisition device: used to acquire images of the back of a cauliflower head under fixed shooting distance and fixed shooting angle conditions; Image import module: Used to import images of the back of cauliflower heads and read image size, image format, and image path information; Image preprocessing module: used to crop the acquired 2D image of the back of the cauliflower, retain the foreground part of the flower head and remove irrelevant background areas to obtain the image to be inferred; Image inference module: Used to load the instance segmentation model weight file and perform offline inference on the image to be inferred, to obtain the instance segmentation results of cauliflower flower head pedicel. The instance segmentation results include pedicel instance mask, pedicel outline, category information and confidence information. Size calibration module: used to calculate the ratio between the pixel size and the actual size of the reference object based on the pixel size of the reference object in the image and the actual size of the reference object; The phenotypic parameter extraction and quantization module is used to extract and quantify the phenotypic parameters of cauliflower flower heads based on the flower stalk instance mask, flower stalk outline, and proportion coefficient. The phenotypic parameters include morphological parameters and color parameters. The morphological parameters include flower stalk length, flower stalk width, aspect ratio, outline area, and outline perimeter. The color parameters include six items: mean and standard deviation of R, G, and B channels in the RGB color space; six items: mean and standard deviation of H channel in the HSV color space, and mean and standard deviation of S and V channels; eight items: mean and standard deviation of L, a, b, and chromaticity C in the Lab color space; two items: mean and standard deviation of color difference ΔE of each pixel in the instance mask area relative to the Lab color in the instance; three items: mean of normalized RGB components r, g, and b; and three items: mean of R / G, R / B, and G / B channel ratios. Segmentation result display module: used to display the original image, preprocessed image, flower stalk instance mask image, contour overlay image, and phenotypic parameter quantification results; Data export module: Used to export instance segmentation results, phenotypic parameters, and size calibration results as table files or image files; Visualization and Interaction Module: This module enables human-computer interaction for image import, image preprocessing, model weight loading, offline model inference, size calibration, result display, parameter quantization, and data export.
[0010] Beneficial technical effects Compared with the prior art, the present invention has the following beneficial effects: (1) In view of the complex structure of the flower stalks on the back of the cauliflower head and the problem of adhesion and interweaving between the flower stalks, the present invention adopts the instance contour annotation method to construct a special dataset and realizes the instance-level segmentation of flower stalks based on the instance segmentation model, which can improve the accuracy of individual flower stalk identification and boundary extraction; (2) The present invention can obtain model weights suitable for segmenting the specific object based on the cauliflower pedicel dataset, thereby improving the segmentation adaptability to the complex pedicel structure on the back of the flower head; (3) Based on the flower stalk instance mask, the present invention automatically quantifies the flower stalk length, flower stalk width, aspect ratio, contour area, contour perimeter, and color parameters such as RGB, HSV and Lab basic color features, thereby improving the quantification efficiency of phenotypic parameters and the richness of data; (4) The present invention establishes the proportional relationship between pixel size and actual size by using a known actual size reference object, which can convert the length, width, perimeter and area parameters under pixel unit into actual physical size parameters, thereby improving the comparability and practicality of phenotypic data between different samples; (5) This invention integrates image import, image preprocessing, offline model inference, segmentation result display, phenotypic parameter quantification and data export functions through a visual interactive platform, reducing the switching operations between multiple software programs and improving the automation level and ease of use of the system; (6) This invention introduces the Ghost lightweight module into the backbone and neck network of the YOLO11n instance segmentation model; the shallow layers P1 and P2 of the backbone network are replaced with the SMDE detail enhancement module; and the neck upsampling is replaced with the Dynamic Sampling module. This reduces the number of model parameters and the size of the weight file while enhancing the ability to extract shallow detail features and improving the accuracy of instance segmentation. (7) This invention proposes a color quantification model for cauliflower florets, which solves the problems of difficulty and strong subjectivity in traditional color rating. Attached Figure Description
[0011] Figure 1 This is a schematic diagram of the method flow according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the system modules according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the model structure according to an embodiment of the present invention; Figure 4 This is a diagram of an image acquisition device according to an embodiment of the present invention; Figure 5 This is a color quantization result diagram of an embodiment of the present invention; Detailed Implementation
[0012] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that the following embodiments are only used to illustrate the technical solutions of the present invention.
[0013] To better understand the above technical solutions, the following will provide a detailed description of the technical solutions in conjunction with the accompanying drawings and specific embodiments. The terms and symbols used are explained as follows: Cauliflower head pedicel: In this invention, "pedicel" refers to the branch-like structural region in the image on the back of the cauliflower head that can be identified and segmented and quantified as an independent instance.
[0014] Instance contour annotation: In this invention, "instance contour annotation" refers to treating each identifiable peduncle of the primary and secondary peduncle of the cauliflower in the image as an independent instance and annotating its closed contour along its outer boundary.
[0015] Instance mask: In this invention, "instance mask" can also be called instance mask, which is used to represent the pixel area of a single flower stalk instance in an image.
[0016] Reference object: In this invention, "reference object" refers to a calibrated object whose actual size is known, and which is photographed at the same distance and magnification as when photographing the image of the back area of the flower ball, in order to establish the proportional relationship between the image pixel size and the actual size.
[0017] Scale factor: In this invention, the "scale factor" refers to the ratio of the actual size of the reference object to its pixel size in the image, which is used to represent the actual length corresponding to a unit pixel.
[0018] scale=L real / L pixel (1) In the formula, L real L is the actual length of the reference object. pixel is the pixel length of the reference object in the image, and scale is the scaling factor between the pixel size and the actual size.
[0019] Z-score data standardization: This involves making a color parameter dimensionless using its mean and standard deviation.
[0020] Z=(x-μ) / σ (2) In the formula, x is the original value of the instance color parameter, μ is the mean of the corresponding category modeled instances, and σ is the standard deviation of the corresponding category modeled instances.
[0021] Principal Component Analysis (PCA), Contribution Rate, and Cumulative Contribution Rate: PCA is a method that transforms multiple standardized color parameters that are correlated into several mutually orthogonal principal components; the contribution rate represents the proportion of the total variance of the original standardized data explained by the corresponding principal component, and the cumulative contribution rate represents the sum of the contribution rates of the first few principal components. This invention selects the first 6 principal components with a cumulative contribution rate of not less than 95%.
[0022] Membership function value: refers to the dimensionless value obtained after normalizing the scores of each principal component to the interval of 0 to 1. The comprehensive color representation value is obtained by multiplying the membership function values of each principal component by their corresponding weights and then summing the results. The principal component weight is the ratio of the contribution rate of that principal component to the cumulative contribution rate of the selected principal components.
[0023] Example 1 This embodiment provides a method for quantitative detection of the primary and secondary pedicel phenotypes of cauliflower heads, including the following steps: S1. Select 650 cauliflower samples and ensure that the growing environment is consistent. At the maturity period of the samples, select cauliflowers of each variety with intact flower heads and no obvious mechanical damage for harvesting.
[0024] S2, using, for example Figure 4 The image acquisition device takes a picture of the cauliflower head with the back facing it. During the image acquisition process, the camera's shooting distance, magnification, and shooting angle are fixed to ensure that the imaging field of view of the image acquisition device covers the entire back area of the cauliflower head. For subsequent conversion to actual dimensions, an image of a reference object with known actual dimensions is taken using the same shooting distance and magnification. The reference object can be a standard coin, ruler, or standard circular calibration plate. In this embodiment, a standard one-yuan coin with a known diameter is used as the reference object.
[0025] S3. Import the acquired RGB image of the back of the cauliflower head into the annotation software to perform instance-by-instance contour annotation of the primary and secondary stems. In this embodiment, Labelme software can be used for annotation. During the annotation process, each identifiable stem on the back of the cauliflower head is treated as an independent instance and its closed contour is annotated. For stem areas that are adhered, intersecting, or mutually occluded, stem instances are distinguished based on identifiable boundaries, and consistent category labels are used for stems of the same type to ensure consistency of annotation results. After annotation, the image data is preprocessed, including one or more of image cropping, dataset partitioning, data augmentation, and annotation format conversion. Image cropping is used to remove some irrelevant background areas; dataset partitioning is used to divide the image data into training, validation, and test sets; data augmentation can include operations such as rotation, flipping, brightness adjustment, and contrast adjustment; annotation format conversion is used to convert the Labelme annotation file into a training format that the instance segmentation model can recognize. Through the above processing, a dedicated dataset for training the cauliflower head stem instance segmentation model is obtained.
[0026] S4. Train the model on the dataset to obtain the model weights for segmenting cauliflower head and pedicel instances, such as... Figure 3The model structure diagram is shown. In this embodiment, the instance segmentation model adopts the YOLO11n-seg-GSD instance segmentation model. The training hardware environment is a Linux system, an NVIDIA GeForce RTX3090 graphics card with 24GB of video memory. Training uses the SGD optimizer, the input image size is 640×640 pixels, the training epochs are 150, the initial learning rate is 0.008, and the batch size is 16. The C3k2 module in the backbone network and the neck network, as well as the C2PSA module at the end of the backbone network, are replaced with the C3Ghost module; the standard convolutional modules used to generate P5 scale features in the backbone network and the neck network are replaced with the GhostConv module; the number of output channels for the P5 scale features of the backbone network is set to 768; the standard convolutional modules in the P1 / 2 and P2 / 4 stages of the backbone network are replaced with the SMDE detail enhancement module; and the upsampling module of the neck network is replaced with the dynamic upsampling module. The original YOLO11n-seg model had approximately 2.84M parameters, while the YOLO11n-seg-GSD model in this embodiment has approximately 1.9M parameters, representing a reduction of about 32.8%. Taking mAP@0.5 as an example, the model's segmentation performance on the independent test set reached 96.3% for first-level segments and 79.6% for second-level segments.
[0027] S5. Based on the visual interactive platform, after the user selects the locally stored model weight file, the model inference module loads the model weight file and performs offline inference on the image to be inferred. After inference is completed, the model outputs the instance segmentation results of the cauliflower head pedicel. The instance segmentation results include the pedicel instance mask, pedicel outline, and category information. A pedicel instance mask image is generated based on the model output, and the pedicel outline is overlaid on the original or preprocessed image for easy viewing of the pedicel segmentation effect. Simultaneously, based on the pedicel instance mask, pedicel outline, and scale coefficient, the phenotypic parameters of the cauliflower head pedicel are precisely quantified, including 5 morphological parameters and 28 color parameters.
[0028] S6. Based on 28 color parameters, data standardization, PCA dimensionality reduction, membership function calculation, normalization, and 0-100 mapping operations are performed to obtain the color quantization models Y1 and Y2 for the primary and secondary stems of cauliflower, respectively. The specific color quantization models are as follows: Y1 = 60.712716 + 1.632145 × R mean - 0.405954 × R std + 1.659883 × G mean - 0.344634 × G std + 1.353787 × B mean - 0.273321 × Bstd -0.658398 × H cmean -0.059355 × H cstd - 0.816297 × S mean - 0.735731 × S std + 1.672899 × V mean -0.369378 × V std + 1.659458 × L mean - 0.443932 × Lstd + 0.556468 × a mean -0.450320 × a std - 0.439180 × b mean - 0.318244 × b std - 0.467827 × C mean -0.351638 × C std - 0.547700 × ΔE mean - 0.118044 × ΔE std - 0.580789 × no mean -0.800994 × ng mean + 0.796486 × nb mean + 0.679363 × R / G mean - 0.662955 × R / B mean - 0.688340 × G / B mean Y2 = 62.021067 + 0.884844 × R mean - 0.090088 × Rs std + 0.836821 × G mean - 0.025577 × G std + 0.956905 × B mean + 0.034690 × B std - 0.388837 × H cmean +0.688255 × H cstd - 0.842547 × S mean - 0.296551 × S std + 0.864188 × V mean -0.075374 × V std + 0.867836 × Lmean - 0.061456 × L std + 0.650049 × a mean +0.025995 × a std - 0.722790 × b mean - 0.061506 × b std - 0.715237 × C mean -0.070031 × C std - 0.187847 × ΔE mean + 0.109846 × ΔE std - 0.755722 × nr mean -0.790352 × ng mean + 0.831017 × nb mean + 0.571350 × R / G mean - 0.662185 × R / B mean - 0.669140 × G / B mean Among them, R mean R std All variables represent color feature parameters after Z-score standardization. The definitions of each parameter are shown in Table 1. Based on the color quantization model, the following can be obtained: Figure 5 The quantization values shown in the color quantization result image; Table 1. Definitions of symbols in the color quantization model Model output <![CDATA[Y1]]> The color quantization value of a first-level meme instance ranges from 0 to 100. Model output <![CDATA[Y2]]> The color quantization value of a secondary meme instance ranges from 0 to 100. RGB color characteristics <![CDATA[R mean ]]> The average pixel value of the R channel in the RGB color space within the mask area of the flower stem example. RGB color characteristics <![CDATA[R std ]]> Pixel standard deviation of the R channel in the RGB color space within the mask area of the flower stem example. RGB color characteristics <![CDATA[G mean ]]> The average pixel value of the G channel in the RGB color space within the mask area of the flower stem example. RGB color characteristics <![CDATA[G std ]]> Pixel standard deviation of the G channel in the RGB color space within the mask area of the flower stem example. RGB color characteristics <![CDATA[B mean ]]> The average pixel value of the B channel in the RGB color space within the mask area of the flower stem example. RGB color characteristics <![CDATA[B std ]]> Pixel standard deviation of the B channel in the RGB color space within the mask area of the flower stem example. HSV color characteristics <![CDATA[H cmean ]]> The circular mean of the H channel in the HSV color space within the mask area of the flower stem example. HSV color characteristics <![CDATA[H cstd ]]> Circular standard deviation of the H channel in the HSV color space within the mask area of the flower stem example. HSV color characteristics <![CDATA[S mean ]]> The average pixel value of the S channel in the HSV color space within the mask area of the flower stem example. HSV color characteristics <![CDATA[S std ]]> Pixel standard deviation of the S channel in the HSV color space within the mask area of the flower stem example. HSV color characteristics <![CDATA[V mean ]]> The average pixel value of the V channel in the HSV color space within the mask area of the flower stem example. HSV color characteristics <![CDATA[V std ]]> Pixel standard deviation of the V channel in the HSV color space within the mask area of the flower stem example. Lab color characteristics <![CDATA[L mean ]]> The average pixel value of the L channel in the Lab color space within the mask area of the flower stem example. Lab color characteristics <![CDATA[L std ]]> Pixel standard deviation of the L channel in Lab color space within the mask area of the flower stem example. Lab color characteristics <![CDATA[a mean ]]> The pixel mean of the a channel in the Lab color space within the mask area of the flower stem example. Lab color characteristics <![CDATA[a std ]]> Pixel standard deviation of the a channel in the Lab color space within the mask area of the flower stem example. Lab color characteristics <![CDATA[b mean ]]> The pixel mean of the b channel in the Lab color space within the mask area of the flower stem example. Lab color characteristics <![CDATA[b std ]]> Pixel standard deviation of the b channel in the Lab color space within the mask area of the flower stem example. Chromaticity characteristics <![CDATA[C mean ]]> Mean value of Lab chromaticity C within the masked area of the flower stem example Chromaticity characteristics <![CDATA[C std ]]> Standard deviation of Lab chromaticity C within the masked area of the flower stalk example Chromaticity characteristics <![CDATA[ΔE mean ]]> The average color difference of each pixel within the instance mask area relative to the Lab color in the instance. Chromaticity characteristics <![CDATA[ΔE std ]]> Standard deviation of color difference of each pixel within the instance mask area relative to the Lab color in the instance Normalized RGB features <![CDATA[nr mean ]]> Mean of normalized RGB component r within the masked region of the flower stem instance Normalized RGB features <![CDATA[ng mean ]]> Mean value of normalized RGB component g within the masked region of the flower stem instance Normalized RGB features <![CDATA[nb mean ]]> Mean of normalized RGB component b within the masked area of the flower stem instance Color ratio characteristics <![CDATA[R / G mean ]]> Mean ratio of R-channel to G-channel within the masked area of the flower stalk example Color ratio characteristics <![CDATA[R / B mean ]]> Mean ratio of R-channel to B-channel within the masked area of the flower stalk example Color ratio characteristics <![CDATA[G / B mean ]]> Mean ratio of G channel to B channel within the masked area of the flower stalk example Note: The range 0-100 maps flower stem colors from green to white to purple. mean represents the mean, std represents the standard deviation, cmean represents the circular mean, and cstd represents the circular standard deviation; R, G, and B represent the red, green, and blue channels in the RGB color space, respectively; H, S, and V represent the hue, saturation, and lightness channels in the HSV color space, respectively; L, a, and b represent the lightness, red-green color component, and yellow-blue color component in the Lab color space, respectively; C represents Lab chromaticity; ΔE represents color difference; nr, ng, and nb represent the normalized RGB color components. All variables in the table represent the standardized values of their corresponding color features.
[0029] The specific parameter quantification steps are as follows: Figure 1 The flowchart shows the quantitative detection method for the primary and secondary pedicel phenotypes of cauliflower heads.
[0030] Example 2 This embodiment provides a quantitative detection system for the primary and secondary phenotypic characteristics of cauliflower flower heads and pedicels. The system includes: Image acquisition device: used to acquire images of the back of a cauliflower head under fixed shooting distance and fixed shooting angle conditions; The image import module is used to import images of the back of cauliflower heads and read image size, image format, and image path information; Image preprocessing module: used to crop the acquired 2D image of the back of the cauliflower, retain the foreground part of the flower head and remove irrelevant background areas to obtain the image to be inferred; Image inference module: Used to load the locally stored instance segmentation model weight file and perform offline inference on the image to be inferred to obtain the instance segmentation results of cauliflower flower head pedicel. The instance segmentation results include pedicel instance mask, pedicel outline, category information and confidence information. Size calibration module: used to calculate the ratio between the pixel size and the actual size of the reference object based on the pixel size of the reference object in the image and the actual size of the reference object; The phenotypic parameter extraction and quantization module is used to extract and quantify the phenotypic parameters of cauliflower flower heads based on the flower stalk instance mask, flower stalk outline, and proportion coefficient. The phenotypic parameters include morphological parameters and color parameters. The morphological parameters include flower stalk length, flower stalk width, aspect ratio, outline area, and outline perimeter. The color parameters include six items: mean and standard deviation of R, G, and B channels in the RGB color space; six items: mean and standard deviation of H channel in the HSV color space, and mean and standard deviation of S and V channels; eight items: mean and standard deviation of L, a, b, and chromaticity C in the Lab color space; two items: mean and standard deviation of color difference ΔE of each pixel in the instance mask area relative to the Lab color in the instance; three items: mean of normalized RGB components r, g, and b; and three items: mean of R / G, R / B, and G / B channel ratios. Segmentation result display module: used to display the original image, preprocessed image, flower stalk instance mask image, contour overlay image, and phenotypic parameter quantification results; Data export module: Used to export instance segmentation results, phenotypic parameters, and size calibration results as table files or image files; Visualization and Interaction Module: Used for human-computer interaction operations such as image import, image preprocessing, model weight loading, offline model inference, size calibration, result display, parameter quantization, and data export; like Figure 2 As shown in the system module diagram, this system is used to implement a quantitative detection method for the primary and secondary pedicel phenotypes of cauliflower heads.
[0031] It should be noted that the terms "including" or "comprising" used in this specification are open-ended terms, and unless expressly specified, they do not exclude the inclusion of other elements, steps, or components not listed.
[0032] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
[0033] Those skilled in the art should understand that the above are merely several specific embodiments of the present invention, and not all embodiments. It should be noted that many modifications and improvements can be made by those skilled in the art, and all modifications or improvements not exceeding the scope of the claims should be considered within the protection scope of the present invention.
Claims
1. A method for quantitative detection of primary and secondary floret phenotypic characteristics of cauliflower heads, characterized in that, Includes the following steps: S1. Select cauliflower varieties with different inbred lines, cultivate them under the same growing environment, and harvest the samples to be tested at the head maturity stage; S2. Use an image acquisition device to photograph the back of the cauliflower head to obtain an RGB image of the back of the head; S3. Perform instance contour annotation on the primary and secondary stems in the captured RGB image of the flower ball, and obtain a dataset that can be used for model training through one or more preprocessing operations such as image cropping, dataset partitioning, data augmentation, and annotation format conversion. S4. Construct a lightweight instance segmentation model, and train the lightweight instance segmentation model using the cauliflower flower head and flower stalk dataset to obtain the model weights for flower stalk instance segmentation. S5. Input the RGB image of the cauliflower head to be tested into a lightweight instance segmentation model loaded with model weights to obtain the mask region of a single instance for each cauliflower sample; extract the morphological parameters and color parameters of the flower stalk based on the instance mask of the image, and construct the color quantization model of the first-level stalk and the second-level stalk based on the color parameters. S6. Build a visual interactive platform to realize functions such as image import, image preprocessing, offline model inference, result display, phenotypic parameter quantification, and data export.
2. The method for quantitative detection of primary and secondary floret phenotypic characteristics of cauliflower heads according to claim 1, characterized in that, In step S2, the back of the selected cauliflower head is photographed, and the camera magnification, shooting distance and shooting angle are fixed during the shooting so that the imaging field of view of the image acquisition device covers the entire back area of the cauliflower head.
3. The method for quantitative detection of primary and secondary floret phenotypic characteristics of cauliflower heads according to claim 1, characterized in that, In step S3, when annotating the primary and secondary stems of the flower ball image, each identifiable flower stem is treated as an independent instance and its closed contour is annotated, and a consistent category label is used for flower stems of the same type.
4. The method for quantitative detection of primary and secondary floret phenotypic characteristics of cauliflower heads according to claim 1, characterized in that, In step S4, the instance segmentation model is a lightweight YOLO instance segmentation model, which includes a backbone network, a neck network, and an instance segmentation head.
5. The method for quantitative detection of primary and secondary floret phenotypic characteristics of cauliflower heads according to claim 4, characterized in that, The C3k2 module in the backbone and neck network, as well as the C2PSA module at the end of the backbone network, were replaced with the C3Ghost module; the standard convolutional modules used to generate P5-scale features in the backbone and neck network were replaced with the GhostConv module; the number of output channels for the P5-scale features in the backbone network was set to 768; the standard convolutional modules in the P1 / 2 and P2 / 4 stages of the backbone network were replaced with the SMDE detail enhancement module; and the upsampling module in the neck network was replaced with the dynamic upsampling module.
6. The method for quantitative detection of primary and secondary floret phenotypic characteristics of cauliflower heads according to claim 1, characterized in that, In step S5, the morphological parameters include five items: flower stalk length, flower stalk width, aspect ratio, contour area, and contour perimeter. The color parameters are calculated based on the pixel values within the mask area of each flower stalk instance, including the mean and standard deviation of the R, G, and B channels in the RGB color space, totaling six features; the circular mean and standard deviation of the H channel and the mean and standard deviation of the S and V channels in the HSV color space, totaling six features; and the mean and standard deviation of the L, a, b, and chromaticity C in the Lab color space, totaling eight features. The mean and standard deviation of the color difference ΔE between each pixel within the instance region and the Lab color in the instance, totaling two features; The mean values of the normalized RGB components r, g, and b, totaling three features; and the mean values of the R / G, R / B, and G / B color channel ratios, totaling three features.
7. The method for quantitative detection of primary and secondary floret phenotypic characteristics of cauliflower heads according to claim 6, characterized in that, For morphological parameters, the size is calibrated based on a reference object of known actual size in the image to obtain the pixel size of the reference object in the image, and the ratio coefficient between the pixel size and the actual size is calculated based on the actual size of the input reference object. The pixel values of the flower stem length, flower stem width and contour perimeter are converted into actual length using the ratio coefficient. Based on the ratio coefficient, the contour area is further converted from pixel area to actual area.
8. The method for quantitative detection of primary and secondary floret phenotypic characteristics of cauliflower heads according to claim 6, characterized in that, Z-score standardization and principal component analysis were performed on 28 color parameters, and the top 6 principal components with a cumulative contribution rate of not less than 95% were selected. The scores of each principal component were normalized by membership function, and the weights were determined according to the ratio of the contribution rate of each principal component to the cumulative contribution rate of the selected principal components. The weighted results were normalized and mapped to the 0-100 interval to obtain the color quantification values of the first-level and second-level pheasants.
9. A quantitative detection system for the primary and secondary pedicel phenotypes of cauliflower heads, characterized in that, The system is used to implement the quantitative detection method for the primary and secondary pedicel phenotypes of cauliflower heads according to any one of claims 1 to 8, and the system comprises: Image acquisition device: used to acquire images of the back of a cauliflower head under fixed shooting distance and fixed shooting angle conditions; Image import module: Used to import images of the back of cauliflower heads and read image size, image format, and image path information; Image preprocessing module: used to crop the acquired 2D image of the back of the cauliflower, retain the foreground part of the flower head and remove irrelevant background areas to obtain the image to be inferred; Image inference module: Used to load the instance segmentation model weight file and perform offline inference on the image to be inferred, to obtain the instance segmentation results of cauliflower flower head pedicel. The instance segmentation results include pedicel instance mask, pedicel outline, category information and confidence information. Size calibration module: used to calculate the ratio between the pixel size and the actual size of the reference object based on the pixel size of the reference object in the image and the actual size of the reference object; The phenotypic parameter extraction and quantization module is used to extract the phenotypic parameters of cauliflower flower heads based on the flower stalk instance mask. The phenotypic parameters include morphological parameters and color parameters. The morphological parameters include flower stalk length, flower stalk width, aspect ratio, contour area, and contour perimeter. The color parameters include the mean and standard deviation of each channel in the RGB, HSV, and Lab color spaces, as well as the chromaticity C; the mean and standard deviation of the color difference ΔE of each pixel in the instance mask area relative to the Lab color in the instance; the mean of the normalized RGB components r, g, and b; and the mean of the R / G, R / B, and G / B channel ratios. Based on a total of 28 color parameters, the color quantization models of the corresponding first-level and second-level flower heads are obtained through standardization, PCA dimensionality reduction, membership function calculation, normalization, and 0-100 mapping operations, respectively. Segmentation result display module: used to display the original image, preprocessed image, flower stalk instance mask image, contour overlay image, and phenotypic parameter quantification results; Data export module: Used to export instance segmentation results, phenotypic parameters, and size calibration results as table files or image files; The visualization and interaction module is used to implement image import, image preprocessing, model weight loading, offline model inference, size calibration, result visualization, phenotypic parameter quantification, and data export. The image preprocessing module is connected to the image import module and is used to receive the imported back image of the flower ball; the image inference module is used to receive the preprocessed image and output the flower stalk instance mask; the phenotypic parameter extraction and quantization module is used to receive the flower stalk instance mask and the scale coefficient output by the size calibration module, calculate the morphological parameters and color parameters and quantize them accurately.
