Table tennis flaw detection system and electronic equipment

Image acquisition through side light sources and high-resolution cameras, combined with deep learning algorithms and improved CSPDarknet model, the problems of uneven lighting, background interference and inference delay in table tennis defect detection are solved, and fast and accurate defect detection is achieved, suitable for high-frequency automated production lines.

CN120259245AActive Publication Date: 2025-07-04GUANGZHOU DOUBLE FISH SPORTS GOODS GRP +1

Patent Information

Application Number
CN202510345169.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-07-04
Estimated Expiration
2045-03-24

AI Technical Summary

Technical Problem

The existing table tennis defect detection technology has problems such as uneven lighting, background interference, insufficient target detection accuracy and high inference delay, which affects detection efficiency and accuracy.

Method used

Side light sources are used to collect ping-pong images in parallel, combine high-resolution cameras and deep learning algorithms for image preprocessing and defect detection, and use the improved CSPDarknet deep convolutional neural network model for feature extraction and classification, eliminating non-maximum suppression (NMS) processes, and improving detection accuracy and speed.

Benefits of technology

It realizes rapid and accurate detection of table tennis defects in complex backgrounds, improves the ability to identify small defects, reduces reasoning delays, and is suitable for high-frequency automated production lines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259245A_ABST
    Figure CN120259245A_ABST
Patent Text Reader

Abstract

The invention provides a table tennis flaw detection system and electronic equipment, which are characterized in that when a side light source is used for illuminating a table tennis ball at the same time, a high-resolution camera is used for collecting original images of the table tennis ball in parallel, a deep learning algorithm is combined for image capture and analysis, and the system preprocesses the images, extracts features and identifies and classifies flaws. Finally, results are output in parallel, automatic detection is achieved, the image contrast is remarkably enhanced and noisy points are reduced through image preprocessing, the detection precision under small flaws and complex backgrounds is improved, meanwhile, an extraction feature layer of the model is improved, flaws in imaging are accurately found out through a target detection algorithm in deep learning, and the detection accuracy is improved. According to the method, the sensitivity to tiny flaws is enhanced, the problem that feature extraction is insufficient when a traditional convolutional layer processes a complex background is solved, inference delay is reduced through non-NMS training, and therefore the detection precision and real-time performance of the whole system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of table tennis production quality control and precision detection, and particularly to a table tennis defect detection system and an electronic device. Background Art

[0002] In the prior art, a color image and multi-source images under a single light source are acquired to generate a material image and a surface geometry image, so as to improve the accuracy and comprehensiveness of defect detection. The prior art usually uses an image masking method, which relies on a predefined template or model to identify and locate defect regions in an image.

[0003] The above prior art has the following disadvantages:

[0004] ① Uneven illumination and background interference: The prior art usually requires complex image preprocessing steps to enhance image quality, but these methods often involve a lot of image fusion, the processing process is complex, and it is easily affected by external environmental changes.

[0005] ② Insufficient target detection accuracy: Traditional target detection methods usually use a single image preprocessing method and model, with limited feature extraction ability, and lower detection accuracy when dealing with complex backgrounds or small defects.

[0006] ③ High inference latency: Existing detection methods generally rely on the non-maximum suppression (NMS) algorithm to optimize the target detection results, but NMS will increase the inference latency, affecting the efficiency of real-time detection, and at the same time, using image segmentation will bring more time consumption. Summary of the Invention

[0007] In view of the above problems, the present invention is proposed to provide a table tennis defect detection system and an electronic device that overcome the above problems or at least partially solve the above problems.

[0008] The present invention provides a table tennis defect detection system, including:

[0009] A table tennis image acquisition module, configured to simultaneously illuminate a table tennis ball with a side light source and parallelly acquire an original image of the table tennis ball through a high-resolution camera;

[0010] A table tennis image preprocessing module, configured to perform image processing on the original image of the table tennis ball to obtain a table tennis ball image to be detected;

[0011] A defect detection and classification module is used to identify defects in the image of the table tennis ball to be detected through a defect detection model, output the defect prediction result of the table tennis ball, determine the quality grade of the table tennis ball according to the defect prediction result, and store the table tennis ball in the corresponding quality grade collection device according to the quality grade of the table tennis ball; the defect prediction result of the table tennis ball is the defect type of the table tennis ball or the table tennis ball has no defect.

