Woodworking table saw safety detection method based on machine vision

Through the combination of improved YOLOv1 model and hardware, real-time hand detection and alarm of woodworking table saws are realized, solving the problems of inaccurate line of sight occlusion and detection of traditional safety protection devices, and improving operational safety and reliability.

CN120564259AInactive Publication Date: 2025-08-29YUNNAN TUOMEI DECORATION ENGINEERING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510644503.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-08-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The safety protection devices of existing woodworking table saws have problems such as obstruction of sight, inaccurate detection, low sensitivity and lack of effective alarm mechanism, which leads to high risk of injury caused by hand cutting of operators, and traditional sensors are susceptible to interference from wood chips and dust.

Method used

The improved YOLOv1 model is adopted, combined with the A2C2f-DYT module and the EUpsample module for hand detection, combined with the electromagnetic relay and the buzzer to achieve real-time safety detection and alarm, and the hands are identified through machine vision and power is cut off within 200ms.

Benefits of technology

It improves the safety and reliability of the woodworking table saw, avoids cutting damage caused by operating errors, responds to high-speed motion scenarios in real time, and reduces the probability of accidents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120564259A_ABST
    Figure CN120564259A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing and the technical field of automation, and particularly discloses a woodworking table saw safety detection method based on machine vision, compared with a traditional mechanical limit switch (the response time is greater than or equal to 500ms), the time difference from dangerous action to safety response is greatly shortened, and the safety of a woodworking table saw is improved. According to the method, cutting injury caused by misoperation and distraction is effectively avoided, the safety of hands and limbs of an operator is protected, non-contact detection is adopted, interference of wood dust is avoided, a high-speed movement scene can be responded in real time, and the safety and reliability of woodworking operation are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of image processing and automation, and in particular to a safety detection method for a woodworking table saw based on machine vision. Background Art

[0002] In the modern woodworking industry, table saw is a widely used basic equipment, which is widely used in cutting and processing operations of various types of wood. Whether it is furniture manufacturing, building decoration or wood craft production, the use of table saw is indispensable.

[0003] However, woodworking table saws currently face numerous safety challenges that need to be addressed. Because the saw blade rotates at high speed during operation, operators often keep their hands close to the blade while feeding material, fine-tuning the wood, and so on. A slight inattention can lead to accidental contact with the blade, resulting in serious cutting injuries, physical harm and mental distress to the operator, and financial losses to businesses or individuals. Furthermore, some existing table saw guards have design flaws. While some guards can prevent foreign objects from approaching the saw blade to a certain extent, they significantly obstruct the operator's view, affecting operational accuracy and reducing work efficiency. Other guards have a limited range of protection, failing to fully cover hazardous areas and failing to effectively ensure operator safety.

[0004] Existing detection methods mostly rely on simple sensors that can only detect approaching objects but cannot accurately identify whether they are human hands. This can easily lead to misjudgments, frequently triggering power-off devices, and affecting work efficiency. Furthermore, these sensors have low sensitivity and reliability. In the complex environment of a woodworking workshop, they are easily interfered with by wood chips, dust, and other factors, resulting in inaccurate detection.

[0005] Even if some table saws are equipped with protective devices, they only cut off the power supply when danger occurs, and lack an effective alarm mechanism. This makes it impossible for people around to be notified of the danger in time and take prompt measures, which increases the severity of the accident. Summary of the Invention

[0006] The purpose of the present invention is to provide a woodworking table saw safety detection method based on machine vision in order to solve the above problems. To achieve the above purpose, the present invention adopts the following technical solution: a woodworking table saw safety detection method based on machine vision, the method comprising the following steps:

[0007] Step 1: Collect a dataset of hand photos;

[0008] Step 2: Use a computer to preprocess the collected data set;

[0009] Step 3: Use the improved YOLOv12 hand detection model training dataset. Improve YOLOv12 by adding a P2 detection head to the detection layer. Design and use the A2C2f-DYT module in the backbone and neck networks. This module combines A2C2f with the Transformer-based Dynamic Tanh module. Design and use the new EUpsample upsampling module at the end of the backbone network.

[0010] Step 4: Use the training set and validation set to train the hand detection model. After obtaining the optimal detection model, use the test set to evaluate the performance of the hand detection model.

[0011] Step 5: After training the detection model using the training set and validation set, the optimal hand detection model is obtained;

