Five-face needle tip sharpness evaluation system and method based on deep learning
By using a deep learning-based method, the sharpness of the five-sided needle tip is evaluated by training in different regions, which solves the problems of low efficiency and strong subjectivity of traditional detection methods and achieves efficient and accurate needle tip sharpness evaluation.
Patent Information
- Application Number
- CN202511667237.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-11-14
AI Technical Summary
Traditional methods for testing the sharpness of a five-sided needle tip cannot accurately and quickly assess its sharpness without damaging the needle tip, and manual judgment is inefficient and highly subjective.
Using a deep learning-based approach, images of five-sided needle tips are collected as training samples. Primary and control needle tip evaluation models are trained in different regions to obtain the interference level and attention weight of each region. The model training process is optimized, and the sharpness of the five-sided needle tip is finally evaluated.
It enables accurate and rapid assessment of the sharpness of a five-sided needle without damaging its tip, improving detection efficiency and accuracy, and replacing traditional destructive testing and manual visual inspection.
Smart Images

Figure CN121121086B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning technology, and specifically to a deep learning-based system and method for evaluating the sharpness of a five-sided needle tip. Background Technology
[0002] Five-sided needles are injection or puncture needles composed of five different cutting surfaces. Compared with traditional three-sided needles, five-sided needles have the advantages of low resistance, minimal trauma and high precision when puncturing human tissue. They are widely used in epidural anesthesia, central venous puncture, venous blood collection and biological sampling. To ensure smooth puncture and reduce patient pain and the risk of complications, the sharpness of the five-sided needle tip must be guaranteed.
[0003] Traditional methods for testing the sharpness of the tip of a five-sided needle mainly include puncture force testing and microscopic observation. However, the puncture force testing process causes wear and tear on the needle tip, making it impossible to test all five-sided needles produced. Microscopic observation, on the other hand, requires manual judgment of the needle tip sharpness, resulting in low testing efficiency and high subjectivity. Summary of the Invention
[0004] This invention provides a deep learning-based system and method for evaluating the sharpness of a five-sided needle tip, in order to solve the existing problem: traditional methods for detecting the sharpness of a five-sided needle tip cannot accurately and quickly detect the sharpness of the needle tip without damaging it.
[0005] The deep learning-based five-sided needle tip sharpness evaluation system and method of the present invention adopts the following technical solution:
[0006] One embodiment of the present invention provides a deep learning-based method for evaluating the sharpness of a five-sided needle tip, the method comprising the following steps:
[0007] Several images of five-sided needle tips were collected as training and test samples. A primary needle tip evaluation model was trained based on the training samples.
[0008] Each training sample is divided into several regions, and control samples are obtained for each region. A control pinpoint evaluation model for each region is trained based on the control samples for each region. Test samples are input into the primary pinpoint evaluation model and the control pinpoint evaluation model for the region, respectively, and the test results of the primary pinpoint evaluation model and the control pinpoint evaluation model for the region are obtained, thereby obtaining the degree of interference in the region.
[0009] Based on the distance between different regions and the difference in the degree of interference between different regions, the attention concentration factor of a region is obtained; based on the difference in the degree of interference between a region and its neighboring regions, the attention trend factor of a region is obtained; and by combining the attention concentration factor of a region with the degree of interference of a region, the attention weight of a region is obtained.
[0010] The needle tip evaluation model is obtained by training based on the attention weight of the region and the training samples, and the sharpness of the five-sided needle tip is evaluated based on the needle tip evaluation model.
[0011] Preferably, the method for collecting several images of five-sided needle tips as training and testing samples, and training a primary needle tip evaluation model based on the training samples, includes the following specific methods:
[0012] Preset a training sample size With the number of test samples Collect data using an industrial microscope camera. Zhang Wumianzhen needle tip image and Images of the needle tip of the five-sided needle were used as training and testing samples, respectively; the sharpness of the needle tip in each training and testing sample was obtained through a mechanical puncture experiment.
[0013] The sharpness of the needle tip in each training sample is used as the training label for each training sample. All training samples are input into the CNN model for training, where the loss function used in training is the cross-entropy loss function, resulting in a primary needle tip evaluation model.
[0014] Preferably, the specific method for dividing each training sample into several regions, obtaining control samples for each region, and training a control needle tip evaluation model for each region based on the control samples for each region is as follows:
[0015] Preset a number of equally divided regions Divide each training sample into equal parts. The five regions are divided into regions, with the injection direction of the five-sided needle as the positive direction, and each region is assigned an index label;
[0016] For the The region that obscures all training samples. The area will block the first The training samples from the i-th region are denoted as the i-th region. The control sample from the [number] region; according to the [number]th [section]... Training was performed using all control samples from the nth region to obtain the nth... The training of the reference needle tip evaluation model in the region, the training of the first The process of training the primary needlepoint assessment model is the same for each region's control needlepoint assessment model.
[0017] Preferably, the specific method for inputting the test samples into the primary needle tip assessment model and the regional control needle tip assessment model to obtain the test results of the primary needle tip assessment model and the regional control needle tip assessment model is as follows:
[0018] For the The region; input all test samples into the first... In the control needle tip evaluation model of each region, the first of all test samples was obtained. The sharpness of the needle tip is compared in each region; all test samples are input into the primary needle tip evaluation model to obtain the primary detection needle tip sharpness of all test samples; an evaluation error is preset. ;
[0019] For any test sample, if the difference between the primary detection tip sharpness and the tip sharpness of the test sample is greater than the sum of the primary detection tip sharpness and the tip sharpness of the test sample, then... If the difference between the tip sharpness of the test sample and the tip sharpness of the primary detection probe is greater than the sum of the tip sharpness of the primary detection probe, then a false positive label is assigned to the primary detection tip sharpness of the test sample. If the absolute value of the difference between the tip sharpness of the test sample and the tip sharpness of the primary detection of the test sample is less than or equal to the sum of the tip sharpness of the primary detection of the test sample and the tip sharpness of the test sample, then a false negative label is assigned to the primary detection tip sharpness of the test sample. Then, the primary detection tip sharpness of the test sample is assigned a correct label;
[0020] The first test sample Each region is assigned a false positive, false negative, or correct label based on the sharpness of the needle tip.
[0021] Preferably, the method for determining the interference level of the acquisition area includes:
[0022] For the The region; according to the test sample, the first... Each region is used to determine the false positive, false negative, or correct label based on the needle tip sharpness, and all test samples are divided into the following categories: The control false positive set of each region, the first The control false negative set of each region and the first The correct set of comparisons for each region; the first... The ratio of the number of test samples in the correct control set of each region to the total number of test samples is used as the ratio of the number of test samples in the correct control set of each region. The accuracy of the comparative needle tip assessment model in each region;
[0023] Based on the false positive, false negative, or correct labels of the primary detection needle tip sharpness of the test samples, all test samples are divided into a primary false positive set, a primary false negative set, and a primary correct set; the ratio of the number of test samples in the primary correct set to the total number of test samples is taken as the accuracy of the primary needle tip evaluation model.
[0024] The first The difference between the accuracy of the control pinpoint assessment model and the accuracy of the primary pinpoint assessment model in each region is calculated by comparing the accuracy of the primary false positive set with that of the secondary false positive set. The intersection and union of the control false positive sets of each region, multiplied by the primary false negative set and the second... The product of the intersection-union ratios of the control false negative sets of each region yields the product of the first... The interference factor in the region, for the first The interference factors in each region are normalized, and the first region is normalized. The result of normalizing the interference factors in each region is used as the first... The degree of interference in each area.
[0025] Preferably, the specific method for obtaining the regional attention concentration factor based on the distance between different regions and the difference in interference levels between different regions includes:
[0026]
[0027] In the formula, Indicates the first The focus factor for each region; Indicates the number of regions; Indicates the first The degree of interference in each area; Indicates the first The degree of interference in each area; Indicates the first The region and the first Index distance between regions; This represents the linear normalization function.
[0028] Preferably, the specific method for obtaining the attention trend factor of a region based on the degree of interference between the region and its neighboring regions includes:
[0029] For the The region will be connected with the first The regions adjacent to the first region are denoted as the i-th region. Neighborhood regions of each region;
[0030] The first The region and the first The absolute value of the difference in interference level between each neighboring region of the first region is taken as the first... The mutation factor of each neighboring region of the region; for the first region The mean values of mutation factors in all neighboring regions of a given region are negatively correlated and normalized. The result of this negative correlation normalization is used as the first... Attention trend factors for each region.
[0031] Preferably, the specific method for obtaining the attention weight of the region is as follows:
[0032] For the The first region will be the first The attention trend factor of each region and the first The product of the attention concentration factors of each region, compared to the previous one The ratio obtained from the interference level of each region is denoted as the i-th region. The level of attention given to each region, for the first The degree of attention to each region is weighted and normalized, and the result of the weight normalization is used as the weight of the first region. The weight of attention for each region.
[0033] Preferably, the specific method for training the needle tip evaluation model based on the attention weight of the region and the training samples is as follows:
[0034] The sharpness of the needle tip in each training sample is used as the training label for each training sample. All training samples and the attention weights of each region are input into the CNN model for training. The loss function used in training is the cross-entropy loss function, resulting in the needle tip evaluation model.
[0035] Another embodiment of the present invention provides a deep learning-based five-sided needle tip sharpness evaluation system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of any of the above-described deep learning-based five-sided needle tip sharpness evaluation methods.
[0036] The beneficial effects of the technical solution of this invention are as follows: This application collects several images of five-sided needle tips as training and testing samples, and trains a primary needle tip evaluation model based on the training samples. Since the information at different locations in the five-sided needle tip images provides different values for evaluating the sharpness of the needle tip, if the information at all locations in the five-sided needle tip images is trained with uniform weights, the model cannot focus on the key locations for evaluating the sharpness of the needle tip during training, thus causing the trained needle tip evaluation model to be unable to accurately evaluate the sharpness of the five-sided needle tip. Therefore, by dividing the five-sided needle tip images into several regions and occluding specific regions… The training samples are used to train a control pinpoint evaluation model for a specific region. Then, the test results of the primary pinpoint evaluation model and the control pinpoint evaluation model for the region are analyzed to optimize the subsequent training process of the model, ultimately enabling the pinpoint evaluation model to accurately evaluate the sharpness of the five-sided needle tip. Therefore, each training sample is divided into several regions, and control samples are obtained for each region. Based on the control samples of each region, a control pinpoint evaluation model for the region is trained. The test samples are input into the primary pinpoint evaluation model and the control pinpoint evaluation model for the region, respectively, and the test results of the primary pinpoint evaluation model and the control pinpoint evaluation model for the region are obtained, thereby obtaining the degree of interference in the region.
[0037] Furthermore, when the interference level of a certain region in the image of a five-sided needle tip is low while the interference level of its surrounding regions is high, it indicates that the region is a region of effective information or a "stable center" of the interference boundary, and should be given a high attention weight. At the same time, if the interference level of a region shows a significant trend, it indicates that such regions are often important criteria for the model to judge the sharpness of the needle tip, and should be given more attention in the subsequent training of the model. Based on the distance between different regions and the difference in interference level between different regions, the attention concentration factor of the region is obtained; based on the interference level of the region and its neighboring regions, the attention trend factor of the region is obtained; and combined with the attention concentration factor of the region and the interference level of the region, the attention weight of the region is obtained.
[0038] The needle tip evaluation model is obtained by training based on the attention weight of the region and the training samples, and the sharpness of the five-sided needle tip is evaluated based on the needle tip evaluation model. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1This is a flowchart illustrating the steps of the deep learning-based five-sided needle tip sharpness evaluation method of the present invention. Detailed Implementation
[0041] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of the deep learning-based five-sided needle tip sharpness evaluation system and method proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0043] The following description, in conjunction with the accompanying drawings, details the specific scheme of the deep learning-based five-sided needle tip sharpness evaluation system and method provided by this invention.
[0044] Please see Figure 1 The diagram illustrates a flowchart of a deep learning-based method for evaluating the sharpness of a five-sided needle tip, according to an embodiment of the present invention. The method includes the following steps:
[0045] Step S001: Collect several images of five-sided needle tips as training and testing samples, and train a primary needle tip evaluation model based on the training samples.
[0046] It should be noted that traditional methods for detecting the sharpness of a five-sided needle tip cannot accurately and quickly detect the sharpness of the needle tip without damaging it. Therefore, this embodiment proposes a deep learning-based method for evaluating the sharpness of a five-sided needle tip. Specifically, several images of five-sided needle tips are collected as training and testing samples. A primary needle tip evaluation model is trained based on the training samples. Subsequently, the training process of the model is optimized based on the test results of the primary needle tip evaluation model using the test samples. Finally, a needle tip evaluation model is trained to accurately and quickly detect the sharpness of the five-sided needle tip.
[0047] Specifically, a preset number of training samples is used. With the number of test samples The and The specific value can be set according to the actual situation. This embodiment does not make a hard requirement. In this embodiment, it is used as... , Taking an industrial microscope as an example, data is collected using an industrial microscope camera. Zhang Wumianzhen needle tip image and Images of the needle tips of the five-sided needle were used as training and testing samples, respectively. The sharpness of the needle tips of each training and testing sample was obtained by mechanical puncture test. Since the mechanical puncture test is a well-known existing technology, it will not be described in detail in this embodiment.
[0048] Furthermore, the sharpness of the needle tip of each training sample is used as the training label for each training sample. All training samples are input into the CNN (Convolutional Neural Network) model for training. The loss function used in the training is the cross-entropy loss function, resulting in a primary needle tip evaluation model. Since the specific training process of the CNN model is a well-known existing technology, it will not be described in detail in this embodiment.
[0049] Step S002: Divide each training sample into several regions, obtain control samples for each region, and train a control pinpoint evaluation model for each region based on the control samples for each region; input the test samples into the primary pinpoint evaluation model and the control pinpoint evaluation model for the region respectively, obtain the test results of the primary pinpoint evaluation model and the control pinpoint evaluation model for the region, and then obtain the interference level of the region.
[0050] It should be noted that the information at different locations in the five-sided needle tip image provides different values for evaluating the sharpness of the needle tip. If the information at all locations in the five-sided needle tip image is trained with uniform weights, the model cannot focus on the key locations for evaluating the sharpness of the needle tip during the training process, which leads to the trained needle tip evaluation model being unable to accurately evaluate the sharpness of the five-sided needle tip. Therefore, this embodiment divides the five-sided needle tip image into several regions, trains a control needle tip evaluation model for a specific region by occluding training samples of a specific region, and then evaluates the impact of a specific region on the needle tip evaluation model by analyzing the test results of the primary needle tip evaluation model and the control needle tip evaluation model for the region.
[0051] Preferably, in a specific embodiment of the present invention, a predetermined number of equally divided regions is set. The The specific value can be set according to the actual situation. This embodiment does not make a hard requirement. In this embodiment, the value is taken as follows: Let's take an example; divide each training sample into equal parts. The five regions are divided into regions, with the injection direction of the five-sided needle as the positive direction, and each region is assigned an index label;
[0052] For the The region that obscures all training samples. The area will block the first The training samples from the i-th region are denoted as the i-th region. The control sample from the [number] region; according to the [number]th [section]... Training was performed using all control samples from the nth region to obtain the nth... The training of the reference needle tip evaluation model in the region, the training of the first The process of training the primary needle tip evaluation model is the same for each region's control needle tip evaluation model, so it will not be repeated in this embodiment.
[0053] Furthermore, regarding the first The region; input all test samples into the first... In the control needle tip evaluation model of each region, the first of all test samples was obtained. The sharpness of the needle tip is compared in each region; all test samples are input into the primary needle tip evaluation model to obtain the primary detection needle tip sharpness of all test samples; an evaluation error is preset. The The specific value can be set according to the actual situation. This embodiment does not make a hard requirement. In this embodiment, the value is taken as follows: Let's take an example to illustrate;
[0054] For any test sample, if the difference between the primary detection tip sharpness and the tip sharpness of the test sample is greater than the sum of the primary detection tip sharpness and the tip sharpness of the test sample, then... If the difference between the tip sharpness of the test sample and the tip sharpness of the primary detection probe is greater than the sum of the tip sharpness of the primary detection probe, then a false positive label is assigned to the primary detection tip sharpness of the test sample. If the absolute value of the difference between the tip sharpness of the test sample and the tip sharpness of the primary detection of the test sample is less than or equal to the sum of the tip sharpness of the primary detection of the test sample and the tip sharpness of the test sample, then a false negative label is assigned to the primary detection tip sharpness of the test sample. Then, the primary detection tip sharpness of the test sample is assigned a correct label;
[0055] Similarly, for each test sample, the first... Each region is assigned a false positive, false negative, or correct label based on the sharpness of the needle tip.
[0056] It should be noted that false positive, false negative, and correct labels all refer to the detection results of the evaluation model. A false positive label indicates that the model mistakenly identifies a blunt needle tip as a sharp needle tip; a false negative label indicates that the model mistakenly identifies a sharp needle tip as a blunt needle tip; and a correct label indicates that the model accurately assesses the true sharpness of the needle. Further analysis of the differences between the needle tip evaluation model and the region-based control needle tip evaluation model can reveal the degree of interference in the region. This information is used to optimize the model's training process, ultimately enabling the needle tip evaluation model to accurately assess the sharpness of the needle tip.
[0057] Preferably, in a specific embodiment of the present invention, for the first The region; according to the test sample, the first... Each region is used to determine the false positive, false negative, or correct label based on the needle tip sharpness, and all test samples are divided into the following categories: The control false positive set of each region, the first The control false negative set of each region and the first The correct set of comparisons for each region; the first... The ratio of the number of test samples in the correct control set of each region to the total number of test samples is used as the ratio of the number of test samples in the correct control set of each region. The accuracy of the comparative needle tip assessment model in each region;
[0058] Based on the false positive, false negative, or correct labels of the primary detection needle tip sharpness of the test samples, all test samples are divided into a primary false positive set, a primary false negative set, and a primary correct set; the ratio of the number of test samples in the primary correct set to the total number of test samples is taken as the accuracy of the primary needle tip evaluation model.
[0059] Furthermore, the first The difference between the accuracy of the control pinpoint assessment model and the accuracy of the primary pinpoint assessment model in each region is calculated by comparing the accuracy of the primary false positive set with that of the secondary false positive set. The intersection and union of the control false positive sets of each region, multiplied by the primary false negative set and the second... The product of the intersection-union ratios of the control false negative sets of each region yields the product of the first... The interference factor in the region, for the first The interference factors in each region are normalized (using sigmoid normalization). The result of normalizing the interference factors in each region is used as the first... The degree of interference in each area.
[0060] As an example, obtaining the first The specific formula for calculating the interference level in each area is as follows:
[0061]
[0062] In the formula, Indicates the first The degree of interference in each area; Indicates the first The accuracy of the comparative needle tip assessment model in each region; This indicates the accuracy of the primary needle tip assessment model; Indicates the primary false positive set and the second set. Crossover and union ratio of the control false positive sets in each region; The primary false negative set and the second set are represented by the first set. The intersection-union ratio of the control false negative sets in each region; This represents a preset hyperparameter, the purpose of which is to avoid the denominator being zero during fractional operations. The specific value can be set according to the actual situation. This embodiment does not make a hard requirement. In this embodiment, the value is taken as... Let's take an example to illustrate; This represents the sigmoid function, which is used for normalization in this embodiment.
[0063] It should be noted that, The larger the value, the more likely the first digit is obscured. The more regions the model trained in increases in accuracy, i.e., the more regions the accuracy increases, the more the accuracy of the model increases. The information on needle tip sharpness is accurately assessed by considering the memory interference within a region; a higher intersection-union ratio (IU) indicates greater similarity between sets. However, when the primary false positive set is less similar to the region's control false positive set, and vice versa, occlusion of the region results in a drastic change in the region's control needle tip assessment model compared to the primary needle tip assessment model. This suggests that the region may contain interfering features. The larger the value and The smaller the value, the more... The greater the interference in a given area, the more severe the problem.
[0064] This gives us the level of interference in each region.
[0065] Step S003: Based on the distance between different regions and the difference in the degree of interference between different regions, obtain the attention concentration factor of the region; based on the difference in the degree of interference between the region and its neighboring regions, obtain the attention trend factor of the region; and combine the attention concentration factor of the region with the degree of interference of the region to obtain the attention weight of the region.
[0066] It should be noted that when the interference level of a certain region in the image of a five-sided needle tip is low while the interference level of its surrounding regions is high, it indicates that the region is a region of effective information or a "stable center" of the interference boundary, and should be given a high attention weight. Therefore, the attention concentration factor of the region can be obtained from this. At the same time, when the interference level of a region shows a significant trend, it indicates that the region may correspond to a key structural boundary or feature mutation location in the image. Such regions are often important criteria for the model to judge the sharpness of the needle tip, so they should be given a high attention weight. Therefore, the attention trend factor of the region can be obtained from this. Combining the attention concentration factor of the region with the interference level of the region, the attention weight of the region can be obtained. This weight is used in the subsequent optimization of the model training process, ultimately enabling the needle tip evaluation model to accurately evaluate the sharpness of the five-sided needle tip.
[0067] Preferably, in a specific embodiment of the present invention, for the first The region; according to the first The degree of interference between this region and other regions, combined with the first The index distance between the nth region and other regions is obtained. The specific formula for calculating the attention concentration factor for each region is as follows:
[0068]
[0069] In the formula, Indicates the first The focus factor for each region; Indicates the number of regions; Indicates the first The degree of interference in each area; Indicates the first The degree of interference in each area; Indicates the first The region and the first Index distance between regions; This represents a linear normalization function, whose specific normalization range covers all regions. .
[0070] It should be noted that, The larger the value, the more it indicates that the first... The less interference a region experiences compared to its surrounding areas, the more stable it is, indicating it's a region of effective information or a "stable center" of interference boundaries. Therefore, it should be assigned a high attention weight. The more attention a region receives from its concentration factor, the more attention should be paid to it during subsequent model training. Each region.
[0071] It should be further explained that when the degree of interference in a region shows a significant trend, it indicates that such regions are often an important basis for the model to judge the sharpness of the needle tip. The more attention should be paid to this region in the subsequent training of the model, that is, the trend of the degree of interference in the region is needed to obtain the attention trend factor of the region, so that the needle tip evaluation model trained in the end can accurately evaluate the sharpness of the five-sided needle tip.
[0072] Preferably, in a specific embodiment of the present invention; for the first The region will be connected with the first The regions adjacent to the first region are denoted as the i-th region. Neighborhood regions of each region;
[0073] The first The region and the first The absolute value of the difference in interference level between each neighboring region of the first region is taken as the first... The mutation factor of each neighboring region of the region; for the first region The mean of mutation factors in all neighboring regions of a given region is negatively correlated and normalized (this can be done by...). The function is normalized for negative correlation, where This represents an exponential function with the natural constant as its base. As input to the model, the implementer can set a negative correlation normalization function according to the actual situation, and use the result of the negative correlation normalization as the first... Attention trend factors for each region.
[0074] It should be noted that the greater the difference between the interference level of any region and the interference level of its surrounding regions, the greater the trend of change in the interference level of that region. The greater the trend of change in the interference level of a region, the more important information it contains that can accurately assess the sharpness of the five-sided needle tip. Therefore, based on the difference between the interference level of a region and the interference level of its surrounding regions, the attention trend factor of the region is obtained. This factor is then used to combine the attention concentration factor of the region with the interference level of the region to obtain the attention weight of the region. This weight is then used to optimize the training process of the model, ultimately enabling the needle tip evaluation model to accurately assess the sharpness of the five-sided needle tip.
[0075] Specifically, for the first The first region will be the first The attention trend factor of each region and the first The product of the attention concentration factors of each region, compared to the previous one The ratio obtained from the interference level of each region is denoted as the i-th region. The level of attention given to each region, for the first The attention levels of each region are weighted and normalized (the specific range of the weight normalization is the product of the attention trend factor and the attention concentration factor of all regions), and the result of the weight normalization is used as the weight normalization result of the first region. The weight of attention for each region.
[0076] It should be noted that the larger the attention trend factor and attention concentration factor of a region, the more important the information contained within that region is for accurately assessing the sharpness of the five-sided needle tip. Therefore, a higher attention weight should be assigned to that region to ensure the information within it is considered during subsequent model training and evaluation. Conversely, the greater the interference level of a region, the more the information within it will interfere with the assessment of the five-sided needle tip. Therefore, a lower attention weight should be assigned to that region to prevent interference from that region in subsequent model training.
[0077] This gives us the attention weight for each region.
[0078] Step S004: Train and obtain the needle tip evaluation model based on the attention weight of the region and the training samples, and evaluate the sharpness of the five-sided needle tip based on the needle tip evaluation model.
[0079] It should be noted that after obtaining the attention weight of each region through step S003, the training process of the model can be optimized according to the attention weight of each region, and finally a needle tip evaluation model that can accurately evaluate the sharpness of the five-sided needle tip can be obtained. The needle tip evaluation model can accurately and quickly evaluate the sharpness of the five-sided needle tip.
[0080] Specifically, the sharpness of the needle tip in each training sample is used as the training label for each training sample. All training samples and the attention weights of each region are input into the CNN (Convolutional Neural Network) model for training. The loss function used in the training is the cross-entropy loss function, resulting in the needle tip evaluation model.
[0081] Furthermore, after obtaining the needle tip evaluation model, the needle tip image of the five-sided needle can be acquired and input into the needle tip evaluation model to accurately obtain the sharpness of the five-sided needle tip.
[0082] It should be noted that this invention quantifies the degree of interference in each region of the image by occluding a portion of the image of the five-sided needle tip and then adaptively assigning attention weights accordingly. The trained model can accurately focus on key features, ultimately achieving automated, high-precision, and highly robust evaluation of the physical sharpness of the needle tip, effectively replacing traditional manual visual inspection and destructive detection.
[0083] Another embodiment of the present invention provides a deep learning-based five-sided needle tip sharpness evaluation system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the deep learning-based five-sided needle tip sharpness evaluation method in steps S001 to S004.
[0084] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A deep learning-based method for evaluating the sharpness of a five-sided needle tip, characterized in that, The method includes the following steps: Several images of five-sided needle tips were collected as training and test samples. A primary needle tip evaluation model was trained based on the training samples. Each training sample is divided into several regions, and control samples are obtained for each region. A control pinpoint evaluation model for each region is trained based on the control samples for each region. Test samples are input into the primary pinpoint evaluation model and the control pinpoint evaluation model for the region, respectively, and the test results of the primary pinpoint evaluation model and the control pinpoint evaluation model for the region are obtained, thereby obtaining the degree of interference in the region. Based on the distance between different regions and the difference in the degree of interference between different regions, the attention concentration factor of a region is obtained; based on the difference in the degree of interference between a region and its neighboring regions, the attention trend factor of a region is obtained; and by combining the attention concentration factor of a region with the degree of interference of a region, the attention weight of a region is obtained. The needle tip evaluation model is obtained by training based on the attention weight of the region and the training samples, and the sharpness of the five-sided needle tip is evaluated based on the needle tip evaluation model.
2. The method for evaluating the sharpness of a five-sided needle tip based on deep learning according to claim 1, characterized in that, The method of collecting several images of five-sided needle tips as training and testing samples, and training a primary needle tip evaluation model based on the training samples, includes the following specific methods: Preset a training sample size With the number of test samples Collect data using an industrial microscope camera. Zhang Wumianzhen needle tip image and Images of the needle tip of the five-sided needle were used as training and testing samples, respectively; the sharpness of the needle tip in each training and testing sample was obtained through a mechanical puncture experiment. The sharpness of the needle tip in each training sample is used as the training label for each training sample. All training samples are input into the CNN model for training, where the loss function used in training is the cross-entropy loss function, resulting in a primary needle tip evaluation model.
3. The method for evaluating the sharpness of a five-sided needle tip based on deep learning according to claim 1, characterized in that, The specific method for dividing each training sample into several regions, obtaining control samples for each region, and training a control needle tip evaluation model for each region based on the control samples is as follows: Preset a number of equally divided regions Divide each training sample into equal parts. The five regions are divided into regions, with the injection direction of the five-sided needle as the positive direction, and each region is assigned an index label; For the The region that obscures all training samples. The area will block the first The training samples from the i-th region are denoted as the i-th region. The control sample from the [number] region; according to the [number]th [section]... Training was performed using all control samples from the nth region to obtain the nth... The training of the reference needle tip evaluation model in the region, the training of the first The process of training the primary needlepoint assessment model is the same for each region's control needlepoint assessment model.
4. The method for evaluating the sharpness of a five-sided needle tip based on deep learning according to claim 1, characterized in that, The specific method for inputting test samples into the primary needle tip assessment model and the regional control needle tip assessment model to obtain the test results of the primary needle tip assessment model and the regional control needle tip assessment model is as follows: For the The region; input all test samples into the first... In the control needle tip evaluation model of each region, the first of all test samples was obtained. The sharpness of the needle tip is compared in each region; all test samples are input into the primary needle tip evaluation model to obtain the primary detection needle tip sharpness of all test samples; an evaluation error is preset. ; For any test sample, if the difference between the primary detection tip sharpness and the tip sharpness of the test sample is greater than the sum of the primary detection tip sharpness and the tip sharpness of the test sample, then... If the difference between the tip sharpness of the test sample and the tip sharpness of the primary detection probe is greater than the sum of the tip sharpness of the primary detection probe, then a false positive label is assigned to the primary detection tip sharpness of the test sample. If the absolute value of the difference between the tip sharpness of the test sample and the tip sharpness of the primary detection of the test sample is less than or equal to the sum of the tip sharpness of the primary detection of the test sample and the tip sharpness of the test sample, then a false negative label is assigned to the primary detection tip sharpness of the test sample. Then, the primary detection tip sharpness of the test sample is assigned a correct label; The first test sample Each region is assigned a false positive, false negative, or correct label based on the sharpness of the needle tip.
5. The deep learning-based method for evaluating the sharpness of a five-sided needle tip as described in claim 1, characterized in that, The specific methods for obtaining the interference level of the region are as follows: For the The region; according to the test sample, the first... Each region is used to determine the false positive, false negative, or correct label based on the needle tip sharpness, and all test samples are divided into the following categories: The control false positive set of each region, the first The control false negative set of each region and the first The correct set of comparisons for each region; the first... The ratio of the number of test samples in the correct control set of each region to the total number of test samples is used as the ratio of the number of test samples in the correct control set of each region. The accuracy of the comparative needle tip assessment model in each region; Based on the false positive, false negative, or correct labels of the primary detection needle tip sharpness of the test samples, all test samples are divided into a primary false positive set, a primary false negative set, and a primary correct set; the ratio of the number of test samples in the primary correct set to the total number of test samples is taken as the accuracy of the primary needle tip evaluation model. The first The difference between the accuracy of the control pinpoint assessment model and the accuracy of the primary pinpoint assessment model in each region is calculated by comparing the accuracy of the primary false positive set with that of the secondary false positive set. The intersection and union of the control false positive sets of each region, multiplied by the primary false negative set and the second... The product of the intersection-union ratios of the control false negative sets of each region yields the product of the first... The interference factor in the region, for the first The interference factors in each region are normalized, and the first region is normalized. The result of normalizing the interference factors in each region is used as the first... The degree of interference in each area.
6. The deep learning-based method for evaluating the sharpness of a five-sided needle tip according to claim 3, characterized in that, The specific method for obtaining the regional attention concentration factor based on the distance between different regions and the difference in the degree of interference between different regions includes: In the formula, Indicates the first The focus factor for each region; Indicates the number of regions; Indicates the first The degree of interference in each area; Indicates the first The degree of interference in each area; Indicates the first The region and the first Index distance between regions; This represents the linear normalization function.
7. The method for evaluating the sharpness of a five-sided needle tip based on deep learning according to claim 1, characterized in that, The specific method for obtaining the attention trend factor of a region based on the degree of interference between the region and its neighboring regions includes: For the The region will be connected with the first The regions adjacent to the first region are denoted as the i-th region. Neighborhood regions of each region; The first The region and the first The absolute value of the difference in interference level between each neighboring region of the first region is taken as the first... Mutation factors in each neighboring region of each region; For the first The mean values of mutation factors in all neighboring regions of a given region are negatively correlated and normalized. The result of this negative correlation normalization is used as the first... Attention trend factors for each region.
8. The method for evaluating the sharpness of a five-sided needle tip based on deep learning according to claim 1, characterized in that, The specific methods for obtaining the attention weight of the region are as follows: For the The first region will be the first The attention trend factor of each region and the first The product of the attention concentration factors of each region, compared to the previous one The ratio obtained from the interference level of each region is denoted as the i-th region. The level of attention given to each region, for the first The degree of attention to each region is weighted and normalized, and the result of the weight normalization is used as the weight of the first region. The weight of attention for each region.
9. The deep learning-based method for evaluating the sharpness of a five-sided needle tip according to claim 1, characterized in that, The specific method for training the needle tip evaluation model based on the attention weight of the region and training samples is as follows: The sharpness of the needle tip in each training sample is used as the training label for each training sample. All training samples and the attention weights of each region are input into the CNN model for training. The loss function used in training is the cross-entropy loss function, resulting in the needle tip evaluation model.
10. A deep learning-based five-sided needle tip sharpness evaluation system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed by the processor, it implements the steps of the deep learning-based five-sided needle tip sharpness evaluation method as described in any one of claims 1-9.
Citation Information
Patent Citations
Arrangement for the monitoring of needles
DE3814898A1
Probe device and method for recognizing probe tip
JP2003270304A