[0012] Optionally, the defect types include: density, color spots, lack of glue, yellow lines, dents, wooden edges, insufficient inflation, and double-colored balls.

[0013] Optionally, the table tennis ball image preprocessing module is further used for:

[0014] Perform Gaussian denoising, grayscale processing, and contrast enhancement processing on the original table tennis ball image to obtain the table tennis ball image to be detected.

[0015] Optionally, the table tennis ball image preprocessing module is further used for:

[0016] In the Gaussian denoising process, use the Gaussian function as the weight coefficient, calculate the weighted average of the pixels around each pixel in the original table tennis ball image as the new pixel value, and obtain the Gaussian denoised table tennis ball image.

[0017] Optionally, the table tennis ball image preprocessing module is further used for:

[0018] Convert the Gaussian denoised table tennis ball image into a grayscale image;

[0019] Calculate the histogram and cumulative distribution function of the grayscale image;

[0020] Normalize the cumulative distribution function to the preset grayscale level range;

[0021] According to the normalized cumulative distribution function, replace each pixel value of the histogram with a new pixel value to obtain the table tennis ball image to be detected.

[0022] Optionally, the training process of the defect detection model includes:

[0023] Collect table tennis ball images without defects and various defect types and mark the types to which each table tennis ball image belongs to construct a table tennis ball image sample data set;

[0024] Perform Gaussian denoising, grayscale processing, and contrast enhancement processing on the table tennis ball image sample data set to obtain the table tennis ball image training data set;

[0025] Use the table tennis ball image training data set to train an improved CSPDarknet deep convolutional neural network model to obtain the defect detection model.

[0026] Optionally, the improved CSPDarknet deep convolutional neural network model includes a C2PSA module. The C2PSA module fuses the pyramid slice attention mechanism and the convolutional layer. The improved CSPDarknet deep convolutional neural network model is trained using the table tennis image training dataset to obtain the defect detection model, including:

[0027] Taking the table tennis image training dataset as the input of the improved CSPDarknet deep convolutional neural network model, the C2PSA module divides the original feature map of the table tennis training image into slices of multiple pyramid levels, performs global pooling operations on each slice to obtain the global feature representation of each slice, transforms the global feature representation of each slice through the convolutional layer to obtain the attention weights, and multiplies the attention weights with the corresponding slices of the original feature map to obtain the table tennis depth fusion feature map;

[0028] The table tennis depth fusion feature map processed by the C2PSA module is continuously passed to the subsequent network layer to output the table tennis defect prediction result.

[0029] Calculating the loss value according to the difference between the table tennis defect prediction result and the table tennis true defect label, and updating the model parameters through backpropagation. After multiple iterations until the model converges or reaches the predetermined maximum number of iterations, the defect detection model is obtained.

[0030] Optionally, the table tennis defect detection system further includes a ball diameter measurement module. The ball diameter measurement module is used to determine whether to measure the ball diameter of the table tennis according to the quality grade of the table tennis; if the quality grade of the table tennis is first-class product, the ball diameter of the table tennis is measured; if the quality grade of the table tennis is non-first-class product, the table tennis ball diameter measurement step is skipped.

[0031] Optionally, the table tennis image acquisition module is further used for:

[0032] When illuminating the table tennis with three groups of side light sources simultaneously, parallelly acquiring the original table tennis images through three high-resolution cameras evenly distributed at 120° on the side of the table tennis.

[0033] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the electronic device executes the computer program, it loads the table tennis defect detection system according to any one of the embodiments of the present invention.

[0034] The present invention has the following advantages:

