Artificial intelligence drill bit working condition detection system

Through the artificial intelligence drill bit condition detection system, the drill bit status of the ring mold drill machine is solved, and the problem of drill bit failure cannot be detected in real time is improved, production efficiency and safety are improved, and production optimization is supported.

CN120244703APending Publication Date: 2025-07-04JIANGSU VITANS TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510479300.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The drill bit breakage of the prior art middle ring mold drilling machine cannot be detected in real time during the drilling process, resulting in leaking holes and drilling of the workpiece, affecting production efficiency and wasting time.

Method used

An artificial intelligence drill bit working condition detection system is designed, including a camera module, fill light device, filter device, main control board, bus slave communication board, power supply module, power cable, bus communication cable, bracket, alarm light, server, WIFI communication module, data storage module and mobile phone real-time monitoring APP. Through image processing and deep learning models, the drill bit status is detected in real time, and the machine is shut down and alarm is called in a timely manner.

Benefits of technology

Real-time detection of drill bit fracture is realized, which avoids waste of labor hours, improves production efficiency, enhances operational safety, and supports production process optimization and equipment management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120244703A_ABST
    Figure CN120244703A_ABST
Patent Text Reader

Abstract

The invention relates to an artificial intelligence drill bit working condition detection system.The detection system comprises a camera module, a light supplementing device, a light filtering device, a main control board, a bus slave station communication board, a power line, a bus communication cable and a support. And timely shutdown is realized. When the drill bit is broken, the system sends a signal to the drilling machine through the bus interface or the feedback signal line, so that the drilling machine is stopped immediately. And meanwhile, the running state of the drilling machine is fed back in real time through the mobile phone terminal, when the drill bit is broken, the system can stop in real time and give an alarm through the mobile phone terminal, personnel can replace the drill bit and restart the drilling machine conveniently, hole site arrangement and drilling do not need to be conducted again, and therefore the production efficiency and the product quality are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a detection system, and particularly to an artificial intelligence drill bit working condition detection system, belonging to the technical field of artificial intelligence. Background Art

[0002] At present, the ring die drill press faces a series of challenges during the drilling process. First of all, due to its complex internal structure and non-uniform quality of workpieces, the drill bit often breaks. At present, the judgment of the working condition of the drill bit mainly relies on manual inspection, which cannot meet the requirements of real-time detection. Secondly, once the drill bit breakage is found manually, since the ring die drill press does not stop in real time, the ring die drill press continues to work, which in turn affects the workpiece with missing holes and missing drills, not only wasting a large amount of man-hours, but also reducing the production efficiency. Therefore, there is an urgent need for a new solution to solve this technical problem. Summary of the Invention

[0003] The present invention precisely aims at the technical problems existing in the prior art, and provides an artificial intelligence drill bit working condition detection system. This technical solution is ingeniously designed and structurally compact. This technical solution can realize the real-time detection of drill bit breakage and stop in time, avoiding the waste of man-hours and improving the work efficiency.

[0004] To achieve the above object, the technical solution of the present invention is as follows. An artificial intelligence drill bit working condition detection system, the detection system includes a camera module, a supplementary light device, a light filtering device, a main control board, a bus slave communication board, a power supply module, a power cord, a bus communication cable, and a bracket, an alarm lamp, a server, a WIFI communication module, a data storage module, and a mobile phone real-time monitoring APP. Among them, the supplementary light device provides a blue light source, enhances the scattering effect of oil mist, improves the image quality, is installed beside the camera module, and directly irradiates the drill bit and workpiece area. The supplementary light device is powered by the power supply module, and its light acts on the detected area through the light filtering device;

[0005] The light filtering device is fixed between the supplementary light device and the camera module. After the light passes through the light filtering device, it enters the camera, selectively transmits blue light, filters out light of other wavelengths, and highlights the characteristics of oil mist. The light filtering device does not need to be directly connected to the power supply, and cooperates with the light paths of the supplementary light device and the camera through its physical position.

[0006] The camera module is fixed on the bracket. The light of the light filtering device enters the camera, and after collecting the image, it is connected to the main control board through a data cable, and the image information of the drill bit and the workpiece is collected in real time for monitoring the drill bit state and the oil mist situation. The camera module is powered by the power supply module and transmits the image data to the main control board through a high-speed data cable;

[0007] The main control board is installed at the core position of the system and is directly connected to the camera module, the bus slave communication board, the WIFI communication module, and the alarm lamp.

[0008] Receive the image data transmitted by the camera, perform data processing and working condition analysis, and issue control instructions.

[0009] Receive and process the image data from the camera module.

[0010] Interact with the drilling machine equipment through the bus slave communication board.

[0011] Send an alarm signal to the alarm light.

[0012] Transmit the data to the server through the WIFI communication module.

[0013] The bus slave communication board is installed beside the main control board and is connected to the main control board through a data cable.

[0014] As a data transmission interface, send the instructions of the main control board to the drilling machine equipment and receive the equipment status at the same time.

[0015] Receive the shutdown or process adjustment instructions sent by the main control board and feedback them to the drilling machine equipment.

[0016] Receive the operating status information from the drilling machine equipment and transmit it back to the main control board.

[0017] The alarm light is installed at a position convenient for the operator to observe and is connected to the main control board through a signal line.

[0018] When an abnormality is detected (such as drill bit breakage), warn the operator through a visual signal.

[0019] When the main control board issues an alarm signal, trigger the alarm light to light up or flash.

[0020] The equipment control interface is physically connected to the drilling machine equipment and is indirectly connected to the main control board through the bus slave communication board.

[0021] Receive the control instructions issued by the main control board and transmit the instructions to the drilling machine equipment through the bus.

[0022] Receive the equipment status and feedback it to the main control board.

[0023] Interact with the drilling machine equipment to perform shutdown or process adjustment.

[0024] The WIFI communication module is installed on the main control board and is connected to the main control board through a high-speed interface to achieve wireless data transmission, supporting remote monitoring and data storage.

[0025] Receive the processed data from the main control board and transmit it to the server through the wireless network.

[0026] Support remote access and send real-time monitoring data to the mobile phone monitoring APP.

[0027] The server, as a remote background component, is connected to the WIFI module and the mobile phone monitoring APP through the network.

[0028] It stores, processes, and analyzes data from the system and provides remote access. It receives the data transmitted by the WIFI module and stores it. It provides real-time and historical data query services to the mobile phone monitoring APP.

[0029] The data storage module is connected to the main control board and serves as a local data storage unit.

[0030] It is used to store historical data, images, and analysis results.

[0031] The main control board writes data into the storage module for subsequent query and analysis.

[0032] The mobile phone real-time monitoring APP receives the data transmitted by the server and displays real-time monitoring information.

[0033] Operators can send control instructions to the main control board through the APP. It monitors the status of the drill press in real time through the mobile device, provides instant alarms and an operation interface. The remote device interacts with the server and the WIFI module through the wireless network.

[0034] The user interface module (local display screen) is installed on the control box housing and is connected to the main control board through a data cable.

[0035] It provides a local display and an operation interface.

[0036] It receives the data from the main control board and displays the working conditions of the drill bit in real time. It allows operators to perform local control functions through the interface.

[0037] An artificial intelligence drill bit working condition detection method is as follows:

[0038] The camera captures the drilling state of the ring die drill press in real time. The main control board deploys an image processing program and an image recognition module using an industrial Raspberry Pi. The target position judgment module uses a deep learning model to detect and judge the spraying situation of the cooling spray in real time. If the drill bit breaks at a certain point, resulting in the inability to complete the drilling and the coolant cannot be discharged, the system can judge the situation of the drill bit breakage.

[0039] Among them, the image processing module uses OPENCV to process the video stream, and uses OPENCV and NUMPY to perform brightness enhancement and contrast enhancement operations on the video captured images, saves the image frames in real time, and provides them to the image recognition module for recognition. Among them, the image recognition module uses the torch framework, uses two consecutive 3*3 convolutional layers, uses the C2F module to link across layers through 3 branches, enriches the gradient flow of the model, uses the SPPF module, the detection head uses a decoupled method, BCE LOSS is used as the classification loss, and VFL Loss+CIOU Loss is used as the regression loss, and the Task-Aligned Assigner matching method;

[0040] The detection algorithm includes the following steps:

[0041] Step 1, input the image, input the image to be detected into the model to form initial data,

[0042] Step 2, backbone network (CSPDarknet+adaptive attention mechanism), extract multi-layer feature maps through the CSPDarknet backbone network, apply the adaptive attention mechanism to each layer of feature maps to obtain enhanced feature maps,

[0043] Step 3, Feature Pyramid Network (FPN+Adaptive Feature Fusion Module AFFM),

[0044] Fuse multi-layer feature maps through the Feature Pyramid Network (FPN) to generate multi-scale pyramid feature maps, apply the Adaptive Feature Fusion Module (AFFM) to the feature maps generated by FPN, and further fuse features of different scales to obtain fused feature maps,

[0045] Step 4, detection head (decoupled: classification branch+regression branch), through the decoupled classification branch, output the class probability map, and through the decoupled regression branch, output the bounding box parameter map,

[0046] Step 5, loss calculation (Focal Loss+GIoU Loss), calculate the classification loss and regression loss according to the prediction results and the ground truth labels, and comprehensively calculate the total loss,

[0047] Step 6, dynamic anchor matching strategy, dynamically adjust the anchor matching threshold according to the IoU distribution of the current batch. Assign the predicted boxes as positive or negative samples for subsequent loss calculation and model optimization,

[0048] Step 7, backpropagation and optimization, calculate the gradients and update the model parameters through the backpropagation algorithm to minimize the total loss. Among them, in Step 1, input the image, input the image to be detected into the model, denoted as I; Among them, 3 represents the three RGB channels, and H and W represent the height and width of the image respectively.

[0049] In step 2, for feature extraction and the adaptive attention mechanism, a multi-layer feature map is extracted through the backbone network CSP Darknet to obtain a set of feature maps {F1, F2, F3, F4}, and each F i has a shape of

[0050] The adaptive attention mechanism is applied to each feature map F i to obtain the enhanced feature map F i,out ,

[0051] The specific calculation process is as follows:

[0052] F i,att = BN(F i )

[0053] F i,avg = AvgPool(F i,att )

[0054] F i,max = MaxPool(F i,att )

[0055] F i,concat = Concat(F i,avg , F i,max )

[0056] F i,fc1 = σ(W 1i ·F i,concat + b 1i )

[0057] F i,fc2 = σ(W 2i ·F i,fc1 + b 2i )

[0058]

[0059] Among them,

[0060] σ represents the Sigmoid activation function,

[0061] represents the element-wise multiplication operation,

[0062] W 1i and W 2i are the weight matrices of the fully connected layers,

[0063] b 1i and b 2i are the bias terms of the fully connected layers,

[0064] Calculation process:

[0065] 1) Batch normalization,

[0066] F i,att = BN(F i ) The batch normalization layer normalizes the feature map F i to stabilize the feature distribution and reduce internal covariate shift,

[0067] 2) Global pooling:

[0068]

[0069] Perform global average pooling and global max pooling respectively to extract global feature information,

[0070] 3) Feature concatenation:

[0071] F i,concat = Concat(F i,avg , F i,max )

[0072] Concatenate the features after average pooling and max pooling in the channel dimension to form a richer feature vector,

[0073] 4) Fully connected layer and activation:

[0074] F i,fc1 = σ(W 1i ·F i,concat + b 1i )

[0075] F i,fc2 = σ(W 2i ·F i,fc1 + b 2i )

[0076] Generate channel attention weights through a two-layer fully connected network. The value of F i,fc2 is between 0 and 1, indicating the importance of each channel,

[0077] 5) Channel weighting:

[0078]

[0079] Apply the channel attention weights to the original feature map to enhance important channels and suppress unimportant channels, obtaining the enhanced feature map F i,out .

[0080] In step 3, the feature pyramid and the adaptive feature fusion module

[0081] Combine the multi-layer feature maps {F extracted by the backbone network1,out ,F 2,out ,F 3,out ,F 4,out}, where F 1,out is the shallowest layer, and F 4,out is the deepest layer. The FPN performs feature fusion through a top - down path and lateral connections to generate a set of pyramid feature maps {P1, P2, P3}. The calculation process is as follows:

[0082] 1) Top - down feature upsampling:

[0083] P′3 = Conv(F 4,out , W c3 )(Adjust the number of channels)

[0084] Adjust the number of channels of the deepest feature map F 4,out through a 1×1 convolution to obtain P′.

[0085] 2) Feature upsampling and fusion:

[0086] P′2 = Upsample(P′3)(Upsampling)

[0087] P2 = Conv(F 3,out , W c2 ) + P′2(Lateral connection)

[0088] Additively fuse the upsampled P′3 with the corresponding shallow feature map F 3,out to obtain P2.

[0089] 4) Repeat upsampling and fusion

[0090] P′1 = Upsample(P2)(Upsampling)

[0091] P1 = Conv(F 2,out , W c1 ) + P′1(Lateral connection)

[0092] 4) Final fusion

[0093] The final set of pyramid feature maps is {P1, P2, P3}, where:

[0094]

[0095] Apply the Adaptive Feature Fusion Module (AFFM) to the feature maps {P1, P2, P3} generated by the FPN. The specific calculation process is as follows: Taking the fusion of P1 and P2 as an example:

[0096]

[0097] Where:

[0098] P1′ = Conv(P1, W1)

[0099] P2′ = Conv(P2, W2)

[0100]

[0101] Calculation process:

[0102] 1) Convolution transformation:

[0103] P1′ = Conv(P1, W1)

[0104] P2′ = Conv(P2, W2)

[0105] Adjust the number of channels of the feature map through 1x1 convolution to unify the channel dimensions of feature maps at different scales.

[0106] 2) Feature concatenation:

[0107]

[0108] Concatenate the transformed feature maps in the channel dimension to form a richer fused feature.

[0109] 3) Channel attention generation:

[0110]

[0111] Generate the fusion weights through convolution and the Sigmoid activation function. Indicates the weight of each channel in the fusion process. 4) Feature fusion:

[0112]

[0113] According to the generated weights, perform weighted fusion on the two feature maps to obtain the fused feature map. Repeat the above steps for fusion. Fuse with p3 to obtain the final fused feature map P. fused .

[0114] In step 4, the detection head calculates through decoupled classification and regression branches, and outputs the class probability and bounding box parameters respectively. 1) Classification branch:

[0115] C = σ(Conv(P fused , W c ))