[0012] Step 6. Fix the camera directly above the woodworking table saw and use computer algorithms to perform real-time safety detection on the woodworking table saw.

[0013] As a preferred technical solution of the present invention, the implementation process of the A2C2f-DYT module is as follows:

[0014] The input tensor X is passed to the initial convolution layer created when the parent class is initialized; the convolution layer uses a 1×1 convolution layer, which is used to reduce the dimension of the input feature map and convert the number of input channels into the number of hidden channels; the convolution operation performs a linear transformation on the input features to extract some basic feature information from the input features; the convolution kernel in the CBS convolution layer slides on the input feature map, and the weight of the convolution kernel is multiplied by the element at the corresponding position of the input feature map and summed to obtain the value of each element of the output feature map; finally, the feature map after convolution is stored in a list, which has only one element at this time, that is, the result of convolution of the input vector; then the ABlock_DYT module composition is started in a loop; for each module sequence, the last element of the list is passed in as input; the feature vector X2 processed by the ABlock_DYT module is residually connected with the input feature vector X to output the result Y; the mathematical expression of its forward propagation process is:

[0015] Y=X+X2.

[0016] As a preferred technical solution of the present invention, the implementation process of the ABlock_DYT module is as follows: after the input vector X enters the DynamicTanh module, it is first multiplied by the learnable scalar α1 to obtain X1, so as to dynamically adjust the input amplitude so that the model can learn the appropriate scaling ratio; then a nonlinear transformation is performed through the tanh function to obtain Y 11, maps the input to the range of -1 to 1 and introduces nonlinear characteristics; then uses the learnable channel-level weight W and bias B to scale and offset Y element by element to obtain Y dyt1 , adaptively adjust the activation function output according to the input features; the transformed Y dyt1 Input the attention mechanism layer and enhance the key information by weight distribution to obtain Y attn , and then perform residual connection with the original input X to obtain X2 to alleviate the gradient disappearance problem; after processing X2, apply DynamicTanh transformation again: first multiply it by the learnable scalar to obtain X3, and then transform it into Y through the tanh function 21 , and then scale the offset by channel-level weight W2 and bias B2 to get Y dyt2 ; then Y dyt2 Enter the multi-layer perceptron MLP, and perform nonlinear transformation and feature extraction through the fully connected layer and activation function to obtain Y mlp ; Finally, Y mlp The output is obtained by adding it to the first residual result X2. The feature cross-layer fusion is achieved through two residual connections, ensuring efficient gradient backpropagation and deep network training. The whole process realizes multi-granularity processing and efficient expression of input features through the combination of dynamic scaling, nonlinear activation, channel adaptive adjustment, attention mechanism and multi-layer perceptron. The forward propagation mathematical expression is:

[0017] X1=α1·X

[0018] Y 11 =tanh(X1)

[0019] Y dyt 1=W1⊙Y 11 +B1

[0020] Y attn =Attn(Y dyt1 )

[0021] X2=X+Y attn

[0022] X3=α2·X1

[0023] Y 21 =tanh(X2)

[0024] Y dyt2 =W2⊙Y 21 +B2

[0025] Y mlp =MLP(Y dyt2 )

[0026] Output=X2+Y mlp .

[0027] As a preferred technical solution of the present invention, the implementation process of the DynamicTanh module is as follows: After the input vector X enters the Dynamic Tanh module, a learnable scalar multiplication operation is first performed, multiplying it by the learnable scalar α1 to dynamically adjust the input amplitude so that the model learns the appropriate scaling ratio. In this way, the model can autonomously learn to adapt to the scaling level of the current input features, avoiding the limitations of fixed scaling, and obtain X1. Then, the tanh function is applied to X1 for nonlinear transformation to obtain Y 11 , which maps the input to the range of -1 to 1, introducing nonlinear characteristics, which is consistent with the need to use nonlinear transformation of activation functions to capture complex patterns in the literature. Then, the channel-level weight W1 and bias B1 that can be learned are used to transform Y 11 Perform element-by-element scaling and offset, and make adaptive adjustments based on the channel differences of the input features, and finally obtain Y dyt1 ; Its forward propagation mathematical expression is:

[0028] X1=α1·X

[0029] Y 11 =tanh(X1)

[0030] Y dyt1 =W1⊙Y 11 +B1.

