Trachea intubation endoscope image target detection method and system based on improved YOLOV5
By improving the image target detection method of YOLOV5, combined with data enhancement and quantitative sensing operations, the problem of difficult organ identification during tracheal intubation is solved, high-precision and efficient target detection is achieved, and the accuracy and safety of first aid operations are improved.
Patent Information
- Application Number
- CN202410674218.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-09-13
AI Technical Summary
During tracheal intubation, due to the close position of the trachea and esophagus, it is difficult to accurately distinguish them simply by relying on the experience of medical staff. Existing video laryngoscope equipment has difficulties in identifying small and medium-sized targets and spatial information, which affects the success rate of first aid and patient safety.
Based on the improved YOLOV5 image target detection method, a highly sensitive target detection model is formed through data enhancement, bounding box regression loss function WIoU optimization and quantified perception operations. Combined with the CBAM attention mechanism and Transformer structure, it improves organ intubation image target detection. accuracy and efficiency.
It significantly improves the detection accuracy of small targets in the tracheal intubation scope, improves the accuracy and speed of first aid operations, reduces the difficulty of operation for medical staff, and enhances the success rate of organ identification.
Smart Images

Figure CN118644655A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image target detection, and in particular to a tracheal intubation mirror image target detection method and system based on improved YOLOV5. Background Art
[0002] Tracheal intubation is one of the most common operations in the clinical medical care of the emergency department, and it is also an important rescue and treatment measure in the emergency department. In clinical practice, critically ill patients, especially those with respiratory arrest and patients under general anesthesia, need to be operated by medical experts in the hospital operating room before and after surgery. That is, an artificial airway is established by tracheal intubation to assist the patient's breathing with a ventilator after the patient has no spontaneous breathing. However, the process of tracheal intubation is often very urgent, and because the trachea and esophagus are close in position in terms of physiological and anatomical structure, it is difficult to avoid errors in distinguishing the trachea and esophagus under laryngoscopy by relying solely on the personal experience of medical staff. Therefore, the traditional method is to use images under visual endoscopes (such as visual laryngoscopes, digestive endoscopes, etc.) to provide guidance for intubation and prompts for intubation errors.
[0003] The use of visual endoscopes such as video laryngoscopes has significantly reduced the difficulty of completing tracheal intubation for emergency professionals, but it does not mean that it is equally easy for other professional emergency personnel to complete tracheal intubation. Most of these operators have no practical operation experience and cannot effectively use the visual laryngoscope. At the same time, because the glottis is easily blocked by other tissues (such as epiglottis, tumors and other tissues), and is easily disturbed by foreign objects in emergency scenarios, visual laryngoscope equipment is needed to provide accurate glottal structure recognition and key feature positioning, so that the operator can identify various anatomical landmarks in the human cavity during use and advance along the anatomical landmarks for detection. However, existing visual laryngoscope equipment has difficulties in identifying landmarks and the lack of identified spatial information makes it difficult to effectively identify small and medium-sized targets.
[0004] Therefore, it is necessary to develop a highly sensitive recognition model that can effectively identify small targets. This method can improve the success rate of endoscopic navigation so that operators can provide rapid rescue and reduce patient discomfort and injury. Summary of the invention
[0005] The present invention provides a tracheal intubation mirror image target detection method based on improved YOLOV5 to overcome the above-mentioned technical problems.
[0006] The technical solution of the present invention is:
[0007] A tracheal intubation mirror image target detection method based on improved YOLOV5, characterized by comprising:
[0008] Step 1: Obtain the original endotracheal intubation image dataset;
[0009] Step 2, performing data enhancement processing on the original endotracheal intubation mirror image data set to obtain a endotracheal intubation mirror image data set after data enhancement processing, wherein the endotracheal intubation mirror image data set includes a endotracheal intubation mirror image data training set, a endotracheal intubation mirror image data verification set, and a endotracheal intubation mirror image data test set;
[0010] Step 3, forming a target detection model based on improved YOLOV5 according to the endotracheal intubation image data training set after data enhancement processing;
[0011] Step 4, optimizing the loss function of the target detection model based on the improved YOLOV5 according to the bounding box regression loss function WIoU to form an organ intubation endoscope image target detection model;
[0012] Step 5, optimizing the aforementioned organ intubation endoscope image target detection model according to the quantitative perception operation;
[0013] Step 6: According to the endotracheal intubation endoscope image data test set, the endotracheal intubation endoscope organ image is recognized by using the optimized organ intubation endoscope image target detection model.
[0014] Furthermore, the aforementioned step 2 includes the following steps:
[0015] Step 21, performing a horizontal flip operation on each original image in the original endotracheal intubation mirror image data set;
[0016] Step 22, performing a vertical flip operation on each original image in the original endotracheal intubation mirror image data set;
[0017] Step 23, performing a random cropping operation on each original image in the original endotracheal intubation mirror image data set;
[0018] Step 24, performing a random rotation operation on each original image in the original endotracheal intubation mirror image data set;
[0019] Step 25: adding random noise to each original image of the original endotracheal intubation image dataset.
[0020] Step 26: All the endotracheal intubation endoscope images obtained in steps 21 to 25 are used as the endotracheal intubation endoscope image dataset after data enhancement processing.
[0021] Furthermore, the aforementioned target detection model based on improved YOLOV5 includes an input end, a Backbone structure, a Neck structure, and an output end;
[0022] The aforementioned Backbone structure adopts the CSPDarknet53 network, which includes a Focus structure and a CSP structure. The C3 module in the aforementioned CSP structure and connected to the SPP layer is replaced with an encoder module of the Transformer structure; at the same time, a CBAM attention mechanism module is inserted after the output and jump connection of each residual block in the aforementioned Backbone structure are added;
[0023] The C3 module of the aforementioned Neck structure is replaced by the encoder module of the Transformer structure; the C3 module of the aforementioned part refers to the C3 module connected to each conv layer in the Transformer Prediction Heads structure at the aforementioned output end;
[0024] The aforementioned output end includes a Transformer Prediction Heads structure.
[0025] Furthermore, the aforementioned CBAM attention mechanism module includes a channel attention module and a spatial attention module;
[0026] The aforementioned channel attention module includes a global average pooling layer, a global maximum pooling layer and a shared multi-layer perceptron. The aforementioned global average pooling layer and the global maximum pooling layer can generate their respective corresponding global feature maps based on the input image; the aforementioned shared multi-layer perceptron can obtain the corresponding nonlinear relationship based on the aforementioned global feature map to form MLP output data, and perform element-by-element addition operation on the MLP output data and then activate it through a sigmoid activation function to obtain a channel attention map;
[0027] The aforementioned spatial attention module can perform channel average pooling and channel maximum pooling processing based on the channel attention map to form feature maps of the two corresponding channels respectively. At the same time, the feature maps of the aforementioned two channels are spliced and convolved in the channel dimension to form a spatial attention map, and then the spatial attention map is activated by the sigmoid activation function to finally form an enhanced feature map.
[0028] Furthermore, the formula corresponding to the bounding box regression loss function WIoU in step 4 is as follows:
[0029]
[0030] Among them, w i is the weight of the i-th pixel in the intersection area, w j is the weight of the jth pixel in the union region.
[0031] Furthermore, in the aforementioned step 6, when performing tracheal intubation mirror organ image recognition, the optimized organ intubation mirror image target detection model is evaluated by evaluation indicators; the aforementioned evaluation indicators include accuracy, recall rate, mAP and FLOPs, and the corresponding process includes:
[0032] S61, respectively calculate the accuracy and recall rate of the optimized organ intubation endoscope image target detection model, and the calculation formula is as follows:
[0033]
[0034] S62, draw the Precision-Recall curve;
[0035] S63. First, according to the aforementioned Precision-Recall curve, the Precision under different Recall values is calculated. Then, each calculated Precision value is integrated to obtain the AP of each recognition category of the optimized organ intubation image target detection model, and the average value of the AP of all categories, i.e., mAP, is obtained. The calculation formula of mAP is as follows:
[0036]
[0037] S64: Calculate the FLOPs of the optimized organ intubation image object detection model layer by layer, and accumulate the FLOPs of each layer to obtain the network computational complexity.
[0038] The present invention also provides a tracheal intubation scope image target detection system based on the tracheal intubation scope image target detection method based on the improved YOLOV5, which is characterized by comprising:
[0039] An acquisition unit capable of acquiring a raw endotracheal intubation endoscope image data set;
[0040] A data enhancement processing unit, which can perform data enhancement processing on the original endotracheal intubation mirror image data set to obtain a endotracheal intubation mirror image data set after data enhancement processing, wherein the endotracheal intubation mirror image data set includes a endotracheal intubation mirror image data training set, a endotracheal intubation mirror image data verification set, and a endotracheal intubation mirror image data test set;
[0041] A target detection model creation unit, which can form a target detection model based on an improved YOLOV5 according to a training set of endotracheal intubation image data after data enhancement processing;
[0042] A loss function optimization unit, which can optimize the loss function of the target detection model based on the improved YOLOV5 according to the bounding box regression loss function WIoU to form an organ intubation image target detection model;
[0043] A quantitative perception processing unit capable of optimizing the aforementioned organ intubation endoscope image target detection model according to the quantitative perception operation;
[0044] The target recognition unit can recognize the tracheal intubation mirror organ image according to the tracheal intubation mirror image data test set through the optimized organ intubation mirror image target detection model.
[0045] Beneficial effects of the present invention:
[0046] The present invention proposes a novel endotracheal intubation mirror image target detection method and system based on improved YOLOV5; firstly, the present invention optimizes the YOLOV5 network to form an improved YOLO V5 model, thereby improving the accuracy of target detection; secondly, the target detection model based on the improved YOLO V5 is optimized by combining the improved YOLO V5 model and the bounding box regression loss function WIoU, so that the present invention can effectively improve the problem of small target detection accuracy in airway organ recognition; finally, the optimized organ intubation mirror image target detection model is evaluated by evaluation indicators (mAP and GFLOPs, etc.), thereby further improving the superiority of the target detection model. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0048] Figure 1 A flowchart of the steps of the method corresponding to the present invention;
[0049] Figure 2 Schematic diagram of the image annotation process of the organ intubation endoscope in the present invention;
[0050] Figure 3 Schematic diagram of the CBAM attention mechanism module in the present invention;
[0051] Figure 4 It is a schematic diagram of the structure of the endotracheal intubation mirror image target detection model in the present invention;
[0052] FIG5 is a schematic diagram of organ detection effect (i.e., a schematic diagram of recognition result) in the present invention;
[0053] in, Figure 5a It is a schematic diagram of the model recognition results (glottis—level I);
[0054] Figure 5bIt is a schematic diagram of the model recognition results (glottis—level II);
[0055] Figure 5c It is a schematic diagram of the model recognition results (glottis—level III);
[0056] Figure 5d This is a schematic diagram of the model identification results (epiglottis);
[0057] Figure 5e This is a schematic diagram of the model identification results (carina);
[0058] Figure 5f This is a schematic diagram of the model recognition results (trachea);
[0059] Figure 5g This is a schematic diagram of the model recognition result (tongue);
[0060] Figure 5h This is a schematic diagram of the model identification results (uvula);
[0061] Figure 5i Schematic diagram of model recognition results (teeth). DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] In order to solve the above problems, Figure 1 - Figure 5, a novel endotracheal intubation scope image target detection method based on improved YOLOV5 proposed in the present invention, characterized in that it includes the following steps:
[0064] Step 1: Obtain the original endotracheal intubation image dataset;
[0065] Step 2, performing data enhancement processing on the original endotracheal intubation mirror image data set to obtain a endotracheal intubation mirror image data set after data enhancement processing, wherein the endotracheal intubation mirror image data set includes a endotracheal intubation mirror image data training set, a endotracheal intubation mirror image data verification set, and a endotracheal intubation mirror image data test set;
[0066] Step 3, forming a target detection model based on improved YOLOV5 according to the endotracheal intubation image data training set after data enhancement processing;
[0067] Step 4, optimizing the loss function of the target detection model based on the improved YOLOV5 according to the bounding box regression loss function WIoU to form an organ intubation endoscope image target detection model;
[0068] Step 5, optimizing the aforementioned organ intubation endoscope image target detection model according to the quantitative perception operation;
[0069] Step 6: According to the endotracheal intubation endoscope image data test set, the endotracheal intubation endoscope organ image is recognized by using the optimized organ intubation endoscope image target detection model.
[0070] Preferably, the specific process of obtaining the endotracheal intubation endoscope image dataset in the aforementioned step 1 is: first, a number of historical sample datasets - clinical videos - are collected through the organ intubation endoscope; second, a number of original endotracheal intubation endoscope images are respectively intercepted from the aforementioned clinical videos according to the target type; finally, each original endotracheal intubation endoscope image is anchored and format converted to form an endotracheal intubation endoscope image dataset; further preferably, the original endotracheal intubation endoscope image interception method is to extract frames from the clinical video through the X-AnyLabeling tool to intercept a number of images. The target type in this example includes the uvula. , epiglottis, glottis-I level, glottis-II level, glottis-III level, carina, trachea, tongue and teeth 9 target organ structures; further preferably, the captured images are anchored by the X-AnyLabeling tool to obtain 3000 final labeled pictures, and finally the YOLO format labels are generated - the generated xml format information is converted into txt format; further preferably, the tracheal intubation image dataset is divided into training set, test set and validation set, such as randomly allocating the training set, validation set and test set in a ratio of 8:1:1 to ensure the randomness of the laryngoscope image data.
[0071] Preferably, the specific process of performing data enhancement processing on the original endotracheal intubation image dataset in the aforementioned step 2 to obtain the endotracheal intubation image dataset after data enhancement processing is as follows:
[0072] Step 21, performing a horizontal flip operation on each original image in the original endotracheal intubation mirror image data set, so as to process the original image in a mirroring manner;
[0073] Step 22, performing a vertical flip operation on each original image in the original endotracheal intubation mirror image data set, so as to process the original image in a flipping manner;
[0074] Step 23, performing a random cropping operation on each original image in the original endotracheal intubation mirror image data set, so as to process the original image by cropping, that is, randomly cropping a part of the original image, randomly selecting a starting point and an end point in the image, and then cropping the original image within this range;
[0075] Step 24, performing a random rotation operation on each original image in the original endotracheal intubation mirror image data set to process the original image by rotation, that is, randomly generating a rotation angle, and creating a rotation matrix, and using the matrix to rotate the original image;
[0076] Step 25, adding random noise to each original image of the original endotracheal intubation mirror image data set to process the original image by adding noise, specifically, randomly generating a noise array that conforms to a normal distribution, and adding it to the original image;
[0077] Step 26: All the endotracheal intubation endoscope images obtained in step 21-step 25 are used as the endotracheal intubation endoscope image dataset after data enhancement. The dataset obtained by S1 is enhanced by mirroring, flipping, cropping, rotating, adding noise and other data enhancement methods through steps 21-step 25 to increase the sample size of the dataset. For example, there are 4000 pictures after data enhancement, 3200 of which are used as training sets, 400 as validation sets, and 400 as test sets. The number of labels after data enhancement is shown in the following table:
[0078]
[0079] Preferably, in the aforementioned step 3, the specific process of forming a target detection model based on improved YOLOV5 according to the training set of endotracheal intubation image data after data enhancement processing is as follows:
[0080] The core of this step is to optimize the target detection network model: the core of the optimization is to improve the original YOLO V5s network by integrating the Transformer and CBAM attention mechanism modules. There are two main improvements. The first improvement is to replace some C3 modules of the Backbone and Head structures of the original YOLO V5s network with the encoder module of the Transformer. The second improvement is to add the CBAM attention mechanism module to the Backbone structure of YOLO V5s, thereby improving the target detection performance of the target detection network model.
[0081] Regarding the first improvement point: The core of the aforementioned Transformer module is its Encoder and Decoder structure. Generally speaking, a basic Transformer Encoder module consists of a multi-head self-attention (MSA) mechanism and a feed-forward neural network (FFN), each of which is accompanied by residual connections and layer normalization.
[0082] Multi-head self-attention (MSA): allows the model to capture global dependencies while considering other elements in the sequence when processing each element of the sequence.
[0083] Feed-Forward Neural Network (FFN): The same fully connected network with two linear transformations and a ReLU activation function is applied at each position.
[0084] Residual connections and layer normalization: Residual connections are added after MSA and FFN, respectively, followed by layer normalization.
[0085] Therefore, in view of the aforementioned advantages of the Transformer module, the present invention can replace the Backbone in the original YOLO V5 and several C3 structures at the end of the head part with the encoder module of the Transformer, wherein the head part forms the Transformer Prediction Heads. The further design principle of the Transformer Prediction Heads is that since the Transformer itself does not have the ability to process sequence position information, the positional encoding technology can be introduced to retain the spatial position information; and then the dimension is adjusted through the reshape operation, that is, the output of the Transformer Encoder is re-adjusted back to the shape of the feature map through the reshape function so that it can be correctly processed by the subsequent YOLOv5s layer.
[0086] For the second improvement point: it is necessary to add a CBAM attention mechanism module to the Backbone structure of the original YOLO V5, that is, insert the CBAM attention mechanism module after the residual connection of the original YOLOV5s network; since the residual block of the original YOLOV5s network usually includes two convolutional layers and a skip connection, this method allows the input graph to bypass the two convolutional layers and directly connect to the corresponding output.
[0087] Preferably, based on the aforementioned design ideas, the aforementioned target detection model based on improved YOLOV5 includes an input terminal input, a Backbone structure, a Neck structure and an output terminal output;
[0088] The aforementioned input end is used to process the input image, which is composed of a Mosaic data enhancement function module, an adaptive anchor frame calculation function module, and an adaptive image scaling function module. The Mosaic data enhancement function module splices the input image in a random scaling, random cropping and random arrangement manner to enrich the data set, greatly improving the network training speed, etc.; the adaptive anchor frame calculation function module can output a predicted frame based on the initial anchor frame, and then compare it with the real frame, calculate the difference between the two, and then reversely update and iterate the corresponding network parameters; the adaptive image scaling function module scales the original image to fill it to the standard size, and then sends it to the detection network to improve the target detection speed.
[0089] The aforementioned Backbone structure adopts the CSPDarknet53 network, which includes the Focus structure and the CSP structure. The C3 module in the aforementioned CSP structure and connected to the SPP layer is replaced with the encoder module of the Transformer structure; the Focus structure is used to slice the input image and obtain the downsampled feature map without information loss. The CSP structure includes 4 conv layers, 3 C3 modules, an SPP layer, and an encoder module of the Transformer structure, namely 3*Trans in the figure. The conv layer is used to extract local spatial information from the input image features. The C3 module includes a conv layer and a csp bottleneck to effectively enhance the learning ability of the model and reduce the amount of calculation.
[0090] The aforementioned Neck structure is used as a feature fusion layer to enhance the network feature fusion capability, that is, to further extract and fuse multi-scale feature maps to generate feature maps with multi-scale information, which helps the model to better understand target information at different scales. Some of its C3 modules are replaced by encoder modules of the Transformer structure; some of the C3 modules here refer to the C3 modules connected to the 4 conv layers in the Transformer Prediction Heads structure at the output end (the replaced structure is the two Trans modules, one 2*Trans, and one 3*Trans in the figure) to further improve the detection effect of small targets, thereby improving the accuracy of target detection.
[0091] The aforementioned output end includes the Transformer Prediction Heads structure, which is mainly used to predict the type and location of the target and output a list of all detected targets, each of which consists of its category label, confidence score, and location information of the bounding box.
[0092] At the same time, after the output and jump connection of each residual block in the aforementioned Backbone structure are added, a CBAM attention mechanism module is inserted to infer feature maps from two independent dimensions, channel and space, and multiply them with the input feature map to construct an adaptive feature vector to meet different organ recognition scenarios; the aforementioned CBAM attention mechanism module includes a channel attention module and a spatial attention module;
[0093] The aforementioned channel attention module includes a global average pooling layer, a global maximum pooling layer and a shared multi-layer perceptron. The aforementioned global average pooling layer and the global maximum pooling layer can generate their respective corresponding global feature maps, i.e., feature descriptors, based on the input image; the aforementioned shared multi-layer perceptron (MLP and MLP includes a hidden layer for learning the nonlinear relationship between channels) can obtain the corresponding nonlinear relationship based on the aforementioned global feature map to form MLP output data, and perform element-by-element addition operation on the MLP output data and then perform activation processing through a sigmoid activation function to obtain a channel attention map;
[0094] The aforementioned spatial attention module can form the feature maps of the two channels corresponding to each other after performing channel average pooling and channel maximum pooling based on the feature map modulated by the channel attention, i.e., the channel attention map. At the same time, the feature maps of the two channels are concatenated and convolved (a 7x7 convolution layer) in the channel dimension to form the spatial attention map, and then the spatial attention map is activated by the sigmoid activation function to finally form the enhanced feature map. The image processing process of the CBAM attention mechanism module is to input the obtained feature map into the CBAM module after the standard operation of the residual block is completed (the convolution layer is followed by batch normalization and ReLU activation function); weight the feature map through the channel attention module to highlight the important channels; then input the feature map weighted by the channel attention into the spatial attention module to highlight the important areas in space; finally, the feature map modulated by the channel and spatial attention is element-wise multiplied with the input of the residual block (the output of the jump connection) to obtain the enhanced feature map.
[0095] Preferably, in the aforementioned step 4, the loss function of the target detection model based on the improved YOLOV5 is optimized according to the bounding box regression loss function WIoU to form the specific process of the organ intubation endoscope image target detection model:
[0096] Since the traditional loss function may not be able to fully capture the subtle changes in overlapping areas, the weighted IoU (WIoU) loss function is introduced to more finely evaluate the accuracy of the predicted box; WIoU loss is a variant of IoU that takes into account the weights of different areas; the specific WIoU loss function formula is as follows:
[0097]
[0098] Among them, w i is the weight of the i-th pixel in the intersection area (the intersection area between the predicted box and the real box), w j It is the weight of the jth pixel in the union area (the union area of the predicted box and the true box).
[0099] Preferably, the specific process of optimizing the aforementioned organ intubation endoscope image target detection model according to the existing quantitative perception operation method in the aforementioned step 5 is: the aforementioned step 5 is the process of using quantitative perception to train the compression model: introducing quantization operation in the model training process, quantizing weights and activation values, and optimizing model parameters through back propagation, reducing the amount of calculation of the model, and further optimizing the model performance. The corresponding principle is that for a neural network, the weights represent the parameters of each connection in the neural network. These parameters can be optimized through network training, and their values determine the strength of the input signal when it is transmitted to the next layer of neurons. The activation value is the value output by the neuron after being processed by the activation function; the specific steps are:
[0100] S51: During the forward propagation of the model, the weights and activation values are first quantized to low-bit-width integer representations, and then dequantized back to floating-point numbers to simulate the effect of quantization in actual deployment for subsequent calculations;
[0101] S52: Use the Straight Through Estimator (STE) gradient approximation algorithm to calculate the gradient during the back propagation of the network model;
[0102] S53: Optimize model parameters by simulating quantized forward propagation and gradient approximation backpropagation methods, and obtain a representation of the model adapted to quantization.
[0103] Preferably, in the aforementioned step 6, the specific process of identifying the tracheoscope organ image by the optimized organ tracheoscope image target detection model based on the tracheoscope image data test set is as follows: the test set image sample data is sent to the improved YOLOV5s network model to obtain the detection result.
[0104] In the aforementioned step 6, when performing endotracheal intubation mirror organ image recognition, the optimized organ intubation mirror image target detection model is evaluated by evaluation indicators to obtain various evaluation results, and the evaluation results are used to determine whether the established model meets the actual application requirements; the aforementioned evaluation indicators include accuracy, recall rate, mAP and FLOPs, and the corresponding process includes:
[0105] S61, respectively calculate the accuracy and recall rate of the optimized organ intubation endoscope image target detection model, and the calculation formula is as follows:
[0106]
[0107] S62, drawing a Precision-Recall curve, calculating Precision and Recall under a series of different confidence thresholds, and drawing the Precision-Recall curve;
[0108] S63. First, according to the aforementioned Precision-Recall curve, the Precision under different Recall values is calculated. Then, each calculated Precision value is integrated to obtain the AP of each recognition category of the optimized organ intubation image target detection model, and the average value of the AP of all categories, i.e., mAP, is obtained. The calculation formula of mAP is as follows:
[0109]
[0110] Where C is the analogy number, AP i is the average precision of the i-th category.
[0111] S64: Calculate the FLOPs of the optimized organ intubation image object detection model layer by layer, and accumulate the FLOPs of each layer to obtain the network computational complexity.
[0112] And as shown in Figure 5 (including Figure 5a-Figure 5i ) are schematic diagrams of recognition results of various organ detections using the present invention. It can be seen from each figure that the present invention can accurately detect the target organ in the image;
[0113] At the same time, the relevant professional knowledge is introduced as follows:
[0114] The use of laryngoscopes and the evaluation and grading standards for difficult airways used in this application are also based on the most well-known [Cormack-Lehane grading system], which is one of the important tools for doctors to communicate with each other and describe the patient's airway condition; the main knowledge points of the aforementioned modified Cormack and Lehane grading are as follows:
[0115] The laryngeal structures that can be seen under laryngoscopy are divided into 4 levels:
[0116] Level I can fully expose the glottis;
[0117] Level II allows visualization of the glottis (posterior wall of the glottic inlet) and the posterior half of the glottis;
[0118] In grade III, only the epiglottis can be seen;
[0119] In grade IV, the epiglottis cannot be seen.
[0120] According to the above-mentioned technical solutions and effect diagrams, the present invention can effectively extract the image features of endotracheal intubation mirror and improve the problem of small target detection accuracy in organ recognition. That is, the method proposed in the present invention has high detection accuracy, fast running speed, low computational complexity, and can accurately detect organs in the image.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A tracheal intubation mirror image target detection method based on improved YOLOV5, characterized in that: include: Step 1: Obtain the original endotracheal intubation image dataset; Step 2, performing data enhancement processing on the original endotracheal intubation mirror image data set to obtain a endotracheal intubation mirror image data set after data enhancement processing, wherein the endotracheal intubation mirror image data set includes a endotracheal intubation mirror image data training set, a endotracheal intubation mirror image data verification set, and a endotracheal intubation mirror image data test set; Step 3, forming a target detection model based on improved YOLOV5 according to the endotracheal intubation image data training set after data enhancement processing; Step 4, optimizing the loss function of the target detection model based on the improved YOLOV5 according to the bounding box regression loss function WIoU to form an organ intubation endoscope image target detection model; Step 5, optimizing the aforementioned organ intubation endoscope image target detection model according to the quantitative perception operation; Step 6: According to the endotracheal intubation endoscope image data test set, the endotracheal intubation endoscope organ image is recognized by using the optimized organ intubation endoscope image target detection model.
2. According to claim 1, a tracheal intubation mirror image target detection method based on improved YOLOV5 is characterized in that: The aforementioned step 2 includes the following steps: Step 21, performing a horizontal flip operation on each original image in the original endotracheal intubation mirror image data set; Step 22, performing a vertical flip operation on each original image in the original endotracheal intubation mirror image data set; Step 23, performing a random cropping operation on each original image in the original endotracheal intubation mirror image data set; Step 24, performing a random rotation operation on each original image in the original endotracheal intubation mirror image data set; Step 25: adding random noise to each original image of the original endotracheal intubation image dataset. Step 26: All the endotracheal intubation endoscope images obtained in steps 21 to 25 are used as the endotracheal intubation endoscope image dataset after data enhancement processing.
3. According to claim 1, a tracheal intubation mirror image target detection method based on improved YOLOV5 is characterized in that: The aforementioned target detection model based on improved YOLOV5 includes an input end, a Backbone structure, a Neck structure, and an output end; The aforementioned Backbone structure adopts the CSPDarknet53 network, which includes a Focus structure and a CSP structure. The C3 module in the aforementioned CSP structure and connected to the SPP layer is replaced with an encoder module of the Transformer structure; at the same time, a CBAM attention mechanism module is inserted after the output and jump connection of each residual block in the aforementioned Backbone structure are added; The C3 module of the aforementioned Neck structure is replaced by the encoder module of the Transformer structure; the C3 module of the aforementioned part refers to the C3 module connected to each conv layer in the Transformer Prediction Heads structure at the output end; The aforementioned output end includes a Transformer Prediction Heads structure.
4. According to claim 3, a tracheal intubation mirror image target detection method based on improved YOLOV5 is characterized in that: The aforementioned CBAM attention mechanism module includes a channel attention module and a spatial attention module; The aforementioned channel attention module includes a global average pooling layer, a global maximum pooling layer and a shared multi-layer perceptron. The aforementioned global average pooling layer and the global maximum pooling layer can generate their respective corresponding global feature maps based on the input image; the aforementioned shared multi-layer perceptron can obtain the corresponding nonlinear relationship based on the aforementioned global feature map to form MLP output data, and perform element-by-element addition operation on the MLP output data and then activate it through a sigmoid activation function to obtain a channel attention map; The aforementioned spatial attention module can perform channel average pooling and channel maximum pooling processing based on the channel attention map to form feature maps of the two corresponding channels respectively. At the same time, the feature maps of the aforementioned two channels are spliced and convolved in the channel dimension to form a spatial attention map, and then the spatial attention map is activated by the sigmoid activation function to finally form an enhanced feature map.
5. According to claim 1, a tracheal intubation mirror image target detection method based on improved YOLOV5 is characterized in that: The formula corresponding to the bounding box regression loss function WIoU in step 4 is as follows: Among them, w i is the weight of the i-th pixel in the intersection area, w j is the weight of the jth pixel in the union region.
6. According to claim 1, a tracheal intubation mirror image target detection method based on improved YOLOV5 is characterized in that: In the aforementioned step 6, when performing endotracheal intubation mirror organ image recognition, the optimized organ intubation mirror image target detection model is also evaluated by evaluation indicators; the aforementioned evaluation indicators include accuracy, recall rate, mAP and FLOPs, and the corresponding process includes: S61, respectively calculate the accuracy and recall rate of the optimized organ intubation endoscope image target detection model, and the calculation formula is as follows: S62, draw the Precision-Recall curve; S63. First, according to the aforementioned Precision-Recall curve, the Precision under different Recall values is calculated. Then, each calculated Precision value is integrated to obtain the AP of each recognition category of the optimized organ intubation image target detection model, and the average value of the AP of all categories, i.e., mAP, is obtained. The calculation formula of mAP is as follows: S64: Calculate the FLOPs of the optimized organ intubation image object detection model layer by layer, and accumulate the FLOPs of each layer to obtain the network computational complexity.
7. A tracheal intubation scope image target detection system constructed by the tracheal intubation scope image target detection method based on improved YOLOV5 according to any one of claims 1 to 6, characterized in that: include: An acquisition unit capable of acquiring a raw endotracheal intubation endoscope image data set; A data enhancement processing unit, which can perform data enhancement processing on the original endotracheal intubation mirror image data set to obtain a endotracheal intubation mirror image data set after data enhancement processing, wherein the endotracheal intubation mirror image data set includes a endotracheal intubation mirror image data training set, a endotracheal intubation mirror image data verification set, and a endotracheal intubation mirror image data test set; A target detection model creation unit, which can form a target detection model based on an improved YOLOV5 according to a training set of endotracheal intubation image data after data enhancement processing; A loss function optimization unit, which can optimize the loss function of the target detection model based on the improved YOLOV5 according to the bounding box regression loss function WIoU to form an organ intubation image target detection model; A quantitative perception processing unit, which can optimize the aforementioned organ intubation endoscope image target detection model according to the quantitative perception operation; The target recognition unit can recognize the tracheal intubation mirror organ image according to the tracheal intubation mirror image data test set through the optimized organ intubation mirror image target detection model.
Citation Information
Cited By
Visual combined type multi-parameter monitoring lung isolation catheter
CN120285388A
A visual combined multi-parameter monitoring lung isolation catheter
CN120285388B
