Defective walking stick detection method and shunting mechanism

By combining super-resolution technology and deep learning models, the problems of low image quality and insufficient model generalization ability in crutch detection were solved, and high-precision, fully automated defective product detection and diversion were achieved, improving production efficiency and quality control.

CN120672727APending Publication Date: 2025-09-19GREAT LASER TECH (SHENZHEN) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510814452.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Existing crutch detection technology has problems such as low image quality, low detection accuracy, insufficient model generalization ability, and lack of fully automated detection and diversion, resulting in unstable detection results and low production efficiency.

Method used

Super-resolution technology is used to improve image quality, combined with deep learning models for defect identification, and an automatic diversion mechanism is designed. Image data is acquired through visual inspection cameras, super-resolution technology is applied for detail enhancement, deep neural networks are used for training and analysis, adaptive data enhancement and mixed reality synthesizers are combined to increase the diversity of training data, and an intelligent diversion mechanism is designed to automatically separate defective products.

Benefits of technology

It improves detection accuracy and efficiency, enhances the generalization ability of the model, realizes fully automated defective product detection and diversion, and improves the quality control level of the production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120672727A_ABST
    Figure CN120672727A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of crutch production detection, in particular to a crutch defective product detection method and a distribution mechanism, which can perform detail enhancement and high-quality reconstruction on a crutch image by combining a super-resolution technology and a deep learning model, thereby improving the accuracy of defect identification. Particularly, the super-resolution algorithm based on attention mechanism guidance is utilized, the reconstruction key point can be dynamically adjusted according to the image content, the denoising degree is automatically adjusted, and excessive smoothing or noise amplification is avoided. In addition, through innovative model designs such as a space-time convolutional network, neural architecture search and a double-flow attention mechanism, the adaptability and classification capability of the model to different defect types are further enhanced. The high-precision automatic detection method not only improves the accuracy of defective product detection, but also greatly improves the detection speed and reduces manual intervention.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of crutch production detection, and in particular to a method for detecting defective crutch products and a diversion mechanism. Background Art

[0002] Currently, ensuring product quality during the crutch manufacturing process remains a significant challenge for the industry. Traditional inspection methods often rely on manual visual inspection, which is not only inefficient but also susceptible to subjective factors, resulting in unstable inspection results. With technological advancements, automated visual inspection systems have gradually been introduced, but some issues still exist: 1. Image quality and detection accuracy of automated visual inspection in existing technologies are key issues. Low-resolution images and noise interference often lead to subtle defects being overlooked, affecting detection accuracy.

[0003] 2. Existing detection models often have insufficient generalization capabilities, are difficult to adapt to different types of crutch defects, and have low classification accuracy.

[0004] 3. Traditional methods in current technologies often require manual intervention, which affects production efficiency.

[0005] Therefore, a method for detecting defective crutch products and a diversion mechanism are needed to solve the above problems. Summary of the Invention

[0006] The present invention provides a method for detecting defective crutch products and a diversion mechanism, which has the advantages of improving detection accuracy, enhancing model generalization capability, and realizing fully automated detection and diversion.

[0007] The technical solution adopted by the present invention to solve the above technical problems is: A method for detecting defective crutch products comprises the following steps: Step 1. Acquire image data of the crutch using a visual inspection camera, wherein the image data includes information about the appearance, connection locations, and surface quality of the crutch; Step 2. Apply super-resolution technology to enhance the details of the acquired low-resolution image to improve image quality; Step 3. De-noise, enhance, grayscale, and separate the enhanced image to facilitate analysis by the deep learning model. Step 4. Train the deep learning model: Based on a large amount of labeled training data, use a deep neural network to train the model; The training data includes different types of defective crutch sample data and normal crutch sample data; Step 5. Input the image data after denoising, image enhancement, grayscale processing, and image separation into the trained deep learning model. The model analyzes the image data and identifies and classifies the defect types in the image data. Step 6. Based on the analysis results of the deep learning model, the crutches with defects are automatically marked as defective and a defective product identification is generated; Step 7. Based on the marking results, the crutches marked as defective products are separated by controlling the diversion mechanism to ensure that defective products do not enter the subsequent production links.

[0008] Furthermore, in step 2, the super-resolution technology is applied to enhance the details of the acquired low-resolution image to improve the image quality, including: Step 2-1: Design and pre-train a super-resolution generative model; Step 2-2: For the trained super-resolution generative model, implement a multi-scale input strategy to input low-resolution images of different scaling ratios to improve image detail recovery; Step 2-3: Use a super-resolution algorithm guided by an attention mechanism to dynamically adjust the reconstruction focus according to the image content; Steps 2-4: Automatically adjust the denoising level in the super-resolution process based on the quality of the low-resolution image to prevent over-smoothing or amplifying noise; Steps 2-5: Use the super-resolution algorithm guided by the attention mechanism to dynamically adjust the focus of reconstruction according to the image content.

[0009] Furthermore, a perceptual loss function is applied during the training of the super-resolution generation model, combined with the high-level semantic features of the image to enhance the authenticity of the reconstructed image; a cycle consistency constraint is also added during the training of the super-resolution generation model, and a downscaling network is constructed and its loss is incorporated into the total loss function.

[0010] Furthermore, the image separation in step 3 includes decomposing the features of the image into color channels, texture channels and depth channels, and optimizing the color channels, texture channels and depth channels respectively, combining the image after removing the background and the features of different channels, and analyzing the image in a deep learning model.

[0011] Furthermore, in step 4, the deep learning model is trained using a deep neural network based on a large amount of labeled training data, including: Step 4-1: Data preparation and preprocessing; Step 4-2: Design the model architecture; Step 4-3: Define the loss function; Step 4-4: Train the model strategy; Step 4-5: Evaluate and validate the trained model.

[0012] Furthermore, the data preparation and preprocessing in step 4-1 include: Step 4-1-1: Introduce an adaptive data augmentation strategy. By analyzing the defect pattern distribution in the existing dataset, intelligently select and apply data augmentation techniques to ensure that each category has enough representative samples while avoiding overfitting. Step 4-1-2: Develop a mixed reality synthesizer that combines real crutch images and computer-generated defect features to create highly realistic synthetic defect samples and increase the diversity of training data; The model architecture design in step 4-2 includes: 4-2-1: Construct spatiotemporal convolutional network; 4-2-2: Introducing neural architecture search to automatically explore and optimize network structures suitable for specific defect types; 4-2-3: Design a two-stream attention mechanism to process local details and global structures in the image respectively; the loss function defined in step 4-3 includes: 4-3-1: Apply different perceptual loss items in stages according to the different levels of defects; 4-3-2: Introduce an adaptive weight adjustment mechanism to automatically adjust the weights of various loss items based on dynamic feedback during training to optimize training results.

[0013] Furthermore, in step 5, the acquired image data is input into the trained deep learning model, and the pre-processed image data is analyzed by the model to identify and classify the defect types in the image data, including: 5-1: Image input and feature extraction; 5-1-1: Input the low-resolution image data after denoising, image enhancement, grayscale processing and image separation into the trained super-resolution generation model, first performing image detail enhancement; 5-1-2: The enhanced high-resolution image is fed into the main detection model, which uses multi-scale feature fusion technology to extract image features at different levels; 5-2: Intelligent decision-making and feedback; 5-2-1: Apply reinforcement learning optimizer to dynamically adjust parameters during the recognition process and continuously optimize classification results based on real-time feedback; 5-2-2: For uncertain classification results, activate the auxiliary verification mechanism to ensure the accuracy and reliability of the final classification.

[0014] A diversion mechanism based on a crutch defective product detection method includes a crutch conveying platform, a conveying device and a material receiving platform. The conveying device is installed on the crutch conveying platform, and a diversion mechanism is installed on the crutch conveying platform. The material receiving platform is arranged on one side of the crutch conveying platform, and a material receiving mechanism is installed on the material receiving platform. A frame is installed on the crutch conveying platform, and a visual inspection camera is installed on the frame.

[0015] Furthermore, the diversion mechanism includes a bracket, a rotating rod, a driving cylinder and a support plate. The bracket and the driving cylinder are fixedly installed on the crutch conveying platform. The rotating rod is rotatably connected to the bracket. Multiple sliding rods are fixedly connected to the rotating rod. The support plate is fixedly connected to the bottom of the sliding rod. The output end of the driving cylinder is driven and connected to a piston rod, and the piston rod and the bottom of the support plate are connected to each other.