[0035] The table tennis defect detection system of the present invention, when illuminating the table tennis ball with a side light source at the same time, parallelly acquires the original image of the table tennis ball through a high-resolution camera, combines the deep learning algorithm in AI vision technology for image capture and analysis, preprocesses the image, extracts features, identifies and classifies defects in the system, and finally outputs the results in parallel to achieve automatic detection. Among them, through histogram equalization and Gaussian denoising technology in image preprocessing, the image contrast is significantly enhanced and the noise is reduced, improving the detection accuracy under small defects and complex backgrounds. Secondly, the present invention improves the feature extraction layer of the model, uses the improved self-attention convolutional layer to improve feature extraction, and the self-attention convolutional layer further enhances the sensitivity to subtle defects, avoiding the problem of insufficient feature extraction of the traditional convolutional layer when dealing with complex backgrounds. Furthermore, non-maximum suppression (NMS) training is used in post-processing to eliminate the NMS process, thereby significantly reducing the inference latency. This enables the present invention to process real-time image data faster and meet the defect detection requirements on high-frequency production lines. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 FIG. is a structural block diagram of a table tennis defect detection system provided by an embodiment of the present invention;

[0037] Figure 2 FIG. is a schematic diagram of table tennis image annotation provided by an embodiment of the present invention;

[0038] Figure 3 FIG. is a schematic diagram of table tennis image preprocessing provided by an embodiment of the present invention;

[0039] Figure 4 FIG. is a deep fusion feature map of table tennis extracted by an improved CSPDarknet deep convolutional neural network model provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0040] In order to make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the drawings and specific embodiments.

[0041] Refer to Figure 1 , which shows a structural block diagram of a table tennis defect detection system provided by an embodiment of the present invention, and specifically may include the following modules:

[0042] A table tennis image acquisition module, configured to parallelly acquire the original image of the table tennis ball through a high-resolution camera when illuminating the table tennis ball with a side light source at the same time;

[0043] A table tennis image preprocessing module, configured to perform image processing on the original image of the table tennis ball to obtain a table tennis image to be detected;

[0044] A defect detection and classification module is used to identify defects in the image of the table tennis ball to be detected through a defect detection model, output the defect prediction result of the table tennis ball, determine the quality grade of the table tennis ball according to the defect prediction result, and store the table tennis ball in the corresponding quality grade collection device according to the quality grade of the table tennis ball; the defect prediction result of the table tennis ball is the defect type of the table tennis ball or the table tennis ball has no defect.

[0045] The purpose of the table tennis ball defect detection system in the embodiment of the present invention is to accurately identify the defects of the table tennis ball. In this system, three groups of side light sources are used to illuminate the table tennis ball simultaneously, ensuring that clear and uniform images can be obtained even in complex lighting environments. For example, twelve table tennis balls are illuminated simultaneously by three groups of side light sources. Three high-resolution cameras are evenly distributed at the side of the table tennis ball at an angle of 120°, and the original images of the table tennis ball are collected in parallel, ensuring that the surface of the table tennis ball is comprehensively covered from multiple angles and effectively avoiding the generation of shadows, thus improving the image quality.

[0046] To further improve the accuracy of defect detection, the table tennis ball image preprocessing module in the embodiment of the present invention is responsible for preprocessing the collected original images, including operations such as enhancing the image contrast and reducing noise, which significantly increases the probability of detecting small defects in complex backgrounds.

[0047] Finally, the defect detection and classification module uses the object detection algorithm in deep learning to perform detailed defect identification on the preprocessed table tennis ball images. The feature extraction layer of the model used has been improved, enhancing the sensitivity to subtle defects and optimizing the feature extraction deficiency of the traditional convolutional layer in complex backgrounds. In this process, the system can quickly and accurately locate and identify any defects in the image according to the pre-trained defect detection model. Based on the detected defect type or the result of confirming no defect, the system will automatically determine the quality grade of the table tennis ball and use the corresponding collection device to store table tennis balls of different grades.

[0048] Among them, the defect types can include: density, color spots, lack of glue, yellow lines, dents, wooden edges, insufficient inflation, two-tone balls, etc. The quality grades can include premium products, first-class products, qualified products, entertainment products, discarded balls, etc. Premium products can include super three-star, ordinary three-star, one-star, etc.

[0049] The present invention provides an end-to-end automated detection system, which realizes automated processing throughout the whole process from image acquisition, preprocessing, feature extraction to defect detection. Through deep learning algorithms and efficient image processing processes, this system can quickly and accurately detect various defects on the surface of table tennis balls and is suitable for high-frequency automated production lines.

