A bathroom towel rack plug detection method and system based on AI visual information
By acquiring and extracting features from multiple angles, combined with region analysis, defect classification, and scoring algorithms, the problems of accuracy in identifying and quantifying defects in bathroom towel rack end caps have been solved. This has enabled efficient defect detection and production optimization, thereby improving product quality and production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGXI AVONFLOW HVAC TECH CO LTD
- Filing Date
- 2025-05-26
- Publication Date
- 2026-06-16
AI Technical Summary
In existing technologies, the segmentation and identification accuracy of defect areas in bathroom towel rack end caps is limited, making it difficult to distinguish similar or overlapping defect types, resulting in inaccurate classification results. Furthermore, the lack of a quantitative scoring mechanism for the severity of defects affects intelligent control and production optimization in the quality inspection process.
By employing multi-angle image acquisition and feature extraction, combined with region analysis, defect classification, and scoring algorithms, defect areas are identified through region analysis algorithms, defect types are distinguished through defect classification algorithms, and defect reports are generated through scoring algorithms, allowing for real-time adjustments to the production process to optimize the technology.
It enables accurate identification and type differentiation of defects in bathroom towel rack end caps, provides real-time quality feedback, optimizes production processes, reduces defect rates, and improves product consistency and testing efficiency.
Smart Images