[0016] Furthermore, the material receiving mechanism includes a supporting stand, a material receiving frame and a material receiving rod. The material receiving frame is arranged between the material receiving platform and the crutch conveying platform. The material receiving frame is fixedly connected to the supporting stand. The material receiving rod is arranged below the material receiving frame. The material receiving rod is rotatably connected to the supporting stand through a spring return shaft. A defective product collection box is arranged below the material receiving rod.

[0017] The advantages of the present invention are: 1. Improve detection accuracy and efficiency: By combining super-resolution technology with deep learning models, this invention can enhance the details and reconstruct high-quality images of crutch images, thereby improving the accuracy of defect identification. In particular, the super-resolution algorithm guided by the attention mechanism can dynamically adjust the reconstruction focus according to the image content and automatically adjust the degree of denoising to avoid excessive smoothing or noise amplification. In addition, through innovative model designs such as spatiotemporal convolutional networks, neural architecture search, and dual-stream attention mechanisms, the model's adaptability and classification capabilities for different defect types are further enhanced. This high-precision automated detection method not only improves the accuracy of defective product detection, but also greatly increases detection speed and reduces manual intervention.

[0018] 2. Enhance the diversity and representativeness of training data: This invention introduces an adaptive data augmentation strategy and a mixed reality synthesizer. The adaptive data augmentation strategy ensures that each defect category has sufficient representative samples, while the mixed reality synthesizer can create realistic synthetic samples by combining real images and computer-generated defect features, significantly increasing the diversity of training data, effectively preventing model overfitting, and improving classification accuracy.

[0019] 3. Realize intelligent decision-making process and efficient diversion: This invention utilizes a reinforcement learning optimizer and an auxiliary verification mechanism to achieve dynamic parameter adjustment and reconfirmation of uncertain classification results, ensuring the accuracy and reliability of the final classification results. Furthermore, a diversion mechanism designed based on this detection method, including a crutch conveyor platform, a conveyor device, a material receiving platform, and its supporting visual inspection cameras and mechanical components, can quickly separate defective products based on the test results, ensuring that they do not enter subsequent production links. This series of measures ensures more intelligent and efficient product quality control on the production line, helping to improve the quality management level of the entire manufacturing process. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 The figure is a flow chart of a method for detecting defective crutch products according to the present invention.

[0022] Figure 2 This is a structural schematic diagram of the diversion mechanism of the crutch defective product detection method provided by the present invention.

[0023] Figure 3 for Figure 2 Schematic diagram of the enlarged structure of the middle diversion structure.

[0024] in: 1. Crutch conveyor; 2. Conveying device; 3. Diverting mechanism; 301, bracket; 302, rotating rod; 303, driving cylinder; 304, piston rod; 305, support plate; 306, slide rod; 4. Defective product collection box; 5. Material receiving rack; 6. Material receiving table; 7. Crutch; 8. Frame; 9. Visual inspection camera; 10. Material receiving rod; 11. Support frame. DETAILED DESCRIPTION

[0025] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0026] Example 1: Image quality and detection accuracy are currently key factors in the crutch production process. However, existing detection systems often perform poorly when processing low-resolution images and in the presence of noise. This makes it difficult to accurately identify subtle defects, thereby affecting the reliability of the overall detection system. In addition, existing models lack generalization and adaptability, making it difficult to cope with a variety of defect types and prone to overfitting. These issues severely restrict the accuracy and efficiency of the detection system. Furthermore, the lack of fully automated detection and diversion mechanisms makes it difficult to effectively improve production efficiency and quality control levels.

[0027] Specifically, on a cane production line, a visual inspection system is used to identify product defects. Equipped with an industrial camera with a resolution of 1280x720 pixels, the system captures images of the canes at 30 frames per second. However, due to the high production line speed and unstable lighting conditions, the images are often blurry or noisy. For example, when detecting tiny scratches on the surface of a cane, the system's recognition accuracy is only 75%. Furthermore, when encountering new types of defects or canes made of different materials, the system's detection performance deteriorates significantly, with a false alarm rate as high as 20%. In the diversion process, due to the lack of real-time feedback and automated control, operators need to manually sort out defective products, which not only reduces efficiency but also increases the risk of human error.

[0028] It can be seen that if these technical problems are not effectively resolved, a large number of defective products will enter the market, seriously affecting product quality and corporate reputation. Low detection accuracy may cause small but critical structural defects to be overlooked, potentially endangering user safety. In addition, the limitations of the detection system will restrict production line upgrades and product innovation because it cannot adapt to changes brought about by new materials or new designs. Manual diversion not only increases labor costs, but also may cause quality fluctuations due to human error. If these problems are not resolved, they will restrict the company's production efficiency and product competitiveness, hindering its long-term development in the market. Therefore, there is an urgent need for an innovative technical solution that can improve image quality, enhance model adaptability, and achieve fully automated detection and diversion.

[0029] To solve the above problems, the present invention proposes a method for detecting defective crutch products, comprising the following steps: acquiring image data of crutch through a visual inspection camera; applying super-resolution technology to perform detail enhancement on the acquired low-resolution image; performing denoising, image enhancement, grayscale processing and image separation on the enhanced image; using a deep neural network to perform model training based on a large amount of labeled training data; inputting the acquired image data into a trained deep learning model to identify and classify the defect types in the image data; automatically marking the defective crutch as defective based on the analysis results; separating the crutches marked as defective by controlling the diversion mechanism; and feeding back the detected defect information to the deep learning model for updating.

[0030] The visual inspection camera is a device used to collect crutch image data, and can be implemented using a high-speed industrial camera. Super-resolution technology is a method of converting low-resolution images into high-resolution images through algorithms, and can be implemented using a deep learning-based super-resolution algorithm.

[0031] The deep learning model refers to an artificial intelligence model used to analyze image data and identify defects, and can be implemented using a convolutional neural network. The diversion mechanism refers to a device used to separate defective products from the production line, and can be implemented using a robotic arm or pneumatic device.

[0032] The core of this invention is a comprehensive method for detecting defective crutches. This method combines super-resolution technology, image preprocessing, deep learning model training, and an automatic triage mechanism to form a complete inspection process. This method not only improves image quality and inspection accuracy, but also achieves fully automated defect identification and separation, while also enabling continuous optimization. The working principle of this invention can be divided into the following key steps: First, a visual inspection camera acquires image data of the crutch. This image data contains information about the crutch's appearance, connection locations, and surface quality. Next, super-resolution technology is applied to enhance the details of the acquired low-resolution image. This step significantly improves image quality, making subtle defect features easier to identify. The enhanced image then undergoes a series of preprocessing steps, including denoising, image enhancement, grayscale processing, and image separation. These preprocessing steps further optimize image quality, highlight key features, and lay the foundation for subsequent deep learning analysis. Based on a large amount of labeled training data, a deep neural network is used for model training. This training process enables the model to learn various types of defect features, improving its generalization and adaptability. During actual inspection, the acquired image data is fed into a trained deep learning model, which analyzes the images, identifying and classifying the types of defects within them. Based on the analysis results, the system automatically marks crutches containing defects as defective. Finally, the system controls the diversion mechanism to separate the crutches marked as defective, ensuring that defective products do not enter subsequent production stages. Simultaneously, the detected defect information is fed back to the deep learning model for updating, enabling continuous optimization of the model. The proposed method can effectively improve detection accuracy while achieving fully automated operation, significantly enhancing production efficiency and quality control.

[0033] As a preferred embodiment, the defective crutch detection method of the present invention can be specifically implemented as follows: The visual inspection camera used in this invention is a high-speed industrial camera with a resolution of 2048x1536 pixels, capturing images of the crutch at 60 frames per second. The camera is mounted 50 cm above the production line with a 45-degree shooting angle to ensure full coverage of all parts of the crutch. The captured images are fed into a pre-trained super-resolution generative model. This model utilizes the ESRGAN (Enhanced Super-Resolution Generative Adversarial Network) architecture, which increases the image resolution by fourfold, from 2048x1536 pixels to 8192x6144 pixels. This step effectively enhances image detail, making even tiny defects such as scratches and cracks more visible. The enhanced image is then preprocessed. First, denoising is performed using a Gaussian filter with a filter size of 5x5 and a standard deviation of 1.5. Contrast enhancement is then performed, using adaptive histogram equalization to divide the image into 8x8 blocks for processing. Grayscaling is then performed to convert the RGB image into an 8-bit grayscale image. Finally, image segmentation is performed and the crutches are separated from the background using the Otsu threshold method.