[0050] In one embodiment of the present invention, the table tennis image preprocessing module is further configured to:

[0051] Perform Gaussian denoising, grayscale processing, and contrast enhancement on the original table tennis image to obtain a table tennis image to be detected.

[0052] The table tennis defect detection system of the present invention not only has a fully automated detection process, but also its table tennis image preprocessing module effectively improves the quality of the original image through a series of advanced image processing techniques, including Gaussian denoising, grayscale conversion, and contrast enhancement. These preprocessing steps ensure that even in complex or changing environments, the captured table tennis images can achieve high clarity and high contrast, thus providing a reliable basis for subsequent accurate defect identification and classification. This high-quality image processing ability is closely combined with the fully automated detection function of the system, which also improves the defect detection accuracy of the system and further guarantees the product quality.

[0053] In one embodiment of the present invention, the table tennis image preprocessing module is further configured to:

[0054] In the Gaussian denoising process, use the Gaussian function as the weight coefficient, and for each pixel point in the original table tennis image, calculate the weighted average of the pixels around the pixel point as the new pixel value to obtain the table tennis Gaussian denoised image.

[0055] In this embodiment, denoising methods such as Gaussian blur and mean filtering can be adopted to reduce the interference of image noise. Among them, Gaussian blur is a linear filtering method that uses the Gaussian function as the weight coefficient. For each pixel point, Gaussian blur calculates the weighted average of its surrounding pixels, and the weight is determined by the Gaussian function. The Gaussian blur calculation formula is:

[0056]

[0057] where, I blur (x, y) is the value of the blurred image at point (x, y), I(x + u, y + v) is the value of the original image at point (x + u, y + v), and σ is the standard deviation of the Gaussian function, which controls the degree of blur.

[0058] In one embodiment of the present invention, the table tennis image preprocessing module is further configured to:

[0059] Convert the table tennis Gaussian denoised image into a grayscale image;

[0060] Calculate the histogram and cumulative distribution function of the grayscale image;

[0061] Normalize the cumulative distribution function to a preset grayscale level range;

[0062] According to the normalized cumulative distribution function, each pixel value of the histogram is replaced with a new pixel value to obtain the table tennis image to be detected.

[0063] In this embodiment, through techniques such as histogram equalization, the image details are enhanced to make the contour of the table tennis ball clearer. Specifically, first, the histogram of the image is calculated, and then the cumulative distribution function is calculated.

[0064]

[0065] By normalizing the CDF to the range [0, L - 1] (where L is the number of gray levels, such as 256), the new gray value is obtained:

[0066] s(i) = round((L - 1)·CDF(i))

[0067] After generating the equalized image, the equalized image is generated by replacing each pixel value f(x, y) in the original image with the new pixel value s(f(x, y)).

[0068] In an embodiment of the present invention, the training process of the defect detection model includes:

[0069] Collect table tennis images without defects and various defect types and label the types to which each table tennis image belongs to construct a table tennis image sample data set;

[0070] Perform Gaussian denoising, grayscale processing, and contrast enhancement processing on the table tennis image sample data set to obtain a table tennis image training data set;

[0071] Use the table tennis image training data set to train an improved CSPDarknet deep convolutional neural network model to obtain the defect detection model.

[0072] In an embodiment of the present invention, the improved CSPDarknet deep convolutional neural network model includes a C2PSA module. The C2PSA module fuses the pyramid slice attention mechanism and the convolutional layer. Using the table tennis image training data set to train the improved CSPDarknet deep convolutional neural network model to obtain the defect detection model includes:

[0073] Take the table tennis image training data set as the input of the improved CSPDarknet deep convolutional neural network model. The C2PSA module divides the original feature map of the table tennis training image into slices of multiple pyramid levels, performs global pooling operations on each slice to obtain the global feature representation of each slice, transforms the global feature representation of each slice through the convolutional layer to obtain the attention weight, and multiplies the attention weight with the corresponding slice of the original feature map to obtain the table tennis deep fusion feature map;

[0074] The depth fusion feature map of the table tennis ball after being processed by the C2PSA module is continuously passed to the subsequent network layer to output the prediction result of the table tennis ball defect.

