Method and system for improving manufacturing process of high-flexibility wear-resistant pea gravel hose
By using YOLOv5 model and dynamic threshold calculation technology, the leakage of highly flexible wear-resistant bean gravel hose is automatically detected, which solves the problem of insufficient bean gravel binding in traditional processes, achieves more efficient defect positioning and process optimization, and improves the quality and durability of the hose.
Patent Information
- Application Number
- CN202510204643.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-06-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the production process of existing high-flexible wear-resistant bean gravel hoses, the bonding force between bean gravel and hose substrate is weak, resulting in the material being easily shedded or unevenly distributed, resulting in defects such as air leakage and rupture of the hose. The traditional defect positioning method relies on labor, has low efficiency and inaccurate data.
The ROI detection box in the hose detection video was extracted using the YOLOv5 model, and the dynamic threshold was calculated through the OTS algorithm and the maximum inter-class variance method to determine the leakage degree, leakage point and leakage amount of the hose, and combined with the pre-trained expert database to identify defect types and improve the production process.
It realizes automatic detection of hose leakage, reduces errors and workloads in manual positioning, provides reliable data support for process optimization, and improves hose quality and durability.
Smart Images

Figure CN120084492A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hose production, and particularly to an improved method and system for manufacturing a highly flexible and wear-resistant pea gravel hose. Background Art
[0002] With the rapid development of modern industries such as industry, agriculture, construction, and transportation, higher requirements are placed on the wear resistance, flexibility, and longer service life of pipeline and hose materials. In these applications, traditional hose materials (such as rubber, PVC, etc.) although have certain durability and flexibility, but in high-intensity friction and wear environments, they are prone to damage, wear, and short service life problems, especially in some harsh working conditions, such as high-pressure, high-temperature, and high-friction environments.
[0003] Pea gravel, as a common ore material, has attracted wide attention in many high-intensity wear-resistant applications due to its structural characteristics. By combining pea gravel material with a specific polymer matrix, the wear resistance and impact resistance of the hose can be significantly improved, while maintaining sufficient flexibility. This material combination can effectively extend the service life of the hose and reduce the cost of frequent replacement and maintenance.
[0004] However, in the existing manufacturing processes of highly flexible and wear-resistant hoses, the application of pea gravel still poses technical challenges. For example, the bonding force between pea gravel and the hose substrate is weak, which is prone to cause material shedding or uneven distribution, resulting in defects such as air leakage and rupture in the hose during use. In the research and development improvement, the defects of the hose can be located and then the hose production can be improved accordingly. However, traditional defect location methods rely on manual work, with difficulties in detection, low efficiency, inaccurate data, and large workload. Summary of the Invention
[0005] In view of the above technical problems, the present invention provides an improved method and system for manufacturing a highly flexible and wear-resistant pea gravel hose to solve the problems of product quality and improvement difficulties of pea gravel hoses in the prior art.
[0006] Other features and advantages of the present disclosure will become apparent through the following detailed description, or be learned in part through the practice of the present disclosure.
[0007] According to one aspect of the present invention, an improved method for manufacturing a highly flexible and wear-resistant pea gravel hose is disclosed, the method comprising: Obtaining a detection video of the hose, in which the hose is placed in water, one end thereof is connected to a solenoid valve, a proportional valve, a pressure sensor, and an inflation device, and the other end is sealed. Based on the YOLOv5 model, an ROI detection frame of the hose in the detection video is extracted, and based on a target area correction method, it is ensured that the ROI detection frame can cover the hose; Select the first N frames of the detected video to establish a total image set, integrate the data of each selected frame image, randomly select pixel values to form a background sample library, calculate the dynamic threshold based on the OTS algorithm and the maximum inter-class variance method through the grayscale image difference of the detected video, and based on the dynamic threshold and the background sample library, determine each pixel in the remaining frame images in the total image set as either foreground or background. Divide the remaining frame images in the total image set into multiple sub-regions, accumulate the pixel points in each sub-region, count the foreground change frequency of each pixel point, calculate the average foreground change frequency in the sub-region according to the number of remaining frame images, and use the threshold to filter the sub-regions with excessive changes. Calculate the proportion of the sub-regions with excessive changes to determine the leakage degree of the hose, calculate the central distance of the frequency distribution of the pixel points determined as foreground to obtain the coordinate points of the area with the most intensive foreground distribution in the image, obtain the leakage point, acquire the pressure data of the pressure sensor after the hose is inflated, and calculate the leakage amount according to the pressure data; Based on the leakage degree, the leakage point, the leakage amount, and a pre-trained expert library, obtain the defect type of the hose, and improve the manufacturing process of the hose according to the defect type.
[0008] Further, the integrating the data of each selected frame image and randomly selecting pixel values to form a background sample library includes: Traverse each pixel point of the ROI detection frame of the selected image, and randomly extract pixel values in the corresponding neighborhood area of the ROI detection frame of each selected frame image to form a background sample library.
[0009] Further, the background sample library is expressed as: ; where, is the pixel value of the pixel in the ROI detection frame of the first N frame images, is the neighborhood of the pixel , represents N executions, represents 10 random selections.
[0010] Further, when calculating the dynamic threshold, specifically calculate: ; ; where, is the pixel value in the image, and are the foreground set and the background set divided based on the grayscale characteristics of the image by the OTS algorithm, and are the pixel values of the foreground and background respectively, is the total pixel value of the image, and is the mean value, and is the variance, and are the distribution probabilities of the foreground and background respectively; Based on the OTS algorithm, based on the maximum and minimum gray values of the image, by traversing the gray value interval, the maximum value is obtained, and the boundary point between the foreground and background is obtained; Calculate the first threshold based on the difference between the background sample library and the current frame image; Calculate the second threshold based on the difference between the current frame image and the previous frame image; Based on the maximum inter-class variance method, the means and variances of the foreground and background, obtain the third threshold; Integrate the first threshold, the second threshold, and the third threshold, assign different weights respectively, and add them up to obtain the dynamic threshold.
[0011] Furthermore, when calculating the first threshold and the second threshold, calculate: ; wherein, is the first threshold, is the second threshold, is the pixel value of the current frame image, is the pixel value of the background sample library, is the pixel value of the previous frame image.
[0012] Furthermore, when calculating the third threshold, calculate: ; ; ; wherein, and are the means of the foreground and background, and are the variances of the foreground and background, and are the pixel values of the foreground and background respectively, and are the distribution probabilities of the foreground and background respectively.
[0013] Furthermore, when calculating the leakage degree of the hose, specifically calculate: ; ; ; ; where m is the number of frames of the detected video, is the sum of the pixel change frequencies within the sub-region, is the average pixel change frequency of the sub-region, is the change frequency of the corresponding region, is the percentage of the leakage sub-region, is a conditional function, which takes the value 1 when the condition is satisfied and 0 otherwise.
[0014] Furthermore, when calculating the leakage point, calculate: ; where is the set of pixel values within the foreground region, is the set of x coordinates within the foreground region, is the set of y coordinates within the foreground region, and are the centroid coordinates of the leakage region respectively, is the leakage point.
[0015] According to another aspect of the present invention, there is disclosed an improved system for manufacturing a highly flexible and wear-resistant pea gravel hose, the system comprising: An acquisition module, configured to obtain a detection video of the hose. In the detection video, the hose is placed in water, one end of which is connected to a solenoid valve, a proportional valve, a pressure sensor, and an inflation device, and the other end is sealed. Based on the YOLOv5 model, the ROI detection frame of the hose in the detection video is extracted, and based on the target region correction method, it is ensured that the ROI detection frame can cover the hose; A calculation module is used to select the first N frames of the detection video to establish a total image set, integrate data for each selected frame image, randomly select pixel values to form a background sample library, calculate a dynamic threshold based on the OTS algorithm and the maximum inter-class variance method through the gray image difference of the detection video, and based on the dynamic threshold and the background sample library, determine each pixel in the remaining frame images in the total image set as either foreground or background. Divide the remaining frame images in the total image set into multiple sub-regions, accumulate the pixel points in each sub-region, count the foreground change frequency of each pixel point, calculate the average foreground change frequency in the sub-region according to the number of remaining frame images, filter the sub-regions with overly large changes using a threshold, calculate the proportion of the sub-regions with overly large changes, determine the leakage degree of the hose, calculate the central distance of the frequency distribution of the pixel points determined as foreground to obtain the coordinate points of the area with the densest foreground distribution in the image, obtain the leakage point, acquire the pressure data of the pressure sensor after the hose is inflated, and calculate the leakage amount according to the pressure data; A process control module is used to obtain the defect type of the hose based on the leakage degree, the leakage point, the leakage amount, and a pre-trained expert library, and associate the defect type with relevant process parameters to modify the process parameters.
[0016] The technical solution of the present disclosure has the following beneficial effects: Using the YOLOv5 model for accurate region recognition can automatically extract the region of interest (ROI) of the hose body, reducing the error and blind spots in air leakage detection. Automatically detecting the leakage degree, leakage point, and leakage amount of the hose and then using them for the correlation analysis of production process parameters can provide reliable data support for subsequent process optimization, and can timely adjust bad processes during the production process to prevent unqualified products from entering the market. Description of the Drawings
[0017] Figure 1 It is a flowchart of an improved method for manufacturing a highly flexible and wear-resistant pea gravel hose in an embodiment of this specification; Figure 2 It is a structural block diagram of a system for improving the manufacturing process of a highly flexible and wear-resistant pea gravel hose in an embodiment of this specification. Detailed Embodiments
[0018] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will realize that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring aspects of the present disclosure.
[0019] In addition, the accompanying drawings are only schematic illustrations of the present disclosure. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0020] In one embodiment, as Figure 1 shown, this specification provides an improved method for manufacturing a highly flexible and wear-resistant pea gravel hose. The execution subject of this method can be a computer, a server, a mobile phone, a tablet computer, etc. This method can specifically include steps S101 to S103: In step S101, a detection video of the hose is obtained. In the detection video, the hose is placed in water, one end of which is connected to a solenoid valve, a proportional valve, a pressure sensor, and an inflation device, and the other end is sealed. The ROI detection frame of the hose in the detection video is extracted based on the YOLOv5 model, and the target area correction method is used to ensure that the ROI detection frame can cover the hose.
[0021] Among them, based on the YOLOv5 model, the ROI area of the hose is extracted to reduce the computational burden. The Mosaic image enhancement method is used in YOLOv5 to equalize and amplify the data, improving the generalization ability of the model. Then, the metal hose area is extracted by using target area correction. Specifically, the ROI area partially corresponds to the hose. When the detection frame is too large when the hose is tilted, the ROI area needs to be corrected to conform to the tilted hose. Specifically, when the hose has a deviation within the detection frame, it forms a certain deflection angle θ with the diagonal of the detection frame, and the detection frame needs to be rotated according to the deflection angle for correction. The correction formula is: ; ; ; Here, and are the coordinates of two corner points in the area of the rotated metal hose. By rotating these coordinates, the corrected ROI detection frame is aligned with the inclined metal hose area.
[0022] In step S102, the first N frames of the detected video are selected to establish a total image set. The data of each selected frame is integrated, and pixel values are randomly selected to form a background sample library. Based on the OTS algorithm and the maximum inter-class variance method, the dynamic threshold is calculated through the gray image difference of the detected video. Based on the dynamic threshold and the background sample library, each pixel in the remaining frame images in the total image set is determined to be either a foreground or a background. The remaining frame images in the total image set are divided into multiple sub-regions, the pixel points in each sub-region are accumulated, the foreground change frequency of each pixel point is statistically calculated, the average foreground change frequency in the sub-region is calculated according to the number of remaining frame images, and the sub-regions with excessive changes are filtered using a threshold. The proportion of the sub-regions with excessive changes is calculated to determine the leakage degree of the hose. The central distance of the frequency distribution of the pixel points determined to be the foreground is calculated to obtain the coordinate points of the area where the foreground is most densely distributed in the image, the leakage point is obtained, the pressure data of the pressure sensor after the hose is inflated is acquired, and the leakage amount is calculated according to the pressure data.
[0023] Among them, in the prior art, the initial frame of the detected video is used as the background, and then the leakage bubbles are identified by background subtraction. However, if there are moving bubbles in the initial frame, ghosting is likely to occur. At the same time, under the detection conditions of the hose, the water surface ripples are likely to affect the detection due to image interference, and the originally fixed threshold cannot well adapt to this detection situation. To avoid the interference of floating bubbles or impurities in the first frame on the background model, the paper proposes to use the first N frame images to improve the background initialization. A "total image set" is created through the first N frame images, and then each pixel point in the hose image is traversed, and the pixel value is randomly extracted M times in the corresponding neighborhood area in the image set to form a more stable background sample library. The construction formula of the background sample library is as follows: ; Among them, is the pixel value of the pixel in the ROI detection frame of the first N frame images, is the neighborhood of the pixel , means to execute N times, It means randomly selecting 10 times. In this way, the images of the first N frames and the pixel values in the neighborhood can be used to construct a more accurate and stable background sample library, reducing the influence of impurities on the background sample library, thereby improving the detection accuracy.
[0024] This embodiment combines the OTS algorithm and the maximum inter-class variance method to obtain a dynamic threshold through image difference calculation, so as to adapt to different background and foreground conditions. The OTS algorithm determines the optimal threshold by calculating the gray distribution difference between the background and the foreground, making the variance between the background and the foreground the largest. The formula is: ; where, is the pixel value in the image, and are the foreground set and the background set divided based on the gray characteristics of the image by the OTS algorithm, and are the pixel values of the foreground and the background respectively, is the total pixel value of the image, and are the means, and are the variances.
[0025] Next, calculate the distribution probabilities of the foreground and the background: ; Then, according to the maximum inter-class variance method, calculate the dynamic threshold. That is, when calculating the dynamic threshold, based on the OTS algorithm, based on the maximum and minimum gray values of the image, by traversing the gray value interval, obtain the maximum value, obtain the boundary point between the foreground and the background; calculate the first threshold based on the difference between the background sample library and the current frame image; calculate the second threshold based on the difference between the current frame image and the previous frame image; based on the maximum inter-class variance method, the means and variances of the foreground and the background, obtain the third threshold; comprehensively assign different weights to the first threshold, the second threshold, and the third threshold, and add them up to obtain the dynamic threshold.
[0026] Specifically, when calculating the first threshold and the second threshold, calculate: ; ; is the threshold calculated by the OTS algorithm, is the first threshold, is the second threshold, is the pixel value of the current frame image, is the pixel value of the background sample library, is the pixel value of the previous frame image.
[0027] When calculating the third threshold, the Otsu method is adopted, which specifically includes: ; ; ; where, and are the means of the foreground and background, and are the variances of the foreground and background, and are the pixel values of the foreground and background respectively, and are the distribution probabilities of the foreground and background respectively. In the Otsu method, , , , are used to calculate and , is the within-class variance, is the between-class variance, and the ratio of is calculated from the minimum to the maximum gray value to obtain the third threshold . Finally, the dynamic threshold is obtained by combining the three thresholds, and the calculation is as follows: ; ; , , are the weight coefficients, is the th frame image, represents the foreground or background points obtained by combining the gray value determined by the current frame from , , . The foreground points are represented by 1, and the background points are represented by 0.
[0028] Generally speaking, the main idea of the OTS algorithm is to divide the image into background and foreground according to the gray characteristics of the image, so that the variance between the background and the foreground is the largest. However, the OTS algorithm is prone to misjudging foreground points as background. In this paper, the background sample library is combined with the OTS algorithm, the first threshold and the second threshold are calculated using the idea of image difference, and the method of the maximum within-class and between-class variance ratio is introduced. The third threshold is calculated through the characteristics of this method, and finally the dynamic threshold is obtained by integrating the three thresholds.
[0029] When calculating the leakage degree of the hose, the generated binary image can be used to calculate the change frequency of the foreground points in each sub-region. Then, the average change frequency in the sub-region is calculated according to the number of images, and the sub-regions with excessive changes are filtered out using a threshold. Finally, the proportion of the sub-regions with excessive changes is calculated to determine the leakage degree. Specific calculation: ; ; ; ; where m is the number of frames of the detection video, is the sum of the pixel change frequencies in the sub-region, is the average pixel change frequency of the sub-region, is the change frequency of the corresponding region, is the percentage of the leakage sub-region, is a conditional function, which takes the value 1 when the condition is satisfied, otherwise 0.
[0030] When calculating the leakage point, the frequency distribution of the foreground region is obtained through By calculating the central moment of the foreground point frequency distribution, the coordinate points of the region with the densest distribution of foreground points in the image can be obtained. Specific calculation: ; where, is the set of pixel values in the foreground region, is the set of x coordinates in the foreground region, is the set of y coordinates in the foreground region, and are the centroid coordinates of the leakage region respectively, is the leakage point.
[0031] In the calculation of the leakage amount, after the inflation of the hose is completed, a pressure holding test is carried out. Pressure data is collected to obtain the pressure drop value during the holding process.
[0032] According to the ideal gas state equation: ; It is transformed into: ; The gas masses before and after leakage are calculated as: ; By substituting into the gas state equation, we get: ; The calculation result of the total leakage amount is: ; Finally, when the total leakage amount and the leakage ratio of the sub-region are known, the leakage amount of the sub-region can be calculated: ; wherein, is the pressure in the hose, is the volume of the hose, is the mass of the gas in the hose, is the gas constant, 𝑇 is the temperature inside the hose, is the ambient temperature, is the atmospheric pressure, is the leakage amount, is the holding time.
[0033] In step S103, based on the leakage degree, the leakage point, the leakage amount and the pre-trained expert library, the defect type of the hose is obtained, and the manufacturing process of the hose is improved according to the defect type.
[0034] Among them, the leakage degree is evaluated by analyzing the gas leakage situation that occurs during the inflation process of the hose. Specifically, the leakage degree of the hose is evaluated by detecting the foreground change frequency in the video. Areas with a higher foreground change frequency usually indicate that there are bubbles or air flow fluctuations in that area, which may be the source of leakage. By calculating the average change frequency of the foreground in each sub-region and filtering out sub-regions with overly large changes, the areas where leakage occurs can be effectively identified, and then the leakage degree of the hose (such as slight, medium, or severe) can be determined. The leakage point refers to the location of the leakage source found through foreground detection in the image. After the leakage degree is determined, the system further analyzes the central distance of the frequency distribution of the foreground area, calculates the coordinates of the area where the foreground is most densely distributed in the image, so as to determine the location of the leakage point. These positions are the specific sources of gas leakage. By calculating the distribution of the leakage points, the leakage location of the hose can be accurately located. The leakage volume refers to the amount of gas leaked from the hose, which is usually calculated based on pressure data. After inflation is completed, the system will, according to the pressure data provided by the pressure sensor, through the ideal gas state equation, obtain the mass change amount of the gas, and finally calculate the leakage volume. The size of the leakage volume is related to the leakage degree of the hose and the size of the leakage point, which can help judge the damage degree of the hose. The pre-trained expert library is a database containing historical data and expert experience, which includes the defects of different types of hoses and corresponding improvement plans for manufacturing processes, such as: classification of hose defect types, for example, bubbles, cracks, loose joints, etc.; historical data related to defects, such as the occurrence frequency of different types of defects, influencing factors, etc.; optimization suggestions for manufacturing processes. According to the defect types, the expert library can include suggestions on how to improve the hose manufacturing process to reduce or eliminate a certain defect. By identifying the hose defect types, the system can utilize the knowledge in the pre-trained expert library to give corresponding improvement plans for manufacturing processes. For example, if cracks or pores in the hose are the main causes of leakage, it is necessary to improve the selection of raw materials or optimize the heat treatment process; if the leakage is caused by loose joints, it is necessary to improve the joint connection process, increase the welding strength or use higher-quality sealing materials.
[0035] By combining the analysis of defect types, the improvement plan for the manufacturing process will specifically optimize the production process of the hose, thereby improving the quality and durability of the hose and reducing the occurrence of leakage problems.
[0036] Based on the same idea, such as Figure 2As shown in the figure, the exemplary embodiment of the present disclosure further provides an improved system for manufacturing a highly flexible and wear-resistant pea gravel hose. The system includes: a collection module 201, configured to obtain a detection video of the hose. In the detection video, the hose is placed in water, one end of which is connected to a solenoid valve, a proportional valve, a pressure sensor, and an inflation device, and the other end is sealed. Based on the YOLOv5 model, the ROI detection frame of the hose in the detection video is extracted, and based on the target area correction method, it is ensured that the ROI detection frame can cover the hose; a calculation module 202, configured to select the first N frames of the detection video to establish a total image set, integrate the data of each selected frame of the image, randomly select pixel values to form a background sample library, based on the OTS algorithm and the maximum inter-class variance method, calculate the dynamic threshold through the gray image difference of the detection video, based on the dynamic threshold and the background sample library, determine each pixel in the remaining frame images in the total image set as either foreground or background, divide the remaining frame images in the total image set into multiple sub-regions, accumulate the pixel points in each sub-region, count the foreground change frequency of each pixel point, calculate the average foreground change frequency in the sub-region according to the number of remaining frame images, and use the threshold to filter the sub-regions with excessive changes, calculate the proportion of the sub-regions with excessive changes, determine the leakage degree of the hose, calculate the center distance of the frequency distribution of the pixel points determined as foreground, obtain the coordinate points of the area where the foreground is most densely distributed in the image, obtain the leakage point, obtain the pressure data of the pressure sensor after the hose is inflated, and calculate the leakage amount according to the pressure data; a process control module 203, configured to obtain the defect type of the hose based on the leakage degree, the leakage point, the leakage amount, and a pre-trained expert library, associate the defect type with the relevant process parameters, and modify the process parameters.
[0037] In this embodiment, the YOLOv5 model is used for accurate region recognition, which can automatically extract the region of interest (ROI) of the hose body, reducing the error and blind area of air leakage detection. Automatically detecting the leakage degree, leakage point, and leakage amount of the hose and then using them for the correlation analysis of production process parameters can provide reliable data support for subsequent process optimization, and can timely adjust the defective process during the production process to prevent unqualified products from entering the market.
[0038] From the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (such as a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the exemplary embodiments of the present disclosure.
[0039] In addition, the above drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, rather than for limiting purposes. It is easy to understand that the processes shown in the above drawings do not indicate or limit the chronological order of these processes. Additionally, it is also easy to understand that these processes can be executed synchronously or asynchronously, for example, in multiple modules.
[0040] After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other embodiments of the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include well-known knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.
Claims
1. An improved method for manufacturing a highly flexible and wear-resistant pea gravel hose, characterized in that: The method comprises: Obtain a detection video of a hose, in which the hose is placed in water, one end of which is connected to a solenoid valve, a proportional valve, a pressure sensor, and an inflator, and the other end is sealed, extract a ROI detection frame of the hose in the detection video based on a YOLOv5 model, and ensure that the ROI detection frame can cover the hose based on a target region correction method; Select the first N frames of the detection video to establish a total image set, integrate the data of each selected frame image, randomly select pixel values to form a background sample library, calculate the dynamic threshold value based on the grayscale image difference of the detection video based on the OTS algorithm and the maximum inter-class variance method, determine each pixel in the remaining frame images in the total image set as a foreground or background based on the dynamic threshold value and the background sample library, divide the remaining frame images in the total image set into multiple sub-areas, accumulate the pixel points in each sub-area, count the foreground change frequency of each pixel point, calculate the average foreground change frequency in the sub-area according to the number of remaining frame images, and use the threshold to filter the sub-areas with excessive changes, calculate the proportion of the sub-areas with excessive changes, determine the leakage degree of the hose, calculate the center distance of the frequency distribution of the pixel points determined as the foreground, obtain the coordinate point of the most densely distributed foreground area in the image, obtain the leakage point, obtain the pressure data of the pressure sensor after the hose is inflated, and calculate the leakage amount according to the pressure data; Based on the leakage degree, the leakage point, the leakage amount and the pre-trained expert library, the defect type of the hose is obtained, and the manufacturing process of the hose is improved according to the defect type.
2. The improved method for manufacturing a highly flexible and wear-resistant pea gravel hose according to claim 1, characterized in that: The step of integrating data of each frame of image and randomly selecting pixel values to form a background sample library includes: Each pixel point of the ROI detection frame of the selected image is traversed, and pixel values are randomly extracted from the neighborhood area corresponding to the ROI detection frame of each selected frame of the image to form a background sample library.
3. The improved method for manufacturing a highly flexible and wear-resistant pea gravel hose according to any one of claims 1 or 2, characterized in that: The background sample library is expressed as: ; in, The pixels in the ROI detection box in the previous N frames of images The pixel value of It's pixels Neighborhood of Indicates execution N times, Indicates 10 random selections.
4. The improved method for manufacturing a highly flexible and wear-resistant pea gravel hose according to claim 1, characterized in that: When calculating the dynamic threshold, specifically calculate: ; ; in, is the pixel value in the image, and The distribution is divided into foreground set and background set based on the grayscale characteristics of the image based on the OTS algorithm. and are the pixel values of foreground and background respectively, is the total pixel value of the image, and is the mean, and is the variance, and are the distribution probabilities of foreground and background respectively; Based on the OTS algorithm, based on the maximum and minimum grayscale values of the image, by traversing the grayscale value interval, we can get The maximum value of , get the dividing point between foreground and background; Calculating a first threshold based on the difference between the background sample library and the current frame image; Calculating a second threshold based on a difference between a current frame image and a previous frame image; Based on the maximum inter-class variance method, the mean and variance of the foreground and background are used to obtain a third threshold; The first threshold, the second threshold, and the third threshold are comprehensively assigned different weights, and the weights are added to obtain the dynamic threshold.
5. The improved method for manufacturing a highly flexible and wear-resistant pea gravel hose according to claim 4, characterized in that: When calculating the first threshold and the second threshold, calculate: ; in, is the first threshold, is the second threshold, is the pixel value of the current frame image, is the pixel value of the background sample library, is the pixel value of the previous frame.
6. The improved method for manufacturing a highly flexible and wear-resistant pea gravel hose according to claim 4, characterized in that: When calculating the third threshold, calculate: ; ; ; in, and is the mean of foreground and background, and is the variance of foreground and background, and are the pixel values of foreground and background respectively, and are the distribution probabilities of foreground and background respectively.
7. The improved method for manufacturing a highly flexible and wear-resistant pea gravel hose according to claim 1, characterized in that: When calculating the leakage degree of the hose, specifically calculate: ; ; ; ; Wherein, m is the number of frames of the detection video, is the sum of the pixel change frequencies in the sub-region, is the average pixel change frequency of the sub-region, is the frequency of change in the corresponding area, is the percentage of the leaking sub-area, It is a conditional function, which takes the value 1 when the condition is met, otherwise it takes the value 0.
8. The improved method for manufacturing a highly flexible and wear-resistant pea gravel hose according to claim 1, characterized in that: When calculating the leak point, calculate: ; in, is the set of pixel values in the foreground area, is the set of x-coordinates within the foreground area, is the set of y coordinates within the foreground area, and are the centroid coordinates of the leakage area, is the leakage point.
9. An improved system for manufacturing a highly flexible and wear-resistant pea gravel hose, characterized in that: The system comprises: The acquisition module is used to obtain a detection video of a hose, in which the hose is placed in water, one end of which is connected to a solenoid valve, a proportional valve, a pressure sensor, and an inflator, and the other end is sealed, and a ROI detection frame of the hose in the detection video is extracted based on a YOLOv5 model, and a target region correction method is used to ensure that the ROI detection frame can cover the hose; A calculation module is used to select the first N frames of the detection video to establish a total image set, integrate the data of each selected frame image, randomly select pixel values to form a background sample library, calculate a dynamic threshold based on the OTS algorithm and the maximum inter-class variance method through the grayscale image difference of the detection video, and determine each pixel in the remaining frame images in the total image set as a foreground or background based on the dynamic threshold and the background sample library, divide the remaining frame images in the total image set into multiple sub-areas, accumulate the pixel points in each sub-area, count the foreground change frequency of each pixel point, calculate the average foreground change frequency in the sub-area according to the number of remaining frame images, and use the threshold to filter the sub-areas with excessive changes, calculate the proportion of the sub-areas with excessive changes, determine the leakage degree of the hose, calculate the center distance of the frequency distribution of the pixel points determined as the foreground, obtain the coordinate point of the most densely distributed foreground area in the image, obtain the leakage point, obtain the pressure data of the pressure sensor after the hose is inflated, and calculate the leakage amount according to the pressure data; The process control module is used to obtain the defect type of the hose based on the leakage degree, the leakage point, the leakage amount and the pre-trained expert library, and associate the defect type with related process parameters to modify the process parameters.