[0034] The preprocessed images are fed into a deep learning model for analysis. This model uses the ResNet-50 architecture and is trained on 100,000 labeled images of crutches. The model's input is 224x224 pixels, and it scans the entire high-resolution image using a sliding window. The model output includes probability distributions for four main defect categories (appearance defects, structural defects, connection defects, and surface finish defects) and 20 specific defect subcategories. If the probability of any defect category exceeds a preset threshold (for example, 0.8), the system marks the crutch as defective. The labeling results are transmitted to the control system via industrial Ethernet, which then activates the diverter mechanism. The diverter mechanism uses a pneumatic push rod with a length of 30 cm and a thrust of 50 N, capable of pushing defective products off the main production line within 100 ms. The final inspection results and corresponding image data are stored on a local server, and the model is updated every 24 hours. This update utilizes transfer learning, fine-tuning only the last few layers of the model to adapt to new defect types or changes in characteristics.

[0035] Through this implementation, the defective crutch detection method of the present invention can achieve high-precision, fully automated quality control, and significantly improve production efficiency and product quality.

[0036] The present invention further proposes a solution for enhancing the details of the acquired low-resolution images and improving the image quality by applying super-resolution technology. The solution includes designing and pre-training a super-resolution generation model; implementing a multi-scale input strategy for the trained super-resolution generation model, inputting low-resolution images of different scaling ratios, and improving image detail recovery; using a super-resolution algorithm guided by an attention mechanism to dynamically adjust the reconstruction focus according to the image content; automatically adjusting the denoising level in the super-resolution processing according to the quality of the low-resolution image to prevent excessive smoothing or amplification of noise; and using a super-resolution algorithm guided by an attention mechanism to dynamically adjust the reconstruction focus according to the image content. This technical solution aims to solve the problem of detail information loss due to low image resolution during the detection of defective crutches. By applying super-resolution technology, image quality can be effectively improved, detail information can be enhanced, and the accuracy and reliability of subsequent defect detection can be improved.

[0037] The super-resolution technology solution of the present invention includes the following key steps: First, a super-resolution generative model is designed and pre-trained. This step can use deep learning methods such as generative adversarial networks (GANs) or convolutional neural networks (CNNs). By training a large number of high- and low-resolution image pairs, the model can learn the mapping relationship from low resolution to high resolution.

[0038] Implement a multi-scale input strategy: For a trained super-resolution generative model, input low-resolution images at different scales. For example, the original low-resolution image can be scaled to 0.5x, 0.75x, and the original size before being fed into the model. This strategy helps the model capture image information from different scales, thereby improving image detail recovery.

[0039] The present invention adopts a super-resolution algorithm guided by an attention mechanism. The attention mechanism can help the model focus on important areas in the image and dynamically adjust the reconstruction focus according to the image content. For example, for small scratches on the surface of a crutch or tiny defects in the connection parts, the attention mechanism can guide the model to invest more computing resources in these areas, thereby obtaining more refined reconstruction results. The degree of denoising in the super-resolution processing is automatically adjusted according to the quality of the low-resolution image. This step can dynamically adjust the denoising intensity by analyzing the noise level of the input image. For images with greater noise, the denoising intensity is increased; for images with less noise, the denoising intensity is reduced. This can prevent excessive smoothing from causing loss of details, or noise from being amplified and affecting the reconstruction quality. Finally, the super-resolution algorithm guided by the attention mechanism is used again to dynamically adjust the reconstruction focus according to the image content. This step can further optimize the reconstruction results and ensure that key areas are adequately enhanced in detail.

[0040] Through the above steps, the super-resolution technology of the present invention can effectively improve the resolution and clarity of crutch images. For example, a crutch image with an original resolution of 640x480 can be transformed into a high-resolution image of 2560x1920 after super-resolution processing. This process significantly enhances details such as tiny scratches on the crutch surface and slight gaps in joints, providing more reliable image data for subsequent defect detection.

[0041] For implementation, a super-resolution model based on the Enhanced Super-Resolution Generative Adversarial Network (ESRGAN) can be used. This model uses the Residual Dense Block as its basic unit and introduces residual scaling to stabilize the training process. The model's discriminator adopts a relativistic discriminator structure to improve the realism of generated images.

[0042] During the training phase, a dataset containing a variety of crutch images can be used. These images should cover different types of crutch, different lighting conditions, and a variety of possible defects. The training dataset can contain 10,000 pairs of high-resolution and low-resolution images. The low-resolution images are 256x256 pixels, and the high-resolution images are 1024x1024 pixels. During training, the Adam optimizer is used with a learning rate of 0.0001, a batch size of 16, and 200,000 training iterations.

[0043] In practice, when a low-resolution 640x480 image of a cane is fed into a trained model, it is first resized to 256x256. The model then processes the image and outputs a high-resolution 1024x1024 image, which is then cropped to 2560x1920 to match the aspect ratio of the original image. This process typically takes about 0.5 seconds (based on an NVIDIA RTX 3080 graphics card).

[0044] By applying this super-resolution technique, detail in the cane image is significantly enhanced. For example, a 0.5 mm wide surface scratch, previously difficult to discern in the low-resolution image, becomes clearly visible in the processed high-resolution image. The gap at the joint is enhanced from a blurry 2-3 pixels to 8-10 pixels, significantly improving detection accuracy. Compared to traditional simple upscaling methods such as bilinear interpolation or bicubic interpolation, the super-resolution technique of the present invention not only increases the number of pixels in the image but also intelligently restores and generates detailed information. For example, for a cane surface defect that originally occupied only 4x4 pixels in a low-resolution image, traditional methods might simply upscale it to 16x16 pixels. However, the method of the present invention generates a 16x16 pixel area with more detail, making the defect's shape and texture more distinct. Furthermore, the method of the present invention effectively suppresses noise and artifacts. When processing low-quality input images, traditional methods may amplify noise, resulting in degraded output image quality. However, the method of the present invention, through adaptive denoising and an attention mechanism, effectively suppresses noise while improving resolution, maintaining overall image quality.

[0045] The super-resolution technology proposed in this paper significantly improves the quality of crutch images, providing clearer and more detailed image data for subsequent defect detection, thereby enhancing the accuracy and reliability of the entire defect detection system. This technology is not only applicable to crutch detection but can also be extended to other industrial inspection fields requiring high-precision image analysis, showing broad application prospects.

[0046] The present invention further proposes to apply a perceptual loss function during the training of a super-resolution generative model, combined with high-level semantic features of the image, to enhance the authenticity of the reconstructed image; and to simultaneously add a cycle consistency constraint during the training of the super-resolution generative model, by constructing a downscaling network and incorporating its loss into the total loss function, to ensure the consistency of the image conversion process and optimize the reconstruction effect. The technical solution proposed in the present invention aims to solve the problem of image reconstruction quality in the training of a super-resolution generative model. By introducing a perceptual loss function and a cycle consistency constraint, the solution can effectively improve the authenticity and consistency of the reconstructed image, thereby improving the accuracy of the detection of defective crutch products. Specifically, the technical solution of the present invention includes two main features: applying a perceptual loss function and adding a cycle consistency constraint.

[0047] The application of perceptual loss functions utilizes high-level semantic features of images. This loss function not only considers pixel-level differences but also focuses on the overall structure and semantic information of the image. For example, the perceptual loss can be calculated using intermediate-layer features from a pre-trained deep neural network (such as the VGG network). By comparing the differences between the generated and target images in these feature spaces, the high-level structural information of the image can be better captured. This approach produces more realistic and natural images, avoiding the oversmoothing and detail loss issues that can occur with traditional pixel-level loss functions. The cycle consistency constraint is implemented by constructing a downscaling network. This network converts the high-resolution image generated by super-resolution back to a low-resolution image. By comparing the differences between this reconstructed low-resolution image and the original low-resolution image, the consistency of the entire conversion process is ensured. This constraint prevents unnecessary artifacts or distortion in the super-resolution process, thereby improving the quality and reliability of the reconstructed image. These two features are closely related and interactive. The perceptual loss function focuses on the visual quality and realism of the reconstructed image, while the cycle consistency constraint ensures the stability and reversibility of the image conversion process. Combined, the two ensure consistency of the overall conversion process while preserving image detail and structure.