[0116] C: Classification result, with the shape of

[0117] K: Number of classes.

[0118] σ: Sigmoid activation function,

[0119] Generate class predictions through the convolutional layer Conv(P fused , W c ).

[0120] 2) Regression branch:

[0121] B = Conv(P fused , W b )

[0122] B: Regression result (bounding box parameters), with shape

[0123] Generate bounding box parameter predictions (such as center coordinates, width, height) through the convolutional layer Conv(P fused , W b ).

[0124] In step 5, calculate the loss

[0125] Combine Focal Loss for classification and GloU Loss for regression to calculate the total loss,

[0126] 1) Classification loss (Focal Loss):

[0127]

[0128] Where:

[0129] p t : The predicted probability of the model for positive samples

[0130] α, γ: Hyperparameters of Focal Loss, used to adjust the weights of easy and hard samples,

[0131] By reducing the weights of easy-to-classify samples and focusing on hard-to-classify samples, alleviate the class imbalance problem. 2) Regression loss (GloU Loss):

[0132]

[0133] Where:

[0134] IoU(B, B gt ): The intersection over union of the predicted box and the ground truth box,

[0135] A: The predicted box,

[0136] B: The ground truth box,

[0137] C: The smallest enclosing rectangle of the predicted box and the ground truth box,

[0138] Consider the overlap degree between the predicted bounding box and the ground truth bounding box, and at the same time introduce the area of the minimum bounding rectangle as a compensation term to improve the regression performance. Calculate the GloU of each predicted bounding box and the ground truth bounding box, and sum over all samples to obtain the total regression loss.

[0139] 3) Total loss:

[0140]

[0141] Among them, λ is the weight that balances the classification and regression losses.

[0142] Combine the classification loss and the regression loss, and balance the importance of the two through the weight parameter λ to obtain the final total loss. In step 6, the dynamic anchor matching strategy

[0143] Dynamically adjust the position and scale of the anchor points according to the target distribution to improve the matching rate and detection performance.

[0144] 1) Calculate IoU

[0145] For each predicted bounding box B and the ground truth bounding box Bg, calculate the intersection over union (IoU):

[0146]

[0147] It is used to evaluate the overlap degree between each predicted bounding box and the ground truth bounding box and determine its matching situation.

[0148] 2) Dynamically adjust the anchor threshold:

[0149] According to the IoU distribution in the current training batch, dynamically adjust the threshold T for anchor matching:

[0150] τ = μ IoU + k · σ IoU

[0151] Where:

[0152] μ IoU : The mean of IoU,

[0153] σ IoU : The standard deviation of IoU,

[0154] k: The adjustment parameter.

[0155] According to the IoU distribution of the current batch, dynamically set the threshold τ through statistical methods to make the anchor matching more flexible and adaptable. When the target distribution changes, τ can be adjusted to adapt to different scenarios.

[0156] 3) Sample assignment:

[0157] Match the predicted bounding boxes with the ground truth bounding boxes according to the adjusted threshold τ, and assign them as positive or negative samples.

[0158] If IoU(B, B gt ) ≥ τ, then assign B as a positive sample; otherwise, assign B as a negative sample. According to the adjusted threshold, assign the predicted bounding boxes as positive or negative samples for subsequent loss calculation and model optimization, ensuring the accuracy of positive and negative sample assignment and improving the training efficiency and detection performance.

[0159] Compared with the prior art, the present invention has the following advantages. Through the cooperation of hardware components such as a camera module, a light supplementing device, and a light filtering device, the present invention can collect and analyze the working condition data of the drill bit in real time. When a fracture occurs, it can send a signal to the drilling machine through the bus interface in time, automatically stop the machine, and send a real-time alarm to the operator through the mobile application, which is convenient for the operator to handle in time. Since the system can automatically stop the machine and give an alarm when the drill bit breaks, it avoids the trouble of re-arranging the hole positions, thus greatly improving the production efficiency, especially saving a large amount of time and resources in mass production. The system also supports intelligent data collection and analysis, providing a basis for optimizing the production process. For example, by analyzing the performance of different drill bits under different working conditions, it provides more accurate decision-making support for equipment managers, further improving the production quality and efficiency. At the same time, the system can ensure the safety of operators through remote monitoring and alarm functions, reducing the time for personnel to be exposed to dangerous environments when the drill bit is abnormal and ensuring operation safety. In addition, the modular design of the system makes the hardware easy to maintain and upgrade, and the software can also be updated remotely, enhancing the maintainability and adaptability of the system. It can flexibly adapt to different brands and models of ring die drilling machines, reducing labor costs and improving the automation level of the production line. The design of this solution fully considers various complex working environments, and through waterproof, dustproof, and shockproof designs, it ensures the stable operation of the system in harsh environments. In summary, this solution not only improves the production efficiency and product quality, but also enhances the operation safety, extends the service life of the equipment, and can adapt to various production environments. It is an ideal solution for modern CNC drilling machines. Brief Description of the Drawings

[0160] Figure 1 It is a schematic diagram of the overall structure of the present invention;

[0161] Figure 2 It is a schematic diagram of the detection process of the present invention.

[0162] In the figure: 1. Light filtering device, 2. Lens, 3. Alarm light, 4. Camera module, 5. Light supplementing device, 6. WIFI antenna, 7. Mobile terminal, 8. Bus connection, 9. Drilling machine, 10. Control box, 11. Bus interface, 12. Power supply, 13. Server. Detailed Embodiments

[0163] To deepen the understanding of the present invention, the following will make a detailed description of this embodiment in conjunction with the accompanying drawings.

[0164] Embodiment 1: Refer to Figure 1 、 Figure 2 , the detection system includes:

[0165] Camera module: Used to collect image information of the drill bit and the workpiece in real time, and monitor the state of the drill bit and the oil mist situation.

[0166] Light supplement device: Provides a blue light source, enhances the scattering effect of the oil mist, improves the image quality, and ensures clear detection.

[0167] Light filtering device: Used in conjunction with the light supplement device, selectively transmits blue light, filters out light of other irrelevant wavelengths, and highlights the characteristics of the oil mist.

[0168] Main control board: Receives and processes the image data of the camera module, performs data analysis and working condition judgment, and issues control instructions. Bus slave communication board: As a communication interface, it is used for data transmission and signal feedback with drill press equipment, servers, etc. Power supply module: Provides stable power support for each component in the system to ensure the long-term stable operation of the system.

[0169] Power cord and bus communication cable: Transmit power and data to ensure the normal connection and signal transmission between each module.

[0170] Bracket: Fixes modules such as the camera and the light supplement device to ensure stable installation and proper angle of the equipment.

[0171] Alarm light: Used for real-time alarm. When a drill bit breakage or other abnormal situation is detected, it visually warns the operator. Server: Used to store, process and analyze data from the system, provide remote access and monitoring services, and support big data analysis and historical data query.

[0172] Mobile real-time monitoring APP: Monitors the working state of the drill press in real time through a mobile device, provides instant alarm, data viewing and operation interfaces, and facilitates the operator to respond quickly.

[0173] Data storage module: Used to store historical detection data, images and analysis results, support subsequent analysis and report generation, and facilitate quality control and production optimization.

[0174] WIFI communication module: Ensures that the system has the ability of remote monitoring, data transmission and cloud storage, and supports real-time remote access and operation.