Figure CN120495272B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual recognition technology, and more specifically, to a method and system for detecting end caps on bathroom towel racks based on AI visual information. Background Technology
[0002] With the continuous advancement of artificial intelligence technology, the application of AI visual information processing technology in industrial quality inspection is becoming increasingly widespread. AI vision, by integrating image acquisition, deep learning models, and feature recognition algorithms, can simulate the human visual system to perform multi-dimensional analysis of images. It possesses significant advantages such as non-contact operation, high precision, real-time performance, and adaptability to complex environments, making it particularly suitable for inspecting the appearance of products with complex defect morphologies and multi-scale variations. In the inspection scenario of bathroom towel rack end caps, the end cap surface often features reflections, curved structures, and various minute defects such as cracks, scratches, indentations, and pores. AI vision technology can accurately identify and classify various defect areas through image recognition and deep feature extraction, improving inspection efficiency and stability, and providing crucial support for the quality control of bathroom end caps and subsequent intelligent process optimization.
[0003] However, existing technologies have limited accuracy in segmenting and identifying defective areas, making it difficult to effectively distinguish similar or overlapping defect types, resulting in inaccurate classification results. Furthermore, they are not conducive to fully capturing the details of the plug surface, increasing the chances of omissions and misjudgments during inspection. At the same time, the lack of a quantitative scoring mechanism for the severity of defects makes it difficult to use the inspection results for subsequent production optimization. Defect data cannot form an effective feedback loop, limiting the ability of the quality inspection process to intelligently control and improve the production process.
[0004] No effective solutions have yet been proposed to address the problems in the relevant technologies. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention proposes a method and system for detecting end caps on bathroom towel racks based on AI visual information. This solves the problems mentioned in the background section, such as limited accuracy in segmenting and identifying defect areas, difficulty in effectively distinguishing similar or overlapping defect types leading to inaccurate classification results, and difficulty in comprehensively capturing the surface details of the end caps, increasing the likelihood of oversights and misjudgments during detection. Furthermore, the lack of a quantitative scoring mechanism for defect severity makes it difficult to use detection results for subsequent production optimization, and defect data cannot form an effective feedback loop, limiting the quality inspection process's ability to intelligently control and improve production processes.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] According to one aspect of the present invention, a method for detecting end caps on a bathroom towel rack based on AI visual information is provided, comprising:
[0008] S1. Obtain images of the bathroom towel rack end caps from different angles and extract the feature images of the bathroom towel rack end caps;
[0009] S2. Based on the region analysis algorithm, the feature image of the bathroom towel rack end cap is analyzed to identify the defect area of the bathroom towel rack end cap;
[0010] S3. Use the defect segmentation algorithm to identify the defect area and obtain the defect type of the bathroom towel rack end cap;
[0011] S4. Based on the defect type, use a scoring algorithm to automatically score the quality of the bathroom towel rack end caps and generate a defect report; and based on the defect report, adjust the production process in real time and optimize the production process to reduce the defect rate.
[0012] Furthermore, images of the bathroom towel rack end caps from different angles were acquired, and feature images of the bathroom towel rack end caps were extracted, including:
[0013] S11. Obtain images of the bathroom towel rack end caps from different angles, and perform noise reduction, contrast adjustment, and cropping on the bathroom towel rack end cap images.
[0014] S12. Use image segmentation technology to select the target area in the processed bathroom towel rack end cap image, and use dynamic contour model to generate a preliminary target contour.
[0015] S13. Based on the boundary information of the target area, use B-spline curves to establish an internal and external force model for the target contour, and obtain a smooth and fitted final target contour by using control points and B-spline curve segmentation strategy.
[0016] S14. Based on the final target contour and target area information, extract the feature image of the bathroom towel rack end cap.
[0017] Furthermore, based on region analysis algorithms, the feature images of bathroom towel rack end caps were analyzed to identify defective areas including:
[0018] S21. Initialize the parameters and maximum number of iterations of the region analysis algorithm, and generate an initial image feature region set from the feature image of the bathroom towel rack end cap;
[0019] S22. Calculate the fitness of each image feature region, find the image feature region with the highest fitness as the current optimal image feature region solution, and compare it with the historical optimal solution. If the current solution is the best, then update the historical optimal solution.
[0020] S23. Using the ranking selection algorithm, select the best performing image feature region solution from the current image feature regions as the parent, and generate a new generation of image feature region solutions;
[0021] S24. Based on the transformation probability, choose to perform global or local image feature region update. If global image feature region update is selected, global jump is simulated by Lévy step size to increase the diversity of solution space. If local image feature region update is selected, feature information from historical best solutions is introduced to refine the boundaries of feature regions.
[0022] S25. When the maximum number of iterations is reached, the region analysis process is terminated, and the optimal image feature region solution is output as the defect region of the bathroom towel rack plug.
[0023] Furthermore, a ranking selection algorithm is used to select the best-performing image feature region solution from the current image feature regions as the parent, and a new generation of image feature region solutions is generated, including:
[0024] S231. Randomly generate several image feature region solutions in the feature dimension space of the image feature region as the initial population;
[0025] S232. Calculate the fitness of each image feature region based on its recognition performance. The image feature region with the highest fitness is used to generate several sub-region solutions, and the number of offspring is allocated using a linear formula.
[0026] S233. The sub-region solution is generated by normal distribution diffusion in the feature dimension space with the parent generation as the center, and similar image feature regions are classified into the same sub-region, and local diffusion is carried out in each sub-region.
[0027] S234. Merge the parent region solutions and the child region solutions. When the total number exceeds the preset threshold, sort and filter according to fitness, and retain the image feature regions with the best performance.
[0028] S235, repeat the fitness evaluation, diffusion generation and region selection process until the maximum number of iterations is reached, output the best performing image feature region as the parent, and generate a new generation of image feature region solutions.
[0029] Furthermore, the sub-region solutions are generated using a normal distribution diffusion method centered on the parent generation within the feature dimension space. This method groups similar image feature regions into the same sub-region and performs local diffusion within each sub-region, including:
[0030] S2331. Sort the solutions of image feature regions in descending order according to fitness. If the population size exceeds a preset threshold, retain several solutions of image feature regions before the preset threshold.
[0031] S2332. Decompose the image feature region with the highest fitness into the center of the first niche, and use it as the core region of the niche;
[0032] S2333. Calculate the Euclidean distance between the solutions of other image feature regions in the population and the center of the current niche. If it is less than the preset radius, then it is assigned to the niche.
[0033] S2334. Select the solution with the highest fitness from the unclassified image feature regions as the new niche center, continue to judge and classify into niches, repeat the classification process until all image feature regions are classified into the corresponding niches, complete the niche classification, and carry out local diffusion in each niche.
[0034] Furthermore, by using a defect segmentation algorithm to identify defect areas, the defect types of bathroom towel rack end caps were determined to include:
[0035] S31. Construct a feature image model of the end cap of the bathroom towel rack, and perform image topology simplification processing in combination with the structural characteristics of the end cap of the bathroom towel rack;
[0036] S32. Establish a defect segmentation algorithm model to identify sets of independent defect regions of different scales in the feature image of the end cap of a bathroom towel rack.
[0037] S33. Set a minimum defect strength threshold, retain defect areas that are greater than or equal to the threshold, and treat the rest as isolated pixel nodes;
[0038] S34. Merge adjacent defect areas that have overlapping or connecting relationships to form the largest possible defect partition.
[0039] S35. For isolated pixel nodes, calculate their connection relationship with each defect region and divide them based on the criterion of minimum feature difference;
[0040] S36. Repeat the calculation and update of the attribution relationship until all image feature points are assigned to the corresponding defect area and the defect type is identified.
[0041] Furthermore, a defect segmentation algorithm model is established to identify sets of independent defect regions of different scales in the feature image of a bathroom towel rack end cap, including:
[0042] S321. Obtain the pixel structure features of the feature image of the bathroom towel rack end cap, and construct an image topology graph based on adjacency relationship;
[0043] S322. By utilizing the connection strength between nodes, identify all initial defect connection segments in the feature image of the bathroom towel rack end cap to form a potential defect sub-map.
[0044] S323. Construct a defect partitioning algorithm model and perform factional stratification on the defect subgraph to identify mutually independent defect region sets.
[0045] S324. Based on the area and connectivity features of each faction in the feature image of the bathroom towel rack end cap, determine the spatial scale of the defect area and identify the set of independent defect areas of different scales in the feature image of the bathroom towel rack end cap.
[0046] Furthermore, based on the defect type, a scoring algorithm is used to automatically score the quality of bathroom towel rack end caps, generating a defect report. Based on this report, the production process is adjusted in real time to optimize manufacturing techniques and reduce the defect rate, including:
[0047] S41. Based on the defect type, extract the image features of each defect region and use them as scoring input parameters to evaluate their impact on the overall quality.
[0048] S42. Based on the defect type and severity, apply the scoring rules to give a preliminary score to each defect area, and determine the consistency between the image features and the scoring criteria.
[0049] S43. Conduct multiple rounds of comparison and consistency checks on the preliminary scoring results. If there are scoring deviations, adjust them according to the standards, and finally confirm the scoring results and generate a defect scoring report.
[0050] S44. Based on the distribution characteristics of various defects in the scoring report, track the changes in related production process parameters and adjust key production process operations to reduce the defect rate.
[0051] Furthermore, based on the type and severity of the defects, scoring rules are applied to initially score each defect area, and the consistency between image features and scoring criteria is assessed, including:
[0052] S421. Set an initial score value for each detected defect area in the image, with the default defect type set to the median value, and limit the score range.
[0053] S422. Based on the image features of each defect area, assign a score for the current round according to the scoring rules, and calculate a weighted score by combining the historical detection performance to obtain a preliminary score.
[0054] S423. Make a consistency judgment between the current scoring result and the standard scoring range. If the scoring deviation exceeds the threshold, make corrections based on image features to ensure the rationality of the scoring.
[0055] According to another aspect of the present invention, a bathroom towel rack end plug detection system based on AI visual information is also provided, the system comprising:
[0056] The image acquisition module is used to acquire images of the bathroom towel rack end caps from different angles and extract the feature images of the bathroom towel rack end caps.
[0057] The region analysis module is used to analyze the feature images of bathroom towel rack end caps based on the region analysis algorithm and identify the defective areas of the bathroom towel rack end caps.
[0058] The defect identification module is used to identify defect areas using a defect segmentation algorithm to determine the defect type of the bathroom towel rack end cap.
[0059] The quality evaluation and optimization module is used to automatically score the quality of bathroom towel rack end caps using a scoring algorithm based on defect type, generate a defect report, and adjust the production process in real time based on the defect report to optimize the production process and reduce the defect rate.
[0060] The beneficial effects of this invention are as follows:
[0061] 1. This invention ensures comprehensive coverage of defect information through multi-angle image acquisition and feature extraction. Combined with region analysis and defect classification algorithms, it automatically identifies defect areas and types, avoiding omissions and misjudgments during inspection. The defect classification algorithm further distinguishes defect types, which helps to accurately assess product quality. Furthermore, through automatic scoring and defect report generation, it not only provides real-time quality feedback but also optimizes the production process based on data, thereby improving production efficiency and product consistency and reducing the defect rate.
[0062] 2. This invention achieves high-precision defect region identification through a ranking selection algorithm. The algorithm gradually selects the optimal image feature regions through fitness calculation and iterative optimization, enhancing the ability to identify complex defects. Furthermore, through normal distribution diffusion and niche classification, the algorithm can efficiently handle the diversity of image feature regions, avoiding information omissions and misjudgments. Ultimately, the optimized defect region identification provides an accurate basis for subsequent scoring and quality control, effectively improving the automation and intelligence level of product quality inspection.
[0063] 3. This invention performs topological modeling and region layering on plug images through a defect segmentation algorithm, achieving accurate identification of independent defect regions of different scales. By utilizing connectivity and feature difference judgment mechanisms, it effectively improves the ability to distinguish between subtle defects and composite defects, thereby enhancing the structural understanding of image processing and the accuracy of defect attribution, and providing a basis for subsequent defect type determination.
[0064] 4. This invention achieves quantitative assessment of the type and severity of plug defects through a defect scoring algorithm. It combines image features with scoring standards to make consistency judgments, effectively improving the accuracy and objectivity of the scoring results. Based on the scoring results, a defect report is generated and fed back to the production process, allowing for timely adjustment of process parameters and optimization of the production process, thereby improving the product yield. Attached Figure Description
[0065] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0066] Figure 1 This is a flowchart of a bathroom towel rack end plug detection method based on AI visual information according to an embodiment of the present invention;
[0067] Figure 2 This is a schematic diagram of a bathroom towel rack end cap detection system based on AI visual information according to an embodiment of the present invention.
[0068] In the picture:
[0069] 1. Image acquisition module; 2. Region analysis module; 3. Defect identification module; 4. Quality evaluation and optimization module. Detailed Implementation
[0070] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0071] In the description of this invention, unless otherwise stated, "a plurality of" means two or more. Furthermore, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0072] According to an embodiment of the present invention, a method and system for detecting end caps on bathroom towel racks based on AI visual information is provided.
[0073] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments, such as... Figure 1 As shown, the bathroom towel rack end plug detection method based on AI visual information according to an embodiment of the present invention includes:
[0074] S1. Obtain images of the bathroom towel rack end caps from different angles and extract the feature images of the bathroom towel rack end caps;
[0075] Specifically, by fixing the end cap to a rotating platform and controlling its gradual rotation by a motor, a CCD camera is fixed to take pictures, capturing images of the bathroom towel rack end cap from different angles after each rotation at a certain angle.
[0076] Specifically, the feature images of bathroom towel rack end caps include edge feature images, texture feature images, color feature images, geometric structure feature images, and lighting / reflection feature images.
[0077] S2. Based on the region analysis algorithm, the feature image of the bathroom towel rack end cap is analyzed to identify the defect area of the bathroom towel rack end cap;
[0078] Specifically, a defective area refers to a local area in the feature image of a bathroom towel rack end that is significantly different from the normal structure or surface morphology, including areas with abnormal surface texture, areas with structural discontinuities, areas with material defects, areas with coating defects, and areas with assembly defects.
[0079] S3. Use the defect segmentation algorithm to identify the defect area and obtain the defect type of the bathroom towel rack end cap;
[0080] Specifically, the types of defects in bathroom towel rack end caps include: size defects, height step defects, shape contour defects, round hole eccentricity defects, lower end face defects, chamfer size defects, R-angle defects, and rotten teeth defects.
[0081] It should be explained that four CCD vision inspection stations are set up to acquire images of the plug from different angles. The first station uses dual telecentric lenses and a backlight to detect defects such as size, contour, eccentricity of round holes, and radius (R-angle). The second station uses a 360° endoscope to identify rotten teeth. The third station takes side-view images to obtain the height and step dimensions. The fourth station takes images from bottom to top to detect end-face defects and chamfers. Combined with a defect classification algorithm, it can identify defect types such as size, height, contour, round holes, end faces, chamfers, R-angles, and rotten teeth.
[0082] S4. Based on the defect type, use a scoring algorithm to automatically score the quality of the bathroom towel rack end caps and generate a defect report; and based on the defect report, adjust the production process in real time and optimize the production process to reduce the defect rate.
[0083] In this optional embodiment, acquiring images of the bathroom towel rack end caps from different angles and extracting the feature images of the bathroom towel rack end caps includes:
[0084] S11. Obtain images of the bathroom towel rack end caps from different angles, and perform noise reduction, contrast adjustment, and cropping on the bathroom towel rack end cap images.
[0085] S12. Use image segmentation technology to select the target area in the processed bathroom towel rack end cap image, and use dynamic contour model to generate a preliminary target contour.
[0086] S13. Based on the boundary information of the target area, use B-spline curves to establish an internal and external force model for the target contour, and obtain a smooth and fitted final target contour by using control points and B-spline curve segmentation strategy.
[0087] S14. Based on the final target contour and target area information, extract the feature image of the bathroom towel rack end cap.
[0088] Specifically, the feature image of the bathroom towel rack end cap is extracted using the snake algorithm. The contour curve that moves and deforms under the interaction of the internal force of the B-spline curve itself and the external constraint force brought by the bathroom towel rack end cap image data is then determined according to the current position and shape of the contour. Finally, it approximates the foreground target contour of the bathroom towel rack end cap image (i.e., the feature image of the bathroom towel rack end cap), thereby achieving accurate extraction of the image foreground and effective improvement of the contour integrity.
[0089] In this optional embodiment, based on a region analysis algorithm, the feature image of the bathroom towel rack end cap is analyzed to identify the defective areas of the bathroom towel rack end cap, including:
[0090] S21. Initialize the parameters and maximum number of iterations of the region analysis algorithm, and generate an initial image feature region set from the feature image of the bathroom towel rack end cap;
[0091] S22. Calculate the fitness of each image feature region, find the image feature region with the highest fitness as the current optimal image feature region solution, and compare it with the historical optimal solution. If the current solution is the best, then update the historical optimal solution.
[0092] S23. Using the ranking selection algorithm, select the best performing image feature region solution from the current image feature regions as the parent, and generate a new generation of image feature region solutions;
[0093] S24. Based on the transformation probability, choose to perform global or local image feature region update. If global image feature region update is selected, global jump is simulated by Lévy step size to increase the diversity of solution space. If local image feature region update is selected, feature information from historical best solutions is introduced to refine the boundaries of feature regions.
[0094] Specifically, the formula for updating the global image feature region is:
[0095]
[0096] In the formula, g represents the solution of the a-th image feature region in the t-th iteration; * δ represents the historical optimal solution; δ represents the global step size control coefficient (controlling the magnitude of image region adjustment); L represents the Lévy distribution step size (simulating cross-region jumps to enhance search diversity); Let represent the solution of the a-th image feature region in the (t+1)-th iteration.
[0097] Specifically, the formula for updating local image feature regions is:
[0098]
[0099] In the formula, This represents the solution for the a-th image feature region in the t-th iteration. This represents the solution for the a-th image feature region in the (t+1)-th iteration; and ε represents the solution of image feature regions within two randomly selected neighborhoods; ε represents a uniformly distributed random number following [0, 1] (controlling the fine-tuning amplitude).
[0100] S25. When the maximum number of iterations is reached, the region analysis process is terminated, and the optimal image feature region solution is output as the defect region of the bathroom towel rack plug.
[0101] Specifically, the region analysis algorithm is the discrete flower pollination algorithm, which simulates the pollination process in nature. Combining local and global update strategies, through continuous searching and optimization, it ultimately accurately identifies the defective areas of the bathroom towel rack end caps.
[0102] It should be explained that after acquiring the feature image of the towel rack end cap, the parameters of the region analysis algorithm are initialized and an initial feature region set is generated; the optimal region is selected through fitness calculation, compared with historical solutions, and iteratively optimized; the ranking selection algorithm is used to select excellent feature regions to generate new solutions; global or local updates are performed according to the transformation probability, and the search diversity is improved by using the Levy step size, and finally the optimal image region is output and marked as the defect region, thus realizing the efficient extraction and accurate localization of defect regions, providing a reliable foundation for image detection.
[0103] In this optional embodiment, the process of selecting the best-performing image feature region solution from the current image feature regions using a ranking selection algorithm as the parent solution and generating a new generation of image feature region solutions includes:
[0104] S231. Randomly generate several image feature region solutions in the feature dimension space of the image feature region as the initial population;
[0105] S232. Calculate the fitness of each image feature region based on its recognition performance. The image feature region with the highest fitness is used to generate several sub-region solutions, and the number of offspring is allocated using a linear formula.
[0106] S233. The sub-region solution is generated by normal distribution diffusion in the feature dimension space with the parent generation as the center, and similar image feature regions are classified into the same sub-region, and local diffusion is carried out in each sub-region.
[0107] S234. Merge the parent region solutions and the child region solutions. When the total number exceeds the preset threshold, sort and filter according to fitness, and retain the image feature regions with the best performance.
[0108] S235, repeat the fitness evaluation, diffusion generation and region selection process until the maximum number of iterations is reached, output the best performing image feature region as the parent, and generate a new generation of image feature region solutions.
[0109] Specifically, the ranking selection algorithm is the Invasive Weed Algorithm, which simulates the weed diffusion process by generating an initial population, evaluating fitness, linear reproduction, and normal diffusion. Image feature regions with high fitness serve as parents, diffuse to generate offspring, and are assigned to niches. Through repeated screening and optimization, the optimal image feature region solution is finally obtained.
[0110] It should be explained that, firstly, several image feature regions are randomly generated within the feature dimension space as an initial population, and their recognition performance is calculated to determine their fitness. Regions with high fitness are used as parents, generating several child regions, which then spread in a normal distribution within niches to generate new solutions. The parent and child regions are merged, and the optimal region is selected. This process is repeated until the iteration limit is reached. Finally, the best-performing image feature region is output for subsequent defect recognition, thereby enhancing the solution space exploration and convergence capabilities and providing a high-quality initial feature region foundation for subsequent defect recognition.
[0111] In this optional embodiment, the sub-region solution is generated by normal distribution diffusion within the feature dimension space, centered on the parent generation, to group similar image feature regions into the same niche, and to perform local diffusion within each niche, including:
[0112] S2331. Sort the solutions of image feature regions in descending order according to fitness. If the population size exceeds a preset threshold, retain several solutions of image feature regions before the preset threshold.
[0113] S2332. Decompose the image feature region with the highest fitness into the center of the first niche, and use it as the core region of the niche;
[0114] S2333. Calculate the Euclidean distance between the solutions of other image feature regions in the population and the center of the current niche. If it is less than the preset radius, then it is assigned to the niche.
[0115] S2334. Select the solution with the highest fitness from the unclassified image feature regions as the new niche center, continue to judge and classify into niches, repeat the classification process until all image feature regions are classified into the corresponding niches, complete the niche classification, and carry out local diffusion in each niche.
[0116] It should be explained that, firstly, the solutions for the image feature regions are sorted in descending order based on fitness, and the top few solutions are retained. The solution with the highest fitness is used as the center of the first niche. Then, the distances of other solutions to the center are calculated; if they are less than a preset radius, they are assigned to that niche. Next, the solution with the highest fitness from the unclassified solutions is selected as the center of the new niche, and the classification process is repeated until all solutions are classified. Finally, local diffusion is performed within each niche to optimize the solutions for the image feature regions. This allows for fine-grained division and optimization of feature regions, improving the stability and local search capabilities of image analysis, and providing a better solution space for defect identification.
[0117] In this optional embodiment, a defect segmentation algorithm is used to identify the defect area, and the defect types of the bathroom towel rack end cap include:
[0118] S31. Construct a feature image model of the end cap of the bathroom towel rack, and perform image topology simplification processing in combination with the structural characteristics of the end cap of the bathroom towel rack;
[0119] S32. Establish a defect segmentation algorithm model to identify sets of independent defect regions of different scales in the feature image of the end cap of a bathroom towel rack.
[0120] S33. Set a minimum defect strength threshold, retain defect areas that are greater than or equal to the threshold, and treat the rest as isolated pixel nodes;
[0121] S34. Merge adjacent defect areas that have overlapping or connecting relationships to form the largest possible defect partition.
[0122] S35. For isolated pixel nodes, calculate their connection relationship with each defect region and divide them based on the criterion of minimum feature difference;
[0123] S36. Repeat the calculation and update of the attribution relationship until all image feature points are assigned to the corresponding defect area and the defect type is identified.
[0124] Specifically, the defect segmentation algorithm is a faction filtering algorithm. This algorithm identifies defective regions in bathroom towel rack end caps by constructing an image model, topological simplification, and defect segmentation. First, the algorithm identifies defective regions at different scales, sets an intensity threshold to filter isolated pixels, then merges adjacent defective regions and calculates the connectivity between isolated pixels and defective regions. Finally, through minimum feature difference segmentation, it accurately classifies all image feature points and identifies the specific defect type.
[0125] It should be explained that, firstly, the plug image is topologically simplified to extract key structural features. Then, a defect segmentation algorithm is used to identify multi-scale defect regions, and an intensity threshold is set to remove isolated pixels. Connected or overlapping defect regions are merged to form complete partitions, and isolated pixels are assigned to the corresponding defect region based on the minimum feature difference. Finally, the attribution relationships are repeatedly updated until all image feature points are classified, accurately identifying the specific defect type of the plug. This allows for precise segmentation and identification of various defect regions, effectively improving the reliability and accuracy of plug quality inspection.
[0126] In this optional embodiment, a defect segmentation algorithm model is established to identify a set of independent defect regions of different scales in the feature image of a bathroom towel rack end cap, including:
[0127] S321. Obtain the pixel structure features of the feature image of the bathroom towel rack end cap, and construct an image topology graph based on adjacency relationship;
[0128] S322. By utilizing the connection strength between nodes, identify all initial defect connection segments in the feature image of the bathroom towel rack end cap to form a potential defect sub-map.
[0129] S323. Construct a defect partitioning algorithm model and perform factional stratification on the defect subgraph to identify mutually independent defect region sets.
[0130] S324. Based on the area and connectivity features of each faction in the feature image of the bathroom towel rack end cap, determine the spatial scale of the defect area and identify the set of independent defect areas of different scales in the feature image of the bathroom towel rack end cap.
[0131] It should be explained that, firstly, pixel structure information of the plug feature image is extracted to construct an adjacency graph, forming the image topology. Then, potential defect connection fragments are extracted based on node connection strength, constructing a defect subgraph. The subgraph is divided using a faction-based hierarchical approach to identify structurally independent defect regions. Finally, by combining the area and connectivity features of each faction in the image, its spatial scale is determined, completing the identification and classification of defect regions at different scales. This enables efficient identification and classification of defect regions at different scales, improving the accuracy and precision of defect detection.
[0132] In this optional embodiment, the quality of the bathroom towel rack end caps is automatically scored using a scoring algorithm based on the defect type, generating a defect report; and based on the defect report, the production process is adjusted in real time to optimize the production process and reduce the defect rate, including:
[0133] S41. Based on the defect type, extract the image features of each defect region and use them as scoring input parameters to evaluate their impact on the overall quality.
[0134] S42. Based on the defect type and severity, apply the scoring rules to give a preliminary score to each defect area, and determine the consistency between the image features and the scoring criteria.
[0135] S43. Conduct multiple rounds of comparison and consistency checks on the preliminary scoring results. If there are scoring deviations, adjust them according to the standards, and finally confirm the scoring results and generate a defect scoring report.
[0136] S44. Based on the distribution characteristics of various defects in the scoring report, track the changes in related production process parameters and adjust key production process operations to reduce the defect rate.
[0137] Specifically, the scoring algorithm is a practical Byzantine fault-tolerant algorithm. This algorithm uses multiple rounds of scoring comparison and consistency checks to filter out abnormal or deviating scoring results, ensuring the reliability of each defect scoring data. The algorithm reaches consensus among scoring nodes, avoiding the impact of individual misjudgments on the overall scoring accuracy, and ultimately generates a reliable defect scoring report, providing a stable basis for production process optimization.
[0138] It should be explained that the process begins by extracting image features from various defect areas and assigning preliminary scores based on defect type and severity. Subsequently, multiple rounds of score consistency checks are conducted to correct discrepancies and generate a final defect score report. Based on the defect distribution in the report, the system traces relevant process steps, identifies parameter fluctuations causing the defects, and adjusts production operation strategies in real time. This optimizes the process flow, improves the overall quality of the plugs, and reduces the defect rate.
[0139] In this optional embodiment, based on the defect type and severity, a scoring rule is applied to initially score each defect area, and the consistency between the image features and the scoring criteria is determined, including:
[0140] S421. Set an initial score value for each detected defect area in the image, with the default defect type set to the median value, and limit the score range.
[0141] S422. Based on the image features of each defect area, assign a score for the current round according to the scoring rules, and calculate a weighted score by combining the historical detection performance to obtain a preliminary score.
[0142] S423. Make a consistency judgment between the current scoring result and the standard scoring range. If the scoring deviation exceeds the threshold, make corrections based on image features to ensure the rationality of the scoring.
[0143] It should be explained that, firstly, an initial score is assigned to each detected defect area, with the defect type defaulting to medium level. Then, based on image features such as location and shape, a score is assigned according to scoring rules, and historical detection results are weighted to form a preliminary score. Finally, the preliminary score is compared with the standard score range for consistency. If discrepancies exist, corrections are made based on image features, thereby ensuring the accuracy and consistency of defect scoring. This provides a reliable basis for subsequent quality assessment and production optimization, ensuring the accuracy and reasonableness of the scoring results.
[0144] According to another embodiment of the invention, such as Figure 2 As shown, a bathroom towel rack end plug detection system based on AI visual information is also provided. This system includes:
[0145] Image acquisition module 1 is used to acquire images of bathroom towel rack end caps from different angles and extract feature images of the bathroom towel rack end caps;
[0146] Region analysis module 2 is used to analyze the feature image of the bathroom towel rack end cap based on the region analysis algorithm and identify the defect area of the bathroom towel rack end cap;
[0147] Defect identification module 3 is used to identify defect areas using a defect segmentation algorithm to obtain the defect type of the bathroom towel rack end cap;
[0148] The Quality Evaluation and Optimization Module 4 is used to automatically score the quality of bathroom towel rack end caps using a scoring algorithm based on defect type, generate a defect report, and adjust the production process in real time based on the defect report to optimize the production process and reduce the defect rate.
[0149] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A bathroom towel rack plug detection method based on AI visual information, characterized in that, include: S1. Obtain images of the bathroom towel rack end caps from different angles and extract the feature images of the bathroom towel rack end caps; S2. Based on the region analysis algorithm, the feature image of the bathroom towel rack end cap is analyzed to identify the defect area of the bathroom towel rack end cap; S3. Use the defect segmentation algorithm to identify the defect area and obtain the defect type of the bathroom towel rack end cap; The defect identification algorithm is used to identify defect areas, and the defect types of bathroom towel rack end caps include: S31. Construct a feature image model of the end cap of the bathroom towel rack, and perform image topology simplification processing in combination with the structural characteristics of the end cap of the bathroom towel rack; S32. Establish a defect segmentation algorithm model to identify sets of independent defect regions of different scales in the feature image of the end cap of a bathroom towel rack. S33. Set a minimum defect strength threshold, retain defect areas that are greater than or equal to the threshold, and treat the rest as isolated pixel nodes; S34. Merge adjacent defect areas that have overlapping or connecting relationships to form the largest possible defect partition. S35. For isolated pixel nodes, calculate their connection relationship with each defect region and divide them based on the criterion of minimum feature difference; S36. Repeat the calculation and update of the attribution relationship until all image feature points are assigned to the corresponding defect area and the defect type is identified. S4. Based on the defect type, use a scoring algorithm to automatically score the quality of the bathroom towel rack end caps and generate a defect report; and based on the defect report, adjust the production process in real time and optimize the production process to reduce the defect rate.
2. The bathroom towel rail cap detection method based on AI visual information according to claim 1, characterized in that, The process of acquiring images of bathroom towel rack end caps from different angles and extracting feature images of the bathroom towel rack end caps includes: S11. Obtain images of the bathroom towel rack end caps from different angles, and perform noise reduction, contrast adjustment, and cropping on the bathroom towel rack end cap images. S12. Use image segmentation technology to select the target area in the processed bathroom towel rack end cap image, and use dynamic contour model to generate a preliminary target contour. S13. Based on the boundary information of the target area, use B-spline curves to establish an internal and external force model for the target contour, and obtain a smooth and fitted final target contour by using control points and B-spline curve segmentation strategy. S14. Based on the final target contour and target area information, extract the feature image of the bathroom towel rack end cap.
3. The method for detecting end caps on a bathroom towel rack based on AI visual information according to claim 1, characterized in that, The region analysis algorithm analyzes the feature image of the bathroom towel rack end cap and identifies the defective areas of the end cap, including: S21. Initialize the parameters and maximum number of iterations of the region analysis algorithm, and generate an initial image feature region set from the feature image of the bathroom towel rack end cap; S22. Calculate the fitness of each image feature region, find the image feature region with the highest fitness as the current optimal image feature region solution, and compare it with the historical optimal solution. If the current solution is the best, then update the historical optimal solution. S23. Using the ranking selection algorithm, select the best performing image feature region solution from the current image feature regions as the parent, and generate a new generation of image feature region solutions; S24. Based on the transformation probability, choose to perform global or local image feature region update. If global image feature region update is selected, global jump is simulated by Lévy step size to increase the diversity of solution space. If local image feature region update is selected, feature information from historical best solutions is introduced to refine the boundaries of feature regions. S25. When the maximum number of iterations is reached, the region analysis process is terminated, and the optimal image feature region solution is output as the defect region of the bathroom towel rack plug.
4. The method for detecting end caps on a bathroom towel rack based on AI visual information according to claim 3, characterized in that, The step of using a ranking selection algorithm to select the best-performing image feature region solution from the current image feature regions as the parent solution and generating a new generation of image feature region solutions includes: S231. Randomly generate several image feature region solutions in the feature dimension space of the image feature region as the initial population; S232. Calculate the fitness of each image feature region based on its recognition performance. The image feature region with the highest fitness is used to generate several sub-region solutions, and the number of offspring is allocated using a linear formula. S233. The sub-region solution is generated by normal distribution diffusion in the feature dimension space with the parent generation as the center, and similar image feature regions are classified into the same sub-region, and local diffusion is carried out in each sub-region. S234. Merge the parent region solutions and the child region solutions. When the total number exceeds the preset threshold, sort and filter according to fitness, and retain the image feature regions with the best performance. S235, repeat the fitness evaluation, diffusion generation and region selection process until the maximum number of iterations is reached, output the best performing image feature region as the parent, and generate a new generation of image feature region solutions.
5. The method for detecting end caps on a bathroom towel rack based on AI visual information according to claim 4, characterized in that, The sub-region solution is generated by normal distribution diffusion within the feature dimension space, centered on the parent generation, grouping similar image feature regions into the same sub-region, and performing local diffusion within each sub-region, including: S2331. Sort the solutions of image feature regions in descending order according to fitness. If the population size exceeds a preset threshold, retain several solutions of image feature regions before the preset threshold. S2332. Decompose the image feature region with the highest fitness into the center of the first niche, and use it as the core region of the niche; S2333. Calculate the Euclidean distance between the solutions of other image feature regions in the population and the center of the current niche. If it is less than the preset radius, then it is assigned to the niche. S2334. Select the solution with the highest fitness from the unclassified image feature regions as the new niche center, continue to judge and classify into niches, repeat the classification process until all image feature regions are classified into the corresponding niches, complete the niche classification, and carry out local diffusion in each niche.
6. The method for detecting end caps on a bathroom towel rack based on AI visual information according to claim 1, characterized in that, The establishment of the defect segmentation algorithm model, which identifies a set of independent defect regions of different scales in the feature image of the bathroom towel rack end cap, includes: S321. Obtain the pixel structure features of the feature image of the bathroom towel rack end cap, and construct an image topology graph based on adjacency relationship; S322. By utilizing the connection strength between nodes, identify all initial defect connection segments in the feature image of the bathroom towel rack end cap to form a potential defect sub-map. S323. Construct a defect partitioning algorithm model and perform factional stratification on the defect subgraph to identify mutually independent defect region sets. S324. Based on the area and connectivity features of each faction in the feature image of the bathroom towel rack end cap, determine the spatial scale of the defect area and identify the set of independent defect areas of different scales in the feature image of the bathroom towel rack end cap.
7. The method for detecting end caps on a bathroom towel rack based on AI visual information according to claim 1, characterized in that, The quality of bathroom towel rack end caps is automatically scored using a scoring algorithm based on the defect type, and a defect report is generated. Based on defect reports, production processes are adjusted in real time to optimize production techniques and reduce defect rates, including: S41. Based on the defect type, extract the image features of each defect region and use them as scoring input parameters to evaluate their impact on the overall quality. S42. Based on the defect type and severity, apply the scoring rules to give a preliminary score to each defect area, and determine the consistency between the image features and the scoring criteria. S43. Conduct multiple rounds of comparison and consistency checks on the preliminary scoring results. If there are scoring deviations, adjust them according to the standards, and finally confirm the scoring results and generate a defect scoring report. S44. Based on the distribution characteristics of various defects in the scoring report, track the changes in related production process parameters and adjust key production process operations to reduce the defect rate.
8. The method for detecting end caps on a bathroom towel rack based on AI visual information according to claim 7, characterized in that, The process of applying scoring rules to initially score each defect area based on defect type and severity, and determining the consistency between image features and scoring criteria, includes: S421. Set an initial score value for each detected defect area in the image, with the default defect type set to the median value, and limit the score range. S422. Based on the image features of each defect area, assign a score for the current round according to the scoring rules, and calculate a weighted score by combining the historical detection performance to obtain a preliminary score. S423. Make a consistency judgment between the current scoring result and the standard scoring range. If the scoring deviation exceeds the threshold, make corrections based on image features to ensure the rationality of the scoring.
9. A bathroom towel rack end cap detection system based on AI visual information, used to implement the bathroom towel rack end cap detection method based on AI visual information as described in any one of claims 1-8, characterized in that, The system includes: The image acquisition module is used to acquire images of the bathroom towel rack end caps from different angles and extract the feature images of the bathroom towel rack end caps. The region analysis module is used to analyze the feature images of bathroom towel rack end caps based on the region analysis algorithm and identify the defective areas of the bathroom towel rack end caps. The defect identification module is used to identify defect areas using a defect segmentation algorithm to determine the defect type of the bathroom towel rack end cap. The quality evaluation and optimization module is used to automatically score the quality of bathroom towel rack end caps using a scoring algorithm based on defect type, generate a defect report, and adjust the production process in real time based on the defect report to optimize the production process and reduce the defect rate.