[0031] As a preferred technical solution of the present invention, the implementation process of the EUpsample module is as follows: after the input feature map X enters the EUpsample module, the Upsample operation is first performed, and the feature map is amplified by the scale-factor 2 scaling factor to improve the resolution to match the dimension of the subsequent connected feature map to obtain X1; then a 3×3 depth convolution is applied to X1. This operation is independent of each channel, extracting local features of each channel while reducing the amount of calculation, and obtaining X2; then a BN operation is performed on X2 to accelerate training and improve model stability by normalizing the input data, and then a nonlinear characteristic is introduced through the ReLU activation function to enhance the model expression ability to obtain X3; then a channel rearrangement operation is performed on X3, and the feature map is divided into groups and the channels are rearranged to achieve channel information mixing between different groups, thereby improving feature diversity and utilization efficiency, and obtaining X4; finally, a 1×1 convolution is used to process X4, and the number of channels is reduced by point-by-point convolution to match the input requirements of the next stage, and finally the output Y is obtained; its forward propagation mathematical expression is:

[0032] Y=C 1×1 (ReLU(BN(DWC(Up(x))))).

[0033] As a preferred technical solution of the present invention, the specific steps of step six are as follows: the hardware part includes a buzzer, an electromagnetic relay and an Arduino controller; the signal pin of the buzzer is connected to the digital pin 9 of the Arduino controller for receiving the alarm signal sent by the Arduino; the ground pin of the buzzer is connected to the ground terminal (GND) of the Arduino, and the power pin is connected to the 5V power terminal of the Arduino; the control pin of the electromagnetic relay is connected to another digital pin 10 of the Arduino controller for receiving the control signal sent by the Arduino; the common terminal COM of the electromagnetic relay is connected to the power input, and the normally closed terminal NC is connected to the load device. When the Arduino sends a high-level signal to the control pin, the electromagnetic relay is energized and cuts off The power supply of the load device; in the information transmission and program execution part, the YOLO target recognition module is connected to the Arduino controller through serial communication; when the YOLO algorithm recognizes a hand, the recognition result is sent to the Arduino controller in the form of an ASCII code string through the serial port; after the Arduino controller receives the recognition information sent by YOLO, it first parses and verifies the information; if the verification result shows that a hand is recognized, the Arduino controller immediately sends a high-level signal to the digital pin connected to the electromagnetic relay, causing the electromagnetic relay to attract, cutting off the power supply of the load device and realizing the power-off operation; at the same time, the Arduino controller sends a pulse signal of a specific frequency to the digital pin connected to the buzzer, driving the buzzer to emit an alarm sound, realizing the alarm function.

[0034] As a preferred technical solution of the present invention, the specific steps of step seven are as follows:

[0035] Step 7: Fix the industrial camera vertically above the woodworking table saw with an adjustable bracket, with the lens covering the saw blade cutting area, and capture the operation screen in real time;

[0036] Step 72: Use the improved YOLOv12 computer vision algorithm to process the video stream and accurately identify hand images. When a hand is detected, the algorithm immediately sends a signal to the Arduino through the serial port, triggering the electromagnetic relay to cut off the power to the table saw and start the buzzer.

[0037] Compared with the existing technology, the present invention offers the following advantages: Based on the application scenario of woodworking table saw safety inspection, the present invention proposes an improved YOLOv12 hand recognition model. The A2C2f_DYT module, which combines the A2C2f with the Dynamic Tanh module of the Transformer architecture, is innovatively designed and implemented in the backbone and neck networks. This module introduces a nonlinear activation function, enabling adaptive nonlinear response in different layers and channels. By adjusting parameters in the lower layers, the activation function is made closer to linear, preserving more detailed information. By adjusting parameters in the higher layers, the activation function is made more nonlinear, enhancing abstract feature extraction. Each channel independently learns a set of parameters, enhancing the model's ability to differentiate between different feature channels, thereby improving hand feature extraction. A new EUpsample upsampling module is designed and implemented in the neck network. This module fuses feature maps of different scales through convolution operations, learning the correlation between feature information across channels and locations within the feature map. This module better preserves and enhances feature information, improving model performance and addressing the problem of traditional models losing important feature information. To address the deadly dangers posed by the high-speed rotating blade of a woodworking table saw, this device uses YOLO visual recognition technology to monitor the operating area in real time. When a human hand approaches the blade's protective boundary, the system triggers an Arduino-controlled electromagnetic relay to cut off the table saw motor power within 200ms or less, while a high-frequency buzzer sounds a warning tone. Compared to traditional mechanical limit switches (response time ≥500ms), this significantly shortens the time lag between dangerous action and safe response, effectively preventing cutting injuries caused by operator error and distraction, and protecting the operator's hands and limbs. This solution utilizes non-contact detection, is unaffected by sawdust and dust, and can respond to high-speed motion scenarios in real time, effectively improving the safety and reliability of woodworking operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a flow chart of the method of the present invention;