[0075] Calculate the loss value according to the difference between the table tennis ball defect prediction result and the true table tennis ball defect label, and update the model parameters through backpropagation. After multiple iterations until the model converges or reaches the predetermined maximum number of iterations, the defect detection model is obtained.

[0076] In the embodiment of the present invention, a model capable of efficiently and accurately identifying and classifying the surface defects of table tennis balls is constructed and trained. Specifically, table tennis ball images without defects and various types of defects are collected to ensure the diversity and representativeness of the training data set, and these images are accurately labeled to determine their specific types, referring to Figure 2 . After constructing the table tennis ball image sample data set, the system preprocesses the table tennis ball image samples, referring to Figure 3 . Through histogram equalization and Gaussian denoising techniques in image preprocessing, the image contrast is significantly enhanced and the noise is reduced, improving the detection accuracy under small defects and complex backgrounds. These preprocessing steps not only enhance the visual effect of the image, but also improve the sensitivity of the model to subtle defects. The images after these processes are integrated into the table tennis ball image training data set, preparing high-quality learning samples for the subsequent model training.

[0077] The improved CSPDarknet deep convolutional neural network model is one of the inventive points of the present invention. The C2PSA self-attention mechanism module is introduced into the feature extraction layer of the CSPDarknet deep convolutional neural network model. The C2PSA module combines the pyramid slice attention mechanism with the traditional convolutional layer. The C2PSA module divides the original feature map of the input table tennis ball training image into multiple pyramid-level slices of different scales, and each slice represents the feature information at a specific scale. For each slice, the system performs global pooling operations to obtain global feature representations, and further transforms these representations through convolutional layers to calculate the attention weights. The attention weights are then multiplied by the corresponding slices of the original feature map to generate the depth fusion feature map, referring to Figure 4 , improving the model's ability to capture tiny or complex defect features. The depth fusion feature map is continuously passed to the subsequent network layer, and finally the prediction result of the table tennis ball defect is output. The loss value is calculated according to the difference between the prediction result and the true label, and the model parameters are continuously updated through the backpropagation algorithm, and the preliminary effect of the model after training is evaluated according to the result. Finally, the model training is completed after multiple rounds of iteration to obtain a defect detection model with high detection accuracy.

[0078] The table tennis ball defect detection system of the present invention not only has a fully automated detection process, but also its defect detection and classification module realizes the efficient recognition and classification of the defects on the surface of the table tennis ball through a defect detection model. These improvements ensure that the model can accurately detect subtle defects in a complex background. The defect detection model improved and trained in the present invention is closely combined with the fully automated detection function of the system, enabling the rapid and accurate detection of various defects on the surface of the table tennis ball while realizing the fully automated detection of the system, and ensuring the product quality in real time.

[0079] In an embodiment of the present invention, the table tennis ball defect detection system further includes a ball diameter measurement module, and the ball diameter measurement module is used to determine whether to measure the ball diameter of the table tennis ball according to the quality grade of the table tennis ball; if the quality grade of the table tennis ball is a first-class product, the ball diameter of the table tennis ball is measured; if the quality grade of the table tennis ball is not a first-class product, the step of measuring the ball diameter of the table tennis ball is skipped.

[0080] In the embodiment, the table tennis ball defect detection system can further integrate a ball diameter measurement module to ensure that the first-class table tennis balls not only meet high standards in terms of surface quality, but also their sizes strictly comply with the requirements of international competition rules. The design of this module is to decide whether to execute the ball diameter measurement step according to the quality grade of the table tennis ball. Specifically, when the defect detection and classification module completes the analysis of the defects on the surface of the table tennis ball and determines that the table tennis ball is a first-class product, the system will automatically trigger the ball diameter measurement module to perform precise diameter measurement on these high-quality table tennis balls. This process is achieved through high-precision sensors or vision measurement technologies to ensure that each table tennis ball marked as a first-class product can meet strict size standards. For those table tennis balls classified as non-first-class products, the ball diameter measurement step can be directly skipped, avoiding unnecessary resource consumption and improving the overall detection efficiency of the system. In this way, the present invention realizes the comprehensive coverage of the quality control of table tennis balls, from surface defects to size specifications, ensuring that each table tennis ball leaving the factory meets the production standards.

