Table tennis recognition system based on YOLOv8 and edge computing device deployment method
By adopting YOLOv8-based recognition system and edge computing equipment in the table tennis training system, combined with multi-threading technology and NPU acceleration, the existing system has solved the problems of high equipment costs, low detection accuracy and inability to meet the real-time detection of high frame rate, and achieved efficient and low-cost real-time detection of table tennis.
Patent Information
- Application Number
- CN202411761780.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-28
AI Technical Summary
The existing table tennis training system equipment is expensive and has low detection accuracy, which cannot meet the real-time detection requirements at high frame rates. Relying on high-performance computing equipment leads to high hardware costs and power consumption and high network quality requirements.
The YOLOv8-based table tennis recognition system is adopted, combined with edge computing equipment, and inference acceleration is performed through multi-threading technology and NPU, and the AKConv network and attention mechanism GAM are added to achieve real-time and efficient table tennis detection.
It realizes efficient and low-cost real-time detection and analysis of table tennis balls, reduces system deployment costs, improves the privacy and security of data processing, and meets the high-frequency table tennis training needs.
Smart Images

Figure CN119723410A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer vision technology, and in particular relates to a table tennis recognition system based on YOLOv8 and a method for deploying edge computing equipment. Background Art
[0002] At present, more and more people in various countries around the world are paying attention to the sport of table tennis, especially in my country, where table tennis, as my country's national sport, has attracted much attention. For this reason, the development of table tennis-related industries has also received more attention. As a national sport and an important part of my country's sports, the health and good development trend of table tennis industry is related to the development direction of my country's sports economy industry. Therefore, the research on table tennis serving machines is very important. Only by developing the sports industry can we promote the further upgrading of my country's economic transformation. Computer vision is an important branch of artificial intelligence, enabling machines to interpret and understand visual information from images or multidimensional data. Object recognition, as one of the core tasks in computer vision, aims to identify specific objects in images. This includes detecting the location of objects and classifying the categories of objects. In recent years, the introduction of deep learning technology has greatly promoted the development of object recognition technology. As an extremely fast sport, table tennis has put forward extremely high requirements for real-time object recognition systems. The recognition system needs to be able to accurately track the position of the ball and process and respond in a very short time. In addition, environmental factors such as lighting, ball speed and rotation also pose challenges to the accuracy and stability of the recognition system. Deep learning can detect small, fast-flying, and complex-motion objects like ping-pong balls with a high accuracy. Therefore, using computer vision to capture and locate ping-pong balls instead of human eyes has become a hot topic in modern technology.
[0003] The existing table tennis training system has the following problems:
[0004] 1. Equipment equipped with artificial intelligence is expensive, not suitable for ordinary users, and is not conducive to promotion.
[0005] 2. The detection effect of table tennis balls is poor, especially under complex or changing environmental conditions, and the overall detection accuracy cannot be achieved.
[0006] 3. The existing ball-serving machine system cannot ensure real-time detection of the landing point of the table tennis ball at a high frame rate, and cannot meet the needs of fast-paced training.
[0007] 4. Traditional AI devices mostly rely on high-performance computing devices for data processing and analysis to participate in computing, which means high hardware costs and complex deployment environments. The overall cost is high, the power consumption is high, and at the same time, image and video data need to be transmitted, which places high requirements on network quality. Summary of the invention
[0008] In order to solve the above problems, the present invention proposes: a table tennis recognition system based on YOLOv8 and a method for deploying edge computing devices.
[0009] The beneficial effects of the present invention are as follows: the present invention proposes a table tennis recognition system based on YOLOv8 and a method for deploying edge computing devices, which realizes efficient and low-cost real-time detection and analysis of table tennis. Compared with the prior art, the present invention has significant differences and advantages in the following aspects:
[0010] 1. The YOLOv8 model is used, which has been significantly optimized in terms of accuracy and detection speed, and is particularly suitable for running on resource-constrained edge computing devices. By modifying the model's network and improving the convolution calculation, an AKConv network is added on the basis of YOLOv8, reducing model parameters and computing overhead. The attention mechanism GAM is added to further improve the recognition accuracy of small target objects such as table tennis balls, and can achieve real-time and efficient table tennis ball detection on edge devices.
[0011] 2. Use multi-threading technology and NPU to accelerate reasoning on edge computing devices. By calling NPU in parallel through multi-threading to process table tennis detection tasks, compared with the traditional single-thread processing method, the multi-threading acceleration technology of the present invention can significantly improve the system's response speed, reduce latency, and meet the needs of high-frequency table tennis training.
[0012] 3. Compared with systems that rely on cloud computing and high-performance computing devices, the present invention achieves end-to-end optimized deployment on edge computing devices, and the system can run independently without cloud computing resources. This not only reduces the deployment cost of the system, but also improves the privacy and security of data processing, and is suitable for promotion and use in scenarios such as schools, gymnasiums, and homes.
[0013] 4. The end-to-end optimization of the system makes its deployment and maintenance on edge devices simple and convenient. Users only need to perform simple configuration and installation to complete system deployment, without the need for complex hardware environment and professional technical support. This enables the system to be quickly promoted to meet the needs of different users. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a schematic diagram of image acquisition of a table tennis detection system of the present invention;
[0015] Figure 2 The overall system architecture diagram of the table tennis detection system of the present invention;
[0016] Figure 3 The multi-threaded RKNNLite system occupancy map adopted by the present invention is retrieved;
[0017] Figure 4 It is a schematic diagram of the YOLOv8 framework adopted by the present invention;
[0018] Figure 5 It is a schematic diagram of the recognition accuracy of detecting a table tennis data set according to the present invention. DETAILED DESCRIPTION
[0019] Example 1
[0020] In order to make the technical means adopted by the present invention and the purpose achieved easy to understand, the present invention is further explained in combination with a specific implementation method below. A table tennis recognition system based on YOLOv8 includes a camera, an edge computing device and a serving machine. The camera and the serving machine are connected to the edge computing device, and the edge computing device is connected to the main control center.
[0021] The edge computing device adopts the Orange Pi 5 Plus computing device, and the camera adopts a distortion-free industrial camera with a frame rate of 60fps and a resolution of 640*480. The camera is connected to the Orange Pi 5 Plus, and video is recorded and detected in real time through multi-threading. The serving machine is integrated with the Orange Pi 5 Plus computing platform, and the serving strategy is dynamically adjusted according to the data obtained from the camera. YOLOv8 is deployed on the RK3588 of the Orange Pi 5 Plus through the RKNN tool chain.
[0022] This invention studies an intelligent table tennis training system consisting of a low frame rate camera, an Orange Pie 5 Plus computing device and a serving machine. The system is innovative based on the traditional serving machine. By adding Orange Pie 5 Plus and a camera, video recording and transmission, as well as real-time detection of table tennis coordinates, are realized. The system can receive training mode instructions according to the specific needs of the user, and control the serving machine to serve in the specified mode after processing by Orange Pie 5 Plus. This intelligent system can customize personalized serving strategies according to the user's actual training performance and display the coordinate position of the ball in real time.
[0023] In order to deal with the high cost and effect problems encountered in the above table tennis detection system, we designed and implemented an intelligent table tennis training system based on high-performance computing and optimization algorithms. The detection data set constructed by this system simulates the camera at a fixed angle. The camera uses a distortion-free industrial camera with a frame rate of 60fps and a resolution of 640*480. This camera can capture high-speed moving table tennis, greatly reduce motion blur, and improve image clarity, which is the key to achieving high-precision recognition. The camera is connected to the Orange Pi 5 Plus, and the video is recorded and detected in real time through multi-threading. The serving machine is integrated with the Orange Pi 5 Plus computing platform, and the serving strategy can be dynamically adjusted according to the data obtained from the camera. The serving machine is independently developed and can serve stably in multiple speeds and rotation modes. YOLOv8 is deployed on the RK3588 of the Orange Pi 5 Plus through the RKNN (Rockchip Neural Network) tool chain. RKNN is a neural network optimization tool based on the Rockchip platform that can maximize hardware performance and reduce the delay of model operation. Through YOLOv8's excellent real-time processing capabilities and high accuracy, fast and accurate object detection of table tennis balls.
[0024] Multi-threaded execution can effectively utilize the computing resources of multi-core CPUs and improve data processing speed and system response time through parallel processing. In video processing and real-time object detection applications, the processing of each frame includes steps such as image preprocessing, neural network reasoning, and result post-processing. Through multi-threaded design, these tasks can be assigned to different threads to achieve a smoother data processing flow, thereby achieving higher frame rates and lower latency. The main thread is responsible for capturing video frames from the camera, and multiple worker threads are responsible for processing these frames to achieve parallel computing and control. The multi-threaded control in the embodiment of the present invention includes the following steps:
[0025] 1. Create multiple threads: The processing unit creates multiple threads, each of which can execute different tasks at the same time. The tasks in the present invention mainly include camera video recording, RKNNLite call, image processing, object detection, and drawing recognition frame lines.
[0026] 2. Task allocation: The processing unit allocates different tasks to different threads so that multiple tasks can be executed simultaneously.
[0027] 3. Thread synchronization: The processing unit can use synchronization mechanisms to ensure that multiple threads can share resources or data safely and orderly.
[0028] 4. Thread communication: The thread communication mechanism ensures the coordinated operation and data consistency of multi-threaded programs. Adding a safe queue allows data items to be safely added and retrieved by multiple threads.
[0029] 5. Thread pool management: The processing unit can maintain a thread pool through ThreadPoolExecutor, allowing multiple tasks to be executed concurrently while controlling the number of active threads. This reduces the overhead of thread creation and destruction, and can effectively manage threads, making the performance of the application more stable.
[0030] 6. Thread destruction: The processing unit can destroy the thread after the task is completed to release resources.
[0031] Compared with traditional single-thread control, the multi-thread control in the embodiment of the present invention can improve the computing efficiency and response speed of the system, and increase the running speed of YOLOv8 for camera detection.
[0032] RKNN (Rockchip Neural Network) is a neural network inference framework designed specifically for Rockchip processors, used to deploy and optimize deep learning models on Rockchip's SoC (system on chip). This deployment framework is mainly aimed at mobile devices and embedded systems, and can fully utilize the hardware acceleration features of these devices to improve the performance and efficiency of deep learning applications.
[0033] YOLOv8 is a very popular real-time object detection system. This is the latest iteration in the YOLO series. It inherits the speed and accuracy of previous versions while introducing several improvements and innovations. The goal of YOLOv8 is to provide a high-speed and efficient framework for object detection on a variety of devices. YOLOv8 optimizes the network architecture to improve detection accuracy and processing speed. This includes improved feature extraction layers, more effective feature fusion techniques, and optimized classification and regression branches. Like its predecessors, YOLOv8 uses multi-scale prediction techniques to detect objects of different sizes. This enables the model to perform well on different image resolutions, thereby improving the generalization ability and practicality of the model. YOLOv8 introduces adaptive anchor box technology, which automatically adjusts the size and scale of the anchor box by learning the object size distribution in the training data, improving the model's detection accuracy for different objects. Through enhanced data augmentation and a deeper network structure, YOLOv8 improves robustness in complex environments, including different lighting, occlusion, and background changes.
[0034] Example 2
[0035] A table tennis recognition system based on YOLOv8 and a method for deploying edge computing devices are mainly used for table tennis recognition training on edge computing devices; the steps of the table tennis recognition system include:
[0036] S1. Image acquisition: Use a monocular camera to record the entire table tennis process at a frame rate of 120fps.
[0037] S2. Image preprocessing: Use Python program to enhance the video data and use annotation tools to annotate the images to complete the dataset creation.
[0038] S3. Improve the YOLOv8 network.
[0039] S4. Train the network model.
[0040] S5. Perform RKNN conversion on the model and perform quantization processing.
[0041] S6. Deploy to Orange Pi for multi-threaded real-time table tennis detection.
[0042] The improvements to S3 include modifications to the backbone network of the YOLOv8 network, making the network dedicated to the detection of table tennis balls. The functions of the table tennis training equipment are deployed on edge devices with limited computing resources. In these settings, it is crucial to effectively control the number of parameters, computational complexity, and memory access of the target detection model. In order to improve the speed and accuracy of the model for table tennis detection and reduce the number of parameters of the model, this design focuses on model lightweighting and small target detection. By improving Conv, a lightweight network is added to the basis of YOLOv8 for table tennis detection. In order to further improve the speed of the model, the unique design of the backbone network reduces model parameters and computational overhead. By adding variable kernel convolution, the inherent defects in the standard convolution operation (the sampling shape is fixed) are solved. Let R represent the sampling grid, then R is expressed as follows:
[0043] R={(-1,-1),(-1,0),…,(0,1),(1,1)}
[0044] The main feature is that it provides any number of parameters and any sampling shape for the convolution kernel, can use any number of parameters (such as 1, 2, 3, 4, 5, 6, 7, etc.) to extract features, and can increase or decrease the number of convolution parameters linearly according to the hardware environment.
[0045] The algorithm generates the initial sampling coordinates P of the convolution kernel n The sampling grid is first generated as a regular sampling grid, then irregular grids are created for the remaining sampling points, and finally, they are stitched together to generate the overall sampling grid.
[0046] After defining the initial coordinates P of the irregular convolution n After that, the corresponding position P 0 The convolution operation can be defined as follows:
[0047]
[0048] Represents the convolution parameters, R represents the sampling network, and first obtains the offset of the corresponding kernel through the convolution operation. The dimension of the convolution operation is (B, 2N, H, W), where N is the size of the convolution kernel. In order to measure the offset change of each given position, the definition of the average offset is given, which is defined as follows:
[0049]
[0050] Then, by comparing the offset and the original coordinates (P 0 +P n ) to obtain the modified coordinates. Finally, the features of the corresponding positions are obtained by interpolation and resampling, and 3×3 convolution features are stacked in the spatial dimension. Then, a convolution operation with a stride of 3 is used to extract square sampling shape features, and column convolution or row convolution is used to extract features corresponding to irregular sampling shapes.
[0051] A global feature fusion mechanism is added to YOLOv8. By fusing features at different levels globally to obtain global information, and injecting global information into features at different levels, efficient information interaction and fusion are achieved, improving the detection capability for small targets such as ping-pong balls. When cross-layer information integration is required, traditional FPN-like structures cannot transmit information losslessly, which hinders YOLO from performing better information fusion. Through a novel collection and distribution mechanism, global information is injected into higher levels to achieve effective information exchange in YOLO, which significantly enhances the information fusion capability of the backbone network without significantly increasing latency, thereby improving the performance of the model on different object sizes. First, the shallow feature modules of the network identified by the backbone network are aligned to a uniform scale of 40x40 and connected on the channel. The formula is as follows.
[0052] F align =Low_FAM([B2, B3, B4, B5])
[0053] B2, B3, B4, and B5 are the feature information identified by the backbone network. The output of FAM is first extracted through multiple layers of RepBlock, and then divided into two parts by channel. The following formula is used to obtain inj_P3 and inj_P4 as the input for subsequent Inject.
[0054] F fuse =RepBlock(F align ),
[0055] F inj_P3 , F inj_P4 =Split(F fuse ).
[0056] Due to the size difference between Flocal and Fglobal, in order to ensure that the feature maps at different levels are aligned with the target size, average pooling or bilinear interpolation is used to scale Fglobal_embed and Fact according to the size of Finj, and 1x1 convolution is used to adjust the features that are different from the target channel to ensure correct alignment. At the end of each attention fusion, RepBlock is added to further extract and fuse information.
[0057] F global_act_Pi = resize(Sigmoid(Conv act (F inj_Pi ))),
[0058] F global_embed_Pi = resize(Conv global_embed_Pi (F inj_Pi )),
[0059] F att_fuse_Pi =Conv local_embed_Pi (Bi)*F ing_act_Pi +F global_embed_Pi
[0060] Pi=RepBlock(F att_fuse_Pi ).
[0061] Global represents the features of multiple layers fused together using the FAM module, and local represents the features of each layer. In order to achieve a balance between speed and accuracy, two LAF models are added: the LAF low-level model and the LAF high-level model, which are used to merge features from two adjacent layers and merge features from an adjacent layer, respectively.
[0062] The model was trained for 300 rounds with an input resolution of 640x640. val Compared with YOLOv5-N, it is 11.9% higher, and compared with YOLOv8-N, it is 2.6% higher. bs=1 It is 1.7ms.
[0063] The steps for RKNN model conversion and quantization for S5 are as follows:
[0064] A1. Prepare the trained YOL0 model weight file and convert it into 0NNX format file.
[0065] A2. Convert the pre-trained 0NNX model to a format supported by RKNN, and use the RKNN toolchain to parse and convert the model.
[0066] A3. Collect a dataset of representative table tennis pictures for quantitative calibration of the model. These data should cover as many input conditions as possible during model inference to ensure that the quantized model can make accurate predictions.
[0067] A4. Use the prepared dataset to quantize and calibrate the model. Through the calibration process, the optimal quantization parameters (such as scaling factors and zero points) for each layer in the model are determined.
[0068] A5. The RKNN tool simulates low-precision calculations and adjusts model parameters to achieve the best balance between accuracy and performance of the quantized model.
[0069] A6. Compile the quantified files and perform simulated deployment to test whether the Orange Pi environment is qualified.
[0070] The steps for multi-threading processing for S6 are as follows:
[0071] B1. Prepare the RKNN environment on the edge device, obtain the RKNN Toolkit and install it.
[0072] B2. Load the model file from RKNNLite and initialize model loading
[0073] B3. Add a thread pool to the main thread for thread management. Run multiple threads to enable the model files to run on NPUs with different numbers. Assign continuous video frames to different threads, and each thread processes its assigned frames independently.
[0074] B4. Add a secure queue. Each working thread independently performs model reasoning, preliminarily processes the detected ping-pong ball coordinates and categories, and transmits the reasoning results of each thread to the queue.
[0075] B5. In the main thread, the results of each working thread are summarized, the inference results are extracted, and the recognition results are displayed on the screen.
[0076] Example 3
[0077] A table tennis recognition system based on YOLOv8 and a method for deploying edge computing devices; image acquisition components such as Figure 1 The overall table tennis recognition training process on the edge computing device is as follows Figure 2 The result of multi-threaded calls to RKNNLite is shown in Figure 3 As shown in the figure, by calling the edge computing device NPU with multiple threads, the running speed of the model can be greatly improved, and the overall computing resources can be fully utilized to achieve the purpose of real-time detection. The principle of the YOLOv8 framework used is as follows Figure 4As shown in the figure, firstly, a table tennis detection model is established through the improved YOLOv8 detection algorithm; then, a variable kernel convolution network is added on the basis of YOLOv8 by improving Conv for table tennis detection. In order to further improve the speed of the model, the model parameters and computational overhead are reduced through its unique design. A global feature fusion mechanism is added to YOLOv8, which realizes effective information exchange in YOLO by globally fusing multi-level features and injecting global information into higher levels, further improving the recognition accuracy of small target objects such as table tennis, and finally achieving real-time detection. The final detection effect is shown in the figure. Figure 5 shown.
[0078] The method of the present invention can be implemented by an embedded chip, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0079] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical solutions and concepts of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A table tennis recognition system based on YOLOv8, characterized in that: It includes cameras, edge computing devices and serving machines. The cameras and serving machines are connected to the edge computing devices, and the edge computing devices are connected to the main control center.
2. The table tennis recognition system based on YOLOv8 as claimed in claim 1, characterized in that: The edge computing device uses an Orange Pi 5 Plus computing device, and the camera uses a distortion-free industrial camera with a frame rate of 60fps and a resolution of 640*480. The camera is connected to the Orange Pi 5 Plus, and video is recorded and detected in real time through multi-threading. The serving machine is integrated with the Orange Pi 5 Plus computing platform, and the serving strategy is dynamically adjusted according to the data obtained from the camera. YOLOv8 is deployed on the RK3588 of the Orange Pi 5 Plus through the RKNN tool chain.
3. A method for deploying edge computing devices of a table tennis recognition system based on YOLOv8 according to claim 1, characterized in that: The steps of the table tennis ball recognition system include: S1, image acquisition, using a monocular camera to record and collect the entire table tennis process at a frame rate of 120fps; S2, Image preprocessing: Use Python program to enhance the video data, and use annotation tools to annotate the pictures to complete the data set production; S3, improve the YOLOv8 network; S4, training network model; S5, perform RKNN conversion on the model and perform quantization processing; S6. Deploy to Orange Pi 5 Plus for multi-threaded real-time table tennis detection.
4. The edge computing device deployment method of the table tennis recognition system based on YOLOv8 as claimed in claim 3, characterized in that: In step S3, by improving Conv, a lightweight network is added on the basis of YOLOv8 for table tennis detection; by designing and modifying the backbone network, the model parameters and computational overhead are reduced; by adding variable kernel convolution, the inherent defects in the standard convolution operation are solved. Let R represent the sampling grid, then R is expressed as follows: R={(-1,-1),(-1,0),…,(0,1),(1,1)} Provide any number of parameters and any sampling shape for the convolution kernel, use any number of parameters to extract features, and make the number of convolution parameters increase or decrease linearly according to the hardware environment; The algorithm generates the initial sampling coordinates P of the convolution kernel n First, the sampling grid is generated as a regular sampling grid, then irregular grids are created for the remaining sampling points, and finally, they are stitched together to generate the overall sampling grid; After defining the initial coordinates P of the irregular convolution n After that, the corresponding position P0 convolution operation can be defined as follows: Represents the convolution parameters, R represents the sampling network, and first obtains the offset of the corresponding kernel through the convolution operation. The dimension of the convolution operation is (B, 2N, H, W), where N is the size of the convolution kernel; in order to measure the offset change of each given position, the definition of the average offset is given, which is defined as follows: Then, by comparing the offset and the original coordinates (P0+P n ) to obtain the modified coordinates; finally, the features of the corresponding positions are obtained by interpolation and resampling, and 3×3 convolution features are stacked in the spatial dimension; then, a convolution operation with a step size of 3 is used to extract square sampling shape features, and column convolution or row convolution is used to extract features corresponding to irregular sampling shapes; A global feature fusion mechanism is added to YOLOv8. By fusing features at different levels globally to obtain global information, the global information is injected into features at different levels, and the global information is injected into higher levels to achieve effective information exchange in YOLO and enhance the information fusion capability of the backbone network. First, the shallow feature modules of the network identified by the backbone network are aligned to a unified scale of 40x40 and connected on the channel. The formula is as follows: F align =Low_FAM([B2,B3,B4,B5]) B2, B3, B4, and B5 are the feature information recognized by the backbone network. The output of FAM is first extracted through multiple layers of RepBlock, and then divided into two parts by channel. As shown in the formula in the figure below, inj_P3 and inj_P4 are obtained as the input of the subsequent Inject; F fuse =RepBlock(F align ), F inj_P3 ,F inj_P4 =Split(F fuse ). Due to the size difference between F1ocal and Fglobal, in order to ensure that the feature maps at different levels are aligned with the target size, average pooling or bilinear interpolation is used to scale Fglobal_embed and Fact according to the size of Finj, and 1x1 convolution is used to adjust the features that are different from the target channel to ensure correct alignment; F global_act_Pi =resize(Sigmoid(Conv act (F inj_Pi ))), F global_embed_Pi =resize(ConV global_embed_Pi (F inj_Pi )), F att_fuse_Pi =ConV local_embed_Pi (Bi)*F ing_act_Pi +F global_embed_Pi Pi=RepBlock(F att_fuse_Pi ). Global represents the features of multiple layers fused together using the PAM module, and local represents the features of each layer. In order to achieve a balance between speed and accuracy, two LAP models are added: the LAF low-level model and the LAF high-level model, which are used to merge the features of two adjacent layers and merge the features from an adjacent layer, respectively.
5. The edge computing device deployment method of the table tennis recognition system based on YOLOv8 as claimed in claim 3, characterized in that: In step S5, the steps of performing RKNN model conversion and quantization operation are as follows: A1. Prepare the trained YOLO model weight file and convert it into ONNX format file; A2. Convert the pre-trained ONNX model to a format supported by RKNN, and use the RKNN toolchain to parse and convert the model; A3. Collect a dataset of representative table tennis pictures for quantitative calibration of the model; A4. Use the prepared dataset to quantitatively calibrate the model; A5. The RKNN tool simulates low-precision calculations and adjusts model parameters to achieve the best balance between accuracy and performance of the quantized model. A6. Compile the quantified files and perform simulated deployment to test whether the Orange Pi environment is qualified.
6. The edge computing device deployment method of the table tennis recognition system based on YOLOv8 as claimed in claim 3, characterized in that: In step S6, the multi-thread processing operation steps are as follows: B1. Prepare the RKNN environment on the edge device, obtain the RKNN Toolkit and install it; B2. Load the model file from RKNNLite and initialize model loading; B3. Add a thread pool to the main thread for thread management, run multiple threads to make the model files run on NPUs with different numbers, assign continuous video frames to different threads, and each thread processes its assigned frames independently; B4. Add a security queue. Each working thread independently performs model reasoning, preliminarily processes the detected ping-pong ball coordinates and categories, and transmits the reasoning results of each thread to the queue. B5. In the main thread, the results of each working thread are summarized, the inference results are extracted, and the recognition results are displayed on the screen.
7. The edge computing device deployment method of the table tennis recognition system based on YOLOv8 as claimed in claim 6, characterized in that: Multithreaded control includes the following steps:
1. Create multiple threads: The processing unit creates multiple threads, each of which can perform different tasks at the same time, including camera video recording, RKNNLite call, image processing, object detection, and drawing recognition frames; 2. Assign tasks: The processing unit assigns different tasks to different threads and executes multiple tasks at the same time; 3. Thread synchronization: The processing unit uses a synchronization mechanism to ensure that multiple threads share resources or data; 4. Thread communication: The thread communication mechanism ensures the coordinated operation and data consistency of multi-threaded programs. Adding a safe queue allows data items to be safely added and retrieved by multiple threads.
5. Thread pool management: The processing unit maintains a thread pool through ThreadPoolExecutor, allowing multiple tasks to be executed concurrently while controlling the number of active threads; 6. Thread destruction: The processing unit destroys the thread after the task is completed to release resources.
Citation Information
Cited By
Concrete bridge efflorescence defect detection method, device and system and storage medium
CN120235884A
Concrete bridge efflorescence defect detection method, device, system, and storage medium
CN120235884B