[0039] Figure 2 This is a hand recognition detection model diagram improved by the present invention based on YOLOv12;

[0040] Figure 3 This is a schematic diagram of the A2C2f_DYT module structure of the present invention;

[0041] Figure 4 This is a schematic diagram of the ABlock_DYT module structure of the present invention;

[0042] Figure 5 This is a schematic diagram of the Dynamic Tanh module structure of the present invention;

[0043] Figure 6This is a schematic diagram of the EUpsample module structure of the present invention;

[0044] Figure 7 This is a schematic diagram of the hardware module structure of the device of the present invention;

[0045] Figure 8 It is a schematic diagram of the information transmission and program module structure of the device of the present invention. DETAILED DESCRIPTION

[0046] To make the problems solved by the present invention, the method solutions adopted, and the effects achieved by the methods more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and implementation examples. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the drawings only illustrate portions relevant to the present invention, not all of it.

[0047] like Figure 1 As shown, an embodiment of the present invention provides a method for detecting safety of a woodworking table saw based on machine vision, and the specific steps are as follows:

[0048] The first step is to obtain a dataset of hand images.

[0049] The hand image dataset used in this paper is the ChalearnIsoGD hand dataset, published by the Institute of Automation, Chinese Academy of Sciences. This dataset contains 47,933 RGB-D hand videos. We selected 10 videos for download and used Python code to extract frames from them to obtain 300 hand images.

[0050] In the second step, a computer is used to mark the hands of each frame-processed photo and perform data expansion and enhancement.

[0051] First, we imported the captured dataset into the X-AnyLabeling annotation tool and labeled the hands in 300 images in YOLO format. We then used data augmentation methods such as random contrast enhancement, noise enhancement, flipping, and scaling to expand the image data and labels to 3,000 images. This simulated images recognized by the camera under various extreme conditions, thereby improving the generalization ability of the trained model.

[0052] The third step is to use the computer data set to divide it into validation set, training set, and test set, and process them into the network model recognition format of YOLOv12.

[0053] Use Python code to split the hand dataset into training, validation, and test sets in a ratio of 8:1:1. The training set will be used to train the model, the validation set will be used for evaluation during training, and the test set will be used to evaluate model performance. The dataset is then processed into the YOLOv12 network model recognition format.

[0054] The fourth step is to use the improved YOLOv12 hand detection model for training and the improved YOLOv12 model training data set. The improved YOLOv12 adds a P2 detection head on the detection layer, and innovatively designs and uses the A2C2f-DYT module that combines A2C2f with the Transformer-based Dynamic Tanh module in the backbone network and the neck network. The new EUpsample upsampling module is designed and used in the neck network, as shown in the following figure. Figure 2 shown.

[0055] A P2 detection head is added so that the hand image is passed into the Backbone network to extract four different feature maps. The four sizes of 120×120, 64×64, 32×32, and 16×16 are used to detect targets of four different sizes: tiny, small, medium, and large, respectively.

[0056] like Figure 3As shown in the figure, the A2C2f_DYT module combines the A2C2f architecture with the Dynamic Tanh module of the base Transformer architecture. This module introduces a nonlinear activation function, enabling adaptive nonlinear responses across different layers and channels. By adjusting parameters in lower layers, the activation function is made closer to linearity, preserving more detailed information. By adjusting parameters in higher layers, the activation function is made more nonlinear, enhancing abstract feature extraction. Each channel independently learns a set of parameters, enhancing the model's ability to differentiate between different feature channels, thereby improving hand feature extraction. First, the input tensor X is passed to the initial convolutional layer created during parent class initialization. The CBS convolutional layer uses a 1×1 convolutional layer to reduce the dimensionality of the input feature map, converting the number of input channels to the number of hidden channels. The convolution operation performs a linear transformation on the input features, extracting some basic feature information. The convolution kernel in the CBS convolutional layer slides across the input feature map. The kernel's weights are multiplied by the corresponding element in the input feature map, and the sum is calculated to produce the value of each element in the output feature map. Finally, the convolved feature map is stored in a list containing only one element: the result of the convolution of the input vector. The ABlock_DYT module is then looped through. For each module sequence, the last element of the list is passed as input. The feature vector X2 processed by the ABlock_DYT module is residually connected to the input feature vector X, resulting in the output Y. The mathematical expression for the forward propagation process is:

[0057] Y=X+X2.

[0058] like Figure 4 As shown in the figure, the ABlock_DYT module can dynamically adjust the input amplitude according to the model training situation, allowing the model to learn the appropriate scaling ratio to adapt to different data distributions and task requirements. The implementation process of the ABlock_DYT module used is as follows: Input vector X∈R C×H×W After entering the DynamicTanh module, we first multiply it by the learnable scalar α1 to get X1, so as to dynamically adjust the input amplitude so that the model can learn the appropriate scaling ratio; then we perform a nonlinear transformation through the tanh function to get Y 11 , maps the input to the (-1,1) interval and introduces nonlinear characteristics; then uses the learnable channel-level weight W and bias B, (after dimension expansion) to scale and offset Y element by element to obtain Y dyt1 , adaptively adjust the activation function output according to the input features. The transformed Y dyt1 Input the attention mechanism layer and enhance the key information by weight distribution to obtain Y attn, and then perform a residual connection with the original input X to obtain X2 to alleviate the gradient vanishing problem. After processing X2, the DynamicTanh transformation is applied again: first multiply it by the learnable scalar α2 to obtain X3, and then transform it into Y through the tanh function 21 , and then scale the offset by channel-level weight W2 and bias B2 (after dimension expansion) to get Y dyt2 ; then Y dyt2 Enter the multi-layer perceptron MLP, and perform nonlinear transformation and feature extraction through the fully connected layer and activation function to obtain Y mlp Finally, Ymlp is added to the initial residual result X2 to obtain the output. Two residual connections are used to achieve cross-layer feature fusion, ensuring efficient gradient backpropagation and deep network training. The entire process combines dynamic scaling, nonlinear activation, channel adaptive adjustment, attention mechanism, and multi-layer perceptron to achieve multi-granular processing and efficient expression of input features. The forward propagation mathematical expression is:

[0059] X1=α1·X

[0060] Y 11 =tanh(X1)

[0061] Y dyt 1=W1⊙Y 11 +B1

[0062] Y attn =Attn(Y dyt1 )

[0063] X2=X+Y attn

[0064] X3=α2·X1

[0065] Y 21 =tanh(X2)

[0066] Y dyt2 =W2⊙Y 21 +B2

[0067] Y mlp =MLP(Y dyt2 )

[0068] Output=X2+Y mlp

[0069] like Figure 5As shown in the figure, the Dynamic Tanh module can make adaptive adjustments based on the differences in input features in different channels, so that the model can pay more attention to important channel information and suppress irrelevant information, thereby improving the quality and effectiveness of feature representation. The implementation process is as follows: After the input vector X enters the Dynamic Tanh module, it first performs a learnable scalar multiplication operation, multiplying it by the learnable scalar α1 to dynamically adjust the input amplitude so that the model can learn the appropriate scaling ratio. In this way, the model can autonomously learn to adapt to the scaling level of the current input features, avoiding the limitations of fixed scaling, and obtain X1. Then, apply the tanh function to X1 for nonlinear transformation to obtain Y 11 , which maps the input to the (-1,1) interval and introduces nonlinear characteristics, which is consistent with the need to use nonlinear transformation of activation functions to capture complex patterns in the literature. Then, the channel-level weight W1 and bias B1 (after dimension expansion) are used to transform Y 11 Perform element-by-element scaling and offset, and make adaptive adjustments based on the channel differences of the input features, and finally obtain Y dyt1 . Its forward propagation mathematical expression is:

[0070] X1=α1·X

[0071] Y 11 =tanh(X1)

[0072] Y dyt1 =W1⊙Y 11 +B1