[0175] Alarm system interface: Connects the alarm light to ensure real-time alarm.

[0176] Device control interface: Integrates with the drill press. Besides the stop signal, it can also adjust process parameters to achieve automatic optimization and regulation.

[0177] User interface module (local display screen): Provides a local display and control interface for operators to view working condition information in real time, facilitating quick judgment and operation.

[0178] Main components and connection relationships. The supplementary lighting device provides a blue light source to enhance the scattering effect of the oil mist, improve image quality, and is installed beside the camera module, directly irradiating the drill bit and workpiece area; the supplementary lighting device is powered by a power supply module, and its light acts on the detected area through a filter device.

[0179] Filter device: Selectively transmits blue light, filters out light of other wavelengths, highlights the characteristics of the oil mist, is fixed between the supplementary lighting device and the camera module, and the light passes through the filter device and then enters the camera. The filter device does not need to be directly connected to the power supply and cooperates with the optical paths of the supplementary lighting device and the camera through its physical position.

[0180] Camera module: Real-time collects image information of the drill bit and workpiece, used to monitor the state of the drill bit and the oil mist situation, is fixed on the bracket, the light of the filter device enters the camera, and after collecting the image, it is connected to the main control board through a data cable. The camera module is powered by a power supply module and transmits the image data to the main control board through a high-speed data cable.

[0181] Main control board: Receives the image data transmitted by the camera, executes data processing and working condition analysis, and issues control instructions. It is installed at the core position of the system and is directly connected to the camera module, bus slave communication board, WIFI communication module, and alarm light; receives the image data from the camera module for processing. Interacts with the drill press equipment through the bus slave communication board, sends alarm signals to the alarm light, and transmits the data to the server through the WIFI communication module.

[0182] Bus slave communication board: As a data transmission interface, sends the instructions of the main control board to the drill press equipment, and at the same time receives the equipment status. It is installed beside the main control board and is connected to the main control board through a data cable. Receives the stop or process adjustment instructions sent by the main control board and feeds them back to the drill press equipment.

[0183] Receives the operating status information from the drill press equipment and transmits it back to the main control board.

[0184] Alarm light: When an abnormality is detected (such as drill bit breakage), warns the operator through a visual signal, is installed at a position convenient for the operator to observe, and is connected to the main control board through a signal line. When the main control board issues an alarm signal, it triggers the alarm light to light up or flash.

[0185] The device control interface interacts with the drill press equipment, executes shutdown or process adjustment, is physically connected to the drill press equipment, and is indirectly connected to the main control board through the bus slave communication board. It receives the control instructions issued by the main control board, transmits the instructions to the drill press equipment through the bus, receives the equipment status, and feeds it back to the main control board.

[0186] The WIFI communication module realizes wireless data transmission, supports remote monitoring and data storage, is installed on the main control board, is connected to the main control board through a high-speed interface, receives and processes data from the main control board, and transmits it to the server through the wireless network.

[0187] It supports remote access and sends real-time monitoring data to the mobile phone monitoring APP.

[0188] The server stores, processes, and analyzes the data from the system, provides remote access, serves as a remote background component, is connected to the WIFI module and the mobile phone monitoring APP through the network, receives the data transmitted by the WIFI module and stores it, and provides real-time and historical data query services to the mobile phone monitoring APP.

[0189] The data storage module is used to store historical data, images, and analysis results, is connected to the main control board, and serves as a local data storage unit. The main control board writes the data into the storage module for subsequent query and analysis.

[0190] The mobile phone real-time monitoring APP monitors the status of the drill press in real time through the mobile device, provides instant alarms and an operation interface. It is a remote device that interacts with the server and the WIFI module through the wireless network; receives the data transmitted by the server, displays real-time monitoring information, and the operator can send control instructions to the main control board through the APP.

[0191] The user interface module (local display screen) provides a local display and operation interface, is installed on the control box housing, is connected to the main control board through a data cable, receives the data from the main control board, and displays the working conditions of the drill bit in real time. It allows the operator to perform local control through the interface.

[0192] The drill bits of the fully automatic ring die drill press generally have configurations of 2 drill bits, 4 drill bits, and 8 drill bits on one drill press. Multiple drill bits drill the ring die simultaneously, improving production efficiency. There are oil holes in the center of the drill bits. When the drill bits are drilling, high-pressure cutting oil will spray out from the central oil holes, playing a role in lubricating and cooling the drill bits. When the drill bits drill through the ring die, the cutting oil will spray out from the central holes of the drill bits, forming an oil mist. If a certain drill bit breaks, when the drill bits at other hole positions drill through the ring die, no oil mist can be sprayed out from the hole position of the broken drill bit.

[0193] Due to the relatively dim light inside the fully automatic ring die drill press and the influence of oil mist, etc., it is difficult to perform video acquisition through conventional methods.

[0194] According to calculations, in a typical drill press environment, the main particle size of cutting oil mist is approximately in the range of 1 - 3 μm.

[0195] 1. The particle size follows a lognormal distribution, and the peak position d peak is 2 μm. 2.

[0197]

[0198] d peak = 2 μm.

[0199] σ is the standard deviation of the lognormal distribution (0.3)

[0200] Optical wavelength (blue light)

[0201] λ b = 450 nm = 0.45 μm

[0202] The distribution function f(d) satisfies When the particle size is close to the optical wavelength (d ≈ λ), the simplified form of Mie scattering approximation can be used (only for comparison and order-of-magnitude estimation):

[0203]

[0204] Where:

[0205] σ s σ(d; λ): Scattering cross-section when the particle diameter is d and the optical wavelength is λ (unit m 2 ).

[0206] C: A constant that includes the particle refractive index, geometric factor, etc. (relatively fixed for the same coolant and the same particle shape), and does not change significantly with wavelength or d.

[0207] The dominant term of the scattering intensity varying with particle size and wavelength.

[0208] 3. Establish the integral of the scattered light intensity

[0209] Let I represent the incident light intensity (provided by the fill light), and the oil mist particles scatter it. Denote the "total scattered light intensity" as I scat . Since there are a large number of oil mist particles in the drill chamber of the drill rig, the scattered light intensity can be regarded as the result of summing over "all particle size segments":

[0210]

[0211] σ s σ(d; λ): Scattering cross-section when the particle diameter is d and the optical wavelength is λ (unit m 2 )

[0212] ρ(d): "The particle number density distribution per unit volume", which can be written as ρ tot ×f(d), where ρ tot is the total number of particles per unit volume in the drilling chamber of the drill press, and f(d) is the normalization function of this volume distribution with respect to d.

[0213] I0: The light intensity of the light source irradiating the oil mist area at this wavelength.

[0214] For the relative comparison of lights of different colors, ρ tot and I0, etc. are collectively referred to as a constant factor, and the focus is on the coupling of σ s (d; λ) and f(d).

[0215] Substitute σ s (d; λ)≈Cd 6 / λ 4 into the integral:

[0216]

[0217] Then substitute ρ(d) = ρ tot ×f(d), and combine the constants:

[0218]

[0219] Let

[0220]

[0221] represent the weighted result of d 6 under the given distribution f(d), then

[0222]

[0223] The conclusion is: If other parameters are the same, a shorter wavelength (such as blue light) will obtain a stronger scattering intensity.

[0224] 4. Perform numerical or approximate calculations on the following formula:

[0225] f(d) is a lognormal distribution,

[0226] 1. According to the setting:

[0227] The peak d peak = 2μm,

[0228] The lognormal standard deviation σ = 0.3

[0229] 2. Numerical integration

[0230]

[0231] Since f(d) is very small outside [0, 1, 10], the integration interval is sufficient to cover more than 99% of the distribution.

[0232] Let λ b = 0.45 μm (blue light), then the scattered light intensity is approximately

[0233]

[0234] The following can be given:

[0235] 1. I0 (light source brightness)

[0236] 2. ρ tot (total number of oil mist particles per unit volume)

[0237] 3. C (constant including refractive index and geometric factor)

[0238] In a comparison environment, it can be judged that blue light scattering is greater than that of other wavelengths by only looking at the relative magnitudes.

[0239] Let ρ tot · I0 · C = 1 (unify into a constant, ignoring the dimension)

[0240] Let K given by the "log-normal distribution" d ≈ 2.5 × 10 0 , λ b = 0.45 μm.

[0241] (0.45 μm) 4 = 0.45 4 × (1 μm) 4 ≈ 0.041 μm 4 .

[0242] Then:

[0243] (relative unit)

[0244] If we change to λ g = 0.52 μm (green light), then

[0245] (0.52 μm) 4 = 0.52 4 × (1 μm) 4 ≈ 0.073 μm 4 ,

[0246] (relative unit)

[0247] The ratio of the two is approximately That is, blue light scatters more strongly than green light.

[0248] Watch blue light only (λ b ) is enough to get a very impressive scattered light intensity; if compared with other longer wavelengths, blue light scatters better.

[0249]

[0250]

[0251] It can be seen that oil mist has a better reflection effect on blue light with a shorter wavelength. A blue fill light device is used to fill light in the working area of ​​the fully automatic ring die drilling machine. A bandpass filter is used: the central wavelength is 450nm, the bandwidth is ±10nm, and a polarization filter: a linear polarization or circular polarization filter is used, which is consistent with the polarization direction of the fill light device to further reduce the reflected light. Specific blue light is allowed to pass. Using this solution to process light can make the outline of the oil mist clearer and achieve a better video acquisition effect.

[0252] The camera captures the drilling status of the ring die drilling machine in real time. The main control board uses the industrial control Raspberry Pi to deploy image processing programs and image recognition modules, target position judgment modules, and uses deep learning models to detect and judge the spray status of the cooling spray in real time. If the drill bit breaks at a certain point, resulting in the inability to complete the drilling and the inability to discharge the coolant, the system can determine the drill bit is broken.

[0253] The image processing module uses OPENCV to process the video stream, and uses OPENCV and NUMPY to perform brightness enhancement and contrast enhancement operations on the video acquisition image, save the image frame in real time, and provide it to the image recognition module for recognition. Detection algorithm flow description:

[0254] 1. Input image: Input the image to be detected into the model to form initial data.

[0255] 2. Backbone network (CSPDarknet + adaptive attention mechanism):

[0256] The CSPDarknet backbone network is used to extract multiple layers of feature maps. An adaptive attention mechanism is applied to each layer of feature maps to obtain enhanced feature maps.

[0257] 3. Feature Pyramid Network (FPN+Adaptive Feature Fusion Module AFFM):

[0258] The feature pyramid network (FPN) is used to fuse multiple layers of feature maps to generate a multi-scale pyramid feature map. The adaptive feature fusion module (AFFM) is applied to the feature map generated by FPN to further fuse features of different scales to obtain the fused feature map.

[0259] 4. Detection Head (Decoupling: Classification Branch + Regression Branch):

[0260] Through the decoupled classification branch, the class probability map is output. Through the decoupled regression branch, the bounding box parameter map is output.

[0261] 5. Loss Calculation (Focal Loss + GIoU Loss):

[0262] According to the prediction results and the ground truth labels, the classification loss and regression loss are calculated. The total loss is calculated comprehensively.

[0263] 6. Dynamic Anchor Matching Strategy:

[0264] According to the IoU distribution of the current batch, the anchor matching threshold is dynamically adjusted. The predicted boxes are assigned as positive or negative samples for subsequent loss calculation and model optimization.

[0265] 7. Backpropagation and Optimization:

[0266] Through the backpropagation algorithm, the gradients are calculated and the model parameters are updated to minimize the total loss.

[0267] Algorithm Flow and Calculation Process.

[0268] 3.1 Input Image

[0269] The image to be detected is input into the model, denoted as I.

[0270] Where: 3 represents the three RGB channels, and H and W represent the height and width of the image respectively.

[0271] 3.2 Feature Extraction and Adaptive Attention Mechanism

[0272] Through the backbone network CSP Darknet, multi-layer feature maps are extracted to obtain a set of feature maps {F1, F2, F3, F4}, and each F i has the shape of

[0273] On each feature map F i the adaptive attention mechanism is applied to obtain the enhanced feature map F i,out .

[0274] The specific calculation process is as follows:

[0275] F i,att = BN(F i )

[0276] F i,avg = AvgPool(F i,att )

[0277] Fi,max = MaxPool(F i,att )

[0278] F i,concat = Concat(F i,avg , F i,max )

[0279] F i,fc1 = σ(W 1i ·F i,concat + b 1i )

[0280] F i,fc2 = σ(W 2i ·F i,fc1 + b 2i )

[0281]

[0282] Where:

[0283] σ represents the Sigmoid activation function

[0284] represents the element-wise multiplication operation

[0285] W 1i and W 2i are the weight matrices of the fully connected layer

[0286] b 1i and b 2i are the bias terms of the fully connected layer.

[0287] Calculation process:

[0288] 1. Batch normalization:

[0289] F i,att = BN(F i )

[0290] The batch normalization layer normalizes the feature map F i to stabilize the feature distribution and reduce internal covariate shift

[0291] 2. Global pooling:

[0292]

[0293] Perform global average pooling and global max pooling respectively to extract global feature information

[0294] 3. Feature concatenation:

[0295] F i,concat = Concat(F i,avg , Fi,max )

[0296] Concatenate the features after average pooling and max pooling in the channel dimension to form a richer feature vector. 4. Fully connected layer and activation:

[0297] F i,fc1 = σ(W 1i ·F i,concat + b 1i )

[0298] F i,fc2 = σ(W 2i ·F i,fc1 + b 2i )

[0299] Generate channel attention weights through a two-layer fully connected network. The value of F i,fc2 ranges from 0 to 1, indicating the importance of each channel.

[0300] 5. Channel weighting:

[0301]

[0302] Apply the channel attention weights to the original feature map to enhance important channels and suppress unimportant channels, obtaining the enhanced feature map F i,out .

[0303] 3.3 Feature Pyramid and Adaptive Feature Fusion Module

[0304] The multi-layer feature maps {F 1,out , F 2,out , F 3,out , F 4,out} extracted by the backbone network, where F 1,out is the shallowest layer and F 4,out is the deepest layer. FPN performs feature fusion through a top-down path and lateral connections to generate a set of pyramid feature maps {P1, P2, P3}. The calculation process:

[0305] 1. Top-down feature upsampling:

[0306] P′3 = Conv(F 4,out , W c3 )(Adjust the number of channels)

[0307] Adjust the number of channels of the deepest feature map F 4,out through a 1×1 convolution to obtain P′3.