[0048] In practical applications, the effects of perceptual loss and cycle consistency loss can be balanced by adjusting their weights in the total loss function. For example, the weight of perceptual loss can be set to 0.1-0.5, and the weight of cycle consistency loss can be set to 0.05-0.2. The specific values ​​can be fine-tuned based on the actual training results.

[0049] The technical solution of the present invention significantly improves the quality of reconstructed images by applying a perceptual loss function and incorporating a cycle consistency constraint, addressing the problem of poor training performance in super-resolution generative models. The introduction of the perceptual loss function enables the model to learn higher-level image features, resulting in more realistic and natural high-resolution images. This is particularly important for defective crutch detection, as it better preserves defect details and improves detection accuracy. Furthermore, the inclusion of the cycle consistency constraint ensures consistency during the image conversion process. By constructing a downscaling network, the model not only learns how to generate high-resolution images, but also how to convert high-resolution images back to low-resolution images. This bidirectional learning process helps the model capture more image structural information and reduces artifacts or distortion that may be introduced during the super-resolution process. For defective crutch detection, this means more reliable image reconstruction results, thereby improving the accuracy of subsequent defect identification. Furthermore, the combination of these two techniques produces a synergistic effect. The perceptual loss function provides better visual quality guidance, while the cycle consistency constraint ensures that this quality improvement does not result in loss or distortion of image information. This balance is crucial for defective crutch detection, as it ensures high quality of the reconstructed image while maintaining the integrity of key defect information in the original image.

[0050] As a preferred implementation, it can be implemented by the following steps: First, we construct a super-resolution generation network G and a downscaling network F. G is used to convert low-resolution images into high-resolution images, while F converts high-resolution images back into low-resolution images. For a low-resolution input image x, G is used to generate a high-resolution image G(x). A pre-trained VGG19 network is used to extract feature maps from G(x) and the ground-truth high-resolution image y. The perceptual loss L_perceptual is calculated as the mean squared error between these feature maps. G(x) is then fed into the downscaling network F to obtain the reconstructed low-resolution image F(G(x)). The cycle consistency loss L_cycle is calculated as the mean squared error between F(G(x)) and the original low-resolution image x. The total loss function can be expressed as: L_total = L_pixel + λ1 *L_perceptual + λ2 * L_cycle, where L_pixel is the pixel-level loss and λ1 and λ2 are weight coefficients that can be adjusted based on the actual situation. The network is trained using an optimization algorithm such as stochastic gradient descent, iteratively updating the parameters until convergence. This allows the model to generate more realistic, detailed, and high-resolution images while maintaining consistency with the original low-resolution images. This is crucial for the image preprocessing stage of crutch defect detection, providing higher-quality input images and thus improving the accuracy of subsequent defect detection.

[0051] Compared with the prior art, the technical solution of the present invention has the following advantages: Compared to traditional methods that use only pixel-level loss functions, the perceptual loss function introduced in this paper can generate more realistic and natural images, avoiding problems such as oversmoothing and loss of detail. Compared with unidirectional super-resolution models, the cycle consistency constraint added in this paper provides a bidirectional learning mechanism, ensuring the reversibility and stability of the image transformation process, reducing the generation of artifacts and distortion.

[0052] By combining perceptual loss and cycle consistency constraints, the proposed method improves image quality while maintaining the integrity of the original image information, which is particularly important for identifying subtle defects in defective crutch inspection. The proposed technical solution significantly enhances the quality and reliability of reconstructed images by improving the training process of the super-resolution generative model, providing a better image foundation for subsequent defective crutch inspection, thereby improving the performance and accuracy of the entire inspection system.

[0053] The present invention further proposes to decompose the features of the image into color channel, texture channel and depth channel, and optimize the color channel, texture channel and depth channel respectively, combine the image after removing the background and the features of different channels, and analyze the image in the deep learning model. The image separation method proposed in the present invention aims to improve the accuracy and efficiency of the detection of defective crutches. By decomposing the image features into three channels of color, texture and depth, the various features of the crutches can be captured more comprehensively, thereby providing richer and more accurate input data for the subsequent deep learning model analysis. Specifically, the image separation method of the present invention includes the following steps: 1. Perform feature decomposition on the preprocessed crutch image. The color channel can be represented using RGB or HSV color space, the texture channel can be extracted using methods such as gray-level co-occurrence matrix or local binary pattern, and the depth channel can be obtained using techniques such as stereo vision or structured light.

[0054] 2. Perform individual optimizations on each channel. For example, color balancing and enhancement can be performed on the color channel, filters can be applied to the texture channel to highlight specific texture features, and depth map smoothing and completion can be performed on the depth channel.

[0055] 3. Combine the images after background removal. Background removal can be achieved through methods such as threshold segmentation or semantic segmentation to highlight the features of the crutch itself.

[0056] 4. The optimized channel features are fused with the background-removed image and used as input for the deep learning model. This multi-channel fusion approach allows the model to simultaneously focus on multiple aspects of the cane, such as color, texture, and shape.

[0057] Through this approach, the present invention can more effectively process complex crutch surface features, such as tiny scratches, color aberrations, or structural deformations. For example, for surface scratches, optimizing the texture channel can enhance their visibility; for color aberrations, processing the color channel can better capture subtle color changes; and for structural deformations, information from the depth channel can provide key 3D shape features.

[0058] Furthermore, the image separation method of the present invention, combined with a deep learning model, can achieve more efficient feature extraction and analysis. For example, a multi-branch neural network structure can be designed, with each branch processing the features of a channel, and then performing feature fusion at the back end of the network. This structure allows the model to better utilize information from different channels, improving detection accuracy.

[0059] As a preferred embodiment, the present invention can implement image separation and optimization by adopting the following specific steps: Color channel processing: Convert the RGB image to the HSV color space and perform histogram equalization on the H (hue), S (saturation), and V (brightness) components to enhance color contrast.

[0060] Texture channel processing: Use Gabor filter banks to extract multi-scale and multi-directional texture features, and then use principal component analysis (PCA) to reduce the dimension and retain the most significant texture information.

[0061] Depth channel processing: Binocular stereo vision technology is used to obtain the depth map, and then a bilateral filter is used for smoothing to reduce noise while retaining edge information.

[0062] Background removal: Use the GrabCut algorithm to segment the foreground (crutch) and background to obtain a mask image of the crutch.

[0063] Feature fusion: The processed color, texture, and depth channels are multiplied and fused with the mask image at the pixel level to obtain the final multi-channel feature map.

[0064] Deep learning model input: The fused feature map is input into a pre-trained deep convolutional neural network for defect detection and classification.

[0065] Through this implementation, the present invention can fully utilize the multi-dimensional features of crutch images, significantly improving the accuracy of defective product detection. For example, Gabor filtering in the texture channel can effectively enhance the visibility of tiny surface scratches; processing in the HSV space can more sensitively capture color changes for color aberration; and for structural deformation, the depth channel can provide accurate three-dimensional shape information.

[0066] Compared with the prior art, the image separation method of the present invention has the following advantages: Multi-dimensional feature extraction: Compared with traditional single grayscale image analysis, this invention comprehensively captures the characteristics of the crutch through three dimensions of color, texture and depth, greatly improving the sensitivity and accuracy of detection.

[0067] Targeted optimization: Optimizing each channel individually can enhance specific defect characteristics, such as surface scratches, color differences, or structural deformations.

[0068] Background interference elimination: By combining background removal technology, the impact of background noise on detection results is effectively reduced, allowing the model to focus more on the feature analysis of the crutch itself.

[0069] Seamless integration with deep learning: Multi-channel feature maps can be directly used as input to deep learning models, giving full play to the advantages of deep learning in feature extraction and classification.

[0070] Strong adaptability: This method can flexibly cope with different types of crutch materials and surface treatments, such as metal, plastic, wood, etc., and has a wide range of applicability.