[0073] like Figure 6As shown in Figure 1, the EUpsample upsampling module fuses feature maps of different scales through convolution operations, learning the correlation between feature information across different channels and locations within the feature maps. This module better preserves and enhances feature information, improves model performance, and addresses the problem of traditional models losing important feature information. The implementation process is as follows: After the input feature map X enters the EUpsample module, it first performs an Upsample operation, scaling the feature map by a scale-factor of 2 to increase its resolution to match the dimensions of the subsequent feature maps, resulting in X1. A 3×3 depthwise convolution is then applied to X1. This operation performs independent convolution on each channel, reducing computational effort while extracting local features within each channel, resulting in X2. Batch normalization (BN) is then performed on X2 to normalize the input data, accelerating training and improving model stability. A ReLU activation function is then used to introduce nonlinearity and enhance model expressiveness, resulting in X3. A channel shuffling operation is then performed on X3, dividing the feature map into groups and rearranging the channels. This allows for mixing channel information across groups, improving feature diversity and utilization efficiency, resulting in X4. Finally, 1×1 convolution is used to process X4, and the number of channels is reduced by point-by-point convolution to match the output requirements of the next stage. The forward propagation mathematical expression is:

[0074] Y=C 1×1 (ReLU(BN(DWC(Up(x)))))

[0075] Step 5: Use the iteratively optimal model weight file

[0076] The training set and validation set are input into the improved YOLOv12 hand part recognition and detection model, and the number of training times is set. As the number of training times increases, the loss function curve of the model gradually converges. When the loss function curve converges and stabilizes, the hand part recognition and detection model is trained to the optimal state, and its optimal model weight file is saved. The image to be detected in the test set is input into the trained optimal hand part recognition and detection model, and the hand part detection image is output, where the detection image includes marking information and detection information.

[0077] Step 6. Connect the buzzer and electromagnetic relay to the Arduino. When YOLO recognizes the hand, it transmits the information to the Arduino and executes the power-off and alarm procedures.

[0078] The hardware part includes a buzzer, an electromagnetic relay and an Arduino controller. Use DuPont wire to reliably connect the buzzer and electromagnetic relay to the Arduino controller to ensure a firm connection and avoid looseness that causes abnormal signal transmission. The present invention uses the active buzzer KY-006, which has high sensitivity and loud sound. The signal pin of the buzzer is connected to the digital pin 9 of the Arduino controller to receive the alarm signal sent by the Arduino; the ground pin of the buzzer is connected to the ground terminal (GND) of the Arduino, and the power pin is connected to the 5V power terminal of the Arduino. The present invention uses the SRD-05VDC-SL-C electromagnetic relay, whose contact capacity is 10A 250VAC / 30VDC. The control pin of the electromagnetic relay is connected to another digital pin 10 of the Arduino controller to receive the control signal sent by the Arduino; the common terminal (COM) of the electromagnetic relay is connected to the 220V AC power input, the rated current of the power supply is 5A, and it can provide a stable power supply for the load equipment; the normally closed terminal (NC) is connected to the load equipment. When the Arduino sends a high-level signal to the control pin, the electromagnetic relay is energized to cut off the power supply to the load equipment, such as Figure 7 shown.

[0079] For information transmission and program execution, the YOLO object recognition module connects to the Arduino controller via a serial port. The serial port communication parameters are set to: 9600bps baud rate, 8 data bits, 1 stop bit, and no parity. When the YOLO algorithm recognizes a hand, it sends the recognition result as an ASCII string to the Arduino controller via the serial port. After receiving the recognition information from YOLO, the Arduino controller first parses and verifies the information. Specifically, upon receiving the ASCII string from YOLO, the Arduino controller first checks the string's start and end markers to confirm its integrity. It then extracts and compares key information within the string to verify that it represents the specific string indicating hand recognition. If the verification result indicates hand recognition, the Arduino controller immediately sends a high-level signal to digital pin 10, which is connected to the electromagnetic relay, closing it and disconnecting the power supply to the load device. Simultaneously, the Arduino controller sends a pulse signal with a frequency of 1000Hz and a duty cycle of 50% to digital pin 9, which is connected to the buzzer, causing the buzzer to emit a loud alarm sound, implementing the alarm function. If the Arduino controller does not receive complete identification information within the specified time, or the received information fails to be verified, the system will ignore the information and continue to wait for the next recognition result. At the same time, the indicator light will flash to indicate possible abnormal conditions, such as Figure 8 shown.

[0080] The seventh step is to fix the camera directly above the woodworking table saw and use computer algorithms to perform real-time safety detection of the woodworking table saw.

