Grain Bin Ventilation Feature Information Detection Method and System Based on Improved YOLO Model
By improving the YOLO model to detect granary feature information in real time, the problem of low detection efficiency in granary ventilation is solved, efficient and accurate ventilation management is achieved, and food losses and hardware needs are reduced.
Patent Information
- Application Number
- CN202211602076.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-13
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-12-13
AI Technical Summary
During the ventilation process of existing granaries, it is difficult to efficiently detect characteristic information related to ventilation, resulting in poor ventilation effect and labor-intensive labor.
The improved YOLO model is adopted to identify the feature information in the granary through image acquisition, preprocessing, feature information identification and real-time monitoring, such as grain types, grain surface flatness, warehouse window sealing status, etc., and the improved YOLO model is used for real-time detection and adjustment of ventilation status.
It improves the efficiency of feature information detection, saves manpower and material resources, ensures ventilation effect, reduces food losses, improves the accuracy of target detection and the lightweight model, and reduces hardware requirements.
Smart Images

Figure CN115953713B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of grain bin ventilation management, and in particular to a method for detecting grain bin ventilation characteristic information based on an improved YOLO model, and also relates to a characteristic information detection system applying the detection method, as well as a computer terminal and a computer-readable storage medium applying the detection method. Background Art
[0002] During the process of storing grains in a grain bin, with the physiological changes such as grain heating, mildew, and aging, the reproduction rate of pests is accelerated, which is likely to cause grain losses. Ventilating the grain bin in a timely manner can effectively reduce grain losses. Currently, many grain bins are equipped with intelligent ventilation systems, which can monitor the temperature, humidity and other conditions of the grain bin and the grain piles inside in real time. When certain parameters exceed the predetermined limits, the grain bin can be ventilated or the ventilation mode can be switched.
[0003] During the ventilation process of existing grain bins, some characteristic information for assisting grain bin ventilation, such as the variety of grains, whether the grain surface of the grain pile is flat, whether there are capping materials on the grain surface, etc., these parameters will also affect the ventilation effect. However, currently, the management personnel of grain bins generally identify these parameter information manually on a regular basis and record and copy them. For large grain bins with a large amount of grain reserves, this method has disadvantages such as low efficiency and labor consumption. In addition, during the ventilation process of grain bins, the status of each hardware device is generally judged according to the issued instructions and the level height. For example, to control the electric push rod to open the bin window. However, sometimes when the window opening instruction is issued and the system already thinks the window is open, but due to reasons such as the deformation and bending of the support rod of the bin window or the grains falling on the bin window, the bin window cannot be opened or fully opened, thus affecting the actual ventilation effect. Summary of the Invention
[0004] Based on this, in view of the technical problem that it is difficult to efficiently detect the characteristic information related to ventilation during the ventilation process of existing grain bins, the present invention provides a method and system for detecting grain bin ventilation characteristic information based on an improved YOLO model.
[0005] The present invention discloses a method for detecting grain bin ventilation characteristic information based on an improved YOLO model, including the following steps S1 to S6.
[0006] S1. Collect images of multiple collection points in a grain bin to be measured and perform image preprocessing to obtain an original data set.
[0007] S2. Classify the images in the original data set and divide them into a training set, a test set, and a validation set according to a preset ratio.
[0008] S3. Build a YOLO model based on a neural network.
[0009] Among them, the YOLO model is an object detection model used to identify multiple relevant feature information corresponding to multiple acquisition points; the feature information is grain variety, grain surface flatness, grain surface capping state, bin window sealing state, or fan rotation state; the neural network includes a convolutional layer, a normalization layer, an activation function, and a downsampling layer;
[0010] S4. Improve the YOLO model to obtain an improved YOLO model;
[0011] Among them, the improvement method of the YOLO model at least includes the following process:
[0012] S41. Plan a frame-by-frame recognition channel and a skip-frame recognition channel for the YOLO model according to the acquisition point target type.
[0013] S42. Use MobileNetV3 to improve the network structure of the YOLO model.
[0014] S43. Adopt Distance-IoU as the boundary loss function of the YOLO model.
[0015] S44. Introduce a weight coefficient to improve the feature fusion method of the YOLO model;
[0016] S5. Use the training set to train the corresponding improved YOLO model, then evaluate the performance of the improved YOLO model according to the test set, and use the validation set to adjust the parameters and select features of the improved YOLO model to optimize the improved YOLO model.
[0017] S6. Real-time monitor the states of multiple acquisition points in the to-be-measured grain bin, and respectively input each real-time acquired image into the optimized improved YOLO model, and then identify multiple feature information of the to-be-measured grain bin.
[0018] As a further improvement of the above solution, in S1, the preprocessing of the image specifically includes the following process:
[0019] Perform grayscale processing and median filtering on an original image respectively.
[0020] As a further improvement of the above solution, during the grayscale processing, the expression of the grayscale linear transformation function is:
[0021]
[0022] In the formula, f(x, y) and g(x, y) are the pixel values of the (x, y) coordinates in the original image and the image after grayscale processing respectively. [a, b] is the grayscale range of f(x, y) before transformation. [c, d] is the grayscale range of g(x, y) after transformation.
[0023] The expression of the median filtering process is:
[0024] z(x,y) = med{h(x - k,y - l), (k,l ∈ W)}
[0025] Wherein, h(x,y) and z(x,y) are the pixel values of the (x,y) coordinates in the original image and the image after median filtering respectively. W is a two-dimensional template. k and l represent the moving values of the x and y coordinates respectively.
[0026] As a further improvement of the above solution, in S2, the preset ratio of the training set, test set and validation set is 6:2:2.
[0027] As a further improvement of the above solution, the image to be detected is input into the improved YOLO model through the frame-by-frame recognition channel or the frame-skipping recognition channel according to the target type of the feature information;
[0028] Among them, the target types are grain, bin window or fan; among them, when the target type of the collection point is grain, the image to be detected is input into the improved YOLO model through the frame-skipping recognition channel; when the target type of the collection point is bin window or fan, the image to be detected is input into the improved YOLO model through the frame-by-frame recognition channel.
[0029] As a further improvement of the above solution, the output of the middle layer of the neural network is normalized by using the method of batch normalization, and the specific calculation process is as follows:
[0030] 1) Calculate the mean μ of the samples in the mini-batch using the following formula B :
[0031]
[0032] Wherein, x i represents the i-th sample in the mini-batch. i = 1,2,3…m. m represents the total number of samples.
[0033] 2) Calculate the variance of the samples in the mini-batch using the following formula
[0034]
[0035] 3) After two calculations using the following formula, the normalized output y is obtained i :
[0036]
[0037]
[0038] Wherein, ε is a small value used to prevent the denominator from being 0. Represents an output intermediate value. Both λ and β are learnable parameters, and their initial values are λ = 1 and β = 0.
[0039] As a further improvement of the above solution, after S6, the method for detecting the ventilation characteristic information of a granary based on an improved YOLO model further includes the following steps:
[0040] S7. Respectively judge whether the hardware status or grain status of each collection point meets the expectation according to the identified characteristic information, and obtain corresponding abnormal behavior information when the relevant status does not meet the expectation.
[0041] The present invention also discloses a system for detecting the ventilation characteristic information of a granary based on an improved YOLO model, which applies any one of the above methods for detecting the ventilation characteristic information of a granary based on a video recognition model. The detection system includes: a video acquisition module, a data processing module, a communication module, a server module, a video recognition module, and a user terminal module.
[0042] The video acquisition module is used to acquire images of multiple collection points in a to-be-detected granary.
[0043] The data processing module is used to preprocess the acquired images to obtain an original data set. It is also used to classify the images in the original data set and divide them into a training set, a test set, and a validation set according to a preset ratio.
[0044] The communication module is used to receive the data processed by the data processing module and configure the network information to send the data to a corresponding database server.
[0045] The server module includes a database server and a cloud platform server. The database server is used to store the data information processed by the data processing module. The cloud platform server is used to deploy the improved YOLO model.
[0046] The video recognition module uses the divided training set, test set, and validation set to train the video recognition model, verify its performance, and adjust the parameters and selected features respectively. Then, it uses the optimized improved YOLO model to monitor the characteristic information of each collection point inside the granary in real time, and displays the detected data on a user terminal module.
[0047] The user terminal module is used to display the data detected by the improved YOLO module and send an alarm signal when abnormal behavior information occurs.
[0048] The present invention also discloses a computer terminal, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the steps of any one of the above methods for detecting the ventilation characteristic information of a granary based on an improved YOLO model.
[0049] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of any one of the above-mentioned methods for detecting the characteristic information of the grain bin ventilation based on the improved YOLO model are implemented.
[0050] Compared with the prior art, the technical solution disclosed by the present invention has the following beneficial effects:
[0051] 1. The method for detecting the characteristic information of the grain bin ventilation based on the improved YOLO model collects the monitoring images inside the grain bin and identifies the target states in the images, so as to detect the characteristic information such as the states of each hardware inside the bin, whether the grain surface is flat, and whether the grain surface is covered in real time. Therefore, it can avoid the field record and copy of these characteristic information by the grain bin management personnel, effectively improve the detection efficiency of the characteristic information related to the grain bin ventilation and save the labor and material costs. Furthermore, it can ensure better ventilation effect of the grain bin, adjust the ventilation state of the grain bin in time according to the characteristic information, improve the ventilation effect, and reduce the loss of grain during the grain storage process.
[0052] 2. The method for detecting the characteristic information of the grain bin ventilation based on the YOLO model improves the efficiency and accuracy of target detection by improving the YOLO model. At the same time, the model structure is improved to make the model lightweight and reduce the requirements of the model for the hardware required for deployment.
[0053] 3. The beneficial effects of the system for detecting the characteristic information of the grain bin ventilation based on the improved YOLO model are the same as those of the above detection method, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 is a flowchart of the method for detecting the characteristic information of the grain bin ventilation based on the improved YOLO model in Embodiment 1 of the present invention;
[0055] Figure 2 is a structure diagram of the neural network model in Embodiment 1 of the present invention;
[0056] Figure 3 is a framework diagram of the system for detecting the characteristic information of the grain bin ventilation based on the improved YOLO model in Embodiment 2 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0057] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0058] It should be noted that when a component is referred to as "installed on" another component, it can be directly on the other component or there can also be an intermediate component. When a component is considered to be "set on" another component, it can be directly set on the other component or there may be an intermediate component at the same time. When a component is considered to be "fixed to" another component, it can be directly fixed to the other component or there may be an intermediate component at the same time.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this invention belongs. The terms used in the specification of this invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "or / and" used herein includes any and all combinations of one or more of the related listed items.
[0060] Embodiment 1
[0061] Please refer to Figure 1 , this embodiment provides a method for detecting the characteristic information of grain bin ventilation based on an improved YOLO model, which may include the following seven steps, namely S1 to S7.
[0062] S1. Collect images of multiple collection points in a grain bin to be measured and perform image preprocessing to obtain an original data set.
[0063] In this embodiment, the images are sourced from the monitoring footage inside the grain bin. In an actual scenario, the captured images have various problems such as large angles, low light, strong light, backlight, occlusion, blurring, noise, etc. Therefore, it is necessary to perform image preprocessing to highlight certain features of interest and suppress features that are not of interest to meet the needs of analysis. In this embodiment, methods such as gray-scale transformation enhancement and median filtering can be used to improve the image quality.
[0064] In the case of insufficient or excessive exposure, the gray scale of the image may be limited to a very small range. Using gray-scale transformation enhancement and performing a functional transformation on the gray scale of all points in the image according to linear gray-scale transformation will effectively improve the visual effect. Suppose the gray-scale range of an image f(x,y) before transformation is [a,b], and it is desired to expand or compress the gray-scale range of g(x,y) after transformation to [c,d], then the expression of the gray-scale linear transformation function is:
[0065]
[0066] Wherein, f(x, y) and g(x, y) are respectively the pixel values at the (x, y) coordinates in the original image and the image after grayscale processing. [a, b] is the grayscale range of f(x, y) before transformation. [c, d] is the grayscale range of g(x, y) after transformation. By adjusting the values of a, b, c, and d, the slope of the linear transformation function can be controlled, thereby achieving the expansion or compression of the grayscale range.
[0067] In addition, the purpose of median filtering is to eliminate or suppress image noise on the basis of retaining the original key features of the image. It sets the grayscale value of a pixel point in the image to the median of the values of each point in a certain neighborhood of this point, thereby eliminating isolated noise points, and median filtering is easy to implement with hardware. The principle is as follows:
[0068] z(x, y) = med{h(x - k, y - l), (k, l ∈ W)}
[0069] Wherein, h(x, y) and z(x, y) are respectively the pixel values at the (x, y) coordinates in the original image and the image after median filtering processing. W is a two-dimensional template. k and l respectively represent the moving values of the x and y coordinates. The general principle is to take the median value of the nine points in a 9-grid and replace the data point value in the middle of the 9-grid.
[0070] S2. Classify the images in the original dataset and divide them into a training set, a test set, and a validation set according to a preset ratio.
[0071] In this embodiment, the images in the original dataset can be divided into different categories, a total of 12 categories, namely wheat dataset, corn dataset, rice dataset, bin window open dataset, bin window closed dataset, bin window in the middle state dataset, grain surface with capping material dataset, grain surface without capping material dataset, grain surface flat dataset, grain surface uneven dataset, dataset when the fan is running, dataset when the fan is turned off. It is necessary to ensure that the number of images in each dataset is not less than 800. Use image annotation software to annotate the images. When annotating the pictures, ensure that the size of the annotation box is slightly larger than the target box and changes with the target, and divide the original dataset into a training set, a test set, and a validation set according to a ratio of 6:2:2.
[0072] S3. Build a YOLO model based on a neural network.
[0073] Among them, the YOLO model is an object detection model used to detect multiple relevant feature information corresponding to multiple collection points. The feature information includes grain variety, flatness of the grain surface, state of the grain surface capping, state of the bin window sealing, or state of the fan rotation. It should be noted that since some of the multiple collection points in the granary may have the same shooting images and targets, such as the same parameters like model and installation method, but belong to bin windows at different positions, these collection points can be trained using the same training set in the early stage.
[0074] In this embodiment, the YOLO model uses a neural network model with multiple hidden layers. Please refer to Figure 2 , and through a large number of vector calculations and learning, high-order representation features of the internal laws of the data are obtained, and the process of making decisions using these features. The neural network mainly consists of four parts: a convolutional layer, a normalization layer, an activation function, and a downsampling layer.
[0075] The convolutional layer is mainly used to extract the features of the data. From a mathematical perspective, convolution can be understood as an operation method. For two functions f(x) and g(x), (f*g)(n) is the convolution of f and g, and the definition of the convolution operation is:
[0076]
[0077] In the formula, g(n - τ) represents reversing the function g first and then translating it by n units, and then integrating the two functions to obtain the convolution result (f*g)(n). τ represents an integration variable.
[0078] The purpose of the normalization layer is to standardize the output of the middle layer of the neural network to make the output of the middle layer more stable. In this example, the method of batch normalization is used for processing. The main idea of batch normalization is to normalize the values of neurons in units of mini-batch during training, so that the distribution of the data satisfies the statistical distribution with a mean of 0 and a variance of 1. The specific calculation process is as follows:
[0079] 1) Calculate the mean μ of the samples within the mini-batch using the following formula B :
[0080]
[0081] In the formula, x i represents the i-th sample in the mini-batch. i = 1, 2, 3…m. m represents the total number of samples.
[0082] 2) Calculate the variance of the samples within the mini-batch using the following formula
[0083]
[0084] First, calculate the sample mean μ within a batch B and variance Then, perform normalization on the data to adjust it to a distribution with a mean of 0 and a variance of 1.
[0085] 3) Obtain the standardized output y through the following calculations i :
[0086]
[0087] In the formula, ε is a small value, and its main function is to prevent the denominator from being 0. represents an intermediate output value.
[0088] If the distribution of the output layer is forcibly restricted to be standardized, it may lead to the loss of some feature patterns. Therefore, after standardization, the normalization method will scale and shift the data.
[0089]
[0090] In the formula, both λ and β are learnable parameters. The initial values can be assigned as λ = 1 and β = 0, and then they can be continuously learned and adjusted during the training process.
[0091] Activation functions are mainly used to enhance the expression ability of the model and improve the learning ability of the model. In this example, the ReLU function is used as the activation function, that is:
[0092] ReLU = max(0, x)
[0093] The derivative of the ReLU activation function does not involve floating-point operations, so the operation speed is faster. For the hidden layer, choosing ReLU as the activation function can ensure that when x is greater than 0, the gradient is always 1, thereby improving the operation speed of the neural network gradient descent algorithm.
[0094] The downsampling layer is mainly used to adjust the dimension of the feature map. It can ignore the relative position changes such as the rotation and tilt of the target, and has translational invariance, scale invariance, and rotational invariance, which can improve the recognition accuracy of the model and avoid overfitting.
[0095] S4. Improve the YOLO model to obtain an improved YOLO model.
[0096] In this embodiment, the improvement method of the YOLO model may include but is not limited to the following process:
[0097] S41. Plan the frame-by-frame recognition channel and the frame-skipping recognition channel for the YOLO model according to the target type of the acquisition point. The target type can be grain, warehouse window or fan. Of course, in other embodiments, the target type can also be other auxiliary feature information related to ventilation that needs to be concerned in the granary.
[0098] Since in practical applications, the video images inside the granary may not change for a long time, and the detection speed is affected by the hardware performance. To improve the detection efficiency, in some cases where frame-by-frame detection is not necessary, frame-skipping detection can be performed.
[0099] For example, when the target type of the acquisition point is grain, since the grain does not move for a long time during the grain storage process, the video image may not change for a long time. Then, the image to be detected is input into the improved YOLO model through the frame-skipping recognition channel. As for the frame-skipping interval or frequency, it can be adaptively set according to the cycle of granary management. When the target type of the acquisition point is a warehouse window or a fan, since the warehouse window and the fan need to be frequently adjusted for opening and closing during the daily ventilation process, and the change process of opening and closing is short, the image to be detected is input into the improved YOLO model through the frame-by-frame recognition channel.
[0100] S42. Use MobileNetV3 to improve the network structure of the YOLO model, so as to lightweight the model, improve the speed of recognizing the target, and reduce the requirements of the model for the hardware required for deployment.
[0101] S43. Adopt Distance-IoU as the boundary loss function of the YOLO model. Intersection over union (IoU) is a very important parameter in object detection, which is the overlap rate of the generated prediction box and the original marked box, that is, the ratio of their intersection to their union. In this embodiment, the boundary box regression loss function is optimized, and DIoU (Distance-IoU) is adopted as the boundary box loss function. DIoU comprehensively considers the distance, scale and overlap rate between the target and the target box, improves the stability of the target regression box, can make the detection accuracy higher, and is more in line with the target box regression mechanism.
[0102] S44. Introduce a weight coefficient to improve the feature fusion method of the YOLO model. For input images with different resolutions, the input features are different. In this embodiment, a fusion method that differentiates different input features is designed. By introducing a weight coefficient for bitwise addition fusion of features, the contamination between information is reduced, and a fast normalization method is used to calculate the feature weights. The expression formula of the fast normalization is as follows:
[0103]
[0104] Wherein, O represents the output after fast normalization; i and j are the number of feature maps input by the special fusion node; I represents the input feature map matrix; ε is the constant 10 -4 ; ω is the balance factor for calculating multi-scale features of weights; S5. Use the training set to train the corresponding improved YOLO model, then evaluate the performance of the improved YOLO model according to the test set, and use the validation set to adjust the parameters and select features of the improved YOLO model to optimize the improved YOLO model to select a suitable model.
[0105] It should be understood that the images in the dataset are used for training, testing and validating the corresponding improved YOLO model.
[0106] In this embodiment, the mean average precision (mAP) can be used to measure the performance at different resolutions. mAP represents the average precision (AP) of the detection results of various objects. The larger the value of mAP, the higher the precision of the model. AP is obtained according to the PR curve (Precision Recall Curve). The horizontal axis of the PR curve is the recall rate, and the vertical axis is the precision rate. AP is the area enclosed after the PR curve is smoothed. Its calculation formula is:
[0107]
[0108] The calculation formula for precision is:
[0109]
[0110] The calculation formula for recall is:
[0111]
[0112] Among them, TP means that the detection sample is classified as a positive sample and the classification is correct; FP means that the detection sample is classified as a positive sample and the classification is wrong; FN means that the detection sample is classified as a negative sample and the classification is wrong.
[0113] S6. Real-time monitor the states of multiple collection points in the grain bin to be measured, and input each of the real-time collected images into the optimized improved YOLO model, and then identify multiple feature information of the grain bin to be measured.
[0114] S7. According to the identified feature information, respectively judge whether the hardware state or the grain state of each collection point meets the expectation, and obtain the corresponding abnormal behavior information when the relevant state does not meet the expectation.
[0115] In this embodiment, by identifying multiple characteristic information of the granary, it is possible to judge the variety of grains, whether the surface of the grain pile is flat, whether there is a capping on the grain surface, and the status of each hardware in the granary, such as whether the warehouse windows are sealed. When issuing an instruction to turn on the ventilation fan, whether the fan can operate normally, etc.
[0116] Embodiment 2
[0117] Please refer to Figure 3 , this embodiment provides a granary ventilation characteristic information detection system based on an improved YOLO model, which applies the granary ventilation characteristic information detection method based on the improved YOLO model in Embodiment 1. The detection system includes: a video acquisition module, a data processing module, a communication module, a server module, a video recognition module, and a user terminal module.
[0118] The video acquisition module is used to acquire images of multiple acquisition points in a to-be-detected granary. Specifically, the video acquisition module may include multiple cameras installed inside the granary, which respectively acquire the target picture information at each acquisition point, and then process and transfer the data to the data processing module for processing.
[0119] The data processing module is used to preprocess the acquired images. In the actual scenario, the captured pictures have various problems such as large angles, low light, strong light, backlight, noise, and blurring. Through preprocessing, the image quality is improved. In this way, an original data set is obtained. The data processing module can also be used to classify the images in the original data set and divide them into a training set, a test set, and a validation set according to a preset ratio.
[0120] The communication module is used to receive the data processed by the data processing module and configure the network information to send the data to a corresponding database server.
[0121] The server module includes a database server and a cloud platform server. The database server is used to store the data information processed by the data processing module, and can also store the account passwords of the user-side administrators, etc. The cloud platform server is used to deploy the improved YOLO model.
[0122] The video recognition module uses the divided training set, test set, and validation set to train the improved YOLO model, verify its performance, and adjust the parameters and selected features respectively. Then, it uses the optimized improved YOLO model to monitor the characteristic information of each acquisition point inside the granary in real time, and displays the detected data on a user terminal module.
[0123] The user terminal module is used to display the data detected by the video recognition module to achieve data visualization, and the administrator can see the detected data in real time. The user terminal module can also send an alarm signal when abnormal behavior information occurs, timely reminding the granary management personnel.
[0124] Example 3
[0125] This embodiment provides a computer terminal, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor.
[0126] The computer terminal can be a smart phone, a tablet computer, a notebook computer, etc. that can execute programs. The processor can be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor is generally used to control the overall operation of the computer device. In this embodiment, the processor is used to run the program code stored in the memory or process data. When the processor executes the program, the steps of the method for detecting the characteristic information of the grain bin ventilation based on the improved YOLO model in Embodiment 1 can be implemented, thereby completing some characteristic information detection work in the daily ventilation management process of the grain bin to be measured.
[0127] Example 4
[0128] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of the method for detecting the characteristic information of the grain bin ventilation based on the improved YOLO model in Embodiment 1 are implemented.
[0129] The computer-readable storage medium can include flash memory, a hard disk, a multimedia card, a card-type memory (such as an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage medium can be an internal storage unit of the computer device, such as the hard disk or memory of the computer device. In other embodiments, the storage medium can also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Of course, the storage medium can also include both the internal storage unit and the external storage device of the computer device. In this embodiment, the memory is generally used to store the operating system and various application software installed on the computer device. In addition, the memory can also be used to temporarily store various data that have been output or will be output.
[0130] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as falling within the scope described in this specification.
[0131] The above-described embodiments merely represent several implementation manners of the present invention. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the appended claims.
Claims
1. A method for detecting the characteristic information of grain bin ventilation based on an improved YOLO model, characterized in that, It includes the following steps: S1. Collect images of multiple collection points in a grain bin to be measured and perform image preprocessing to obtain an original dataset; S2. Classify the images in the original dataset and divide them into a training set, a test set, and a validation set according to a preset ratio; S3. Build a YOLO model based on a neural network; Among them, the YOLO model is an object detection model used to identify multiple relevant feature information corresponding to multiple collection points; the feature information is the grain variety, whether the grain surface is flat, whether there is a capping on the grain surface, the sealing state of the bin window, or the rotation state of the fan; the neural network includes a convolutional layer, a normalization layer, an activation function, and a downsampling layer; S4. Improve the YOLO model to obtain an improved YOLO model; Among them, the improvement method of the YOLO model at least includes the following process: S41. Plan a frame-by-frame recognition channel and a frame-skipping recognition channel for the YOLO model according to the target type of the collection point; the target type is grain, bin window, or fan; among them, when the target type of the collection point is grain, the image to be detected is input into the improved YOLO model through the frame-skipping recognition channel; when the target type of the collection point is a bin window or a fan, the image to be detected is input into the improved YOLO model through the frame-by-frame recognition channel; S42. Use MobileNetV3 to improve the network structure of the YOLO model; S43. Adopt Distance-IoU as the boundary loss function of the YOLO model; S44. Introduce a weight coefficient to improve the feature fusion method of the YOLO model; S5. Use the training set to train the corresponding improved YOLO model, then evaluate the performance of the improved YOLO model according to the test set, and use the validation set to adjust the parameters of the improved YOLO model and select features to optimize the improved YOLO model; S6. Real-time monitor the states of multiple collection points in the grain bin to be measured, and input each real-time collected image into the optimized improved YOLO model respectively, and then identify multiple feature information of the grain bin to be measured.
2. The method for detecting the grain bin ventilation characteristic information based on the improved YOLO model according to claim 1, wherein, In S1, the preprocessing of the image specifically includes the following process: Perform grayscale processing and median filtering on an original image respectively.
3. The method for detecting the grain bin ventilation characteristic information based on the improved YOLO model according to claim 2, wherein During the grayscale processing, the expression of the grayscale linear transformation function is: In the formula, f(x, y) and g(x, y) are the pixel values of the (x, y) coordinates in the original image and the grayscale-processed image respectively; [a, b] is the grayscale range of f(x, y) before transformation; [c, d] is the grayscale range of g(x, y) after transformation; The expression of the median filtering is: z(x, y) = med{h(x - k, y - l), (k, l ∈ W)} In the formula, h(x, y) and z(x, y) are the pixel values of the (x, y) coordinates in the original image and the median-filtered image respectively; W is a two-dimensional template; k and l represent the moving values of the x and y coordinates respectively.
4. The method for detecting the grain bin ventilation characteristic information based on the improved YOLO model according to claim 1, wherein In S2, the preset ratio of the training set, the test set, and the validation set is 6:2:
2.
5. The method for detecting grain bin ventilation characteristic information based on the improved YOLO model according to claim 1, wherein, The output of the intermediate layer of the neural network is normalized by using the batch normalization method, and the specific calculation process is as follows: 1) Calculate the mean of the samples within the mini-batch using the following formula : where x i represents the i-th sample in the mini-batch; i = 1, 2, 3... m; m represents the total number of samples; 2) Calculate the variance of the samples within the mini-batch using the following formula 3) After two calculations using the following formula, the standardized output y is obtained i : In the formula, ε is a tiny value used to prevent the denominator from being zero; represents an output intermediate value; both λ and β are learnable parameters, and their initial values are λ = 1 and β = 0.
6. The method for detecting the granary ventilation characteristic information based on the improved YOLO model according to claim 1, characterized in that After S6, the method for detecting the grain bin ventilation feature information based on the improved YOLO model further includes the following steps: S7. Respectively judge whether the hardware status or the grain status of each collection point meets the expectation according to the identified feature information, and obtain the corresponding abnormal behavior information when the relevant status does not meet the expectation.
7. A detection system for grain bin ventilation characteristic information based on an improved YOLO model, characterized in that, It is applied to the method for detecting the grain bin ventilation feature information based on the improved YOLO model according to any one of claims 1 to 6; the detection system includes: A video acquisition module, which is used to acquire images of multiple collection points in a grain bin to be measured; A data processing module, which is used to preprocess the acquired images to obtain an original data set; and is also used to classify the images in the original data set and divide them into a training set, a test set, and a validation set according to a preset ratio; A communication module, which is used to receive the data processed by the data processing module and send the data to a corresponding database server after configuring the network information; A server module, which includes a database server and a cloud platform server; the database server is used to store the data information processed by the data processing module; the cloud platform server is used to deploy the improved YOLO model; A video recognition module, which uses the training set, the test set, and the validation set to train, perform performance verification, and adjust parameters and select features of the improved YOLO model respectively, and then uses the optimized improved YOLO model to monitor the feature information of each collection point inside the grain bin in real time, and displays the detected data on a user terminal module; and A user terminal module, which is used to display the data detected by the video recognition module and send out an alarm signal when abnormal behavior information occurs.
8. A computer terminal, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, the steps of the method for detecting the grain bin ventilation feature information based on the improved YOLO model according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that, When the program is executed by the processor, the steps of the method for detecting the grain bin ventilation feature information based on the improved YOLO model according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Wind driven generator blade surface damage lightweight identification method
CN112581443A
Vibration damper detection method based on deep learning algorithm
CN112906654A