[0071] This invention further proposes a method for detecting defective crutches, comprising the following steps: data preparation and preprocessing; model architecture design; loss function definition; model strategy training; and evaluation and validation of the trained model. This method optimizes the training process of deep learning models through systematic steps, thereby improving model performance and adaptability. Specifically, the data preparation and preprocessing phase ensures the quality and diversity of training data; the model architecture design phase is optimized for the specific requirements of crutch defect detection; the loss function definition helps the model better learn target features; the strategy training phase utilizes advanced training techniques; and the final evaluation and validation phase ensures the model's effectiveness. During the data preparation and preprocessing phase, an adaptive data augmentation strategy can be employed. This strategy intelligently selects and applies data augmentation techniques by analyzing the distribution of defect patterns in an existing dataset. For example, for common defects such as surface scratches, image rotation and scaling augmentation might be added; while for rarer structural defects, more complex synthesis techniques might be employed. Furthermore, a mixed reality synthesizer is developed that combines real crutch images with computer-generated defect features to create highly realistic synthetic defect samples. This approach can generate a variety of defects of varying degrees and types, such as tiny surface cracks or complex structural deformations, thereby greatly increasing the diversity of training data.

[0072] During the model architecture design phase, a spatiotemporal convolutional network was constructed. This network not only processes single-frame images but also combines multi-frame sequence information, enabling it to capture defect characteristics of a crutch as it dynamically changes on the production line. For example, a spatiotemporal convolutional network can detect loose defects at joints by analyzing subtle changes in component position across consecutive frames. Neural architecture search was introduced to automatically explore and optimize network structures suitable for specific defect types. This approach can automatically adjust the depth, width, and connectivity of the network for different types of defects (such as surface scratches and structural deformations), thereby reducing the complexity and uncertainty of manual design. A dual-stream attention mechanism was designed to separately process local details and global structures in the image. For example, when detecting tiny scratches on the surface of a crutch, one attention stream can focus on local texture changes, while the other stream focuses on the overall shape and structure, enabling the model to more accurately identify tiny or complex defects.

[0073] When defining the loss function, different perceptual loss terms are applied in stages, depending on the different levels of the defect (e.g., the surface texture and geometric shape of a crutch). For example, for surface texture defects, more reliance may be placed on the perceptual loss of low-level features; whereas for geometric shape defects, more emphasis may be placed on the perceptual loss of high-level features. This ensures that the reconstructed image is close to reality at all levels. An adaptive weight adjustment mechanism is introduced to automatically adjust the weights of various loss terms based on dynamic feedback during training. For example, if the model performs poorly in identifying a certain type of defect (e.g., surface stains), the system automatically increases the weight of the relevant loss term to optimize the training effect.

[0074] During the model's policy training phase, a progressive learning strategy can be employed. Initially, simple defect samples, such as obvious surface scratches or color anomalies, are used for training, followed by the gradual introduction of more complex and subtle defect samples, such as subtle structural deformations or slightly loose connections. This approach helps the model gradually build its ability to recognize defects of varying complexity. Furthermore, a multi-task learning framework can be implemented to simultaneously train the model for defect detection, classification, and localization. For example, the model must not only identify the presence of a defect on a crutch, but also determine the specific defect type (such as surface scratches or structural deformation) and its precise location. This multi-task learning approach can improve the model's overall performance and generalization capabilities.

[0075] During the evaluation and validation phase of the trained model, cross-validation techniques can be used to assess the model's generalization ability. Specifically, the dataset can be divided into multiple subsets, with one subset used alternately as the validation set and the remaining subsets as the training set. This approach effectively evaluates the model's performance under different data distributions. Furthermore, adversarial sample testing can be introduced to generate unique and challenging examples of crutches to test the model's robustness. For example, examples of edge case defects, such as very small surface scratches or unusual complex defects, can be created to assess the model's extreme performance.

[0076] Through this systematic deep learning model training method, the present invention can significantly improve the accuracy and reliability of crutch defective product detection. The use of adaptive data augmentation and mixed reality synthesizers greatly increases the diversity of training data, enabling the model to better identify defects of various types and degrees. The introduction of spatiotemporal convolutional networks and dual-stream attention mechanisms enables the model to capture static and dynamic features simultaneously, improving the ability to recognize complex defects. The application of hierarchical perceptual loss and adaptive weight adjustment mechanisms ensures that the model can accurately learn defect features at different levels. The progressive learning and multi-task learning frameworks further enhance the generalization ability and overall performance of the model. Finally, a rigorous evaluation and verification process, including cross-validation and adversarial sample testing, ensures the reliability of the model in practical applications.

[0077] As a preferred implementation, the following specific steps can be adopted in the data preparation and preprocessing stage: First, collect a large number of crutch images, including normal samples and samples of various types of defects. For example, you can collect 1,000 normal crutch images, 500 surface scratch images, 300 structural deformation images, and 200 loose connection images.

[0078] Next, we use an adaptive data augmentation strategy. For surface defects like scratches and stains, we can apply enhancement methods such as random rotation (-15° to +15°), horizontal flipping, and brightness adjustment (±20%). For structural defects like deformation, we can apply more complex enhancement techniques such as perspective transformation and local warping.

[0079] Then, a mixed reality synthesizer is used to create synthetic defect samples. For example, scratches of varying lengths (ranging from 1mm to 10mm) can be synthesized onto a normal crutch image, or structural deformations of varying degrees (bending angles ranging from 1° to 5°) can be simulated.

[0080] Finally, all images are normalized, including resizing to a uniform resolution (e.g., 224x224 pixels), normalizing pixel values ​​(to a range of 0-1), and performing color space conversion (e.g., converting RGB to HSV). These steps ensure the quality and diversity of the training data, laying a solid foundation for subsequent model training. Compared to existing technologies, the method presented in this paper offers significant advantages in the following aspects: During the data preparation phase, the method incorporates an adaptive data augmentation strategy and a mixed reality synthesizer. Compared to simple data augmentation techniques (such as random cropping and flipping) used in traditional methods, this method generates more targeted and diverse training samples. For example, while traditional methods may struggle to capture subtle scratches on a cane, the method presented in this paper uses a mixed reality synthesizer to accurately simulate scratches of varying degrees, significantly improving the model's ability to detect subtle defects. In terms of model architecture design, the method presented in this paper utilizes a spatiotemporal convolutional network and a two-stream attention mechanism. Compared to conventional single convolutional neural networks, this method can simultaneously process both static and dynamic features, making it more suitable for real-time inspection on production lines. For example, when detecting loose connections, traditional methods may only be able to make judgments based on a single-frame image, while the method of the present invention can more accurately identify such dynamic defects by analyzing subtle changes in consecutive frames. In terms of loss function definition and training strategy, the present invention introduces a hierarchical perceptual loss and an adaptive weight adjustment mechanism. This is more flexible than the traditional fixed-weight loss function and can dynamically adjust the importance of each loss term based on feedback during the training process. For example, if the model performs poorly in identifying a certain type of defect, the method of the present invention can automatically increase the weight of the relevant loss term, thereby improving the model performance in a targeted manner. In the model evaluation and verification stage, the present invention adopts advanced technologies such as cross-validation and adversarial sample testing. This can more comprehensively evaluate the generalization ability and robustness of the model than a simple training set-test set division. For example, through adversarial sample testing, the performance of the model in the face of extreme or rare defects can be evaluated, which improves the accuracy, reliability and adaptability of crutch defective product detection and provides strong support for improving product quality control levels.

[0081] This invention introduces an adaptive data augmentation strategy and a mixed reality synthesizer to generate more diverse and realistic training samples. The adaptive data augmentation strategy intelligently analyzes the distribution of defect patterns in an existing dataset and selectively selects and applies data augmentation techniques. For example, for more common defects such as surface scratches, basic augmentation techniques such as rotation and scaling are applied; for rarer structural defects, more complex augmentation methods such as elastic deformation or local distortion may be employed. This strategy ensures sufficient representative samples for each defect type while avoiding overfitting caused by excessive enhancement. The introduction of the mixed reality synthesizer further improves the quality and diversity of training data. By combining real crutch images with computer-generated defect features, highly realistic synthetic defect samples can be created. For example, varying degrees of cracks, deformation, or surface treatment defects can be added to real crutch images. These synthetic samples not only appear realistic but also simulate a variety of rare or difficult-to-obtain defect conditions. This approach significantly expands the training dataset, enabling the model to learn a wider range of defect features, thereby improving the model's generalization ability. In terms of model architecture design, this invention utilizes several innovative technologies. The introduction of a spatiotemporal convolutional network (STN) enables the model to process both single-frame images and multi-frame sequences. This is particularly important for capturing the dynamic changes of a crutch on the production line. For example, certain defects may only be clearly visible at specific angles or in certain motion states. STNs effectively capture these transient features. In practice, networks can be constructed using 3D convolutional layers or by combining 2D convolutional layers with LSTM layers to simultaneously process information in both spatial and temporal dimensions.