[0308] 2. Feature upsampling and fusion:

[0309] P′2 = Upsample(P′3)(Upsampling)

[0310] P2 = Conv(F 3,out , W c2 ) + P'2 (lateral connection)

[0311] Fuse the upsampled P'3 with the corresponding shallow feature map F 3,out by addition to obtain P 2。

[0312] 3. Repeat upsampling and fusion

[0313] P'1 = Upsample(P2) (upsampling)

[0314] P1 = Conv(F 2,out , W c1 ) + P'1 (lateral connection)

[0315] 4. Final fusion

[0316] The final pyramid feature map set is {P1, P2, P3}, where:

[0317]

[0318] Apply the Adaptive Feature Fusion Module (AFFM) to the feature maps {P1, P2, P3} generated by FPN. The specific calculation process is as follows: Take the fusion of P1 and P2 as an example:

[0319]

[0320] Where:

[0321] P1' = Conv(P1, W1)

[0322] P2' = Conv(P2, W2)

[0323]

[0324] Calculation process:

[0325] 1. Convolution transformation:

[0326] P1' = Conv(P1, W1)

[0327] P2' = Conv(P2, W2)

[0328] Adjust the number of channels of the feature map through 1x1 convolution to unify the channel dimensions of feature maps at different scales.

[0329] 2. Feature concatenation:

[0330]

[0331] Concatenate the transformed feature maps in the channel dimension to form richer fused features.

[0332] 3. Channel attention generation:

[0333]

[0334] Generate fusion weights through convolution and the Sigmoid activation function indicating the weight of each channel in the fusion process.

[0335] 4. Feature fusion:

[0336]

[0337] According to the generated weights, perform weighted fusion on the two feature maps to obtain the fused feature map Repeat the above steps to fuse with P3 to obtain the final fused feature map P fused .

[0338] 3.4 Detection head calculation

[0339] Output class probabilities and bounding box parameters respectively through decoupled classification and regression branches.

[0340] 1. Classification branch:

[0341] C = σ(Conv(P fused , W c ))

[0342] C: Classification result, with shape

[0343] K: Number of classes.

[0344] σ: Sigmoid activation function.

[0345] Generate class predictions through the convolutional layer Conv(P fused , W c ).

[0346] 2. Regression branch:

[0347] B = Conv(P fused , W b )

[0348] B: Regression result (bounding box parameters), with shape

[0349] Generate predictions of bounding box parameters (such as center coordinates, width, height) through the convolutional layer Conv(P fused , W b ).

[0350] 3.5 Loss Calculation

[0351] Combine Focal Loss for classification and GloU Loss for regression to calculate the total loss.

[0352] 1. Classification Loss (Focal Loss):

[0353]

[0354] Where:

[0355] p t : The predicted probability of the model for positive samples

[0356] α, γ: Hyperparameters of Focal Loss, used to adjust the weights of easy and hard samples.

[0357] By reducing the weights of easy-to-classify samples and focusing on hard-to-classify samples, alleviate the class imbalance problem.

[0358] 2. Regression Loss (GloU Loss):

[0359]

[0360] Where:

[0361] IoU(B, B gt ): The intersection over union of the predicted box and the ground truth box.

[0362] A: The predicted box.

[0363] B: The ground truth box.

[0364] C: The smallest enclosing rectangle of the predicted box and the ground truth box.

[0365] Consider the overlap degree between the predicted box and the ground truth box, and at the same time introduce the area of the smallest enclosing rectangle as a compensation term to improve the regression performance. Calculate the GloU of each predicted box and the ground truth box, and sum over all samples to obtain the total regression loss

[0366] 3. Total Loss:

[0367]

[0368] Where λ is the weight to balance the classification and regression losses.

[0369] Combine the classification loss and the regression loss, and balance the importance of the two through the weight parameter λ to obtain the final total loss

[0370] 3.6 Dynamic Anchor Matching Strategy

[0371] Dynamically adjust the anchor position and scale according to the target distribution to improve the matching rate and detection performance.

[0372] 1. Calculate IoU

[0373] For each predicted bounding box B and the ground truth bounding box Bg, calculate the intersection over union (IoU):

[0374]

[0375] It is used to evaluate the overlap degree between each predicted bounding box and the ground truth bounding box and determine its matching situation.

[0376] 2. Dynamically adjust the anchor threshold:

[0377] According to the IoU distribution in the current training batch, dynamically adjust the threshold T for anchor matching:

[0378] τ = μ IoU + k·σ IoU

[0379] Where:

[0380] μ IoU : The mean of IoU.

[0381] σ IoU : The standard deviation of IoU.

[0382] k: The adjustment parameter.

[0383] According to the IoU distribution in the current batch, dynamically set the threshold τ through statistical methods to make the anchor matching more flexible and adaptable. When the target distribution changes, τ can be adjusted to adapt to different scenarios.

[0384] 3. Sample assignment:

[0385] Match the predicted bounding boxes with the ground truth bounding boxes according to the adjusted threshold τ and assign them as positive or negative samples.

[0386] If IoU(B, B gt ) ≥ τ, then assign B as a positive sample; otherwise, assign B as a negative sample. According to the adjusted threshold, assign the predicted bounding boxes as positive or negative samples for subsequent loss calculation and model optimization, ensuring the accuracy of positive and negative sample assignment and improving the training efficiency and detection performance.

[0387] Appendix: Symbol description

[0388]

[0389]

[0390] This detection process innovatively enhances the feature expression ability and multi-scale feature fusion effect by introducing an adaptive attention mechanism and an Adaptive Feature Fusion Module (AFFM). Meanwhile, the optimized loss function and dynamic anchor matching strategy further improve the detection accuracy and robustness of the model.

[0391] This solution introduces an Adaptive Attention Mechanism: During the feature extraction process, by introducing the adaptive attention mechanism, the weights of feature channels are dynamically adjusted to enhance the expression ability of important features. Integrate an Adaptive Feature Fusion Module (AFFM): In the Feature Pyramid Network (FPN), the adaptive feature fusion module is adopted to more effectively fuse features of different scales. Optimize the loss function: Combine Focal Loss and GloU Loss to further improve the performance of classification and regression. Improve the matching strategy: Adopt a dynamic anchor matching strategy to more flexibly adapt to the target distribution in different scenarios.

[0392] When performing object detection, the position of the object is determined by points (center point and width / height or key points (boundary points)). When the network predicts the correct position of the points, the target object can be found. First, the network extracts features to find the feature points, and the loss is calculated based on these feature points and the feature points in the label, enabling the model to correctly find the detection target. The box_label function outputs the center point coordinates of the detection target box, as well as the coordinates of the upper left, upper right, lower left, and lower right points. Since the drill bit of the full-automatic ring die drill performs axial feeding and the ring die rotates, after the drill bit drills through the ring die, the cutting fluid spray ejected from the center hole of the drill bit is within a fixed range relative to the camera. After collecting multiple image materials inside the full-automatic ring die drill, the ring die in the images is box-selected and labeled, and the spray is also box-selected and labeled. The labeled images are enhanced, the dataset is expanded and divided into a training set, a test set, and a validation set according to a ratio of 6:2:2. The pre-trained model is fine-tuned to adapt it to the detection of the spray situation inside the full-automatic ring die drill.

