A method and system for screening Monascus species based on HSV model
Through image processing and machine learning algorithms based on HSV model, the problems of low efficiency and unstable results of Aspergillus Rhodocyanida strain screening are solved, and efficient and accurate bacterial strain screening results are achieved.
Patent Information
- Application Number
- CN202410407787.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-07
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-04-07
AI Technical Summary
The existing Aspergillus erythromycosis strain screening methods have low screening efficiency and unstable results. The traditional methods are time-consuming and labor-intensive but not accurate enough. The molecular biology methods have high equipment and technical requirements and there may be problems such as incomplete resolution of gene information.
Using the HSV model-based method, the culture liquid image was collected through digital imaging equipment, converted to the HSV color space, and the chromaticity, saturation and brightness thresholds were set to segment the Aspergillus Rhodocyanus area, pre-processing was performed to extract features, and the characteristics were input into the bacteria. This evaluation model uses convolutional neural network and recurrent neural network to fusion information to obtain screening results.
The efficiency and result stability of Aspergillus Rhodobacteria strain screening are improved, and a more efficient screening process and more accurate results are achieved.
Smart Images

Figure CN118334135B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of biotechnology, and in particular to a method and system for screening Monascus species based on an HSV model. Background Art
[0002] Screening of Monascus strains refers to the process of selecting Monascus strains with specific functions or properties from multiple strains through a series of experimental methods. Monascus is used as a food additive in the food industry, such as red yeast rice and red yeast tofu, through the red yeast pigments and other active substances in its metabolites. In addition, Monascus is also used in the field of biopharmaceuticals to produce certain drugs and bioactive substances. Therefore, the screening of Monascus strains is of great significance, which can improve product quality, output and efficiency and promote the development of related industries.
[0003] Currently, the widely used Monascus strain screening methods mainly include traditional screening methods and molecular biology screening methods. The traditional screening method screens Monascus strains with ideal traits by observing the growth and color production of different strains under different conditions, as well as preliminary qualitative and semi-quantitative analysis of color production activity. This method is simple and easy to implement, but time-consuming and labor-intensive, and the results may not be accurate enough. The molecular biology screening method is to analyze and compare the genetic information of Monascus by using technologies such as PCR and gene cloning, so as to screen out strains with specific genotypes or phenotypes. This method has high accuracy, but the equipment and technical requirements are high, and there may be limitations that the genetic information of some strains has not been fully resolved.
[0004] Therefore, there is an urgent need for a technical solution that can improve the screening efficiency and the stability of the screening results. Summary of the invention
[0005] In order to solve the deficiencies of the prior art, the present invention provides a method and system for screening Monascus species based on the HSV model. The present invention solves the technical problems of low screening efficiency and unstable screening results in the existing screening methods for Monascus species.
[0006] A method for screening Monascus species based on an HSV model comprises: using a digital camera to collect an image of a culture solution containing Monascus; converting the image of the culture solution into an HSV color space to obtain a target image; setting a chromaticity threshold, a saturation threshold, and a brightness threshold in the HSV color space based on the color characteristics of the Monascus to segment the Monascus region in the target image; preprocessing the image of the Monascus region to obtain the target characteristics; wherein the preprocessing method comprises: Wherein, G(x, y) represents the preprocessed feature, σ represents the standard deviation, and (x, y) represents the two-dimensional coordinate value of the image; and the target feature is input into the strain evaluation model to obtain the screening result of the target strain.
[0007] In one possible implementation, converting the image of the culture solution into the HSV color space to obtain a target image includes: using the OpenCV image processing library to read the image of the culture solution; and based on the objective function in the image processing library, converting the read image from the RGB color space to the HSV color space to obtain the target image.
[0008] In a possible implementation, based on the color characteristics of the Monascus, a chroma threshold, a saturation threshold and a brightness threshold are set in the HSV color space to segment the Monascus region in the target image, including: determining a value range of the Monascus in a chroma channel based on the color characteristics of the Monascus; wherein the value range of the chroma channel includes 0 to 20 degrees; determining a value range of the Monascus in a saturation channel based on the color characteristics of the Monascus; wherein the value range of the saturation channel includes 0.7 to 1.0; determining a value range of the Monascus in a brightness channel based on the color characteristics of the Monascus; wherein the value range of the brightness channel includes 0.5 to 1.0; and based on the values of the chroma channel, the saturation channel and the brightness channel, using the threshold segmentation method in OpenCV to separate the image of the Monascus region from the background of the target image.
[0009] In a possible implementation, preprocessing the image of the Monascus region to obtain the target feature includes: using a denoising algorithm to remove noise from the image of the Monascus region to obtain a denoised feature; using an edge detection algorithm to extract edge information in the denoised feature to obtain an edge feature; and optimizing the shape and structure of the edge feature through morphological processing to obtain the target feature.
[0010] In a possible implementation, the edge detection algorithm includes: Among them, I represents the original image, I edge-enhanced represents edge features, k represents the enhancement coefficient, Represents the image gradient.
[0011] In a possible implementation, the morphological processing includes: Wherein, A represents the edge feature, B represents the structural element, represents the expansion operation, c|(B) c Represents element displacement.
[0012] In one possible implementation, the target feature is input into a strain evaluation model to obtain a screening result of the target strain, including: inputting the target feature of the image with the latest acquisition time into a convolutional neural network to obtain a first feature; inputting the target feature of the image acquired at different times in the same culture medium into a recurrent neural network in chronological order to obtain a second feature; fusing the first feature and the second feature to obtain a fused feature; and inputting the fused feature into the strain evaluation model to obtain a screening result of the target strain.
[0013] In one possible implementation, the fused features are input into the strain evaluation model to obtain the screening results of the target strains, including: encoding the embedding position of the fused features, and the features after the embedding position encoding are used to input the multi-head attention layer to obtain the attention matrix; the attention matrix is input into the feedforward neural network layer through the residual connection for normalization processing; and the screening results of the target strains are obtained based on the results of the normalization processing.
[0014] In a possible implementation, the position encoding includes: Among them, pos represents the position, d model Represents dimension.
[0015] An embodiment of the present application also provides a system for screening Monascus strains based on the HSV model, comprising: an acquisition module, a conversion module, a segmentation module, a preprocessing module and a screening module; wherein the acquisition module is used to use a digital camera to acquire an image of a culture solution containing Monascus; the conversion module is used to convert the image of the culture solution into an HSV color space to obtain a target image; the segmentation module is used to set a chromaticity threshold, a saturation threshold and a brightness threshold in the HSV color space based on the color characteristics of the Monascus to segment the Monascus area in the target image; the preprocessing module is used to preprocess the image of the Monascus area to obtain the target characteristics; and the screening module is used to input the target characteristics into a strain evaluation model to obtain a screening result of the target strain.
[0016] By implementing a method and system for screening Monascus species based on the HSV model as provided above, the embodiment of the present application can improve the screening efficiency by introducing the HSV model, and further improve the stability of the screening results by using a machine learning algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 A schematic diagram of a method for screening Monascus species based on the HSV model provided in an embodiment of the present application;
[0019] Figure 2 A schematic diagram of an evaluation model provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.
[0021] Those skilled in the art can understand that the terms "first", "second" and the like in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor represent the necessary logical order between them. It should also be understood that in the embodiments of the present disclosure, "multiple" can refer to two or more, and "at least one" can refer to one, two or more. It should also be understood that for any component, data or structure mentioned in the embodiments of the present disclosure, in the absence of explicit limitation or contrary revelation given in the context, it can generally be understood as one or more. In addition, the term "and / or" in the present disclosure is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present disclosure generally indicates that the associated objects before and after are an "or" relationship. It should also be understood that the description of each embodiment in the present disclosure emphasizes the differences between the embodiments, and the same or similar parts can refer to each other. For the sake of brevity, they will not be repeated one by one.
[0022] At the same time, it should be understood that, for ease of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. The techniques, methods and devices known to ordinary technicians in the relevant fields may not be discussed in detail, but where appropriate, the techniques, methods and devices should be considered part of the specification. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.
[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0024] Figure 1 A schematic diagram of a method for screening Monascus species based on the HSV model provided in the present application embodiment. Specifically, Figure 1 As shown, in step S101, a digital camera is used to collect images of a culture solution containing Monascus. It should be understood that Monascus is a common microorganism with important biopharmaceutical and food fermentation applications. In the field of biopharmaceuticals, Monascus is widely used in the production and synthesis of plant secondary metabolites. In the food industry, Monascus is used to ferment products such as Aspergillus oryzae red pigment and red yeast rice. Therefore, effectively collecting and analyzing images of culture solutions containing Monascus is crucial for controlling the fermentation process and improving product quality.
[0025] Digital cameras can provide high-resolution, real-time and non-invasive image acquisition, which is suitable for monitoring the growth and distribution of microorganisms during fermentation.
[0026] In terms of image processing and analysis, digital image processing technology and computer vision algorithms can be used to process and identify the collected images. Among them, mathematical models and algorithms play a key role in image feature extraction, target detection and classification. Therefore, at step S102, the image of the culture solution is converted to the HSV color space to obtain the target image. Specifically, the image of the culture solution is first read using the OpenCV image processing library. Then, based on the objective function in the image processing library, the read image is converted from the RGB color space to the HSV color space to obtain the target image.
[0027] It should be understood that the HSV color space is a commonly used model for describing colors, which consists of three components: hue, saturation, and value. In the process of converting the image of the culture medium to the HSV color space, the color information in the image can be better separated and described, which helps to extract specific color areas in the target image. First, the image in the RGB color space is represented in the form of three channels (R, G, B). Then, the color value in the RGB color space is converted to the HSV color space.
[0028] At step S103, based on the color characteristics of the Monascus, a chromaticity threshold, a saturation threshold and a brightness threshold are set in the HSV color space to segment the Monascus region in the target image. By setting the chromaticity threshold, the saturation threshold and the brightness threshold, pixels that meet the conditions in the HSV color space can be screened out, thereby achieving the segmentation of the Monascus region. Specifically, a threshold method, such as a single threshold, a double threshold or a multiple threshold, etc., can be used, combined with the typical color characteristics of Monascus in the HSV color space, to perform pixel-level segmentation. For example, a threshold range of hue, saturation and brightness can be defined, and pixels falling within these ranges in the HSV image are marked as part of the Monascus region.
[0029] Wherein, based on the color feature of the Monascus, setting a chroma threshold, a saturation threshold and a brightness threshold in the HSV color space to segment the Monascus region in the target image includes:
[0030] Based on the color characteristics of the Monascus, a value range of the Monascus in a chromaticity channel is determined; wherein the value range of the chromaticity channel includes 0 to 20 degrees; based on the color characteristics of the Monascus, a value range of the Monascus in a saturation channel is determined; wherein the value range of the saturation channel includes 0.7 to 1.0; based on the color characteristics of the Monascus, a value range of the Monascus in a brightness channel is determined; wherein the value range of the brightness channel includes 0.5 to 1.0; and based on the values of the chromaticity channel, the saturation channel and the brightness channel, a threshold segmentation method in OpenCV is used to separate the image of the Monascus area from the background of the target image.
[0031] In the segmentation process, the threshold segmentation function in OpenCV, such as cv2.threshold(), is used to segment the image according to the set threshold, effectively separating the Monascus region from the background. If the pixel belongs to the Monascus region, it is marked as 1 in the segmented image; otherwise, it is marked as 0. This method based on HSV color space and threshold segmentation can effectively achieve accurate extraction of the Monascus region.
[0032] At step S104, the image of the Monascus region is preprocessed to obtain target features. When preprocessing the image of the Monascus region, a specific method needs to be used to obtain the target features. Among them, the preprocessing method includes Gaussian filtering. Gaussian filtering is an image processing method that smoothes the image by applying a Gaussian function to reduce noise and highlight specific features of the image. The preprocessing method includes:
[0033]
[0034] Wherein, G(x, y) represents the preprocessed feature, σ represents the standard deviation, and (x, y) represents the two-dimensional coordinate value of the image. In practical applications, selecting an appropriate standard deviation is crucial to the effect of Gaussian filtering. Smaller values result in a smaller range of smoothing, while larger values result in a wider range of smoothing. Therefore, in the preprocessing process of Monascus region images, it is necessary to select an appropriate value according to the specific situation to ensure that the target features can be effectively highlighted and the influence of noise can be reduced.
[0035] Further, the preprocessing of the image of the Monascus region to obtain the target feature includes: using a noise reduction algorithm to remove the noise of the image of the Monascus region to obtain a denoised feature. Using an edge detection algorithm to extract edge information in the denoised feature to obtain an edge feature, wherein the edge detection algorithm includes:
[0036]
[0037] Among them, I represents the original image, I edge-enhanced represents edge features, k represents the enhancement coefficient, Represents the image gradient. It should be understood that edge detection algorithms play a vital role in image processing and are used to identify boundaries and changes between different areas in an image. Among them, the gradient-based algorithm determines the location where the edge may exist by calculating the gradient of the grayscale value of pixels in the image. The gradient usually indicates the direction in which the grayscale of pixels in the image changes most dramatically. Therefore, the gradient value is larger at the edge, which is conducive to edge detection and enhancement. In practical applications, edge detection algorithms can calculate the gradient of an image through different methods, such as the Sobel operator, the Prewitt operator, etc. These operators estimate the gradient of each pixel in the image through convolution operations, thereby realizing edge detection. The enhancement coefficient can be adjusted according to specific application requirements to control the degree of edge enhancement.
[0038] It should be noted that the edge detection algorithm needs to consider the impact of noise on the result when extracting edge information. Therefore, before applying the edge detection algorithm, the image needs to be denoised to reduce interference and improve the accuracy of edge detection. Combining denoising and edge detection can effectively extract edge features in the image, providing a reliable basis for subsequent image analysis and processing.
[0039] Next, the shape and structure of the edge feature are optimized by morphological processing to obtain the target feature, wherein the morphological processing includes:
[0040]
[0041] Wherein, A represents the edge feature, B represents the structural element, represents the expansion operation, c|(B) c Represents element displacement. It should be understood that the morphological processing is a technology in digital image processing, which is used to optimize and improve the shape and structural features in the image. In edge feature processing, morphological processing can effectively extract target features, and optimize their shapes and structures, which is helpful for subsequent feature recognition and analysis. Morphological processing involves a variety of operations, including expansion, erosion, opening and closing operations. In the morphological processing, the structural element is usually a small-sized matrix or kernel, which is used to define the scope and mode of influence of the expansion operation.
[0042] The function of the dilation operation is to slide the structural element along the edge feature. When the area of the structural element intersects with the edge feature, the pixel value in the area is set to 1, otherwise it is set to 0. Such an operation can improve and optimize the shape and structure of the edge feature, which is conducive to highlighting the target features and removing unnecessary noise and interference.
[0043] In practical applications, choosing a suitable structural element is crucial to the effect of the dilation operation. The size and shape of the structural element will directly affect the result of the dilation operation, so it is necessary to make a reasonable choice based on the specific problem and image characteristics. At the same time, morphological processing can also be combined with other operations, such as erosion, opening and closing operations, to achieve more sophisticated image processing effects.
[0044] At step S105, the target feature is input into the strain evaluation model to obtain the screening result of the target strain. Specifically, the target feature of the image with the latest acquisition time is input into the convolutional neural network to obtain the first feature; the target feature of the image acquired at different times in the same culture solution is input into the recurrent neural network in time order to obtain the second feature; the first feature and the second feature are fused to obtain the fused feature; and the fused feature is input into the strain evaluation model to obtain the screening result of the target strain.
[0045] It should be understood that the target feature usually refers to the part or information of the image with a specific target or attribute. In the scenario of bacterial species evaluation, the target feature may include bacterial species-related features such as colony morphology, color, and size. Extracting these target features and inputting them into the evaluation model for screening can help identify and classify different bacterial species, thereby achieving accurate identification of the target bacterial species.
[0046] First, the target features in the most recent image are input into a convolutional neural network (CNN) for processing. CNN is a deep learning model that is widely used to process image recognition and classification tasks. Through structures such as convolutional layers, pooling layers, and fully connected layers, CNN can effectively extract feature information from images and convert it into a representation suitable for subsequent processing.
[0047] Next, for the images collected at different times in the same culture medium, their target features are input into the recurrent neural network (RNN) in chronological order. RNN is a neural network that can process sequence data and is suitable for capturing the temporal dependency between data. Through the cyclic structure of RNN, the image features collected at different times can be modeled and the second feature can be obtained.
[0048] Next, the first feature and the second feature are fused to obtain a fused feature. Information fusion can be performed using various methods, such as simple concatenation, weighted averaging, or a more complex attention mechanism, to integrate the information of the two features and improve the ability to distinguish the target bacterial species.
[0049] Finally, the fusion features are input into the previously trained strain evaluation model. This model can be a classifier or regressor built based on a machine learning algorithm, which aims to identify and evaluate different strains based on the input features. Through the learning and inference process of the model, the screening results of the target strains can be obtained, which can further guide related experiments and applications.
[0050] In one embodiment, the step of inputting the fusion feature into the strain evaluation model to obtain the screening result of the target strain includes: embedding the fusion feature into position coding, and the feature after embedding the position coding is used to input the multi-head attention layer to obtain the attention matrix; wherein the position coding includes:
[0051]
[0052] Among them, pos represents the position, d model Representation dimension. It should be understood that fused feature embedding position coding is a technique that integrates features from different sources or different types and combines position information. This technique is used to improve the model's ability to understand and utilize input information. In specific implementations, embedded position coding usually adopts a common method, which is to use sine and cosine functions to assign a fixed-dimensional vector representation to each position in the sequence. This encoding method can effectively capture position information and establish a certain correlation between different positions. Specific encoding methods combine position information for better application in subsequent multi-head attention layers and feedforward neural network layers. This position encoding method uses sine functions and power functions to assign different codes to features at different positions, which can effectively capture position information.
[0053] The multi-head attention layer is a mechanism for simultaneously computing multiple groups of attention, which can effectively capture the correlation and importance between input features, thereby helping the model better understand and utilize the input information.
[0054] The attention matrix is input into the feedforward neural network layer through the residual connection for normalization processing; and the screening result of the target strain is obtained based on the result of the normalization processing. Residual connection is a technology for transmitting input features in a neural network, which helps to alleviate the gradient vanishing and gradient exploding problems, while better retaining input information. After normalization processing, the screening result of the target strain is obtained based on the processing results, which will be helpful for subsequent strain evaluation and screening work.
[0055] Figure 2 A schematic diagram of an evaluation model provided for an embodiment of the present application. It should be understood that the architecture shown in the figure is exemplary and non-restrictive. This means that the module architecture involved is not limited to a specific form or design, but is presented as an example. In other words, the architecture shown in the figure can be regarded as a way of expression to clearly describe related concepts and relationships, and does not exclude other forms of architecture. Therefore, when interpreting the architecture in the picture, it should be understood that the module has flexibility and diversity, and its purpose is to provide an exemplary description rather than a restrictive provision on a specific form.
[0056] Furthermore, an embodiment of the present application also provides a screening system for Monascus species based on the HSV model, comprising: a processor, a memory, and a system bus; the processor and the memory are connected via the system bus; the memory is used to store one or more programs, and the one or more programs include instructions, which, when executed by the processor, enable the processor to execute any one of the implementation methods of the above-mentioned processing methods.
[0057] Furthermore, an embodiment of the present application also provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute any one of the implementation methods of the above-mentioned processing method.
[0058] It can be known from the description of the above implementation mode that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0059] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0060] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0061] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for screening Monascus species based on the HSV model, characterized in that: include: Using a digital camera device to capture images of a culture solution containing Monascus purpurogenum; Converting the image of the culture solution into an HSV color space to obtain a target image; Based on the color characteristics of the Monascus, a chromaticity threshold, a saturation threshold, and a brightness threshold are set in the HSV color space to segment the Monascus region in the target image; Preprocessing the image of the Monascus region to obtain target features; The pretreatment method comprises: Wherein, G(x, y) represents the preprocessed feature, σ represents the standard deviation, and (x, y) represents the two-dimensional coordinate value of the image; and The target feature is input into a strain evaluation model to obtain a screening result of the target strain; the method includes: inputting the target feature of the image with the latest acquisition time into a convolutional neural network to obtain a first feature; inputting the target feature of the image acquired at different times in the same culture medium into a recurrent neural network in time sequence to obtain a second feature; fusing the first feature and the second feature to obtain a fused feature; and inputting the fused feature into the strain evaluation model to obtain a screening result of the target strain; The step of inputting the fusion feature into the strain evaluation model to obtain the screening result of the target strain comprises: encoding the embedding position of the fusion feature, and using the feature after the embedding position encoding to input the multi-head attention layer to obtain the attention matrix; inputting the attention matrix into the feedforward neural network layer through the residual connection to perform normalization processing; and obtaining the screening result of the target strain based on the result of the normalization processing; The position code includes: Among them, pos represents the position, d model Represents dimension.
2. The method according to claim 1, characterized in that The step of converting the image of the culture solution into the HSV color space to obtain a target image includes: Using OpenCV image processing library to read the image of the culture solution; and Based on the target function in the image processing library, the read image is converted from the RGB color space to the HSV color space to obtain the target image.
3. The method according to claim 2, characterized in that Wherein, based on the color feature of the Monascus, setting a chroma threshold, a saturation threshold and a brightness threshold in the HSV color space to segment the Monascus region in the target image includes: Determining a value range of the Monascus in a chromaticity channel based on the color characteristics of the Monascus; wherein the value range of the chromaticity channel includes 0 to 20 degrees; Determining a value range of the Monascus in a saturation channel based on the color characteristics of the Monascus; wherein the value range of the saturation channel includes 0.7 to 1.0; Determining a value range of the Monascus in a brightness channel based on the color characteristics of the Monascus; wherein the value range of the brightness channel includes 0.5 to 1.0; and Based on the values of the chromaticity channel, the saturation channel and the brightness channel, the image of the Monascus region is separated from the background of the target image using a threshold segmentation method in OpenCV.
4. The method according to claim 3, characterized in that The image of the Monascus region is preprocessed to obtain target features including: Using a noise reduction algorithm to remove noise from the image of the Monascus region to obtain a denoising feature; Extracting edge information from the denoising feature using an edge detection algorithm to obtain an edge feature; and The shape and structure of the edge feature are optimized through morphological processing to obtain the target feature.
5. The method according to claim 4, characterized in that The edge detection algorithm includes: Among them, I represents the original image, I edge-enhanced represents edge features, k represents the enhancement coefficient, Represents the image gradient.
6. The method according to claim 4, characterized in that The morphological processing includes: Wherein, A represents the edge feature, B represents the structural element, represents the expansion operation, c|(B) c Represents element displacement.
7. A screening system for Monascus species based on the HSV model using the method according to any one of claims 1 to 6, characterized in that: include: Acquisition module, conversion module, segmentation module, preprocessing module and screening module; among them, The acquisition module is used to acquire images of the culture solution containing Monascus using a digital camera device; The conversion module is used to convert the image of the culture solution into the HSV color space to obtain a target image; The segmentation module is used to set a chromaticity threshold, a saturation threshold and a brightness threshold in the HSV color space based on the color characteristics of the Monascus, so as to segment the Monascus region in the target image; The preprocessing module is used to preprocess the image of the Monascus region to obtain target features; and The screening module is used to input the target feature into the strain evaluation model to obtain the screening result of the target strain; including: inputting the target feature of the image with the latest acquisition time into the convolutional neural network to obtain the first feature; inputting the target feature of the image acquired at different times in the same culture medium into the recurrent neural network in time sequence to obtain the second feature; fusing the first feature and the second feature to obtain the fused feature; and inputting the fused feature into the strain evaluation model to obtain the screening result of the target strain; The step of inputting the fusion feature into the strain evaluation model to obtain the screening result of the target strain comprises: encoding the embedding position of the fusion feature, and using the feature after the embedding position encoding to input the multi-head attention layer to obtain the attention matrix; inputting the attention matrix into the feedforward neural network layer through the residual connection to perform normalization processing; and obtaining the screening result of the target strain based on the result of the normalization processing; The position code includes: Among them, pos represents the position, d model Represents dimension.
Citation Information
Patent Citations
Method for detecting Mycotoxins contents based on Android platform
CN109030434A
Multi-colony classification extraction method based on deep learning model
CN115393637A