[0082] The dual-stream attention mechanism enables the model to simultaneously focus on local details and global structure. One stream focuses on processing local image features, such as surface texture and minor scratches; the other stream focuses on the overall structure, such as the shape of the crutch and the relative positions of its components. This approach enables the model to more comprehensively understand the image content and improve its ability to identify complex defects. For example, when detecting defects in joints, the local stream can focus on subtle anomalies in welds, while the global stream can determine whether the overall structure is misaligned or deformed.

[0083] In defining the loss function, this paper employs a hierarchical perceptual loss and an adaptive weight adjustment mechanism. This method applies different perceptual loss terms in stages, depending on the defect's layer (e.g., surface texture, geometry). For example, for surface texture defects, more emphasis may be placed on reconstructing low-level features, while for structural defects, greater emphasis may be placed on maintaining consistency in high-level semantic features. This approach ensures that the reconstructed image closely resembles the real sample at all levels.

[0084] The adaptive weight adjustment mechanism automatically adjusts the weights of various loss terms based on dynamic feedback during training. For example, if the model performs poorly on a certain type of defect, the system automatically increases the weight of the corresponding loss term to guide the model's learning focus on this type of defect. This mechanism continuously optimizes the model's learning direction during training, improving overall detection performance.

[0085] As a preferred implementation, the following steps can be specifically implemented: First, during the data preparation phase, adaptive data augmentation strategies are employed. For example, for surface scratches, enhancement techniques such as random rotation (0-360 degrees), scaling (0.8-1.2x), and brightness adjustment (±20%) can be applied. For structural defects, methods such as elastic deformation (σ = 4, α = 50) and local distortion (maximum distortion angle 15 degrees) can be used. Simultaneously, a mixed reality synthesizer is used to generate synthetic samples. For example, computer-generated cracks (1-5 cm in length, 0.1-0.5 mm in width) can be added to real crutch images, or surface coating peeling (1%-5% area) can be simulated.

[0086] Secondly, during the model architecture design phase, a spatiotemporal convolutional network is constructed. 3D convolutional layers (with a kernel size of 3x3x3) can be used to simultaneously process information in both spatial and temporal dimensions. Neural architecture search is used to automatically explore network structures, with the search space encompassing parameters such as the number of layers (8-20), kernel size (1x1, 3x3, 5x5), and number of channels (32-256). When implementing the dual-stream attention mechanism, spatial and channel attention modules can be used to focus on spatial and channel features of the image, respectively.

[0087] Finally, during the loss function definition phase, a layered perceptual loss is implemented. For example, for surface texture defects, the perceptual loss can be calculated using the feature maps of the first few layers of the VGG network; for structural defects, feature maps from deeper layers are used. An adaptive weight adjustment mechanism dynamically adjusts the weights of each loss term based on the training results of each batch, with the adjustment range set to 0.1-10 times the initial weight.

[0088] Through the above implementation methods, the present invention can significantly improve the accuracy and efficiency of crutch defective product detection. Adaptive data augmentation and mixed reality synthesis technology greatly increase the diversity of training data, enabling the model to learn a wider range of defect characteristics. The application of spatiotemporal convolutional networks and dual-stream attention mechanisms enables the model to more comprehensively analyze crutch images and capture static and dynamic defect characteristics. Neural architecture search ensures the optimization of the model structure and improves detection efficiency. The layered perceptual loss and adaptive weight adjustment mechanism further optimize the model training process, enabling the model to more accurately identify various types of defects, so that the method of the present invention can more comprehensively, accurately and efficiently perform crutch defective product detection, significantly improving the level of product quality control.

[0089] In step 5 of the present invention, the acquired image data is input into a trained deep learning model, which then analyzes the preprocessed image data to identify and classify the types of defects in the image data. By introducing advanced image processing and deep learning technologies, efficient and accurate detection of defective crutches is achieved. The method first performs super-resolution processing on the acquired low-resolution images to improve image quality. Then, multi-scale feature fusion technology is used to extract image features at different levels, enhancing the model's ability to identify various types of defects. Furthermore, the introduction of a reinforcement learning optimizer and an auxiliary verification mechanism further improves the accuracy and reliability of the classification results.

[0090] Specifically, the following steps are included: 1. Image input and feature extraction are performed. The pre-processed low-resolution image data is then fed into a trained super-resolution generative model to enhance image detail. This step can employ a variety of super-resolution algorithms, such as the deep learning-based SRCNN (Super-Resolution Convolutional Neural Network) or ESRGAN (Enhanced Super-Resolution Generative Adversarial Networks). For example, ESRGAN can upscale an input 64x64 pixel image to 256x256 pixels, significantly improving image clarity and detail.

[0091] 2. The enhanced high-resolution image is then fed into the main detection model, which uses multi-scale feature fusion techniques to extract image features at different levels. This is achieved by designing a deep neural network consisting of multiple convolutional and pooling layers, with each layer extracting features at a different scale. For example, shallow layers may focus on local features such as edges and textures, while deeper layers may capture more abstract global structural features. These features can be fused using methods such as skip connections or feature pyramid networks (FPNs) to obtain a more comprehensive image representation.

[0092] 3. Intelligent Decision-Making and Feedback: This paper introduces a reinforcement learning optimizer that dynamically adjusts parameters during the recognition process and continuously optimizes classification results based on real-time feedback. This can be achieved by designing a policy gradient-based reinforcement learning algorithm. For example, classification accuracy can be used as a reward signal, allowing the model to learn how to adjust its internal parameters to maximize long-term rewards. Specifically, an initial learning rate of 0.001 can be set, and then dynamically adjusted based on the classification results of each batch, ranging from 0.0001 to 0.01.

[0093] For uncertain classification results, the present invention activates an auxiliary verification mechanism to ensure the accuracy and reliability of the final classification. This can be achieved by setting a confidence threshold. For example, when the model's classification confidence for a certain sample is less than 0.8, the auxiliary verification is triggered. Auxiliary verification can use ensemble learning methods, such as random forests or gradient boosted decision trees, to perform secondary classification on uncertain samples. Another method is to use Bayesian reasoning to evaluate the uncertainty of the classification results by calculating the posterior probability distribution.

[0094] In this way, the present invention can effectively improve the accuracy and efficiency of defective crutch detection. Super-resolution processing enhances the quality of input images, making subtle defects easier to detect. Multi-scale feature fusion technology strengthens the model's ability to identify defects of different types and scales. The reinforcement learning optimizer dynamically adjusts parameters, enabling the model to adapt to the characteristics of different batches of images, improving the model's generalization ability. The auxiliary verification mechanism further reduces the false positive rate, especially for difficult-to-classify edge cases.

[0095] As a preferred embodiment, the technical solution of the present invention can be applied in real time on a crutch production line. For example, a frame is installed above the conveyor, and a high-speed camera is mounted on the frame to capture 30 frames of images per second. After preprocessing, these images are fed into the deep learning model described above for analysis. The model can complete defect detection and classification of a single crutch in 0.1 seconds. For crutches identified as defective, the system can immediately send a signal, triggering a diversion mechanism to remove them from the production line.

[0096] In addition, the technical solution of the present invention can also be integrated with the production management system. For example, a real-time monitoring panel can be set up to display key indicators such as the current test results and defective product rate. The system can also automatically generate daily reports containing statistical data on various defects to help production managers promptly discover and resolve potential quality problems. Compared with the existing technology, the technical solution of the present invention has significant advantages. Traditional methods for detecting defective crutch products usually rely on manual visual inspection or simple machine vision systems. These methods are easily affected by human factors and have difficulty identifying complex or subtle defects. In contrast, the deep learning method of the present invention can automatically learn and identify various types of defects, greatly improving the accuracy and consistency of detection. In addition, the method of the present invention can process large amounts of image data in real time, significantly improving detection efficiency. For example, on a typical crutch production line, the method of the present invention can increase the detection speed to 100 pieces per minute, while increasing the detection accuracy to more than 99%, far exceeding the performance of traditional methods.