[0393] Deploy the pre-trained model and the detection module to the main control board through the PyTorch framework. After the target detection module obtains the center positions and coordinate positions of the target boxes for the ring mold detection and spray detection, the target judgment module judges the recognition quantity and center position of the cutting fluid spray detection target box, and adds functions such as delay setting, spray target detection box quantity and coordinate setting, and reset function. Since the concentricity and radial thickness of the ring mold are not completely consistent, it is possible that the drill bit drills through the ring mold one by one. Therefore, this device obtains the feedback signal of the drilling depth position set by the drill bit of the drilling machine host through the ETHERCATIO interface. After the drill bit of the fully automatic drilling machine host reaches the set drilling depth, the feedback value of the drill bit position encoder in the DS402 protocol of the fully automatic drilling machine host reaches the set value. The drilling machine host feeds back the digital quantity to the ETHERCAT slave IO module of the ring mold drill bit working condition detection system through the ETHERCAT bus, and the ring mold drill bit working condition detection system synchronizes, so that the target judgment module can set different drill bit positions and judge whether cutting fluid sprays out from all drill bit holes during the working time of the drill bit at a single hole position. If a drill bit breaks, during the working time of the drill bit at a single hole position, no cutting fluid sprays out oil mist from the ring mold within the coordinate range of this hole position, and the target judgment module can judge that the drill bit breaks.

[0394] The IO interface of the main control board is connected to the IO interface of the ETHERCAT slave module. After the target judgment module on the main control board judges that the drill bit breaks, the communication module IO interface of the main control board sends a drill bit break signal to the ETHERCAT slave module. After the IO interface of the ETHERCAT slave module obtains the drill bit break signal, it feeds back to stop the fully automatic ring mold drilling machine in real time through the ETHERCAT bus, and at the same time feeds back the alarm signal to the server and the mobile APP terminal through the WIFI signal and the in-plant AP node.

[0395] After replacing the drill bit on the fully automatic ring mold drilling machine and restarting, the drilling machine host feeds back the startup signal to the ETHERCAT slave IO module of the ring mold drill bit working condition detection system through the ETHERCAT bus, and the ring mold drill bit working condition detection system resets and can continue to work.

[0396] It should be noted that the above embodiments are not used to limit the protection scope of the present invention. Equivalent transformations or substitutions made on the basis of the above technical solutions all fall within the protection scope of the claims of the present invention.

Claims

1. An artificial intelligence drill working condition detection system, characterized in that, The detection system includes a camera module, a supplementary light device, a filter device, a main control board, a bus slave communication board, a power supply module, a power cord, a bus communication cable, as well as a bracket, an alarm light, a server, a WIFI communication module, a data storage module, and a mobile phone real-time monitoring APP. Among them, The supplementary light device provides a blue light source, enhances the scattering effect of the oil mist, improves the image quality, is installed beside the camera module, directly irradiates the drill bit and workpiece area, is powered by the power supply module, and its light acts on the detected area through the filter device. The filter device is fixed between the supplementary light device and the camera module, and the light enters the camera after passing through the filter device. The camera module is fixed on the bracket, the light of the filter device enters the camera, and after collecting the image, it is connected to the main control board through a data cable. The main control board is installed at the core position of the system and is directly connected to the camera module, the bus slave communication board, the WIFI communication module, and the alarm light. The bus slave communication board is installed beside the main control board and is connected to the main control board through a data cable. The alarm light is installed at a position convenient for the operator to observe and is connected to the main control board through a signal line. The equipment control interface is physically connected to the drilling machine and is indirectly connected to the main control board through the bus slave communication board. The WIFI communication module is installed on the main control board and is connected to the main control board through a high-speed interface to realize wireless data transmission, support remote monitoring and data storage. The server, as a remote background component, is connected to the WIFI module and the mobile phone monitoring APP through the network. Stores, processes, and analyzes the data from the system, provides remote access, receives the data transmitted by the WIFI module and stores it. Provides real-time and historical data query services to the mobile phone monitoring APP. The data storage module is connected to the main control board and serves as a local data storage unit for storing historical data, images, and analysis results. The main control board writes the data into the storage module for subsequent query and analysis. The mobile phone real-time monitoring APP receives the data transmitted by the server and displays real-time monitoring information. The operator can send control instructions to the main control board through the APP, monitor the status of the drilling machine in real time through the mobile device, provide instant alarms and operation interfaces, and the remote device interacts with the server and the WIFI module through the wireless network. The user interface module is installed on the outer shell of the control box and is connected to the main control board through a data cable.

2. An artificial intelligence drill working condition detection method, characterized in that, Adopting the detection system described in claim 1, the detection method is as follows: The camera captures the drilling state of the ring die drilling machine in real time. The main control board deploys an image processing program and an image recognition module using an industrial Raspberry Pi. The target position judgment module uses a deep learning model to detect and judge the spraying situation of the cooling spray in real time. If the drill bit breaks at a certain point, resulting in the inability to complete the drilling and the coolant cannot be discharged, the system can judge the situation of the drill bit breakage. Among them, the image processing module uses OPENCV to process the video stream, and realizes image input, feature extraction and enhancement, pyramid feature fusion, decoupled detection head calculation, refined loss evaluation, and dynamic anchor point matching, and combines an efficient backpropagation optimization strategy to form a complete and efficient drill bit working condition detection scheme.

3. The artificial intelligence drill working condition detection method according to claim 2, characterized in that The image recognition module uses the Torch framework, adopts two consecutive 3*3 convolutional layers, adopts the C2F module to link across layers through 3 branches to enrich the gradient flow of the model, adopts the SPPF module, the detection head adopts a decoupled method, BCE LOSS is used as the classification loss, VFL Loss+CIOU Loss is used as the regression loss, and the Task-Aligned Assigner matching method; The detection algorithm includes the following steps: Step 1, input image, input the image to be detected into the model to form initial data, Step 2, backbone network, extract multi-layer feature maps through the CSPDarknet backbone network, apply the adaptive attention mechanism to each layer of feature maps to obtain enhanced feature maps, Step 3, Feature Pyramid Network, Fuse multi-layer feature maps through the Feature Pyramid Network (FPN) to generate multi-scale pyramid feature maps, apply the Adaptive Feature Fusion Module (AFFM) to the feature maps generated by FPN to further fuse features of different scales to obtain fused feature maps, Step 4, detection head, output the class probability map through the decoupled classification branch, and output the bounding box parameter map through the decoupled regression branch, Step 5, loss calculation, calculate the classification loss and regression loss according to the prediction results and the ground truth labels, and comprehensively calculate the total loss. Step 6, dynamic anchor matching strategy, dynamically adjust the anchor matching threshold according to the IoU distribution of the current batch, and assign the predicted boxes as positive or negative samples for subsequent loss calculation and model optimization, Step 7, backpropagation and optimization, calculate the gradients and update the model parameters through the backpropagation algorithm to minimize the total loss.

4. The artificial intelligence drill bit working condition detection method according to claim 3, wherein, Step 1: Input the image. Input the image to be detected into the model, denoted as I; Among them, 3 represents the three RGB channels, and H and W respectively represent the height and width of the image.

