Algae biomass determination method and device, storage medium and electronic equipment
By extracting RGB values from the algae liquid picture and inputting it into a machine learning model, the algae absorbance is predicted, and the problem of inaccurate algae biomass measurement in the existing technology is solved, and fast, convenient and accurate algae biomass measurement is achieved.
Patent Information
- Application Number
- CN202411817799.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-29
AI Technical Summary
The existing methods for determining algae biomass are not accurate enough and it is difficult to achieve fast and convenient measurements.
By obtaining the algae liquid picture, pretreatment and extracting the RGB value, and inputting it into the trained machine learning model, predicting the algae absorbance and finally determining the algae biomass.
It realizes rapid, convenient and accurate measurement of algae biomass, and is suitable for rapid quantitative and real-time monitoring of purebred algae industrial farming, and is low in cost.
Smart Images

Figure CN119904413A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of water body detection, and in particular to a method, device, storage medium and electronic device for determining algae biomass. Background Art
[0002] In algae biological experiments and resource-based aquaculture processes, it is necessary to measure algae biomass quickly and efficiently.
[0003] At present, the methods involved in concentration identification include spectrophotometry for measuring optical density and hyperspectral inversion. Spectrophotometry for measuring optical density (i.e. absorbance, OD value): using the absorption spectrum of a substance to identify a substance or determine its content, that is, passing a beam of light of a specific wavelength through the object to be detected, the object to be detected can absorb part of the light, and the concentration of the object to be detected is calculated by absorbance. Generally, the higher the concentration of the object to be detected, the higher the absorbance value. Its disadvantages are: it measures the density of bacteria, including dead bacteria, which is not accurate enough. Hyperspectral inversion method: based on observation information and models, solve or infer application parameters that describe the ground truth. Hyperspectral inversion is to use hyperspectral data taken by remote sensing satellites and the content data of a substance sampled and tested in the field to establish an inversion model. However, in the field of inversion, there are high requirements for the preprocessing of remote sensing data.
[0004] Therefore, the current method for determining algal biomass has the disadvantages of being inaccurate and difficult to implement. Summary of the invention
[0005] The embodiments of the present application provide a method, device, storage medium and electronic device for determining algae biomass, which can be sampled and measured immediately under visible light conditions, facilitate rapid quantification and real-time monitoring of pure algae industrial cultivation at low cost, have relatively accurate measurement results, and are easy to implement.
[0006] The present application embodiment provides a method for determining algae biomass, comprising: Acquire an algae liquid image to be identified, and pre-process the algae liquid image to be identified; Extracting the preprocessed algae liquid image to be identified to obtain the RGB value of the algae liquid image to be identified; Inputting the RGB value of the algae liquid image to be identified into the trained machine learning model to obtain the predicted algae absorbance; The algal biomass is determined based on the predicted algal absorbance.
[0007] As a further improvement of the present invention, in the above algae biomass determination method, the preprocessing of the algae liquid image to be identified comprises: The algae liquid image to be identified is subjected to histogram equalization, contrast enhancement and denoising filtering operations in sequence to obtain a preprocessed algae liquid image to be identified.
[0008] As a further improvement of the present invention, in the above algae biomass determination method, the training process of the machine learning model includes: Obtain the measured absorbance and corresponding algae solution images at different algae solution concentrations; Obtaining an algae RGB value based on the algae liquid image; Inputting the algae RGB value into a machine learning model to obtain a predicted algae absorbance; A loss function is established based on the predicted algae absorbance and the measured absorbance, and the machine learning model is iteratively trained based on the loss function.
[0009] As a further improvement of the present invention, in the above-mentioned method for determining algae biomass, the measured absorbance is obtained by measuring the concentration of the algae liquid with a spectrophotometer.
[0010] As a further improvement of the present invention, in the above algae biomass determination method, the step of obtaining the measured absorbance at different algae solution concentrations comprises: The algae solution concentration range is set from 0 to 2.8 according to the absorbance OD value of the algae solution to be tested at a wavelength of 680nm, and a plurality of different algae solution concentrations are configured with a gradient interval of 0.1 absorbance; The actual absorbance corresponding to different algae solution concentrations was measured by a spectrophotometer.
[0011] As a further improvement of the present invention, in the above-mentioned algae biomass determination method, the machine learning model is a multilayer perceptron regression model.
[0012] As a further improvement of the present invention, the above-mentioned method for determining algae biomass, wherein the loss function is established based on the predicted algae absorbance and the measured absorbance, and after the step of iteratively training the machine learning model based on the loss function, comprises: The regression difference between the predicted algae absorbance and the measured absorbance is calculated, and the iterative training is stopped when the regression difference is greater than or equal to 0.8.
[0013] The present application also provides an algae biomass determination device, comprising: An acquisition and preprocessing module, used for acquiring the algae liquid image to be identified and preprocessing the algae liquid image to be identified; An RGB extraction module is used to extract the pre-processed algae liquid image to be identified and obtain the RGB value of the algae liquid image to be identified; An absorbance prediction module, used to input the RGB value of the algae liquid image to be identified into a trained machine learning model to obtain the predicted algae absorbance; A biomass determination module is used to determine the algae biomass based on the predicted algae absorbance.
[0014] An embodiment of the present application further provides a computer-readable storage medium, wherein a plurality of instructions are stored in the computer-readable storage medium, and wherein the instructions are suitable for being loaded by a processor to execute any of the above-mentioned algae biomass determination methods.
[0015] An embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used for the steps in any of the above-mentioned algae biomass determination methods.
[0016] The present application provides a method, device, storage medium and electronic device for determining algae biomass. The present application extracts RGB values from algae liquid images and determines algae biomass based on algae RGB values. The method of measuring algae biomass by RGB values is relatively accurate and easy to implement, and can be measured immediately after sampling, which is convenient for rapid quantification and real-time monitoring of pure algae industrial cultivation at low cost. Different from previous measurement methods, this method can perform non-contact measurement by taking pictures, and can do so without opening the cover or destructive sampling, so as to avoid contamination of the sample itself, thereby affecting the experimental data. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The technical solution and other beneficial effects of the present application will be made apparent by describing in detail the specific implementation methods of the present application in conjunction with the accompanying drawings.
[0018] Figure 1 A flow chart of a method for determining algae biomass provided in an embodiment of the present application.
[0019] Figure 2 Schematic diagram of the regression difference between the predicted algae absorbance and the measured absorbance.
[0020] Figure 3 A schematic diagram of the structure of an algae biomass determination device provided in an embodiment of the present application.
[0021] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0022] Figure 5 Another schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only 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 those skilled in the art without creative work are within the scope of protection of this application.
[0024] The embodiments of the present application provide a method, device, storage medium and electronic device for determining algae biomass. The algae biomass determination device provided in the embodiments of the present application can be integrated in an electronic device, which can be a terminal, a server and other devices, wherein the terminal can include a tablet computer, a laptop computer, a personal computer (PC, Personal Computer), a micro processing box, or other devices.
[0025] See also Figure 1 , Figure 1 The flowchart of the algae biomass determination method provided in the embodiment of the present application is applied in an electronic device. The algae biomass determination method includes the following steps: S1, obtaining an algae liquid image to be identified, and preprocessing the algae liquid image to be identified.
[0026] Specifically, the algae liquid image to be identified is preprocessed, including: performing histogram equalization, contrast enhancement and denoising filtering operations on the algae liquid image to be identified in sequence to obtain the preprocessed algae liquid image to be identified.
[0027] S2, extracting the preprocessed algae liquid image to be identified to obtain the RGB value of the algae liquid image to be identified.
[0028] Furthermore, after the RGB values are extracted, it is necessary to perform data integrity judgment on the RGB values and remove abnormal values.
[0029] S3, inputting the RGB value of the algae liquid image to be identified into the trained machine learning model to obtain the predicted algae absorbance.
[0030] S4, determining the algal biomass based on the predicted algal absorbance.
[0031] The above steps S1-S4 are the application process of the machine learning model. The following describes the application process of machine learning, that is, before step S1, the following steps are also included: SA1, obtain the measured absorbance and corresponding algae solution images at different algae solution concentrations.
[0032] Specifically, the algae solution concentration range is set from 0 to 2.8 based on the absorbance (OD value) of the algae solution to be tested at a wavelength of 680 nm, and a plurality of different algae solution concentrations are configured with a gradient interval of 0.1 absorbance. The actual absorbance corresponding to different algae solution concentrations is measured by a spectrophotometer.
[0033] SA2, RGB values are obtained based on the algae liquid image.
[0034] SA3, input the algae RGB value into the machine learning model to obtain the predicted algae absorbance.
[0035] The machine learning model is specifically a multi-layer perceptron regression model, and the number of hidden layer neurons and the maximum number of iterations of the multi-layer perceptron regression model are first set. Then the RGB value is input into the machine learning model to obtain the predicted algae absorbance.
[0036] SA4, a loss function is established based on the predicted algae absorbance and the measured absorbance, and the machine learning model is iteratively trained based on the loss function.
[0037] Furthermore, the regression difference between the predicted algae absorbance and the measured absorbance was calculated ( ), when the regression difference is greater than or equal to 0.8, or the maximum number of iterations is reached, the iterative training stops.
[0038] The following example illustrates the specific application process of machine learning: (1) Taking a pure strain of Anabaena cultured indoors as an example, the absorbance OD value (i.e., OD680) of the algae solution to be tested at a wavelength of 680 nm was set from 0 to 2.8 (the biomass was approximately 2.565*107 cells / mL when OD680=2.8). A concentration gradient was set, with each 0.1 absorbance as a gradient, and 29 gradient samples were obtained (which can be supplemented according to actual conditions to obtain as many samples as possible). BG11 culture medium was used as the background value (OD680=0), and photos were taken under a light intensity of approximately 1500 lux to obtain multiple images of the algae solution.
[0039] (2) After judging the algae liquid image according to the interrogation area, extract the R, G, and B values, build a machine learning model, and train and optimize: Split the dataset into training and testing sets.
[0040] Standardize the R, G, and B values.
[0041] Define and train a multilayer perceptron regression model, setting the number of hidden layer neurons and the maximum number of iterations. Use the trained model to make predictions on the training and test sets.
[0042] Draw a regression difference plot, showing a scatter plot of the observed and predicted values for the training and test data, and a reference line. Figure 2 As shown, Figure 2 Schematic diagram of the regression difference between the predicted algae absorbance and the measured absorbance.
[0043] This application extracts RGB values from algae liquid images and determines algae biomass based on RGB values. The method of measuring algae biomass through RGB values is relatively accurate and easy to implement, and can be measured immediately after sampling, which is convenient for rapid quantification and real-time monitoring of pure algae industrial cultivation at low cost. Different from previous measurement methods, this method can perform non-contact measurement by taking pictures, and can do so without opening the lid or destructive sampling, so as to avoid contamination of the sample itself, thereby affecting the experimental data.
[0044] According to the method described in the above embodiment, this embodiment will be further described from the perspective of an algae biomass determination device. The algae biomass determination device can be implemented as an independent entity or integrated in an electronic device. The electronic device can be a terminal, a server, etc., wherein the terminal can include a tablet computer, a laptop computer, a personal computer (PC), a micro processing box, or other devices.
[0045] See also Figure 3 , Figure 3 The algae biomass determination device provided in the embodiment of the present application is specifically described, and is applied to an electronic device. The algae biomass determination device may include: The acquisition and preprocessing module is used to acquire the algae liquid image to be identified and preprocess the algae liquid image to be identified; The RGB extraction module is used to extract the pre-processed algae liquid image to be identified and obtain the RGB value of the algae liquid image to be identified; The absorbance prediction module is used to input the RGB value of the algae liquid image to be identified into the trained machine learning model to obtain the predicted algae absorbance; A biomass determination module is used to determine the algae biomass based on the predicted algae absorbance.
[0046] During specific implementation, the above modules and / or units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above modules and / or units can refer to the previous method embodiments. The specific beneficial effects that can be achieved can also refer to the beneficial effects in the previous method embodiments, which will not be repeated here.
[0047] In addition, the embodiment of the present application also provides an electronic device, which may be a computer, a tablet computer, or other device. Figure 4As shown, the electronic device 400 includes a processor 401 and a memory 402. The processor 401 is electrically connected to the memory 402.
[0048] The processor 401 is the control center of the electronic device 400. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or loading applications stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the electronic device as a whole.
[0049] In this embodiment, the processor 401 in the electronic device 400 loads instructions corresponding to the processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 runs the application programs stored in the memory 402 to implement various functions: Acquire an algae liquid image to be identified, and pre-process the algae liquid image to be identified; Extracting the preprocessed algae liquid image to be identified to obtain the RGB value of the algae liquid image to be identified; Inputting the RGB value of the algae liquid image to be identified into the trained machine learning model to obtain the predicted algae absorbance; The algal biomass is determined based on the predicted algal absorbance.
[0050] The electronic device can implement the steps in any of the embodiments of the algae biomass determination method provided in the embodiments of the present application, and therefore can achieve the beneficial effects that can be achieved by any of the algae biomass determination methods provided in the embodiments of the present invention. For details, please refer to the previous embodiments and will not be repeated here.
[0051] Figure 5 The specific structural block diagram of the electronic device provided in the embodiment of the present invention is shown, and the electronic device can be used to implement the algae biomass determination method provided in the above embodiment. The electronic device 500 can be a terminal, a server, etc., wherein the terminal can include a tablet computer, a notebook computer, a personal computer (PC), a micro processing box, or other devices.
[0052] The RF circuit 510 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 510 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity module (SIM) cards, memories, etc. The RF circuit 510 can communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices through wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The above-mentioned wireless networks may use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as Institute of Electrical and Electronics Engineers standards IEEE 802.11a, IEEE 802.11b, IEEE802.11g and / or IEEE802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging and short messages, and any other suitable communication protocols, even those that have not yet been developed.
[0053] The memory 520 can be used to store software programs and modules, such as the corresponding program instructions / modules in the above embodiments. The processor 580 executes various functional applications and data processing by running the software programs and modules stored in the memory 520, that is, realizing the functions of taking pictures with the front camera, processing the captured images, and switching the display color of the display content on the display screen. The memory 520 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 520 may further include a memory remotely arranged relative to the processor 580, and these remote memories may be connected to the electronic device 500 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0054] The input unit 530 may be used to receive input digital or character information, and generate a keyboard and a mouse related to user settings and function control. The display unit 540 may be used to display information input by the user or information provided to the user and various graphical user interfaces, which may be composed of graphics, text, icons, videos, and any combination thereof. The display unit 540 may include a display panel 541, which may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.
[0055] The audio circuit 560, the speaker 561, and the microphone 562 can provide an audio interface between the user and the electronic device 500. The audio circuit 560 can transmit the electrical signal converted from the received audio data to the speaker 561, which is converted into a sound signal for output; on the other hand, the microphone 562 converts the collected sound signal into an electrical signal, which is received by the audio circuit 560 and converted into audio data, and then the audio data is output to the processor 580 for processing, and then sent to another terminal through the RF circuit 510, or the audio data is output to the memory 520 for further processing. The audio circuit 560 may also include an earplug jack to provide communication between an external headset and the electronic device 500.
[0056] The electronic device 500 can help the user receive requests, send information, etc. through the transmission module 570 (such as a Wi-Fi module), which provides the user with wireless broadband Internet access. Although the transmission module 570 is shown in the figure, it can be understood that it is not a necessary component of the electronic device 500 and can be omitted as needed without changing the essence of the invention.
[0057] The processor 580 is the control center of the electronic device 500. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 520, and calling data stored in the memory 520, it executes various functions of the electronic device 500 and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 580 may include one or more processing cores; in some embodiments, the processor 580 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 580.
[0058] The electronic device 500 also includes a power supply 590 (such as a battery) for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 580 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 590 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0059] Although not shown, the electronic device 500 also includes a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit of the electronic device is a touch screen display, and the mobile terminal also includes a memory, and one or more programs, wherein one or more programs are stored in the memory, and are configured to be executed by one or more processors. One or more programs include instructions for performing the following operations: Acquire an algae liquid image to be identified, and pre-process the algae liquid image to be identified; Extracting the preprocessed algae liquid image to be identified to obtain the RGB value of the algae liquid image to be identified; Inputting the RGB value of the algae liquid image to be identified into the trained machine learning model to obtain the predicted algae absorbance; The algal biomass is determined based on the predicted algal absorbance.
[0060] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above modules can be found in the previous method embodiments, which will not be repeated here.
[0061] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present invention provides a storage medium, which stores a plurality of instructions, and the instructions can be loaded by a processor to execute the steps of any embodiment of the algae biomass determination method provided in the embodiment of the present invention.
[0062] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0063] Since the instructions stored in the storage medium can execute the steps in any embodiment of the algae biomass determination method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any algae biomass determination method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0064] The above is a detailed introduction to an algae biomass determination method, device, storage medium and electronic device provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for determining algae biomass, characterized in that: The method comprises: Acquire an algae liquid image to be identified, and pre-process the algae liquid image to be identified; Extracting the preprocessed algae liquid image to be identified to obtain the RGB value of the algae liquid image to be identified; Inputting the RGB value of the algae liquid image to be identified into the trained machine learning model to obtain the predicted algae absorbance; The algal biomass is determined based on the predicted algal absorbance.
2. The method for determining algae biomass according to claim 1, characterized in that: The preprocessing of the algae liquid image to be identified includes: The algae liquid image to be identified is subjected to histogram equalization, contrast enhancement and denoising filtering operations in sequence to obtain a preprocessed algae liquid image to be identified.
3. The method for determining algae biomass according to claim 1, characterized in that: The training process of the machine learning model includes: Obtain the measured absorbance and corresponding algae solution images at different algae solution concentrations; Obtaining RGB values based on the algae liquid image; Input the image RGB value into the machine learning model to obtain the predicted absorbance; A loss function is established based on the predicted algae absorbance and the measured absorbance, and the machine learning model is iteratively trained based on the loss function.
4. The method for determining algae biomass according to claim 3, characterized in that: The measured absorbance is obtained by measuring the concentration of the algae solution using a spectrophotometer.
5. The method for determining algae biomass according to claim 3, characterized in that: The step of obtaining the measured absorbance at different algae solution concentrations comprises: The algae solution concentration range is set from 0 to 2.8 according to the absorbance of the algae solution to be tested at a wavelength of 680nm, and a plurality of different algae solution concentrations are configured with a gradient interval of 0.1 absorbance; The actual absorbance corresponding to different algae solution concentrations was measured by a spectrophotometer.
6. The method for determining algae biomass according to claim 3, characterized in that: The machine learning model is a multi-layer perceptron regression model.
7. The method for determining algae biomass according to claim 3, characterized in that: The step of establishing a loss function based on the predicted algae absorbance and the measured absorbance, and after the step of iteratively training the machine learning model based on the loss function, comprises: The regression difference between the predicted algae absorbance and the measured absorbance is calculated, and the iterative training is stopped when the regression difference is greater than or equal to 0.
8.
8. An algae biomass determination device, characterized in that: include: An acquisition and preprocessing module, used for acquiring the algae liquid image to be identified and preprocessing the algae liquid image to be identified; An RGB extraction module is used to extract the pre-processed algae liquid image to be identified and obtain the RGB value of the algae liquid image to be identified; An absorbance prediction module, used to input the RGB value of the algae liquid image to be identified into a trained machine learning model to obtain the predicted algae absorbance; A biomass determination module is used to determine the algae biomass based on the predicted algae absorbance.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the algae biomass determination method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used to execute the steps in the algae biomass determination method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Algae biomass detection method and device
CN109030488A
Seaweed biomass evaluation method based on RGB image
CN113869261A
Method for spectrophotometric monitoring the measurement of microalgal biomass, based on a predictive model.
MX2018006487A