[0081] The present invention has the following advantages:

[0082] The present invention provides an end-to-end automated detection system that realizes automated processing throughout the entire process from image acquisition, preprocessing, feature extraction to defect detection. Through deep learning algorithms and an efficient image processing pipeline, this system can quickly and accurately detect various defects on the surface of table tennis balls and is suitable for high-frequency automated production lines. The object detection algorithm used in the present invention generally does not involve the processing of multi-light source images and is different from the image preprocessing methods adopted in the prior art. The image preprocessing used in the prior art constructs data by fusing images with different light sources, while the present invention uses histogram equalization to preprocess and improve the contrast of the picture, and uses a Gaussian convolution kernel to remove noise in the picture. Through histogram equalization and Gaussian denoising techniques in image preprocessing, the image contrast is significantly enhanced and the noise is reduced, improving the detection accuracy in the case of small defects and complex backgrounds. Secondly, the present invention improves the feature extraction layer of the model and uses an improved self-attention convolutional layer to enhance feature extraction. The self-attention convolutional layer further enhances the sensitivity to subtle defects and avoids the problem of insufficient feature extraction of traditional convolutional layers when dealing with complex backgrounds. Furthermore, in post-processing, NMS-free training is used to eliminate the NMS process, thereby significantly reducing the inference latency. This enables the present invention to process real-time image data faster, ensuring that the system can maintain high efficiency in real-time detection tasks and meet the defect detection requirements of high-frequency production lines with extremely high real-time requirements.

[0083] Based on the same inventive concept, another embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory. The processor executes the computer program to load the table tennis ball defect detection system according to any one of the embodiments of the present invention.

[0084] Specifically, the electronic device includes: a memory and a processor. The memory is communicatively connected to the processor through a bus. A computer program is stored in the memory and can run on the processor, thereby loading the table tennis ball defect detection system according to any one of the first aspects of the embodiments of the present invention.

[0085] The memory may include a random access memory (Random Access Memory, abbreviated as RAM), or may also include a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.

[0086] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU for short), a Network Processor (NP for short), etc.; it may also be a Digital Signal Processor (DSP for short), an Application Specific Integrated Circuit (ASIC for short), a Field-Programmable Gate Array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0087] Based on the same inventive concept, another embodiment of the present invention provides a computer-readable storage medium, on which a computer program / instructions are stored. When the computer program / instructions are executed by a processor, the table tennis defect detection system described in any item of the first aspect of the embodiments of the present invention is loaded.

[0088] The various embodiments in this specification are all described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other.

[0089] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, devices, electronic devices, storage media, or computer program products. Therefore, the embodiments of the present invention can take the form of completely hardware embodiments, completely software embodiments, or embodiments combining software and hardware aspects. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD ROMs, optical memories, etc.) containing computer-usable program codes.

[0090] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and purposes of the present invention. The scope of the present invention is defined by the claims and their equivalents.

[0091] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or terminal device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising the element.

[0092] The above has introduced in detail a table tennis defect detection system and an electronic device provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application. The above embodiments are only preferred embodiments cited to fully illustrate the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or transformations made by those skilled in the art on the basis of the present invention are within the protection scope of the present invention.

Claims

1. A table tennis ball defect detection system, characterized in that, Including: A table tennis ball image acquisition module, which is used to simultaneously illuminate the table tennis ball with a side light source and parallelly acquire the original table tennis ball image through a high-resolution camera; A table tennis ball image preprocessing module, which is used to perform image processing on the original table tennis ball image to obtain a table tennis ball image to be detected; A defect detection and classification module, which is used to identify defects in the table tennis ball image to be detected through a defect detection model, output the defect prediction result of the table tennis ball, determine the quality grade of the table tennis ball according to the defect prediction result, and store the table tennis ball in the corresponding quality grade collection device according to the quality grade of the table tennis ball; the defect prediction result of the table tennis ball is the type of defect of the table tennis ball or the table tennis ball has no defect.

