Humidifier floater detection model generation method and system and detection method and system
By acquiring and filtering the image data of the humidifier float state, using the YOLO model and fuzzy data enhancement method for training, and performing lightweight processing of the model, the problem of poor detection of humidifier float in the prior art is solved, and efficient and accurate detection of float state in industrial environments is achieved.
Patent Information
- Application Number
- CN202411747180.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-05-06
AI Technical Summary
The existing humidifier float detection methods have environmental complexity and limitations of deep learning models in complex industrial scenarios, resulting in poor detection results and high cost.
By obtaining image data of normal and abnormal states, filtering and annotating, training using YOLO model, and using a variety of fuzzy data enhancement methods and model lightweight processing, the robustness and deployment efficiency of the model are improved.
It improves the adaptability and robustness of the model to environmental changes, reduces hardware costs, and makes the model more suitable for deployment in resource-constrained industrial environments, achieving efficient and accurate float state detection.
Smart Images

Figure CN119941619A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and system for generating a humidifier float detection model, and a detection method and system. Background Art
[0002] As a popular household appliance, the core function of humidifiers relies on precise water level control to maintain appropriate humidity. As a key sensor component in the humidifier, the float is responsible for detecting and adjusting the water level to ensure the safe and stable operation of the equipment. Traditional manual detection methods are gradually being replaced by automated and intelligent detection processes due to their inefficiency, error-proneness and high cost. These intelligent detection technologies collect float data and use advanced technologies such as computer vision and deep learning to achieve automated detection, significantly improving detection efficiency and accuracy while reducing labor costs.
[0003] However, in complex industrial scenarios, existing intelligent detection methods still face the following challenges:
[0004] 1. Environmental complexity: Factors such as changes in the assembly environment in the actual production environment, the operator's movements, and camera shaking caused by instrument operation may all lead to a decrease in image acquisition quality and affect the detection effect.
[0005] 2. Limitations of deep learning models: Although deep learning models have achieved remarkable results in the field of image recognition, their application in industrial production is limited by large computational workload, high computing power requirements and increased hardware costs, which limits their feasibility in large-scale deployment.
[0006] Therefore, how to build a stable and lightweight industrial humidifier float detection system while ensuring the detection effect to adapt to the changing industrial environment and reduce costs has become a key issue that needs to be solved in technological development. Summary of the invention
[0007] The main purpose of the present invention is to provide a humidifier float detection model generation method and system and a detection method and system, aiming to solve the technical problems that the existing humidifier float detection method has poor detection effect and limited application in industrial production.
[0008] To achieve the above object, the present invention provides a method for generating a humidifier float detection model, which comprises the following steps:
[0009] Acquire normal and abnormal state image data, wherein the normal state image data is image data of a normal float assembly state, and the abnormal state image data is image data of a float missing;
[0010] Screening the normal state image data to obtain the normal state image data under different states; retaining part of the abnormal state image data;
[0011] Perform detection frame annotation on the normal state image data obtained by screening, and generate an annotation frame file consistent with the image name;
[0012] The labeled data set and the retained abnormal state image data are divided into training set, validation set and test set according to the preset ratio, and the image data in the training set are enhanced using a variety of fuzzy data enhancement methods;
[0013] Use the YOLO model to train the model based on the training set and the validation set. The training process uses the stochastic gradient descent optimization algorithm, and presets the initial learning rate and the total number of training rounds.
[0014] The model performance is evaluated based on the test set, and the model is lightweight.
[0015] Optionally, multiple fuzzy data enhancement methods are used to perform data enhancement processing on the image data in the training set, specifically: three fuzzy data enhancement methods, GaussianBlur, MotionBlur and MedianBlur, are randomly applied to each image data in the training set with corresponding preset probabilities.
[0016] Optionally, the model lightweighting process includes at least the following steps:
[0017] Determine the total number of weights T to be pruned based on the model compression requirements and the desired sparsity;
[0018] Design a state function to represent the minimum distortion caused by pruning the jth weight in the i-th layer;
[0019] Establish recursive equations between states and decompose the pruning problem through recursive equations;
[0020] Based on the absolute magnitude of the weight and the proportion of energy occupied by the weight in the subsequent layers, the LAMP score of each weight is calculated to evaluate the distortion effect of pruning on the model;
[0021] Starting from the bottom layer of the model, the weights are sorted according to the LAMP score and the weights are pruned layer by layer;
[0022] During the pruning process, the number of pruned weights in each layer is recorded, and a variable is used to store each state decision;
[0023] Prune iteratively until the total number of pruned weights reaches T.
[0024] Optionally, the model lightweight processing further includes the following steps:
[0025] Fine-tune the pruned model weights to optimize the residual weights;
[0026] The model is thoroughly evaluated to verify that its performance meets the requirements.
[0027] Optional, state function The specific calculation formula is as follows:
[0028] Among them, the state function is from g in a bottom-up manner. i Calculate to g l , l is the top layer, 1<i<l, 1<j<T, 1≤k≤j, represents the minimum distortion caused by pruning the jk-th weight in the i-1 layer, δ i (k) represents the distortion caused by pruning the kth weight in the i-th layer;
[0029] variable The specific calculation formula is as follows:
[0030] in, represents the pruning decision to prune the jth weight in layer i;
[0031] The specific calculation formula of LAMP score score(u;W) is as follows:
[0032] Where u represents the number of model layers that need to be evaluated, W[u] represents the weight of the u-th layer, (W[u]) 2 represents the absolute magnitude of the weight W[u] of the u-th layer, ∑ v≥u (W[v]) 2 Represents the sum of squares of all weights from the uth layer to the last layer.
[0033] Optionally, the humidifier float detection model generation method further includes:
[0034] Export the model file obtained after lightweight processing and upload it to the edge computing device;
[0035] Convert the model file to a specific format and then convert it to half-precision floating point format.
[0036] Optionally, the ratio of the training set, validation set, and test set is 7:2:1; the preset initial learning rate is 0.001, and the preset total number of training rounds is 200.
[0037] Corresponding to the humidifier float detection model generation method, the present invention provides a humidifier float detection model generation system, which at least includes:
[0038] An image acquisition module is used to obtain normal and abnormal state image data, wherein the normal state image data is image data of a normal float assembly state, and the abnormal state image data is image data of a float missing;
[0039] The data screening module is used to screen the normal state image data to obtain the normal state image data under different states; and retain part of the abnormal state image data;
[0040] A data annotation module is used to annotate the normal state image data obtained by screening with a detection frame and generate an annotation frame file consistent with the image name;
[0041] The data enhancement module is used to divide the labeled data set and the retained abnormal state image data into a training set, a validation set and a test set according to a preset ratio, and use a variety of fuzzy data enhancement methods to perform data enhancement processing on the image data in the training set;
[0042] The training module uses the YOLO model to perform model training based on the training set and the validation set. The training process uses the stochastic gradient descent optimization algorithm, and presets the initial learning rate and the total number of training rounds to optimize the model parameters.
[0043] Evaluation module, which evaluates the model performance based on the test set;
[0044] Lightweight processing module, used for model lightweight processing.
[0045] In addition, to achieve the above-mentioned purpose, the present invention also provides a humidifier float detection method, which is performed simultaneously with the humidifier air tightness detection and at least includes the following steps:
[0046] When the air tightness test of the humidifier is started, the humidifier float test instruction is issued;
[0047] Call the image acquisition module to collect the image to be detected and send it back;
[0048] The humidifier float detection model is used to detect the humidifier float on the image to be detected, and whether the float assembly state is normal is determined to obtain the judgment result. The entire detection process is maintained within the air tightness test time;
[0049] When the air tightness test is finished, the judgment result will be sent back and corresponding prompts will be given according to the judgment result;
[0050] Wherein, the humidifier float detection model is generated according to the humidifier float detection model generation method described above.
[0051] Corresponding to the humidifier float detection method, the present invention provides a humidifier float detection system, which is performed simultaneously with the humidifier air tightness detection, and at least includes:
[0052] The embedded module is used to send the humidifier float detection instruction to the edge computing module when the humidifier air tightness test starts the air tightness test;
[0053] The edge computing module is used to call the image acquisition module; the humidifier float detection model is used to perform humidifier float detection on the image to be detected, and whether the float assembly state is normal is determined to obtain the judgment result. The entire detection process is maintained within the air tightness test time; after the air tightness test is completed, the judgment result is sent back to the embedded module;
[0054] The image acquisition module is used to acquire the image to be detected and transmit it back to the edge computing module;
[0055] A prompt module, used for providing corresponding prompts according to the judgment results;
[0056] Wherein, the humidifier float detection model is generated according to the humidifier float detection model generation method described above.
[0057] The beneficial effects of the present invention are:
[0058] (1) Compared with the prior art, the present invention obtains image data in normal and abnormal states, and performs screening and labeling, which helps the model learn the characteristics of floats in different environments, thereby improving the model's adaptability to environmental changes. At the same time, the training set is enhanced using a variety of fuzzy data enhancement methods, which helps the model learn the characteristics of floats under different image quality conditions and improves the model's robustness to camera shaking and assembly environment changes. Furthermore, by lightweight processing of the model, the deployment efficiency of the model is improved, the hardware cost is reduced, and the model is more suitable for deployment in resource-constrained industrial environments.
[0059] (2) Compared with the prior art, the present invention adopts three blur data enhancement methods, namely GaussianBlur, MotionBlur and MedianBlur, to enhance the adaptability of the model to different image qualities and improve the robustness of the model in practical applications.
[0060] (3) Compared with the prior art, the present invention realizes accurate pruning of model weights through dynamic programming and state function design. The layer adaptive amplitude-based pruning (LAMP) adopted does not need to perform sparse training on the original model, and prunes directly on the optimal model weights obtained through training, so that the model takes less time to detect in actual industrial deployment, which is more convenient and quick for overall optimization deployment, effectively reducing the complexity of the model and the computing resource requirements, while maintaining the model performance.
[0061] (4) Compared with the prior art, the present invention ensures that the lightweight model can still meet the performance requirements of industrial applications by fine-tuning the model weights after pruning and comprehensively evaluating the model performance.
[0062] (5) Compared with the prior art, the present invention exports the lightweight model and converts it into a half-precision floating-point format, making the model more suitable for deployment on edge computing devices and reducing storage and computing costs.
[0063] (6) Compared with the prior art, the present invention provides a complete humidifier float detection model generation system, which realizes the automation of the entire process from data acquisition to model lightweight processing, and improves the efficiency and reliability of the entire detection process.
[0064] (7) Compared with the prior art, the present invention performs float detection and humidifier air tightness detection simultaneously, thereby improving the integration and efficiency of the detection process and reducing the total time required for detection.
[0065] (8) Compared with the prior art, the present invention provides an integrated humidifier float detection system, which realizes real-time and accurate float status detection and prompting through the coordinated work of multiple modules, thereby improving the automation level of industrial production. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0067] Figure 1 A simplified flow chart of an embodiment of a method for generating a humidifier float detection model according to the present invention;
[0068] Figure 2 A framework diagram of an embodiment of a humidifier float detection model generation system of the present invention;
[0069] Figure 3 A simplified flow chart of an embodiment of a humidifier float detection method of the present invention;
[0070] Figure 4 It is a framework diagram of an embodiment of a humidifier float detection system of the present invention;
[0071] Figure 5 The hardware facilities and software environment configuration of the edge computing module described in an embodiment of the humidifier float detection system of the present invention. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0073] like Figure 1 As shown, a method for generating a humidifier float detection model of the present invention comprises the following steps:
[0074] Acquire normal and abnormal state image data, wherein the normal state image data is image data of a normal float assembly state, and the abnormal state image data is image data of a float missing;
[0075] Screening the normal state image data to obtain the normal state image data under different states; retaining part of the abnormal state image data;
[0076] Perform detection frame annotation on the normal state image data obtained by screening, and generate an annotation frame file consistent with the image name;
[0077] The labeled data set and the retained abnormal state image data are divided into training set, validation set and test set according to the preset ratio, and the image data in the training set are enhanced using a variety of fuzzy data enhancement methods;
[0078] Use the YOLO model to train the model based on the training set and the validation set. The training process uses the stochastic gradient descent optimization algorithm, and presets the initial learning rate and the total number of training rounds.
[0079] The model performance is evaluated based on the test set, and the model is lightweight.
[0080] It should be noted that the “model” described herein is an abbreviation of the “humidifier float detection model” described in the present invention.
[0081] Preferably, the acquisition of normal and abnormal state image data is specifically performed by converting the normal and abnormal state video data collected by the image acquisition module into corresponding image data; the normal state image data under different states at least include normal state image data under different heights, different forms and different illuminations; in the present invention, the abnormal state image data are placed in the training set, the validation set and the test set in proportion as negative samples; wherein the normal and abnormal state image data are distributed in the training set, the validation set and the test set in a proportion of 7:2:1; the preset initial learning rate is 0.001, and the preset total number of training rounds is 200. At the beginning of training, the first ten rounds of training are preheated with the preset initial learning rate, and a total of 200 rounds of training are trained to obtain the optimal model weights.
[0082] The present invention obtains image data in normal and abnormal states, and performs screening and labeling, which helps the model learn the characteristics of floats in different environments, thereby improving the model's adaptability to environmental changes. At the same time, multiple fuzzy data enhancement methods are used to perform data enhancement processing on the training set, which helps the model learn the characteristics of floats under different image quality conditions and improves the model's robustness to camera shaking and assembly environment changes. Furthermore, through model lightweight processing, the model's deployment efficiency is improved, the hardware cost is reduced, and the model is more suitable for deployment in resource-constrained industrial environments.
[0083] Preferably, the labelImg labeling tool is used to label the normal state image data obtained by screening with a detection frame, and a txt labeling frame file with the same name as the image is generated accordingly.
[0084] In order to solve the problems such as blurred images due to operation actions and unclear images due to movement of accessories during instrument assembly, the present invention combines different blur data enhancement methods such as GaussianBlur, MotionBlur and MedianBlur to simulate unclear images.
[0085] GaussianBlur: Use a Gaussian filter to calculate the convolution kernel based on the Gaussian function to smooth the image data, making the image data blurred as a whole and the edges blurred.
[0086] MedianBlur: Uses a median filter to calculate the median of the pixel values in the filter window to replace the central pixel value, which can effectively remove noise. While removing noise, it will better preserve the edge information of the image.
[0087] MotionBlur: The blur effect is achieved by constructing a convolution kernel that simulates camera motion. It produces a blur effect along a specific direction, simulating the trailing image when the camera moves.
[0088] In this embodiment, GaussianBlur and MedianBlur are used to simulate blurring caused by camera defocus or environmental interference; MotionBlur is used to simulate blurring caused by camera shaking or object movement during shooting.
[0089] In this embodiment, multiple fuzzy data enhancement methods are used to perform data enhancement processing on the image data in the training set. Specifically, three fuzzy data enhancement methods, GaussianBlur, MotionBlur and MedianBlur, are randomly applied to each image data in the training set with corresponding preset probabilities.
[0090] Preferably, the three blur data enhancement methods of GaussianBlur, MotionBlur and MedianBlur have corresponding preset probabilities of 0.1, 0.1 and 0.2 respectively.
[0091] The present invention adopts three blur data enhancement methods, namely GaussianBlur, MotionBlur and MedianBlur, to enhance the adaptability of the model to different image qualities and improve the robustness of the model in practical applications.
[0092] In this embodiment, the model lightweight processing includes at least the following steps:
[0093] Determine the total number of weights T to be pruned based on the model compression requirements and the desired sparsity;
[0094] Design a state function to represent the minimum distortion caused by pruning the jth weight in the i-th layer;
[0095] Establish recursive equations between states and decompose the pruning problem through recursive equations;
[0096] Based on the absolute magnitude of the weight and the proportion of energy occupied by the weight in the subsequent layers, the LAMP score of each weight is calculated to evaluate the distortion effect of pruning on the model;
[0097] Starting from the bottom layer of the model, the weights are sorted according to the LAMP score and the weights are pruned layer by layer;
[0098] During the pruning process, the number of pruned weights in each layer is recorded, and a variable is used to store each state decision;
[0099] Iterate pruning until the total number of pruned weights reaches T;
[0100] Fine-tune the pruned model weights to optimize the residual weights;
[0101] The model is thoroughly evaluated to verify that its performance meets the requirements.
[0102] Preferably, T=0.6.
[0103] It is understandable that fine-tuning is also model training. Unlike the original model training (using the YOLO model to train the model based on the training set and the validation set), fine-tuning is to load the pruned model weights and re-train the model.
[0104] In this embodiment, the state function The specific calculation formula is as follows:
[0105] Among them, the state function is from g in a bottom-up manner. i Calculate to g l , l is the top layer, 1<i<l, 1<j<T, 1≤k≤j, represents the minimum distortion caused by pruning the jk-th weight in the i-1 layer, δ i (k) represents the distortion caused by pruning the kth weight in the i-th layer;
[0106] variable The specific calculation formula is as follows:
[0107] in, represents the pruning decision to prune the jth weight in layer i;
[0108] The specific calculation formula of LAMP score score(u;W) is as follows:
[0109] Where u represents the number of model layers that need to be evaluated, W[u] represents the weight of the u-th layer, (W[u]) 2 represents the absolute magnitude of the weight W[u] of the u-th layer, ∑ v≥u (W[v]) 2 Represents the sum of squares of all weights from the uth layer to the last layer.
[0110] In this embodiment, the connections with the minimum LAMP score are pruned globally by using the calculated LAMP score until the required global sparsity constraint is met; in fact, for weights with larger magnitudes, the proportion of energy they occupy in subsequent layers is also larger, so the score is high. For weights with smaller magnitudes, the proportion of energy they occupy in subsequent layers is smaller, so the score is also lower. Therefore, the following formula can be derived, which is equivalent to performing model pruning using automatically selected layer-wise sparsity.
[0111]
[0112] The scoring method of the present invention can automatically determine the sparsity of each layer. Compared with the traditional pruning method, it has the advantages of high computational efficiency, no need to adjust hyperparameters, and no reliance on specific model knowledge. Through this adaptive weight scoring method, the algorithm can effectively identify weights that have little impact on model performance, thereby achieving more refined and effective model compression.
[0113] The present invention realizes accurate pruning of model weights through dynamic programming and state function design. The layer adaptive amplitude-based pruning (LAMP) adopted does not need to perform sparse training on the original model, and prunes directly on the optimal model weights obtained through training, so that the model spends less time on detection in actual industrial deployment, which is more convenient and quick for overall optimization deployment, effectively reducing the complexity of the model and the demand for computing resources, while maintaining the model performance.
[0114] The present invention ensures that the lightweight model can still meet the performance requirements of industrial applications by fine-tuning the pruned model weights and comprehensively evaluating the model performance.
[0115] In this embodiment, the humidifier float detection model generation method further includes:
[0116] Export the model file obtained after lightweight processing (such as the .pt file in PyTorch) and upload it to the edge computing device;
[0117] Convert the model file to a specific format and then convert it to half-precision floating point (FP16) format.
[0118] Preferably, the edge computing device is specifically an edge development board NVIDIA Jetson Nano; the specific format is a format supported by TensorRT (such as .trt file).
[0119] The present invention exports the lightweight model and converts it into a half-precision floating-point format, making the model more suitable for deployment on edge computing devices and reducing storage and computing costs.
[0120] Actual effect and speed test of the humidifier float detection model of the present invention: the precision (Precision), recall rate (Recall) and mean average precision (mAP) of the lightweight model have not been attenuated, please refer to Table 1 (comparison of model evaluation indicators before and after pruning) for details; on this basis, the number of parameters of the lightweight model is reduced to 1 / 4 of the original, and the inference time on the nano development board is reduced from the original 126ms to 72ms, please refer to Table 2 (comparison of model lightweight deployment on the board effect before and after).
[0121] Precision Recall <![CDATA[mAP 50 ]]> <![CDATA[mAP 50:95 ]]> Before pruning 0.996 0.995 0.995 0.905 After pruning 0.996 0.996 0.995 0.905
[0122] Table 1
[0123]
[0124]
[0125] Table 2
[0126] like Figure 2 As shown, the present invention also provides a humidifier float detection model generation system, which at least includes:
[0127] The image acquisition module 110 is used to obtain normal and abnormal state image data, wherein the normal state image data is image data of a normal float assembly state, and the abnormal state image data is image data of a float missing;
[0128] The data screening module 120 is used to screen the normal state image data to obtain the normal state image data under different states; and retain part of the abnormal state image data;
[0129] The data annotation module 130 is used to annotate the normal state image data obtained by screening with a detection frame, and generate an annotation frame file consistent with the image name;
[0130] The data enhancement module 140 is used to divide the labeled data set and the retained abnormal state image data into a training set, a validation set and a test set according to a preset ratio, and perform data enhancement processing on the image data in the training set using a variety of fuzzy data enhancement methods;
[0131] The training module 150 uses the YOLO model to perform model training based on the training set and the validation set, wherein the training process adopts a stochastic gradient descent optimization algorithm, and presets an initial learning rate and a total number of training rounds to optimize model parameters;
[0132] An evaluation module 160, which evaluates the model performance based on the test set;
[0133] The lightweight processing module 170 is used to perform lightweight processing on the model.
[0134] Preferably, the humidifier float detection model generation system also includes: a model deployment module, which is used to export the model file obtained after lightweight processing and upload it to the edge computing device; convert the model file into a specific format and then convert it into a half-precision floating point format.
[0135] The present invention provides a complete humidifier float detection model generation system, realizes the automation of the entire process from data acquisition to model lightweight processing, and improves the efficiency and reliability of the entire detection process.
[0136] like Figure 3As shown, the embodiment of the present invention also provides a humidifier float detection method, which is performed simultaneously with the humidifier air tightness detection, and at least includes the following steps:
[0137] When the air tightness test of the humidifier is started, the humidifier float test instruction is issued;
[0138] Call the image acquisition module to collect the image to be detected and send it back;
[0139] The humidifier float detection model is used to detect the humidifier float on the image to be detected, and whether the float assembly state is normal is determined to obtain the judgment result. The entire detection process is maintained within the air tightness test time;
[0140] When the air tightness test is finished, the judgment result will be sent back and corresponding prompts will be given according to the judgment result;
[0141] Wherein, the humidifier float detection model is generated according to the humidifier float detection model generation method described above.
[0142] The present invention performs float detection and humidifier air tightness detection simultaneously, thereby improving the integration and efficiency of the detection process and reducing the total time required for detection.
[0143] like Figure 4 As shown, the present invention also provides a humidifier float detection system, which at least includes:
[0144] The embedded module 210 is used to send a humidifier float detection instruction to the edge computing module 220 when the humidifier air tightness detection starts the air tightness test;
[0145] The edge computing module 220 is used to call the image acquisition module 230; the humidifier float detection model is used to perform humidifier float detection on the image to be detected, and whether the float assembly state is normal is determined to obtain a judgment result. The entire detection process is maintained within the air tightness test time; when the air tightness test is completed, the judgment result is returned to the embedded module 210;
[0146] The image acquisition module 230 is used to acquire the image to be detected and transmit it back to the edge computing module 220;
[0147] Prompt module 240, used for giving corresponding prompts according to the judgment result;
[0148] Wherein, the humidifier float detection model is generated according to the humidifier float detection model generation method described above.
[0149] In this embodiment, the parameters of the image acquisition module 230 include: a frame rate of 30 fps, and a video resolution of 640x480 pixels.
[0150] Preferably, the humidifier float detection model is used to perform humidifier float detection on the image to be detected, and the detection information of the float in the operation area of the production line personnel is obtained to determine whether the float assembly state is normal. The detection information includes the float position (represented by drawing a rectangular box) and the category (whether the float assembly state is normal).
[0151] In this embodiment, the edge computing module 220 is specifically a Nvidia Jetson Nano development board, and its hardware facilities and software environment configuration can be referred to in Figure 5 As shown, it is equipped with a quad-core processor, a 128-core Max GPU and an ARM Cortex-A57 CPU, with a memory bandwidth of up to 25.6GB / s, which is conducive to fast communication between the CPU and GPU; low power consumption and high memory bandwidth make it very suitable for the deployment of artificial intelligence systems.
[0152] Furthermore, the prompt module 240 may be a display module and a sound prompt module. The display module is used to display the current operation status. When the float assembly status is normal, the display module displays a pass status. When the float assembly status is abnormal, the sound prompt module issues an alarm.
[0153] Furthermore, the humidifier float detection system also includes a control module, which can be specifically a button control module, and is provided with a reset button for controlling the reset of the float after the system detects an abnormal assembly state of the float.
[0154] The present invention provides an integrated humidifier float detection system, which realizes real-time and accurate float state detection and prompting through the coordinated work of multiple modules, thereby improving the automation level of industrial production.
[0155] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0156] Furthermore, in this document, the terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device that includes the element.
[0157] The above description shows and describes the preferred embodiments of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the invention, through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not depart from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.
Claims
1. A method for generating a humidifier float detection model, characterized in that: The following steps are involved: Acquire normal and abnormal state image data, wherein the normal state image data is image data of a normal float assembly state, and the abnormal state image data is image data of a float missing; Screening the normal state image data to obtain the normal state image data under different states; retaining part of the abnormal state image data; Perform detection frame annotation on the normal state image data obtained by screening, and generate an annotation frame file consistent with the image name; The labeled data set and the retained abnormal state image data are divided into training set, validation set and test set according to the preset ratio, and the image data in the training set are enhanced using a variety of fuzzy data enhancement methods; Use the YOLO model to train the model based on the training set and the validation set. The training process uses the stochastic gradient descent optimization algorithm, and presets the initial learning rate and the total number of training rounds. The model performance is evaluated based on the test set, and the model is lightweight.
2. The method for generating a humidifier float detection model according to claim 1, characterized in that: A variety of fuzzy data enhancement methods are used to perform data enhancement processing on the image data in the training set. Specifically, the three fuzzy data enhancement methods, GaussianBlur, MotionBlur and MedianBlur, are randomly applied to each image data in the training set with corresponding preset probabilities.
3. The method for generating a humidifier float detection model according to claim 1, characterized in that: Model lightweighting includes at least the following steps: Determine the total number of weights T to be pruned based on the model compression requirements and the desired sparsity; Design a state function to represent the minimum distortion caused by pruning the jth weight in the i-th layer; Establish recursive equations between states and decompose the pruning problem through recursive equations; Based on the absolute magnitude of the weight and the proportion of energy occupied by the weight in the subsequent layers, the LAMP score of each weight is calculated to evaluate the distortion effect of pruning on the model; Starting from the bottom layer of the model, the weights are sorted according to the LAMP score and the weights are pruned layer by layer; During the pruning process, the number of pruned weights in each layer is recorded, and a variable is used to store each state decision; Prune iteratively until the total number of pruned weights reaches T.
4. The method for generating a humidifier float detection model according to claim 3, characterized in that: The model lightweighting process also includes the following steps: Fine-tune the pruned model weights to optimize the residual weights; The model is thoroughly evaluated to verify that its performance meets the requirements.
5. The method for generating a humidifier float detection model according to claim 3, characterized in that: State Function The specific calculation formula is as follows: Among them, the state function is from g in a bottom-up manner. i Calculate to g l , l is the top layer, 1<i<l, 1<j<T, 1≤k≤j, represents the minimum distortion caused by pruning the jk-th weight in the i-1 layer, δ i (k) represents the distortion caused by pruning the kth weight in the i-th layer; variable The specific calculation formula is as follows: in, represents the pruning decision to prune the jth weight in layer i; The specific calculation formula of LAMP score score(u;W) is as follows: Where u represents the number of model layers that need to be evaluated, W[u] represents the weight of the u-th layer, (W[u]) 2 represents the absolute magnitude of the weight W[u] of the u-th layer, ∑ v≥u (W[v]) 2 Represents the sum of squares of all weights from the uth layer to the last layer.
6. The method for generating a humidifier float detection model according to claim 1, characterized in that: Also includes: Export the model file obtained after lightweight processing and upload it to the edge computing device; Convert the model file to a specific format and then convert it to half-precision floating point format.
7. The method for generating a humidifier float detection model according to claim 1, characterized in that: The ratio of the training set, validation set, and test set is 7:2:1; the preset initial learning rate is 0.001, and the preset total number of training rounds is 200.
8. A humidifier float detection model generation system, characterized in that: At least: An image acquisition module is used to obtain normal and abnormal state image data, wherein the normal state image data is image data of a normal float assembly state, and the abnormal state image data is image data of a float missing; The data screening module is used to screen the normal state image data to obtain the normal state image data under different states; and retain part of the abnormal state image data; A data annotation module is used to annotate the normal state image data obtained by screening with a detection frame and generate an annotation frame file consistent with the image name; The data enhancement module is used to divide the labeled data set and the retained abnormal state image data into a training set, a validation set and a test set according to a preset ratio, and use a variety of fuzzy data enhancement methods to perform data enhancement processing on the image data in the training set; The training module uses the YOLO model to perform model training based on the training set and the validation set. The training process uses the stochastic gradient descent optimization algorithm, and presets the initial learning rate and the total number of training rounds to optimize the model parameters. Evaluation module, which evaluates the model performance based on the test set; Lightweight processing module, used for model lightweight processing.
9. A humidifier float detection method, characterized in that: This test is carried out simultaneously with the humidifier air tightness test and includes at least the following steps: When the air tightness test of the humidifier is started, the humidifier float test instruction is issued; Call the image acquisition module to collect the image to be detected and send it back; The humidifier float detection model is used to detect the humidifier float on the image to be detected, and whether the float assembly state is normal is determined to obtain the judgment result. The entire detection process is maintained within the air tightness test time; When the air tightness test is finished, the judgment result will be sent back and corresponding prompts will be given according to the judgment result; Wherein, the humidifier float detection model is generated according to the humidifier float detection model generation method according to any one of claims 1-7.
10. Humidifier float detection system, characterized in that, This test is carried out at the same time as the humidifier air tightness test, and at least includes: The embedded module is used to send the humidifier float detection instruction to the edge computing module when the humidifier air tightness test starts the air tightness test; The edge computing module is used to call the image acquisition module; the humidifier float detection model is used to perform humidifier float detection on the image to be detected, and whether the float assembly state is normal is determined to obtain the judgment result. The entire detection process is maintained within the air tightness test time; after the air tightness test is completed, the judgment result is sent back to the embedded module; The image acquisition module is used to acquire the image to be detected and transmit it back to the edge computing module; A prompt module, used for providing corresponding prompts according to the judgment results; Wherein, the humidifier float detection model is generated according to the humidifier float detection model generation method according to any one of claims 1-7.