[0081] The present invention uses a Hikvision MV-CH250-90UN industrial camera, which is fixed vertically above a woodworking table saw via an adjustable bracket. The lens covers the saw blade's cutting area and captures the operating screen in real time. The improved YOLOv12 visual algorithm is used to process the video stream and accurately identify hand images. When a human hand is detected, the algorithm immediately sends a signal to the Arduino through the serial port, triggering an electromagnetic relay to cut off the table saw's power supply and start a buzzer alarm.

[0082] The above embodiments merely illustrate the implementation methods of the present invention. Although the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the scope of the present invention, and these modifications and improvements fall within the scope of protection of the present invention.

Claims

1. A woodworking table saw safety detection method based on machine vision, characterized in that: The method comprises the following steps: Step 1: Collect a dataset of hand photos; Step 2: Use a computer to preprocess the collected data set; Step 3: Use the improved YOLOv12 hand detection model training dataset. Improve YOLOv12 by adding a P2 detection head to the detection layer. Design and use the A2C2f-DYT module in the backbone and neck networks. This module combines A2C2f with the Transformer-based Dynamic Tanh module. Design and use the new EUpsample upsampling module at the end of the backbone network. Step 4: Use the training set and validation set to train the hand detection model. After obtaining the optimal detection model, use the test set to evaluate the performance of the hand detection model. Step 5: After training the detection model using the training set and validation set, the optimal hand detection model is obtained; Step 6. Fix the camera directly above the woodworking table saw and use computer algorithms to perform real-time safety detection on the woodworking table saw.

2. The machine vision-based woodworking table saw safety detection method according to claim 1, characterized in that: The implementation process of the A2C2f-DYT module is as follows: The input tensor X is passed to the initial convolution layer created when the parent class is initialized; the convolution layer uses a 1×1 convolution layer, which is used to reduce the dimension of the input feature map and convert the number of input channels into the number of hidden channels; the convolution operation performs a linear transformation on the input features to extract some basic feature information from the input features; the convolution kernel in the CBS convolution layer slides on the input feature map, and the weight of the convolution kernel is multiplied by the element at the corresponding position of the input feature map and summed to obtain the value of each element of the output feature map; finally, the feature map after convolution is stored in a list, which has only one element at this time, that is, the result of convolution of the input vector; then the ABlock_DYT module composition is started in a loop; for each module sequence, the last element of the list is passed in as input; the feature vector X2 processed by the ABlock_DYT module is residually connected with the input feature vector X to output the result Y; the mathematical expression of its forward propagation process is: Y=X+X2.