[0097] The present invention also proposes a diversion mechanism based on the cane defective product detection method, comprising a cane conveyor platform, a conveyor device, and a receiving platform. The conveyor device is mounted on the cane conveyor platform, and the diversion mechanism is mounted on the cane conveyor platform. The receiving platform is located on one side of the cane conveyor platform, and the receiving mechanism is mounted on the receiving platform. A frame is mounted on the cane conveyor platform, and a visual inspection camera is mounted on the frame.

[0098] The diversion mechanism proposed in this invention is designed to automatically detect and separate defective crutch products. By rationally arranging and integrating the conveyor, diversion mechanism, material receiving mechanism, and visual inspection camera, a complete crutch quality control system is formed.

[0099] Specifically, the cane conveyor platform serves as the foundation for the entire system, providing support and mounting space for other components. A conveyor is installed on the platform to transport canes for inspection, ensuring a stable and orderly flow of canes through the inspection area. A diversion mechanism is also installed on the platform, adjacent to the conveyor, to separate defective products from normal products based on inspection results.

[0100] The receiving station is located on one side of the cane conveyor platform, aligning with the working direction of the diverter mechanism. The receiving mechanism is mounted on the receiving station and receives defective products separated by the diverter mechanism and directs them to a specific collection area. Specifically, the receiving mechanism in the present invention comprises a support frame, a receiving rack, and a receiving rod. The receiving rack is located between the receiving station and the cane conveyor platform, fixedly connected to the support rack. The receiving rod is located below the receiving rack and pivotally connected to the support rack via a spring-return shaft. The receiving rod cushions the impact of receiving defective products, minimizing any additional damage to the products during the separation process. The spring-return shaft allows the receiving rod to automatically return to its original position after receiving a defective product, ready to receive the next defective product. The provision of a defective product collection box facilitates subsequent processing and analysis. A frame mounted above the conveyor mechanism provides a stable mounting location for a visual inspection camera. The visual inspection camera, mounted on the frame, captures clear and complete image data of the canes. Canes are transported via the conveyor mechanism, passing through the visual inspection camera's inspection area, whereupon the inspection results are transmitted to the diverter mechanism. The diversion mechanism responds quickly based on the test results, separates defective products, and collects them through the receiving mechanism.

[0101] The design of the diversion mechanism of this invention takes several key factors into consideration. First, the conveyor speed matches the acquisition frequency of the visual inspection camera, ensuring that every crutch is fully captured and analyzed. Second, the diversion mechanism's response speed and accuracy are optimized to accurately identify and separate defective products without affecting the delivery of normal products. Furthermore, the design of the receiving mechanism takes into account the characteristics of defective products, ensuring that separated products can be safely and efficiently collected to prevent secondary damage.

[0102] As a preferred implementation, the visual inspection camera can be a high-resolution, high-frame-rate industrial camera, such as one with a resolution of 4K (3840 x 2160 pixels) and a frame rate of at least 60 fps. This ensures clear, detailed images can be captured even with the crutch's rapid movement. The conveyor can be a variable-frequency belt conveyor with an adjustable speed range of 0.1-2 m / s to accommodate varying production rhythms and inspection requirements.

[0103] The diversion mechanism can use a pneumatic or electric push rod structure, with a response time of less than 50ms and a thrust force selected based on the weight of the crutch (usually within the range of 50-200N). The material receiving mechanism can be designed as an inclined slide structure with an inclination angle between 15° and 30°, and the surface can be made of a low-friction material such as polytetrafluoroethylene to ensure that defective products slide smoothly into the collection box.

[0104] Through this integrated design, the diversion mechanism of the present invention realizes the full automation of the detection of defective crutch products. Compared with traditional manual detection, it has the following advantages: 1. Significantly improved inspection efficiency: Visual inspection cameras can complete comprehensive inspections of crutches in a very short time, with a processing speed of hundreds of pieces per minute, far exceeding the speed of manual inspection.

[0105] 2. Significantly improved detection accuracy: High-resolution cameras combined with advanced image processing algorithms can identify subtle defects that are difficult to detect with the naked eye, with a detection accuracy of over 99%.

[0106] 3. Labor costs are greatly reduced: The automated system can work 24 hours a day, reducing the large amount of manpower required for manual inspection.

[0107] 4. Enhanced data tracking and analysis capabilities: The system can automatically record the test results of each crutch, providing a large amount of valuable data for subsequent quality analysis and production optimization.

[0108] 5. Improved production efficiency: Due to the fast detection speed and high accuracy, rework caused by misjudgment is reduced, and the operating efficiency of the entire production line is improved.

[0109] In actual application, the diversion mechanism of the present invention is applied to the end of a crutch production line. The crutch conveyor platform is 3 meters long, 0.8 meters wide, and 0.9 meters high, and is made of 304 stainless steel. The conveying device is a belt conveyor with a width of 0.6 meters, and the speed can be adjusted between 0.2-1.5m / s. The frame is built with aluminum profiles and has a height of 1.2 meters. An industrial camera with a 4K resolution and a frame rate of 120fps is installed 0.5 meters away from the surface of the conveyor mechanism. The diversion mechanism adopts a pneumatic push rod design and is installed on one side of the conveyor mechanism, 1 meter away from the camera detection area. The stroke of the push rod is 0.3 meters, the maximum thrust is 150N, and the response time is 30ms. The receiving platform is located opposite the diversion mechanism, 1.5 meters long and 0.5 meters wide. A defective product collection box with a volume of 0.5 cubic meters is placed between the crutch conveyor platform and the receiving platform.

[0110] In actual operation, a cane passes through the conveyor at a speed of 0.5 m / s. When a cane enters the camera's field of view, the system immediately captures and analyzes the image. If a defect is detected, the control system precisely triggers a push rod when the cane reaches the diversion mechanism, pushing the defective product toward the receiving chute. The entire process, from detection to diversion, is completed in less than 1.5 seconds. This design enables the diversion mechanism to process 20-30 canes per minute with an accuracy of 99.5%, significantly improving production efficiency and product quality.

[0111] Compared with the prior art, the diversion mechanism of the present invention has obvious advantages in the following aspects: Higher integration: The present invention integrates visual inspection, automatic diversion and defective product collection into a compact system, which takes up little space and is more convenient to install and maintain.

[0112] Faster response speed: By optimizing the control algorithm and selecting high-performance components, the diversion mechanism of the present invention can complete the entire process from detection to diversion within milliseconds, greatly improving the operating efficiency of the production line.

[0113] Greater adaptability: The system of the present invention can easily adapt to the detection requirements of crutches of different models and materials by adjusting the transmission speed, camera parameters and the settings of the diversion mechanism, thereby enhancing the versatility and flexibility of the system.

[0114] Stronger data integration capabilities: The present invention not only realizes automated detection and diversion, but also can record and analyze detection data in real time, providing strong support for production management and quality control.

[0115] Through these innovative designs and optimizations, the diversion mechanism of the present invention effectively solves the problems of low efficiency and insufficient precision in traditional crutch detection, and provides an efficient and reliable quality control solution for crutch manufacturers.

[0116] Specifically, the diversion mechanism in the present invention includes a bracket, a rotating rod, a driving cylinder and a support plate. The bracket and the driving cylinder are fixedly installed on the crutch conveying platform. The rotating rod is rotatably connected to the bracket. Multiple sliding rods are fixedly connected to the rotating rod. The support plate is fixedly connected to the bottom of the sliding rod. The output end of the driving cylinder is driven and connected to a piston rod, and the piston rod and the bottom of the support plate are connected to each other.

[0117] The diversion mechanism design of the present invention cleverly combines mechanical structure and pneumatic control, which can achieve fast and accurate separation of defective products. The bracket serves as the skeleton of the entire mechanism, providing stable support for other components. The design of the rotating rod allows the pallet to rotate, increasing the flexibility of diversion. The setting of multiple sliding rods not only enhances the stability of the pallet, but also can be adjusted according to crutches of different sizes. The combination of the drive cylinder and the piston rod provides a fast and accurate driving force, ensuring that the pallet can respond to the detection results in a timely manner. Specifically, when a defective product is identified, the drive cylinder will be quickly activated and push the pallet through the piston rod. The pallet then rotates around the rotating rod to separate the defective products from the main production line. The design of multiple sliding rods ensures that the pallet remains stable during rotation, preventing the crutches from tipping over or being damaged during the diversion process. This design not only improves the efficiency of diversion, but also minimizes interference with the normal production process.