5. The artificial intelligence drill bit working condition detection method according to claim 4, wherein In step 2, Feature extraction and adaptive attention mechanism. Multilayer feature maps are extracted through the backbone network CSP Darknet to obtain a set of feature maps {F1, F2, F3, F4}, and each F i has a shape of Apply the adaptive attention mechanism to each feature map F i to obtain the enhanced feature map F i,out , The specific calculation process is as follows: F i,att = BN(F i ) F i,avg = AvgPool(F i,att ) F i,max = MaxPool(F i,att ) F i,concat = Concat(F i,avg , F i,max ) F i,fc1 = σ(W 1i ·F i,concat + b 1i ) F i,fc2 = σ(W 2i · F i,fc1 + b 2i ) Among them, σ represents the Sigmoid activation function, Denotes an element-wise multiplication operation, W 1i and W 2i is the weight matrix of the fully connected layer, b 1i and b 2i are the bias terms of the fully connected layer, Calculation process: 1) Batch normalization, F i,att = BN(F i ) The batch normalization layer normalizes the feature map F i to stabilize the feature distribution and reduce internal covariate shift 2) Global pooling: Perform global average pooling and global max pooling respectively to extract global feature information, 3) Feature concatenation: F i,concat = Concat(F i,avg , F i,max ) Concatenate the features after average pooling and max pooling in the channel dimension to form a richer feature vector, 4) Fully connected layer and activation: F i,fc1 = σ(W 1i · F i,concat + b 1i ) F i,fc2 = σ(W 2i ·F i,fc1 + b 2i ) Generate channel attention weights through a two-layer fully connected network, F i,fc2 The value of F ranges between 0 and 1, indicating the importance of each channel. 5) Channel weighting: Apply the channel attention weights to the original feature map to enhance the important channels and suppress the unimportant channels, obtaining the enhanced feature map F i,out .

6. The artificial intelligence drill bit working condition detection method according to claim 4, wherein, In step 3, the feature pyramid and the adaptive feature fusion module, Extract the multi-layer feature maps {F 1,out , F 2,out , F 3,out , F 4,out} from the backbone network, where F 1,out is the shallowest layer and F 4,out is the deepest layer. FPN performs feature fusion through a top-down path and lateral connections to generate a set of pyramid feature maps {P1, P2, P3}. The calculation process is as follows: 1) Top-down feature upsampling: P′3 = Conv(F 4,out , W c3 )(Adjust the number of channels) Adjust the number of channels of the deepest feature map F 4,out through a 1×1 convolution to obtain P′3, 2) Feature upsampling and fusion: P′2 = Upsample(P′3) (upsampling) P2 = Conv(F 3,out , W c2 ) + P'2 (lateral connection) Perform addition fusion on the upsampled P′3 and the corresponding shallow feature map F 3,out to obtain P2 3) Repeat upsampling and fusion P′1 = Upsample(P2) (upsampling) P1 = Conv(F 2,out , W c1 ) + P′1 (lateral connection) 4) Final fusion The final pyramid feature map set is {P1, P2, P3}, where: Apply the Adaptive Feature Fusion Module (AFFM) to the feature maps {P1, P2, P3} generated by FPN. The specific calculation process is as follows: Take the fusion of P1 and P2 as an example: Among them: P1′ = Conv(P1, W1) P2′ = Conv(P2, W2) F concat1,2 = Concat(P1′, P2′) F att1,2 = σ(Conv(F concat1,2 , W3) + b3) Calculation process: 1) Convolutional transformation: P1′ = Conv(P1, W1) P2′ = Conv(P2, W2) Adjust the channel number of the feature map through 1x1 convolution to unify the channel dimensions of feature maps of different scales, 2) Feature concatenation: The transformed feature maps are concatenated in the channel dimension to form richer fused features. 3) Channel attention generation: Generate fusion weights through convolution and Sigmoid activation function Indicates the weight of each channel during the fusion process 4) Feature fusion: According to the generated weights, the two feature maps are weighted and fused to obtain the fused feature map Repeat the above steps to fuse with P3 to obtain the finally fused feature map P fused .

7. The artificial intelligence drill bit working condition detection method according to claim 4, characterized in that, In step 4, the detection head calculates through decoupled classification and regression branches, and outputs class probabilities and bounding box parameters respectively. 1) Classification branch: C = σ(Conv(P fused , W c )) C: Classification result, with the shape of K: Number of classes σ: Sigmoid activation function Generate class predictions through the convolutional layer Conv(P fused ,W c ). 2) Regression branch: B = Conv(P fused , W b ) B: Regression results (bounding box parameters), with shape Generate the prediction of the bounding box parameters through the convolutional layer Conv(P fused ,W b ).

8. The artificial intelligence drill bit working condition detection method according to claim 4, characterized in that In step 5, the loss calculation combines Focal Loss for classification and GloU Loss for regression to calculate the total loss. 1) Classification loss (Focal Loss): Where: p t : The prediction probability of the model for positive samples α, γ: Hyperparameters of Focal Loss, used to adjust the weights of easy and hard samples By reducing the weights of easy-to-classify samples and focusing on hard-to-classify samples, the class imbalance problem is alleviated. 2) Regression loss (GloU Loss): Where: IoU(B, B gt ): The intersection over union of the predicted bounding box and the ground truth bounding box, A: Predicted box B: Ground truth box C: Smallest enclosing rectangle of the predicted box and the ground truth box Consider the overlap between the predicted bounding box and the ground truth bounding box, and at the same time introduce the area of the minimum bounding rectangle as a compensation term to improve the regression performance. Calculate the GloU of each predicted bounding box and the ground truth bounding box, and sum over all samples to obtain the total regression loss 3) Total loss: Where λ is the weight to balance the classification and regression losses. Combine the classification loss and the regression loss, and balance the importance of the two through the weight parameter λ to obtain the final total loss 9. The artificial intelligence drill bit working condition detection method according to claim 4, wherein In step 6, a dynamic anchor matching strategy Dynamically adjusts the anchor positions and scales according to the target distribution to improve the matching rate and detection performance. 1) Calculate IoU For each predicted box B and ground truth box Bg, calculate the intersection over union (IoU): Used to evaluate the overlap degree between each predicted box and the ground truth box, and determine its matching situation. 2) Dynamically adjust the anchor threshold: According to the IoU distribution in the current training batch, dynamically adjust the anchor matching threshold T: τ = μ IoU + k·σ IoU Where: μ IoU : Mean value of loU σ IoU : Standard deviation of loU k: Adjustment parameter According to the IoU distribution in the current batch, dynamically set the threshold τ through statistical methods to make the anchor matching more flexible and adaptable. When the target distribution changes, adjust τ to adapt to different scenarios. 3) Sample assignment: Match the predicted boxes with the ground truth boxes according to the adjusted threshold τ, and assign them as positive or negative samples. If IoU(B, B gt ) ≥ τ, then assign B as a positive sample; otherwise, assign B as a negative sample. According to the adjusted threshold, assign the predicted boxes as positive or negative samples for subsequent loss calculation and model optimization, ensuring the accuracy of positive and negative sample assignment and improving the training efficiency and detection performance.

Citation Information

Patent Citations

  • Drill bit wear detection method, device and system

    CN118641174A

  • Method for detecting and identifying drilling position and sequence, computer program product and computing equipment

    CN119036203A

  • Drill bit detecting device

    CN207171660U

  • Machining center lathe drill bit detection device

    CN208588930U

  • Infrared-visible light image fusion-based integrated management and control method for grid field operation

    WO2024183245A1