3. The machine vision-based woodworking table saw safety detection method according to claim 2, characterized in that: The implementation process of the ABlock_DYT module is as follows: after the input vector X enters the DynamicTanh module, it is first multiplied by the learnable scalar α1 to obtain X1, so as to dynamically adjust the input amplitude so that the model can learn the appropriate scaling ratio; then a nonlinear transformation is performed through the tanh function to obtain Y 11 , maps the input to the range of -1 to 1 and introduces nonlinear characteristics; then uses the learnable channel-level weight W and bias B to scale and offset Y element by element to obtain Y dyt1 , adaptively adjust the activation function output according to the input features; the transformed Y dyt1 Input the attention mechanism layer and enhance the key information by weight distribution to obtain Y attn , and then perform residual connection with the original input X to obtain X2 to alleviate the gradient disappearance problem; after processing X2, apply DynamicTanh transformation again: first multiply it by the learnable scalar to obtain X3, and then transform it into Y through the tanh function 21 , and then scale the offset by channel-level weight W2 and bias B2 to get Y dyt2 ; then Y dyt2 Enter the multi-layer perceptron MLP, and perform nonlinear transformation and feature extraction through the fully connected layer and activation function to obtain Y mlp ; Finally, Y mlp Add it to the first residual result X2 to get the output Output. Through two residual connections, cross-layer feature fusion is achieved to ensure efficient gradient backpropagation and deep network training; The entire process achieves multi-granularity processing and efficient expression of input features through the combination of dynamic scaling, nonlinear activation, channel adaptive adjustment, attention mechanism and multi-layer perceptron; Its forward propagation mathematical expression is: X1=α1·X AND 11 =tanh(X1) AND dyt1 =W1⊙Y 11 +B1 Y attn =Attn(Y dyt1 ) X2=X+Y attn X3=α2·X1 Y 21 =tanh(X2) Y dyt2 =W2⊙Y 21 +B2 AND mlp =MLP(Y dyt2 ) Output=X2+Y mlp 。 4. The machine vision-based woodworking table saw safety detection method according to claim 3, characterized in that: The implementation process of the DynamicTanh module is as follows: After the input vector X enters the DynamicTanh module, it first performs a learnable scalar multiplication operation, multiplying it by the learnable scalar α1 to dynamically adjust the input amplitude so that the model can learn the appropriate scaling ratio. In this way, the model can autonomously learn to adapt to the scaling level of the current input features, avoiding the limitations of fixed scaling, and obtain X1. Then, the tanh function is applied to X1 for nonlinear transformation to obtain Y 11 , which maps the input to the range of -1 to 1, introducing nonlinear characteristics, which is consistent with the need to use nonlinear transformation of activation functions to capture complex patterns in the literature. Then, the channel-level weight W1 and bias B1 that can be learned are used to transform Y 11 Perform element-by-element scaling and offset, and make adaptive adjustments based on the channel differences of the input features, and finally obtain Y dyt1 ; Its forward propagation mathematical expression is: X1=α1·X AND 11 =tanh(X1) AND dyt1 =W1⊙Y 11 +B1。 5. The machine vision-based woodworking table saw safety detection method according to claim 1, characterized in that: The implementation process of the EUpsample module is as follows: after the input feature map X enters the EUpsample module, the Upsample operation is first performed, and the feature map is amplified by the scale-factor 2 scaling factor to improve the resolution to match the dimension of the subsequent connected feature map to obtain X1; then a 3×3 depth convolution is applied to X1. This operation is independent of each channel, extracting local features of each channel while reducing the amount of calculation, and obtaining X2; then a BN operation is performed on X2 to accelerate training and improve model stability by normalizing the input data, and then a nonlinear characteristic is introduced through the ReLU activation function to enhance the model expression ability, and obtain X3; then a channel rearrangement operation is performed on X3, and the feature map is divided into groups and the channels are rearranged to achieve channel information mixing between different groups, improve feature diversity and utilization efficiency, and obtain X4; finally, a 1×1 convolution is used to process X4, and the number of channels is reduced by point-by-point convolution to match the input requirements of the next stage, and finally the output Y is obtained; its forward propagation mathematical expression is: Y=C 1×1 (ReLU(BN(DWC(Up(x)))))。 6. The machine vision-based woodworking table saw safety detection method according to claim 1, characterized in that: The specific steps of step six are as follows: the hardware part includes a buzzer, an electromagnetic relay and an Arduino controller; the signal pin of the buzzer is connected to the digital pin 9 of the Arduino controller for receiving the alarm signal sent by the Arduino; the ground pin of the buzzer is connected to the ground terminal (GND) of the Arduino, and the power pin is connected to the 5V power terminal of the Arduino; the control pin of the electromagnetic relay is connected to another digital pin 10 of the Arduino controller for receiving the control signal sent by the Arduino; the common terminal COM of the electromagnetic relay is connected to the power input, and the normally closed terminal NC is connected to the load device. When the Arduino sends a high-level signal to the control pin, the electromagnetic relay is energized to cut off the power supply to the load device. In the information transmission and program execution part, the YOLO target recognition module is connected to the Arduino controller through serial communication. When the YOLO algorithm recognizes a hand, the recognition result is sent to the Arduino controller in the form of an ASCII code string through the serial port. After receiving the recognition information sent by YOLO, the Arduino controller first parses and verifies the information. If the verification result indicates that a hand is recognized, the Arduino controller immediately sends a high-level signal to the digital pin connected to the electromagnetic relay, causing the electromagnetic relay to attract and cut off the power supply to the load device, realizing the power-off operation. At the same time, the Arduino controller sends a pulse signal of a specific frequency to the digital pin connected to the buzzer, driving the buzzer to sound an alarm, realizing the alarm function.

7. The machine vision-based woodworking table saw safety detection method according to claim 1, characterized in that: The specific steps of step seven are as follows: Step 7: Fix the industrial camera vertically above the woodworking table saw with an adjustable bracket, with the lens covering the saw blade cutting area, and capture the operation screen in real time; Step 72: Use the improved YOLOv12 computer vision algorithm to process the video stream and accurately identify hand images. When a hand is detected, the algorithm immediately sends a signal to the Arduino through the serial port, triggering the electromagnetic relay to cut off the power to the table saw and start the buzzer.