[0118] The diversion mechanism of the present invention exhibits significant advantages in practical applications. For example, the driving cylinder pressure and piston rod stroke can be adjusted according to production line speed and crutch size to achieve optimal diversion. The number and spacing of the slide bars can also be adjusted to accommodate crutch sizes of varying sizes. Furthermore, the entire mechanism is designed for ease of maintenance and cleaning, allowing for quick disassembly and assembly, facilitating routine maintenance and replacement.

[0119] As a preferred embodiment, the driving cylinder can be a double-acting cylinder, the diameter of the cylinder can be selected to be 50mm, and the stroke of the piston rod can be set to 100mm. The rotating rod can be made of stainless steel with a diameter of 20mm, and the length is determined according to the width of the crutch conveyor platform, for example, it can be set to 600mm. The sliding rod can be made of aluminum alloy with a diameter of 15mm and a length of 200mm, with 4-6 rods evenly distributed on the rotating rod. The support plate can be made of high-strength engineering plastic with a thickness of 10mm, and a length and width of 400mm and 300mm respectively. These specific parameters can be fine-tuned according to the needs of the actual production line.

[0120] The diversion mechanism of this invention is tightly integrated with the previously described method for detecting defective crutch products, forming a complete quality control system. The detection method provides accurate defective product identification results, while the diversion mechanism ensures that these results are quickly translated into actual separation. This combination not only improves the automation level of the entire production line but also significantly enhances the efficiency and accuracy of quality control.

[0121] Compared with existing technologies, the diversion mechanism of the present invention has significant advantages. Traditional diversion methods often rely on manual operation or simple mechanical devices, which are slow to respond, have low precision, and are prone to misjudgments and missed judgments. However, the design of the present invention achieves rapid response through pneumatic control, and the multi-slide structure ensures the stability of the diversion process, greatly reducing the possibility of misoperation. In addition, the design of the present invention has good adaptability and can be easily integrated into existing production lines without the need for large-scale renovations, thereby reducing implementation costs.

[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting defective crutch products, characterized in that: The following steps are involved: Step 1. Acquire image data of the crutch using a visual inspection camera, wherein the image data includes information about the appearance, connection locations, and surface quality of the crutch; Step 2. Apply super-resolution technology to enhance the details of the acquired low-resolution image to improve image quality; Step 3. De-noise, enhance, grayscale, and separate the enhanced image to facilitate analysis by the deep learning model. Step 4. Train the deep learning model: Based on a large amount of labeled training data, use a deep neural network to train the model; The training data includes different types of defective crutch sample data and normal crutch sample data; Step 5. Input the image data after denoising, image enhancement, grayscale processing, and image separation into the trained deep learning model. The model analyzes the image data and identifies and classifies the defect types in the image data. Step 6. Based on the analysis results of the deep learning model, the crutches with defects are automatically marked as defective and a defective product identification is generated; Step 7. Based on the marking results, the crutches marked as defective products are separated by controlling the diversion mechanism to ensure that defective products do not enter the subsequent production links.

2. The method for detecting defective crutch according to claim 1, wherein: In step 2, the super-resolution technology is applied to enhance the details of the acquired low-resolution image to improve the image quality, including: Step 2-1: Design and pre-train a super-resolution generative model; Step 2-2: For the trained super-resolution generative model, implement a multi-scale input strategy to input low-resolution images of different scaling ratios to improve image detail recovery; Step 2-3: Use a super-resolution algorithm guided by an attention mechanism to dynamically adjust the reconstruction focus according to the image content; Steps 2-4: Automatically adjust the denoising level in the super-resolution process based on the quality of the low-resolution image to prevent over-smoothing or amplifying noise; Steps 2-5: Use the super-resolution algorithm guided by the attention mechanism to dynamically adjust the focus of reconstruction according to the image content.

3. The method for detecting defective crutch according to claim 2, wherein: During the training of the super-resolution generation model, the perceptual loss function is applied, combined with the high-level semantic features of the image, to enhance the authenticity of the reconstructed image; during the training of the super-resolution generation model, the cycle consistency constraint is also added, and a downscaling network is constructed and its loss is incorporated into the total loss function.

4. The method for detecting defective crutch according to claim 1, wherein: The image separation in step 3 includes decomposing the features of the image into color channels, texture channels, and depth channels, and optimizing the color channels, texture channels, and depth channels respectively, combining the image after removing the background and the features of different channels, and analyzing the image in a deep learning model.

5. The method for detecting defective crutch according to claim 1, wherein: Training the deep learning model in step 4: Based on a large amount of labeled training data, using a deep neural network to train the model includes: Step 4-1: Data preparation and preprocessing; Step 4-2: Design the model architecture; Step 4-3: Define the loss function; Step 4-4: Train the model strategy; Step 4-5: Evaluate and validate the trained model.

6. The method for detecting defective crutch according to claim 5, characterized in that: The data preparation and preprocessing in step 4-1 include: Step 4-1-1: Introduce an adaptive data augmentation strategy. By analyzing the defect pattern distribution in the existing dataset, intelligently select and apply data augmentation techniques to ensure that each category has enough representative samples while avoiding overfitting. Step 4-1-2: Develop a mixed reality synthesizer that combines real crutch images and computer-generated defect features to create highly realistic synthetic defect samples and increase the diversity of training data; The model architecture design in step 4-2 includes: 4-2-1: Construct spatiotemporal convolutional network; 4-2-2: Introducing neural architecture search to automatically explore and optimize network structures suitable for specific defect types; 4-2-3: Design a two-stream attention mechanism to process local details and global structures in the image respectively; the loss function defined in step 4-3 includes: 4-3-1: Apply different perceptual loss items in stages according to the different levels of defects; 4-3-2: Introduce an adaptive weight adjustment mechanism to automatically adjust the weights of various loss items based on dynamic feedback during training to optimize training results.

7. The method for detecting defective crutch products according to claim 1, wherein: In step 5, the acquired image data is input into the trained deep learning model, and the model is used to analyze the pre-processed image data to identify and classify the defect types in the image data, including: 5-1: Image input and feature extraction; 5-1-1: Input the pre-processed low-resolution image data into the trained super-resolution generative model and first enhance the image details; 5-1-2: The enhanced high-resolution image is fed into the main detection model, which uses multi-scale feature fusion technology to extract image features at different levels; 5-2: Intelligent decision-making and feedback; 5-2-1: Apply reinforcement learning optimizer to dynamically adjust parameters during the recognition process and continuously optimize classification results based on real-time feedback; 5-2-2: For uncertain classification results, activate the auxiliary verification mechanism to ensure the accuracy and reliability of the final classification.

8. A diversion mechanism based on a method for detecting defective crutch products, comprising a crutch conveying platform, a conveying device, and a material receiving platform, characterized in that: The conveying device is installed on the crutch conveying platform, a diversion mechanism is installed on the crutch conveying platform, the material receiving platform is set on one side of the crutch conveying platform, a material receiving mechanism is installed on the material receiving platform, a frame is installed on the crutch conveying platform, and a visual inspection camera is installed on the frame.

9. The diversion mechanism based on the crutch defective product detection method according to claim 8, characterized in that: The diversion mechanism includes a bracket, a rotating rod, a driving cylinder and a support plate. The bracket and the driving cylinder are fixedly mounted on the crutch conveying platform. The rotating rod is rotatably connected to the bracket. A plurality of sliding rods are fixedly connected to the rotating rod. The support plate is fixedly connected to the bottom of the sliding rod. The output end of the driving cylinder is driven and connected to a piston rod, and the piston rod and the bottom of the support plate are connected to each other.

10. The diversion mechanism based on the crutch defective product detection method according to claim 8, characterized in that: The material receiving mechanism includes a supporting stand, a material receiving frame and a material receiving rod. The material receiving frame is arranged between the material receiving platform and the crutch conveying platform. The material receiving frame is fixedly connected to the supporting stand. The material receiving rod is arranged below the material receiving frame. The material receiving rod is rotatably connected to the supporting stand through a spring return shaft. A defective product collection box is arranged below the material receiving rod.