Intelligent water quality detection device based on image recognition technology
By combining image recognition technology, microfluidic control technology and high-precision imaging technology in the intelligent water quality detection device, the existing automated pH detection device has been solved, and the problems of high cost, poor flexibility and limited image recognition methods are achieved by light and algorithm accuracy, and high-precision, low-cost and fast pH measurements are achieved.
Patent Information
- Application Number
- CN202411909746.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-28
AI Technical Summary
The existing automated pH detection devices are costly and not flexible enough. The image recognition-based method is limited by lighting, image clarity and algorithm accuracy, and the processing speed, user interaction and data transmission are insufficient.
An intelligent water quality detection device based on image recognition technology was designed, combining microfluidic control technology, high-precision imaging technology and advanced image processing algorithms, and adopting anti-light interference black box, microfluidic control system, LED lighting system, image acquisition module, image processing module and wireless data transmission module to achieve fast and accurate pH measurement.
It realizes high-precision and low-cost pH measurement, improves detection speed and user experience, and transmits detection results in real time through wireless data transmission, which is suitable for a variety of application scenarios.
Smart Images

Figure CN119715515A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to image recognition technology in the field of chemical analysis, and in particular to an intelligent water quality detection device based on image recognition technology. Background Art
[0002] Traditional pH detection methods rely on chemical indicators and manual observation, which are time-consuming, subjective, and have limited accuracy. With the development of microfluidics and image recognition technology, automated pH detection devices have gradually become a hot topic of research. Existing automated pH detection devices usually include electrode pH meters, which can provide relatively accurate measurement results, but are often expensive and not flexible enough in certain application scenarios.
[0003] In order to solve the above problems, researchers began to explore pH detection methods based on image recognition technology. These methods determine the pH value by analyzing the color change of pH test paper after chemical reaction, but are often limited by lighting conditions, image clarity and algorithm accuracy. In addition, existing image recognition pH detection devices also have shortcomings in processing speed, user interaction and data transmission.
[0004] In view of the limitations of the prior art, the present invention provides a compact, low-cost and easy-to-operate intelligent pH detection device. The device can not only achieve high-precision pH measurement, but also transmit the detection results in real time through a wireless data transmission module, greatly improving the efficiency and convenience of the detection. Through innovative image processing algorithms and hardware design, the present invention improves the detection speed and user experience while ensuring detection accuracy. Summary of the invention
[0005] In view of this, the present invention aims to address the deficiencies in the prior art, and its main purpose is to provide an intelligent water quality detection device based on image recognition technology, which realizes rapid and accurate measurement of the pH value of liquid samples through automated and intelligent methods. It combines microfluidics technology, high-precision imaging technology and advanced image processing algorithms, and provides a low-cost and high-efficiency pH detection solution suitable for a variety of application scenarios, including laboratory testing, water quality monitoring and industrial process control.
[0006] To achieve the above purpose, the present invention adopts the following technical solutions:
[0007] An intelligent water quality detection device based on image recognition technology, comprising:
[0008] Anti-light interference black box, used to isolate external light sources to ensure uniformity and stability of lighting during image acquisition;
[0009] A pre-treatment unit, for pre-treating the sample, the pre-treatment unit comprising a sample introduction device for introducing the liquid sample to be tested onto the pH test paper, a filtering device for filtering the liquid sample to be tested, a precise amount control device for controlling the sample amount of the liquid sample to be tested on the pH test paper, and a color development reaction device for mixing and coloring the liquid sample to be tested on the pH test paper;
[0010] An illumination system, wherein the light source position and range of the illumination system covers the entire detection area of the pH test paper to ensure illumination uniformity of image acquisition; the illumination system is disposed in the light-proof black box and is located above the pH test paper detection position in the light-proof black box;
[0011] An image acquisition module is used to acquire the pH test paper image and send the acquired pH test paper image to the image processing module;
[0012] The image processing module is used to determine the pH value corresponding to the image based on the pH test paper image acquired by the image acquisition module;
[0013] Display module, used for displaying detection data;
[0014] The wireless communication data transmission module is used to transmit the detection data to the service terminal.
[0015] As a preferred solution, the sample introduction is used to introduce the liquid sample to be tested onto the pH test paper through a microfluidic system;
[0016] The filtration device uses a filter membrane with a pore size of 0.10 to 0.22 μm, and the filter membrane is installed in a closed filtration chamber, and the filtration chamber is connected to a microfluidic system; the diameter of the microfluidic channel of the microfluidic system ranges from 100 to 200 μm, so as to ensure that the liquid sample to be tested can directly enter the microfluidic channel after filtration, thereby realizing an automated filtration process;
[0017] The precise control of the amount ensures that the sample amount of the liquid sample to be tested on the pH test paper is between 1 μL and 10 μL through the precise control of the microfluidic system;
[0018] The color development reaction includes a color developer; after the pH test paper contacts the liquid sample to be tested, the liquid sample to be tested and the color developer are quickly mixed through the microfluidic system to quickly fix the color of the pH test paper to prevent color change; the color developer used includes:
[0019] 5,10,15,20-Tetrakis(4-carboxyphenyl)porphyrin (CAS No. 14609-54-2; molecular formula C 48 H 30 N 4O8), 4-nitrobenzamide (CAS No. 619-80-7; molecular formula C7H6N 2O3 ), gold nanoparticles Au (particle size ranges from 10nm to 50nm) or more;
[0020] Phthalocyanine blue (CAS No. 147-14-8; molecular formula C 32 H 16 CuN8), 2-deoxy-2,2-difluoro-3,4,6-tri-O-benzyl-α-D-arabinose-hexopyranose (CAS No. 1259987-05-7; molecular formula C 27 H 28 F 2O5 ), bromocresol purple (CAS No. 115-40-2; molecular formula C 21 H 16 Br 2O5 S) in one or more.
[0021] As a preferred embodiment, the microfluidic system includes a microfluidic chip, the microfluidic chip has the microfluidic channel, and the microfluidic chip is integrated with a temperature sensor; the ambient temperature is monitored by the temperature sensor, and the temperature is adjusted by a heating or cooling element to maintain the temperature of the liquid sample solution to be tested and the surrounding environment of the pH test paper between 4°C and 37°C to ensure the stability of the color development reaction, thereby improving the accuracy of pH test paper image detection.
[0022] As a preferred solution, the illumination system includes a square LED light source of white light or yellow light fixed above the pH test paper detection position in the light-proof black box, and the light intensity of the square LED light source is 100 to 1000 lux;
[0023] The image acquisition module is a camera, and the camera is located above the pH test paper detection position in the light-proof black box;
[0024] The LED square light source is arranged around the camera and irradiates directly downward, covering the entire detection area of the pH test paper, ensuring that the light intensity from the center to the edge of the pH test paper is consistent, and the uniformity of the light intensity reaches more than 99%. It also supports adjusting the light intensity within the range of 100 to 1000 lux to obtain the best image contrast;
[0025] The camera is equipped with a concave reflective cup which is close to the four sides of the LED square light source; the reflective cup is used to collect and reflect the light emitted by the LED square light source to achieve the gathering and uniform distribution of the light at the pH test paper detection position.
[0026] As a preferred solution, a turntable is provided in the light-proof black box, and 10 to 20 pH test paper detection positions are provided on the turntable. All pH test paper detection positions share a camera and a square LED light source located above the turntable, and each pH test paper detection position is photographed in sequence by rotating the turntable; at the pH test paper detection position, the light intensity can be controlled at 1000-10000 lux / cm 2 range to ensure adequate lighting uniformity and image clarity.
[0027] As a preferred solution, a row of long boards is provided in the light-proof black box, and 10 to 20 pH test paper detection positions are provided on the long boards; each pH test paper detection position is equipped with an independent camera located above the pH test paper detection position and an LED square light source, so as to realize the side-by-side processing of multiple liquid samples to be tested; at the pH test paper detection position, the light intensity can be controlled at 1000-10000 lux / cm 2 range to ensure adequate lighting uniformity and image clarity.
[0028] As a preferred solution, the camera is located in the center of the top of the light-proof black box; the camera has automatic focus and exposure adjustment functions, and can automatically adjust within the aperture range of ±3 stops to ensure image quality.
[0029] As a preferred solution, the image processing module includes the following steps:
[0030] Step 1: Image preprocessing algorithm: The image preprocessing algorithm includes two steps: color multivariate regression conversion and illumination compensation algorithm to enhance image contrast and quality; wherein:
[0031] The color multiple regression conversion converts the collected color pH test paper image into a grayscale image for subsequent processing; the color multiple regression conversion is:
[0032]
[0033] Where a1, b1, c1…z1 are the color coefficients of the R channel, a2, b2, c2…z2 are the color coefficients of the G channel, a3, b3, c3…z3 are the color coefficients of the B channel, L is the surface intensity of the pH test paper (white-yellow or yellow light), R, G, B are the ratios of the color image in the RGB channels, I R ,I G ,I B They are the values of the three RGB channels respectively;
[0034] The illumination compensation algorithm is used to adjust the impact of uneven illumination of the image and optimize the uniformity and contrast of the image; the illumination compensation algorithm is:
[0035]
[0036] Step 2, feature extraction: The feature extraction includes image tone analysis parameters; the image tone analysis parameters include the mean and standard deviation of the image, so as to analyze the tone attributes of the image and calculate the statistical parameters of the image. The algorithm is:
[0037]
[0038] Where N is the total number of pixels;
[0039] Step 3, data preparation: feature vector, combine the extracted image features into a feature vector to prepare for model training and prediction. The feature vector is:
[0040]
[0041] Step 4: Model training:
[0042] Multidimensional probability prediction model: Using pattern recognition parser technology, the extracted feature vectors are mapped to pH values. The multidimensional probability prediction model is:
[0043]
[0044] In the formula, k is the category index, K is the total number of categories, and δ k is the weight vector of the kth class, and c is the bias term of the kth class;
[0045] Loss function: A probability loss function is used to optimize the model parameters to minimize the prediction error. The loss function is:
[0046]
[0047] In the formula, δ is the weight parameter, c is the bias parameter, S is the number of samples, t is the temperature compensation coefficient, and p is ik is an indicator variable indicating whether sample i belongs to category k;
[0048] Optimization: Use gradient descent to minimize the loss function, automatically adjust the algorithm parameters to adapt to images under different lighting and background conditions, and improve detection accuracy. The automatic adjustment algorithm parameter function is:
[0049] δ,c=arg min w,b L(δ,c);
[0050] Step 5. Prediction: Classification: For new sample x new , evaluate the probability of belonging to each category, and select the category with the highest probability as the prediction result, convert the extracted features into pH values, and its classification function is:
[0051]
[0052] The image processing module includes a GPU chip, which is used to accelerate the calculation process of the above algorithm and improve the detection speed; the GPU chip has the following parameters: it has a computing power of at least 3.0TFLOPS to meet the needs of high-speed image processing; it is equipped with at least 4GB of video memory for storing and processing large amounts of image data; it supports PCI Express 4.0 to achieve high-speed data exchange with other components of the system; while ensuring computing performance, it has an energy efficiency ratio of at least 1.5TFLOPS / W to optimize energy consumption; it is compatible with mainstream deep learning frameworks to facilitate the implementation of complex image recognition algorithms.
[0053] As a preferred solution, the image processing module adopts the image recognition function in the Huawei Cloud ModelArts platform. The specific steps include data preparation, model selection and training, model evaluation, model deployment, integration and application, and continuous monitoring and maintenance, among which:
[0054] Step 1: Data preparation:
[0055] Collect pH test paper image data, including 140 test paper images with pH values ranging from 1.0 to 14.0;
[0056] Preprocess the image data, such as cropping and scaling, to fit the model input requirements;
[0057] Annotate the images, i.e. determine the pH value corresponding to each image;
[0058] Step 2: Model selection and training:
[0059] The convolutional neural network (CNN) was selected as the basic model on the Huawei Cloud ModelArts platform, considering its strong performance in image recognition tasks and the extraction of complex image features;
[0060] Train the model using the collected and preprocessed image data, and adjust the model parameters including learning rate, batch size, number of iterations, optimizer, regularization parameter, dropout rate, number of neurons in convolutional and fully connected layers to suit the specific pH test strip image recognition task;
[0061] Step 3: Model evaluation:
[0062] Evaluate the trained model and use 1000-2000 pre-divided pH images as validation set data to test the model's accuracy, precision, recall, and F1 score;
[0063] Set the model to a threshold of 95% or higher accuracy, adjust the model structure or parameters based on the evaluation results, and perform iterative optimization;
[0064] Step 4: Model deployment:
[0065] Deploy the trained model to the Huawei Cloud ModelArts platform so that it can receive new test strip image data and make predictions;
[0066] Step 5: Integration and application:
[0067] Integrate the image recognition function in the Huawei Cloud ModelArts platform into the algorithm processing unit of the intelligent water quality detection device;
[0068] Ensure that the algorithm unit can work in coordination with the image acquisition module and the wireless communication data transmission module;
[0069] Step 6: Continuous monitoring and maintenance:
[0070] Monitor the performance of the model in real applications to ensure its stability and accuracy;
[0071] Update models regularly to adapt to new data and environmental changes.
[0072] As a preferred solution, it further includes a control panel, and the lighting system, image acquisition module, image processing module, display module, and wireless communication data transmission module are all electrically connected to the control panel;
[0073] The display module is an LCD display screen, which is integrated on the control panel; the LCD display screen is used to display pH value and temperature in real time, and provide intuitive test results and status information;
[0074] The control panel is equipped with three physical buttons: "Start Extraction", "Stop Operation" and "Photographing", which allow the user to manually start the extraction process of the sample solution, terminate the ongoing detection process and start the photographing operation;
[0075] The service terminal includes a mobile phone APP, which provides a user interface; the mobile phone APP is used to remotely control the detection device and view the results, including image preview, parameter setting and historical data query;
[0076] The wireless communication data transmission module is a Bluetooth data transmission module or a Wi-Fi data transmission module to ensure that the test results can be transmitted from the detection device to the mobile phone APP in real time;
[0077] The mobile phone APP provides operation instructions and result explanations, and users can adjust the detection parameters through the mobile phone APP to adapt to different detection environments.
[0078] Compared with the prior art, the present invention has obvious advantages and beneficial effects. Specifically, it can be seen from the above technical solution that:
[0079] The intelligent water quality detection device of the present invention improves the measurement accuracy through its compact light-proof black box design, the microfluidic system accurately controls the sample amount and ensures the purity of the sample, the color development reaction improves the color development stability through microfluidic technology, the LED square light source realizes uniform light distribution, and the high-throughput detection device composed of a turntable or a long plate with multiple pH test paper detection positions improves the detection efficiency. The camera ensures image clarity and dynamic capture accuracy, the algorithm and chip of the image processing module combine image processing and multivariate logistic regression model to convert image features into pH values, the GPU chip accelerates data processing, and the LCD display and mobile phone APP provide a user-friendly operation interface. The present invention significantly improves the accuracy and efficiency of pH measurement through its innovative technical combination. The design of the device is compact and intelligent, which simplifies the operation process and reduces the overall cost. Compared with traditional pH test paper, the present invention eliminates the subjectivity of human observation, ensures that the measurement results can be accurate to one decimal place, and significantly improves the measurement speed and efficiency. In addition, compared with conventional pH meters, the present invention reduces the need for frequent calibration and maintenance, reduces the risk of electrolyte interference, and has more relaxed requirements on water quality background. Therefore, the present invention not only combines the advantages of the prior art, but also avoids their disadvantages, bringing an innovative and efficient solution to the field of pH measurement. Through this comprehensive method, the present invention achieves rapid and accurate measurement of pH value, meeting the needs of modern analytical detection.
[0080] In order to more clearly illustrate the structural features, technical means and specific purposes and functions achieved by the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] Figure 1 It is a schematic diagram of the overall device structure of an embodiment of the present invention;
[0082] Figure 2 is an algorithm diagram of an embodiment of the present invention;
[0083] Figure 3 It is an overall flow chart of an embodiment of the present invention;
[0084] Figure 4 It is a schematic diagram of a long plate high-throughput side-by-side arrangement according to an embodiment of the present invention;
[0085] Figure 5 2 is a pH data diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0086] Please refer to Figures 1 to 5 As shown, it shows the specific structure of an embodiment of the present invention.
[0087] An intelligent water quality detection device based on image recognition technology, comprising:
[0088] The light-proof black box is used to isolate external light sources to ensure the uniformity and stability of illumination during image acquisition. The light-proof black box is a compact black box with dimensions of 200 mm in height and 100 mm in length and width. The light-proof black box is made of cost-effective ABS plastic material, has a simple structural design, and is easy to operate and maintain. The light-proof black box effectively avoids interference from external light sources and ensures the uniformity and stability of illumination during image acquisition. The light-proof black box integrates a pre-processing unit, an illumination system, an image acquisition module, a wireless communication data transmission module, and an image processing module to form a complete detection system.
[0089] A pre-treatment unit, for pre-treating the sample, the pre-treatment unit comprising a sample introduction device for introducing the liquid sample to be tested onto the pH test paper, a filtering device for filtering the liquid sample to be tested, a precise amount control device for controlling the sample amount of the liquid sample to be tested on the pH test paper, and a color development reaction device for mixing and coloring the liquid sample to be tested on the pH test paper;
[0090] An illumination system, wherein the light source position and range of the illumination system covers the entire detection area of the pH test paper to ensure illumination uniformity of image acquisition; the illumination system is disposed in the light-proof black box and is located above the pH test paper detection position in the light-proof black box;
[0091] An image acquisition module is used to acquire the pH test paper image and send the acquired pH test paper image to the image processing module;
[0092] The image processing module is used to determine the pH value corresponding to the image based on the pH test paper image acquired by the image acquisition module;
[0093] Display module, used for displaying detection data;
[0094] The wireless communication data transmission module is used to transmit the detection data to the service terminal.
[0095] Preferably, the sample introduction is used to introduce the liquid sample to be tested onto the pH test paper through a microfluidic system; the filtration device uses a filter membrane with a pore size of 0.10 to 0.22 μm, and the filter membrane is installed in a closed filtration chamber, and the filtration chamber is connected to the microfluidic system; the diameter of the microfluidic channel of the microfluidic system ranges from 100 to 200 μm to ensure that the liquid sample to be tested can directly enter the microfluidic channel after filtration to achieve an automated filtration process; the precise control of the amount is ensured through the precise control of the microfluidic system to ensure that the sample amount of the liquid sample to be tested on the pH test paper is between 1 μL and 10 μL, providing a precise sample amount for the subsequent color development reaction.
[0096] The color development reaction includes a color developer; after the pH test paper contacts the liquid sample to be tested, the liquid sample to be tested and the color developer are quickly mixed through the microfluidic system to quickly fix the color of the pH test paper to prevent color change; the color developer used includes:
[0097] 5,10,15,20-Tetrakis(4-carboxyphenyl)porphyrin (CAS No. 14609-54-2; molecular formula C 48 H 30 N 4O8 ), 4-nitrobenzamide (CAS No. 619-80-7; molecular formula C7H6N 2O3 ), gold nanoparticles Au (particle size ranges from 10nm to 50nm);
[0098] Phthalocyanine blue (CAS No. 147-14-8; molecular formula C 32 H 16 CuN8), 2-deoxy-2,2-difluoro-3,4,6-tri-O-benzyl-α-D-arabinose-hexopyranose (CAS No. 1259987-05-7; molecular formula C 27 H 28 F 2O5 ), bromocresol purple (CAS No. 115-40-2; molecular formula C 21 H 16 Br 2O5 S) in one or more; the above developers provide obvious color difference within a specific pH range, which is convenient for image recognition.
[0099] Preferably, the microfluidic system comprises a microfluidic chip, the microfluidic chip has the microfluidic channel, and the microfluidic chip is integrated with a temperature sensor; the ambient temperature is monitored by the temperature sensor, and the temperature is adjusted by a heating or cooling element to keep the temperature of the liquid sample solution to be tested and the surrounding environment of the pH test paper between 4°C and 37°C to ensure the stability of the color development reaction, thereby improving the accuracy of the pH test paper image detection. In addition, a precise metering device is set at the outlet of the microfluidic chip to control the volume of the solution dripping onto the pH test paper to ensure the consistency and repeatability of each measurement.
[0100] Preferably, the lighting system includes a white or yellow LED square light source fixed above the pH test paper detection position in the light-proof black box, and the light intensity of the LED square light source is 100 to 1000 lux; the image acquisition module is a camera, and the camera is located above the pH test paper detection position in the light-proof black box; the LED square light source is arranged around the camera and directly irradiates downward, and the irradiation range covers the entire pH test paper detection area, ensuring that the light intensity from the center to the edge of the pH test paper is consistent, the uniformity of the light intensity reaches more than 99%, and supports adjusting the light intensity within the range of 100 to 1000 lux to obtain the best image contrast; a concave reflector cup is installed on the camera, close to the four sides of the LED square light source; the reflector cup is used to collect and reflect the light emitted by the LED square light source to achieve light gathering and uniform distribution at the pH test paper detection position.
[0101] Preferably, a turntable is provided in the light-proof black box, and 10 to 20 pH test paper detection positions are provided on the turntable. All pH test paper detection positions share the camera and the LED square light source located above the turntable, and each pH test paper detection position is photographed in sequence by rotating the turntable; at the pH test paper detection position, the light intensity can be controlled at 1000-10000 lux / cm 2 range to ensure adequate lighting uniformity and image clarity.
[0102] Preferably, a row of long boards is provided in the light-proof black box, and 10 to 20 pH test paper detection positions are provided on the long boards; each pH test paper detection position is equipped with an independent camera located above the pH test paper detection position and an LED square light source, so as to realize the side-by-side processing of multiple liquid samples to be tested; at the pH test paper detection position, the light intensity can be controlled at 1000-10000 lux / cm 2 range to ensure adequate lighting uniformity and image clarity.
[0103] Preferably, the camera is located in the center of the top of the light-proof black box. Through the light path design inside the light-proof black box, the camera shooting area is ensured to completely overlap with the LED square light source irradiation area to ensure image quality; the camera has automatic focus and exposure adjustment functions, and can automatically adjust within the range of ±3 aperture changes to ensure image quality. In addition, the camera has at least 10 million pixels and is equipped with an economical and practical glass lens to ensure image clarity and is used to capture high-definition test paper images. The frame rate of the camera is at least 200 frames to ensure the accuracy of dynamic capture; the pixel depth of the camera is 8bit to 12bit to adapt to different image processing requirements; the exposure time of the camera is from 1μs to 1s to adapt to image capture under different lighting conditions. The operating temperature range of the camera is 4℃ to 37℃, and the operating humidity of the camera is 10% to 80%, ensuring the stability of the camera in different environments. The camera has passed CE, RoHS, CoaXPress2.0, GenICam certification and standards to ensure the safety and compatibility of the camera. The camera can automatically adjust the focal length from 50mm to 200mm to ensure a clear image of the test paper.
[0104] Preferably, the image processing module comprises the following steps:
[0105] Step 1: Image preprocessing algorithm: The image preprocessing algorithm includes two steps: color multivariate regression conversion and illumination compensation algorithm to enhance image contrast and quality; wherein:
[0106] The color multiple regression conversion converts the collected color pH test paper image into a grayscale image for subsequent processing; the color multiple regression conversion is:
[0107]
[0108] Where a1, b1, c1…z1 are the color coefficients of the R channel, a2, b2, c2…z2 are the color coefficients of the G channel, a3, b3, c3…z3 are the color coefficients of the B channel, L is the surface intensity of the pH test paper (white-yellow or yellow light), R, G, B are the ratios of the color image in the RGB channels, I R ,I G ,I B They are the values of the three RGB channels respectively;
[0109] The illumination compensation algorithm is used to adjust the impact of uneven illumination of the image and optimize the uniformity and contrast of the image; the illumination compensation algorithm is:
[0110]
[0111] Step 2, feature extraction: The feature extraction includes image tone analysis parameters; the image tone analysis parameters include the mean and standard deviation of the image, so as to analyze the tone attributes of the image and calculate the statistical parameters of the image. The algorithm is:
[0112]
[0113] Where N is the total number of pixels;
[0114] Step 3, data preparation: feature vector, combine the extracted image features into a feature vector to prepare for model training and prediction. The feature vector is:
[0115]
[0116] Step 4: Model training:
[0117] Multidimensional probability prediction model: Using pattern recognition parser technology, the extracted feature vectors are mapped to pH values. The multidimensional probability prediction model is:
[0118]
[0119] In the formula, k is the category index, K is the total number of categories, and δ k is the weight vector of the kth class, and c is the bias term of the kth class;
[0120] Loss function: A probability loss function is used to optimize the model parameters to minimize the prediction error. The loss function is:
[0121]
[0122] In the formula, δ is the weight parameter, c is the bias parameter, S is the number of samples, t is the temperature compensation coefficient, and pi is k is an indicator variable indicating whether sample i belongs to category k;
[0123] Optimization: Use gradient descent to minimize the loss function, automatically adjust the algorithm parameters to adapt to images under different lighting and background conditions, and improve detection accuracy. The automatic adjustment algorithm parameter function is:
[0124] δ,c=arg min w,b L(δ,c);
[0125] Step 5. Prediction: Classification: For new sample x new , evaluate the probability of belonging to each category, and select the category with the highest probability as the prediction result, convert the extracted features into pH values, and its classification function is:
[0126]
[0127] This process not only improves the accuracy of pH measurement, but also enables the intelligent water quality detection device of the present invention to provide reliable measurement results in various application scenarios;
[0128] The image processing module includes a GPU chip, which is used to accelerate the calculation process of the above algorithm and improve the detection speed; the GPU chip has the following parameters: it has a computing power of at least 3.0TFLOPS and can quickly process a large amount of image data to meet the needs of high-speed image processing; it is equipped with at least 4GB of video memory for storing and processing a large amount of image data, providing sufficient space for processing high-resolution images; it supports PCI Express 4.0 to achieve high-speed data exchange with other components of the system, thereby improving the overall data processing efficiency; while ensuring computing performance, it has an energy efficiency ratio of at least 1.5TFLOPS / W, which means that while ensuring high-performance computing, it optimizes energy consumption, making the device more energy-efficient during long-term operation; it is compatible with mainstream deep learning frameworks, such as TensorFlow, PyTorch, etc., so as to facilitate the implementation of complex image recognition algorithms, including but not limited to convolutional neural networks (CNN), so as to accurately convert the collected images into pH values.
[0129] The image recognition algorithm of the image processing module described above includes several key steps, the first of which is the image preprocessing algorithm: including color multivariate regression transformation and illumination compensation algorithm. These steps enhance the contrast and quality of the image and lay a solid foundation for subsequent analysis.
[0130] In the feature extraction stage, the tonal properties of the image are analyzed and the statistical parameters of the image are calculated, including the mean and standard deviation of the image. These parameters are the key components for constructing the feature vector.
[0131] During the model training phase, a multidimensional probabilistic prediction model was used, which can map the extracted feature vectors to pH values. The optimization of the loss function and the use of gradient descent allow the model parameters to be automatically adjusted to adapt to images under different lighting and background conditions, thereby improving detection accuracy.
[0132] Preferably, the image processing module may also adopt the image recognition function in the Huawei Cloud ModelArts platform. The specific steps include data preparation, model selection and training, model evaluation, model deployment, integration and application, and continuous monitoring and maintenance, wherein:
[0133] Step 1: Data preparation:
[0134] Collect pH test paper image data, including 140 test paper images with pH values ranging from 1.0 to 14.0;
[0135] Preprocess the image data, such as cropping and scaling, to fit the model input requirements;
[0136] Annotate the images, i.e. determine the pH value corresponding to each image;
[0137] Step 2: Model selection and training:
[0138] We chose convolutional neural network (CNN) as the base model on the Huawei Cloud ModelArts platform, especially considering its strong performance in image recognition tasks, especially for extracting complex image features;
[0139] Train the model using the collected and preprocessed image data, and adjust the model parameters including learning rate, batch size, number of iterations, optimizer, regularization parameter, dropout rate, number of neurons in convolutional and fully connected layers to suit the specific pH test strip image recognition task;
[0140] Step 3: Model evaluation:
[0141] Evaluate the trained model and use 1000-2000 pre-divided pH images as validation set data to test the model's accuracy, precision, recall, and F1 score;
[0142] Set the model to reach an accuracy threshold of more than 95%, adjust the model structure or parameters according to the evaluation results, and perform iterative optimization;
[0143] Step 4: Model deployment:
[0144] Deploy the trained model to the Huawei Cloud ModelArts platform so that it can receive new test strip image data and make predictions;
[0145] Step 5: Integration and application:
[0146] Integrate the image recognition function in the Huawei Cloud ModelArts platform into the algorithm processing unit of the intelligent water quality detection device;
[0147] Ensure that the algorithm unit can work in coordination with other parts such as the image acquisition module and the wireless communication data transmission module;
[0148] Step 6: Continuous monitoring and maintenance:
[0149] Monitor the performance of the model in real applications to ensure its stability and accuracy;
[0150] Update models regularly to adapt to new data and environmental changes.
[0151] Preferably, the intelligent water quality detection device of the present invention also includes a control panel, and the lighting system, image acquisition module, image processing module, display module, wireless communication data transmission module, etc. are all electrically connected to the control panel; the display module is a low-cost, high-contrast LCD display screen, and the LCD display screen is integrated on the control panel; the LCD display screen is used to display the pH value and temperature in real time, and provide intuitive detection results and status information; this design enables the user to obtain key measurement data directly from the device without going through other devices or interfaces.
[0152] The control panel is equipped with three physical buttons, namely, "start extraction", "stop operation" and "shoot", which allow the user to manually start the extraction process of the sample solution, terminate the ongoing detection process and start the shooting operation.
[0153] The service terminal can be a smart phone, a tablet computer or a personal computer. The smart phone includes a mobile phone APP, which provides a user interface; the mobile phone APP is used to remotely control the detection device and view the results, including image preview, parameter setting and historical data query, so that the user can comprehensively monitor and record the detection process, which is convenient for subsequent data analysis and report generation.
[0154] The wireless communication data transmission module is a Bluetooth data transmission module or a Wi-Fi data transmission module to ensure that the detection results can be transmitted from the detection device to the mobile phone APP in real time to achieve remote control and data synchronization; this wireless data transmission method not only improves the convenience of data sharing, but also reduces the complexity of the connecting wires, making the deployment and use of the device more flexible.
[0155] The mobile phone APP provides operation instructions and result explanations. Users can use the mobile phone APP to adjust detection parameters, such as light source brightness, camera focus, etc., to adapt to different detection environments; this remote control function allows users to operate without directly contacting the device, thereby improving the safety and convenience of operation.
[0156] The following is explained with specific experimental examples:
[0157] Example 1: Using a turntable-type intelligent water quality testing device to conduct routine laboratory experiments
[0158] In this Example 1, we will use the pH 3.1 solution configured by the national standard method for testing, demonstrating the operation process of the device under normal laboratory conditions. Our device adopts a turntable design, with multiple test paper detection positions on the turntable. All detection positions share a camera and an LED square light source located above the turntable, and each detection position is photographed in sequence by rotating the turntable.
[0159] Before starting the experiment, we took out the pH 3.1 buffer solution from the standard solution bottle and sampled 5μL using a pipette with an accuracy of 1μL. The sample was introduced into the test strip through a microfluidic system, which was designed with a 150μm diameter microfluidic channel to ensure that the sample could be evenly distributed. Subsequently, it was filtered using a 0.15μm pore size filter membrane to remove particulate matter that may affect the color reaction. The filtered sample directly entered the microfluidic channel to ensure that the sample could directly enter the microfluidic channel after filtration.
[0160] In the color development step, we use 5,10,15,20-tetrakis(4-carboxyphenyl)porphyrin as the color developer, which quickly fixes the color of the test paper after mixing with the sample. During the whole process, the built-in temperature sensor monitors the ambient temperature and uses heating or cooling elements to maintain the temperature at 25°C to ensure the stability of the color development reaction.
[0161] Next, the turntable design allows each test strip detection position to move to the bottom of the LED square light source and camera in turn. A white LED square light source with a light intensity of 500 lux is used for illumination, and the concave reflector cup helps to achieve light gathering and uniform distribution. A 12-megapixel color integrated camera module is used, with a set frame rate of 250fps, a pixel depth of 12bit, and an exposure time of 500μs to capture high-definition test strip images.
[0162] Image data is transmitted to the backend processing unit in real time via the Wi-Fi data transmission module. The GPU chip has a computing power of 3.5TFLOPS, is equipped with 4GB of video memory, and supports PCI Express 4.0 to accelerate image processing and calculation. The self-built multi-dimensional probability prediction model converts the collected images into pH values. Gradient descent optimization is used during model training to minimize the loss function.
[0163] Finally, the pH measurement results are intuitively displayed on a high-contrast LCD display. At the same time, users can remotely control and view the results through a mobile phone APP.
[0164] By measuring the pH 3.1 solution five times, the results obtained by the device were 3.1, 3.1, 3.2, 3.1, and 3.1, and the standard deviation between the predicted pH value and the actual value was 0.03898; the results of pH test paper detection were 3.0, 3.0, 3.0, 3.0, and 3.0, and the standard deviation between the predicted pH value and the actual value was 0; the results of pH meter detection were 3.2, 3.1, 3.2, 3.1, and 3, and the standard deviation between the predicted pH value and the actual value was 0.07431; although the standard deviation of the first group of data (3.1, 3.1, 3.2, 3.1, 3.1) was 0.03898, slightly higher than that of the second group, its measured value was closer to the actual pH value of 3.1, that is, the model of the device showed better accuracy.
[0165] Example 2: Temperature influence experiment using a turntable-type intelligent water quality detection device
[0166] In this Example 2, we will explore the effect of different temperature conditions on pH measurement results, and use the pH 5.7 solution configured by the national standard method for detection. Our device adopts a turntable design, with multiple test paper detection positions on the turntable. All detection positions share a camera located above the turntable and an LED square light source, and each detection position is photographed in sequence by rotating the turntable.
[0167] Before starting the experiment, the pH 5.7 buffer solution was equilibrated to 25°C at room temperature, and 10 μL was sampled using a pipette with an accuracy of 1 μL. The sample was introduced into the test strip through a microfluidic system equipped with a 200 μm diameter microfluidic channel. A 0.22 μm pore size filter was used for filtration, and it was ensured that the filtered sample directly entered the microfluidic channel.
[0168] In the color development step, we use 4-nitrobenzamide as the colorimetric agent. Next, we will conduct experiments at three different temperature points: 4°C, 25°C, and 37°C to evaluate the effect of temperature on pH measurement results. The built-in temperature sensor and heating or cooling element will ensure that the temperature of the test strip surrounding environment is precisely controlled.
[0169] A yellow LED square light source with a light intensity of 750 lux is used for illumination, and a concave reflector is used to achieve uniform light distribution. A 16-megapixel color integrated camera module is used with a frame rate of 300fps, a pixel depth of 10bit, and an exposure time of 1ms to capture the test paper image.
[0170] The image data is transmitted to the back-end processing unit via the Wi-Fi data transmission module. The GPU chip has a computing power of 4.0TFLOPS, is equipped with 6GB of video memory, and supports PCI Express 4.0 to accelerate image processing and calculation. The self-built multi-dimensional probability prediction model converts the collected images into pH values.
[0171] The pH 5.7 solution was measured at three different temperature points: 4°C, 25°C, and 37°C. The results obtained by the device were 5.7, 5.7, and 5.7, respectively, and the standard deviation between the predicted pH value and the actual value was 0; the results of the pH test paper were 6.0, 6.0, and 6.0, and the standard deviation between the predicted pH value and the actual value was 0; the results of the pH meter were 5.6, 5.7, and 5.8, and the standard deviation between the predicted pH value and the actual value was 0.08185; although the standard deviation of the first set of data (5.7, 5.7, 5.7) was 0, its measured values were completely consistent and completely consistent with the actual pH value of 5.7, showing excellent accuracy and repeatability. This shows that the measurement process is very stable and suitable for application scenarios where precise pH control is required.
[0172] Example 3: Using a turntable-type intelligent water quality detection device to conduct actual water sample experiments
[0173] In Example 3, we performed five pH measurements on a real water sample to demonstrate the performance and accuracy of the device when dealing with real water quality backgrounds. The water sample was collected from the city water supply system, with a clear color, a turbidity of 5 NTU, and a temperature of 22°C. The average pH value obtained from laboratory measurements was 7.8. The electrolyte background includes bicarbonate, sulfate, and chloride, which may interfere with the pH measurement.
[0174] In the experiment, we used a pipette with an accuracy of 1μL to take a 5μL sample and introduced it into the test paper through the microfluidic system. The diameter of the microfluidic channel is 180μm to ensure uniform distribution of the sample. The sample was filtered through a filter membrane with a pore size of 0.18μm and directly entered the microfluidic channel. Phthalocyanine blue was used as the color developer in the color reaction step, and the color of the test paper was quickly fixed after mixing with the sample. The built-in temperature sensor monitors the ambient temperature, and the heating element is used to maintain the temperature at 30°C to ensure the stability of the color reaction.
[0175] A square white LED light source with a light intensity of 1000 lux is used for illumination, and a concave reflector is equipped to achieve uniform light distribution. The 10-megapixel color integrated camera module captures the test strip image at a frame rate of 200fps, with a pixel depth of 8bit and an exposure time of 10ms to ensure image clarity. The image data is transmitted to the back-end processing unit in real time via the Wi-Fi data transmission module. The GPU chip has a computing power of 3.0TFLOPS, is equipped with 4GB of video memory, and supports PCI Express 4.0 for accelerating image processing and calculation. Our self-built multi-dimensional probability prediction model converts the collected images into pH values. Gradient descent optimization is used during model training to minimize the loss function.
[0176] Finally, the pH measurement results are intuitively displayed on a high-contrast LCD display. At the same time, users can remotely control and view the results through a mobile phone APP. The pH values of the five measurements were 7.8, 7.9, 7.8, 7.8, and 7.8, respectively. The standard deviation of these five measurements was calculated to be 0.03898. The results of the pH test paper test were 8.0, 8.0, 8.0, 8.0, 8.0, and the standard deviation of the predicted pH value and the actual value was 0; the results of the pH meter test were 7.9, 8.0, 8.0, 7.9, and 7.8, and the standard deviation of the predicted pH value and the actual value was 0.07431; although the standard deviation of the first set of data (7.8, 7.9, 7.8, 7.8, 7.8) was 0.03898, slightly higher than that of the second set, its measured value was closer to the actual pH value of 7.8, that is, the model of this device showed better accuracy.
[0177] Compared with traditional pH meters, this device reduces the need for frequent calibration and maintenance, reduces the risk of electrolyte interference, and has more relaxed requirements for water quality background. Therefore, this device is an ideal choice for actual water quality pH analysis, combining accuracy, repeatability and ease of operation, providing strong support for water quality monitoring and environmental science.
[0178] The comparison results of the standard deviations of the three pH detection methods in each embodiment are shown in Table 1:
[0179] Table 1
[0180]
[0181] In summary, the design focus of the present invention is that the intelligent water quality detection device of the present invention improves the measurement accuracy through its compact light-proof black box design, the microfluidic system accurately controls the sample amount and ensures the purity of the sample, the color reaction improves the color stability through microfluidic technology, the LED square light source realizes uniform light distribution, and the high-throughput detection device composed of a turntable or a long plate with multiple pH test paper detection positions improves the detection efficiency. The camera ensures image clarity and dynamic capture accuracy, the algorithm and chip of the image processing module combine image processing and multivariate logistic regression model to convert image features into pH values, the GPU chip accelerates data processing, and the LCD display and mobile phone APP provide a user-friendly operation interface. The present invention significantly improves the accuracy and efficiency of pH measurement through its innovative technology combination. The design of the device is compact and intelligent, which simplifies the operation process and reduces the overall cost. Compared with traditional pH test paper, the present invention eliminates the subjectivity of human observation, ensures that the measurement results can be accurate to one decimal place, and significantly improves the measurement speed and efficiency. In addition, compared with conventional pH meters, the present invention reduces the need for frequent calibration and maintenance, reduces the risk of electrolyte interference, and has more relaxed requirements for water quality background. Therefore, the present invention not only combines the advantages of the prior art, but also avoids their disadvantages, bringing an innovative and efficient solution to the field of pH measurement. Through this comprehensive method, the present invention achieves rapid and accurate measurement of pH value, meeting the needs of modern analytical detection.
[0182] The above description is only a preferred embodiment of the present invention and does not limit the technical scope of the present invention. Therefore, any slight modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. An intelligent water quality detection device based on image recognition technology, characterized in that: include: Anti-light interference black box, used to isolate external light sources to ensure uniformity and stability of lighting during image acquisition; A pre-treatment unit, for pre-treating the sample, the pre-treatment unit comprising a sample introduction device for introducing the liquid sample to be tested onto the pH test paper, a filtering device for filtering the liquid sample to be tested, a precise amount control device for controlling the sample amount of the liquid sample to be tested on the pH test paper, and a color development reaction device for mixing and coloring the liquid sample to be tested on the pH test paper; An illumination system, wherein the light source position and range of the illumination system covers the entire detection area of the pH test paper to ensure illumination uniformity for image acquisition; The illumination system is arranged in the light-proof black box and is located above the pH test paper detection position in the light-proof black box; An image acquisition module is used to acquire the pH test paper image and send the acquired pH test paper image to the image processing module; The image processing module is used to determine the pH value corresponding to the image based on the pH test paper image acquired by the image acquisition module; Display module, used for displaying detection data; The wireless communication data transmission module is used to transmit the detection data to the service terminal.
2. The intelligent water quality detection device based on image recognition technology according to claim 1 is characterized in that: The sample introduction is used to introduce the liquid sample to be tested onto the pH test paper through the microfluidic system; The filtration device uses a filter membrane with a pore size of 0.10 to 0.22 μm, and the filter membrane is installed in a closed filtration chamber, and the filtration chamber is connected to a microfluidic system; the diameter of the microfluidic channel of the microfluidic system ranges from 100 to 200 μm, so as to ensure that the liquid sample to be tested can directly enter the microfluidic channel after filtration, thereby realizing an automated filtration process; The precise control of the amount ensures that the sample amount of the liquid sample to be tested on the pH test paper is between 1 μL and 10 μL through the precise control of the microfluidic system; The color development reaction includes a color developer; after the pH test paper contacts the liquid sample to be tested, the liquid sample to be tested and the color developer are quickly mixed through the microfluidic system to quickly fix the color of the pH test paper to prevent color change; the color developer used includes: 5,10,15,20-Tetrakis(4-carboxyphenyl)porphyrin (CAS No. 14609-54-2; molecular formula C 48 H 30 N 4O8 ), 4-nitrobenzamide (CAS No. 619-80-7; molecular formula C7H6N 2O3 ), gold nanoparticles Au (particle size ranges from 10nm to 50nm); Phthalocyanine blue (CAS No. 147-14-8; molecular formula C 32 H 16 CuN8), 2-deoxy-2,2-difluoro-3,4,6-tri-O-benzyl-α-D-arabinose-hexopyranose (CAS No. 1259987-05-7; molecular formula C 27 H 28 F 2O5 ), bromocresol purple (CAS No. 115-40-2; molecular formula C 21 H 16 Br 2O5 S) in one or more.
3. The intelligent water quality detection device based on image recognition technology according to claim 2 is characterized in that: The microfluidic system comprises a microfluidic chip, the microfluidic chip has the microfluidic channel, and a temperature sensor is integrated on the microfluidic chip; the ambient temperature is monitored by the temperature sensor, and the temperature is adjusted by a heating or cooling element to keep the temperature of the liquid sample solution to be tested and the surrounding environment of the pH test paper between 4°C and 37°C to ensure the stability of the color development reaction, thereby improving the accuracy of pH test paper image detection.
4. The intelligent water quality detection device based on image recognition technology according to claim 1 is characterized in that: The illumination system includes a square LED light source of white light or yellow light fixed above the pH test paper detection position in the light-proof black box, and the light intensity of the square LED light source is 100 to 1000 lux; The image acquisition module is a camera, and the camera is located above the pH test paper detection position in the light-proof black box; The LED square light source is arranged around the camera and irradiates directly downward, covering the entire detection area of the pH test paper, ensuring that the light intensity from the center to the edge of the pH test paper is consistent, and the uniformity of the light intensity reaches more than 99%. It also supports adjusting the light intensity within the range of 100 to 1000 lux to obtain the best image contrast; The camera is equipped with a concave reflective cup which is close to the four sides of the LED square light source; the reflective cup is used to collect and reflect the light emitted by the LED square light source to achieve the gathering and uniform distribution of the light at the pH test paper detection position.
5. The intelligent water quality detection device based on image recognition technology according to claim 4 is characterized in that: A turntable is provided in the light-proof black box, and 10 to 20 pH test paper detection positions are arranged on the turntable. All pH test paper detection positions share a camera and a square LED light source located above the turntable. Each pH test paper detection position can be photographed in sequence by rotating the turntable. At the pH test paper detection position, the light intensity can be controlled at 1000-10000 lux / cm 2 range to ensure adequate lighting uniformity and image clarity.
6. The intelligent water quality detection device based on image recognition technology according to claim 4 is characterized in that: A row of long boards is arranged in the light-proof black box, and 10 to 20 pH test paper detection positions are arranged on the long boards; each pH test paper detection position is equipped with an independent camera located above the pH test paper detection position and an LED square light source, so as to realize the side-by-side processing of multiple liquid samples to be tested; at the pH test paper detection position, the light intensity can be controlled at 1000-10000 lux / cm 2 range to ensure adequate lighting uniformity and image clarity.
7. The intelligent water quality detection device based on image recognition technology according to claim 4 is characterized in that: The camera is located in the center of the top of the light-proof black box; the camera has automatic focus and exposure adjustment functions, and can automatically adjust within the aperture range of ±3 stops to ensure image quality.
8. The intelligent water quality detection device based on image recognition technology according to claim 1 is characterized in that: The image processing module comprises the following steps: Step 1: Image preprocessing algorithm: The image preprocessing algorithm includes two steps: color multivariate regression conversion and illumination compensation algorithm to enhance image contrast and quality; wherein: The color multiple regression conversion converts the collected color pH test paper image into a grayscale image for subsequent processing; the color multiple regression conversion is: <h2 style=";text-align:left;direction:ltr">I<h2 style=";text-align:left;direction:ltr"> gray <h2 style=";text-align:left;direction:ltr"> (a1+b1L+c1L)<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> +…+z1L<h2 style=";text-align:left;direction:ltr"> n <h2 style=";text-align:left;direction:ltr"> )RI<h2 style=";text-align:left;direction:ltr"> R <h2 style=";text-align:left;direction:ltr"> +(a2+b2L+c2L<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> +…+z2L<h2 style=";text-align:left;direction:ltr"> n <h2 style=";text-align:left;direction:ltr"> )GI<h2 style=";text-align:left;direction:ltr"> G <h2 style=";text-align:left;direction:ltr"> +(a3+b3L+c3L<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> +…+z3L<h2 style=";text-align:left;direction:ltr"> n <h2 style=";text-align:left;direction:ltr"> )BI<h2 style=";text-align:left;direction:ltr"> B Where a1, b1, c1…z1 are the color coefficients of the R channel, a2, b2, c2…z2 are the color coefficients of the G channel, a3, b3, c3…z3 are the color coefficients of the B channel, L is the surface intensity of the pH test paper (white-yellow or yellow light), R, G, B are the ratios of the color image in the RGB channels, I R ,I G ,I B They are the values of the three RGB channels respectively; The illumination compensation algorithm is used to adjust the impact of uneven illumination of the image and optimize the uniformity and contrast of the image; the illumination compensation algorithm is: Step 2, feature extraction: The feature extraction includes image tone analysis parameters; the image tone analysis parameters include the mean and standard deviation of the image, so as to analyze the tone attributes of the image and calculate the statistical parameters of the image. The algorithm is: Where N is the total number of pixels; Step 3, data preparation: feature vector, combine the extracted image features into a feature vector to prepare for model training and prediction. The feature vector is: Step 4: Model training: Multidimensional probability prediction model: Using pattern recognition parser technology, the extracted feature vectors are mapped to pH values. The multidimensional probability prediction model is: In the formula, k is the category index, K is the total number of categories, and δ k is the weight vector of the kth class, and c is the bias term of the kth class; Loss function: A probability loss function is used to optimize the model parameters to minimize the prediction error. The loss function is: In the formula, δ is the weight parameter, c is the bias parameter, S is the number of samples, t is the temperature compensation coefficient, and p is ik is an indicator variable indicating whether sample i belongs to category k; Optimization: Use gradient descent to minimize the loss function, automatically adjust the algorithm parameters to adapt to images under different lighting and background conditions, and improve detection accuracy. The automatic adjustment algorithm parameter function is: δ, c=argmin w,b L(δ,c); Step 5. Prediction: Classification: For new sample x new , evaluate the probability of belonging to each category, and select the category with the highest probability as the prediction result, convert the extracted features into pH values, and its classification function is: The image processing module includes a GPU chip, which is used to accelerate the calculation process of the above algorithm and improve the detection speed; the GPU chip has the following parameters: it has a computing power of at least 3.0TFLOPS to meet the needs of high-speed image processing; it is equipped with at least 4GB of video memory for storing and processing large amounts of image data; it supports PCI Express 4.0 to achieve high-speed data exchange with other components of the system; while ensuring computing performance, it has an energy efficiency ratio of at least 1.5TFLOPS / W to optimize energy consumption; it is compatible with mainstream deep learning frameworks to facilitate the implementation of complex image recognition algorithms.
9. The intelligent water quality detection device based on image recognition technology according to claim 1 is characterized in that: The image processing module uses the image recognition function in the Huawei Cloud ModelArts platform. The specific steps include data preparation, model selection and training, model evaluation, model deployment, integration and application, and continuous monitoring and maintenance. Step 1: Data preparation: Collect pH test paper image data, including 140 test paper images with pH values ranging from 1.0 to 14.0; Preprocess the image data, such as cropping and scaling, to fit the model input requirements; Annotate the images, i.e. determine the pH value corresponding to each image; Step 2: Model selection and training: The convolutional neural network (CNN) was selected as the basic model on the Huawei Cloud ModelArts platform, considering its strong performance in image recognition tasks and the extraction of complex image features; Train the model using the collected and preprocessed image data, and adjust the model parameters including learning rate, batch size, number of iterations, optimizer, regularization parameter, dropout rate, number of neurons in convolutional and fully connected layers to suit the specific pH test strip image recognition task; Step 3: Model evaluation: Evaluate the trained model and use 1000-2000 pre-divided pH images as validation set data to test the model's accuracy, precision, recall, and F1 score; Set the model to a threshold of 95% or higher accuracy, adjust the model structure or parameters based on the evaluation results, and perform iterative optimization; Step 4: Model deployment: Deploy the trained model to the Huawei Cloud ModelArts platform so that it can receive new test strip image data and make predictions; Step 5: Integration and application: Integrate the image recognition function in the Huawei Cloud ModelArts platform into the algorithm processing unit of the intelligent water quality detection device; Ensure that the algorithm unit can work in coordination with the image acquisition module and the wireless communication data transmission module; Step 6: Continuous monitoring and maintenance: Monitor the performance of the model in real applications to ensure its stability and accuracy; Update models regularly to adapt to new data and environmental changes.
10. The intelligent water quality detection device based on image recognition technology according to claim 1 is characterized in that: It also includes a control panel, and the lighting system, image acquisition module, image processing module, display module, and wireless communication data transmission module are all electrically connected to the control panel; The display module is an LCD display screen, which is integrated on the control panel; the LCD display screen is used to display pH value and temperature in real time, and provide intuitive test results and status information; The control panel is equipped with three physical buttons: "Start Extraction", "Stop Operation" and "Photographing", which allow the user to manually start the extraction process of the sample solution, terminate the ongoing detection process and start the photographing operation; The service terminal includes a mobile phone APP, which provides a user interface; the mobile phone APP is used to remotely control the detection device and view the results, including image preview, parameter setting and historical data query; The wireless communication data transmission module is a Bluetooth data transmission module or a Wi-Fi data transmission module to ensure that the test results can be transmitted from the detection device to the mobile phone APP in real time; The mobile phone APP provides operation instructions and result explanations, and users can adjust the detection parameters through the mobile phone APP to adapt to different detection environments.
Citation Information
Patent Citations
Efficient pH detection device
CN108760728A
Sewage water quality identification and application method based on deep learning
CN118196513A
System and method for online detection of nitrate / nitrite in water
CN118425038A
Water quality detection system
CN218782195U
Analysis device, system and program
US20160321824A1
Cited By
Micro water quality detection box based on microfluidic technology and image recognition
CN120490077A