2. The table tennis ball defect detection system according to claim 1, wherein The types of defects include: density, color spots, lack of glue, yellow lines, dents, wooden edges, insufficient inflation, and two-tone balls.

3. The table tennis ball defect detection system according to claim 1, wherein The table tennis ball image preprocessing module is further used for: Performing Gaussian denoising processing, grayscale processing, and contrast enhancement processing on the original table tennis ball image to obtain a table tennis ball image to be detected.

4. The table tennis ball defect detection system according to claim 3, wherein The table tennis ball image preprocessing module is further used for: In the Gaussian denoising process, using the Gaussian function as the weight coefficient, for each pixel point in the original table tennis ball image, calculating the weighted average value of the pixels around the pixel point as the new pixel value to obtain the Gaussian denoised table tennis ball image.

5. The table tennis ball defect detection system according to claim 4, wherein The table tennis ball image preprocessing module is further used for: Converting the Gaussian denoised table tennis ball image into a grayscale image; Calculating the histogram and cumulative distribution function of the grayscale image; Normalizing the cumulative distribution function to a preset grayscale level range; According to the normalized cumulative distribution function, replacing each pixel value of the histogram with a new pixel value to obtain a table tennis ball image to be detected.

6. The table tennis ball defect detection system according to claim 1, wherein The training process of the defect detection model includes: Collecting table tennis ball images without defects and various defect types and marking the types to which each table tennis ball image belongs to construct a table tennis ball image sample data set; Performing Gaussian denoising processing, grayscale processing, and contrast enhancement processing on the table tennis ball image sample data set to obtain a table tennis ball image training data set; Training an improved CSPDarknet deep convolutional neural network model with the table tennis ball image training data set to obtain the defect detection model.

7. The table tennis ball defect detection system according to claim 6, characterized in that, The improved CSPDarknet deep convolutional neural network model includes a C2PSA module. The C2PSA module fuses the pyramid slice attention mechanism and the convolutional layer. Training the improved CSPDarknet deep convolutional neural network model with the table tennis ball image training data set to obtain the defect detection model, including: Use the table tennis image training data set as the input of the improved CSPDarknet deep convolutional neural network model. The C2PSA module divides the original feature map of the table tennis training image into slices of multiple pyramid levels, performs global pooling operations on each slice to obtain the global feature representation of each slice, transforms the global feature representation of each slice through a convolutional layer to obtain the attention weights, and multiplies the attention weights with the corresponding slices of the original feature map to obtain the table tennis depth fusion feature map; The table tennis depth fusion feature map processed by the C2PSA module is continuously passed to the subsequent network layers to output the table tennis defect prediction result. Calculate the loss value according to the difference between the table tennis defect prediction result and the table tennis true defect label, and update the model parameters through backpropagation. After multiple iterations until the model converges or reaches the predetermined maximum number of iterations, the defect detection model is obtained.

8. The table tennis defect detection system according to claim 1, wherein The table tennis defect detection system further includes a ball diameter measurement module, and the ball diameter measurement module is used to determine whether to measure the ball diameter of the table tennis according to the quality grade of the table tennis; if the quality grade of the table tennis is first-class product, measure the ball diameter of the table tennis; if the quality grade of the table tennis is non-first-class product, skip the table tennis ball diameter measurement step.

9. The table tennis defect detection system according to claim 1, wherein The table tennis image acquisition module is further used for: When illuminating the table tennis with three groups of side light sources simultaneously, parallelly acquire the original table tennis images through three high-resolution cameras evenly distributed at 120° on the side of the table tennis.

10. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the electronic device executes the computer program, load the table tennis defect detection system according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Indicator lamp state detection method based on video stream

    CN116258999A

  • Glass bead surface appearance defect detection method based on deep learning

    CN116342491A

  • Part surface quality detection method and system based on machine vision

    CN118608504A

  • Ceramic ball surface defect detection method and system, electronic equipment and medium

    CN119205669A

  • Segmentation method for rail defect detection based on improved YOLOv10 and SETR

    CN119671959A

Cited By

  • Multi-station collaborative machine vision table tennis whole peripheral surface defect detection equipment

    CN121830693A