Automatic pin firing trace identification method based on deep learning features
By introducing LoFTR and LPM technologies in firing needle trace recognition, the problem of difficulty in extracting surface features of firing needle traces is solved, and high-precision firing needle trace recognition is achieved, which improves the accuracy and stability of the identification.
Patent Information
- Application Number
- CN202411963783.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-06-03
AI Technical Summary
Traditional methods are difficult to identify firing marks with high accuracy, mainly because of their smooth surface and large slope changes, which leads to difficulty in extracting features, which in turn affects the recognition effect.
The Detector-Free Local Feature Matching with Transformers (LoFTR) model combined with Locality Preserving Matching (LPM) technology is used to convert the input image into feature descriptors through Transformer, and match it after rotating the sample to be tested, further filtering out error matching through LPM to improve recognition accuracy.
It effectively solves the problem of feature extraction difficulties in firing needle trace recognition, improves the high-precision identification accuracy of firing needle traces, and enhances the stability and reliability of identification.
Smart Images

Figure CN120088507A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of identification and appraisal of bullet marks, and in particular to an automatic identification method for firing pin marks based on deep learning features. Background Art
[0002] When a firearm is fired, the firing pin strikes the primer of the cartridge case, leaving an impressed mark on the bottom of the cartridge case. These marks are similar to human fingerprints and contain unique microscopic information on the surface of the firearm. By comparing and analyzing these marks, the relationship between the suspected firearm in a gun-related case at the crime scene and the bullet casing left at the crime scene can be determined, thus providing auxiliary evidence for the detection of gun-related cases. Traditional identification of bullet marks mainly relies on forensic experts to manually compare them with the aid of a binocular microscope. However, manual inspection is not only time-consuming and laborious, but also the objectivity and accuracy of the inspection have been widely questioned.
[0003] With the development of computer technology and image processing technology, the use of image recognition technology for firearm identification has made great progress and achieved remarkable results. However, compared with the relatively flat surface topography of the firing pin impression, the surface morphology of the firing pin mark is a three-dimensional concave pit with a smooth surface and a large slope change. There is much less effective data on its surface than that of the firing pin impression, making it difficult to extract a large amount of effective features from its surface, resulting in difficulties in identifying the firing pin mark using image matching technology. Therefore, there has been less research on the automatic identification of firing pin marks. How to achieve high-precision identification of firing pin marks is also an important research direction in the field of automatic identification of bullet marks. Summary of the Invention
[0004] Aiming at the problem that the surface of the firing pin mark sample is smooth and has a large slope change, and there is much less effective data on its surface than that of the firing pin impression, making it difficult to extract a large amount of effective features from its surface, resulting in poor recognition effect of the feature-based method. This project proposes to introduce Detector-Free Local Feature Matching with Transformers (LoFTR) into the automatic identification of firing pin marks, and use Transformer to convert the input image into a series of feature descriptors. And considering the initial phase existing between samples, keeping the reference sample unchanged, the sample to be measured is rotated within the range of [-180, 180] degrees in steps of 3 degrees, and the reference sample is respectively matched with each rotated sample to be measured, and the combination with the largest number of matching feature points is selected as the preliminary matching result. In order to further improve the matching accuracy, on this basis, the Locality Preserving Matching (LPM) technology is introduced to filter out the wrong matches from the obtained preliminary matching results, so as to obtain a more reliable matching result.
[0005] The present invention proposes the following technical methods to achieve the above objectives:
[0006] An automatic recognition method for firing pin marks based on deep learning features, the specific steps are as follows:
[0007] Step (1): Use a three-dimensional confocal microscope to collect firing pin mark sample data, and perform filtering processing on the collected firing pin mark data to remove unreliable components such as noise, shedding, and outliers to obtain the surface roughness texture features of the firing pin mark, and process to obtain the firing pin mark dataset;
[0008] Step (2): For a pair of samples to be matched in the dataset, keep the reference firing pin mark sample unchanged, and rotate the sample to be measured within the range of [-180, 180] degrees in steps of 3 degrees;
[0009] Step (3): Import the reference sample and all the samples to be measured obtained by rotation in Step (2) into the Detector-Free Local Feature Matching with Transformers (LoFTR) model for matching respectively;
[0010] Step (4): Take the maximum value of the number of feature points of all sample matches obtained in Step (3) as the preliminary matching result of the reference sample and the sample to be measured in Step (2);
[0011] Step (5): Introduce the Locality Preserving Matching (LPM) technology to filter out false matches in the preliminary matching result obtained in Step (4), improve the matching accuracy, and thus obtain a more reliable matching result.
[0012] The specific steps of sampling and filtering in the above Step (1) are as follows:
[0013] 1) Use a low-pass area spline filter to remove surface noise, and a regional Gaussian regression filter to obtain the average surface of the firing pin mark, and finally obtain the surface roughness texture features of the firing pin mark;
[0014] 2) Normalize the height value of the surface roughness texture features of the firing pin mark obtained to 0-255 gray values for better subsequent image processing operations.
[0015] Furthermore, in the above Step (2): For two samples to be matched in the dataset, keep the reference sample unchanged, and rotate the sample to be measured within the range of [-180, 180] degrees in steps of 3 degrees to obtain the matching combinations of the reference sample and all rotated samples to be measured;
[0016] Further, in step (3): all the matched combined samples in step (2) are imported into the Detector-Free Local Feature Matching with Transformers (LoFTR) model for matching respectively. The specific steps of step (3) are as follows:
[0017] 1) Use Transformer to convert the input image data into a series of feature descriptors, which contain the microstructural information of different regions of the image;
[0018] 2) Calculate the inner product between the descriptors and screen out those with relatively high matching probabilities as the initial matching point set M. The calculation formula of M is as follows:
[0019]
[0020] where: P represents the confidence score matrix, Tp represents the matching threshold, and those with scores greater than Tp in the P matrix are screened as the initial matching feature point pairs. The calculation formula of P is as follows:
[0021] P(i,j) = softmax(S(i,·)) j ·softmax(S(·,j)) i
[0022] where: S(i,j) represents the inner product between two feature descriptors;
[0023] 3) According to the initial matching feature point pairs calculated in step 2), draw matching lines between the reference sample and the sample to be measured.
[0024] Further, in step (4): take the maximum value of the number of all matching feature points obtained in step (3) as the preliminary matching result of the pair of reference sample and sample to be measured in step (3);
[0025] Further, in step (5) above: introduce the Locality Preserving Matching (LPM) technology to filter out the wrong matches in the preliminary matching result obtained in step (4), improve the matching accuracy, and thus obtain a more reliable matching result.
[0026] The specific steps of step (5) are as follows:
[0027] 1) Introduce an outlier filtering algorithm LPM to filter out the wrong matches in the result of the initial matching. The LPM method transforms the feature point matching problem into an optimal solution problem of a mathematical model by defining a mathematical model. The defined mathematical model is as follows:
[0028] I *= argmin C(I, S, λ)
[0029] Where: S represents the largest known matching point pair selected in step (4), I represents the set of unknown inliers, and I * represents the optimal solution of I, and the parameter λ is the threshold for determining whether a pair of assumed matches is a correct match.
[0030] 2) The loss function C in step 1) is defined as follows:
[0031]
[0032] Where N represents the number of known matching point pairs, x and y respectively represent the known matching feature point pairs in the reference sample and the sample to be measured, N x and N y respectively represent the neighborhoods of x and y, and p i is a binary vector indicating whether the i-th corresponding matching relationship is a correct match, and d(,) represents the Euclidean distance metric.
[0033] 3) To represent this mathematical model more clearly, we combine p i and finally transform the mathematical model into:
[0034]
[0035] Where c i can be expressed as:
[0036]
[0037] 4) Therefore, for a given known matching point pair, the value of p is calculated as follows:
[0038]
[0039] 5) Therefore, for a known matching point pair, the optimal solution of its inlier set can be expressed as:
[0040] I * = {i | p i = 1, i = 1,..., N}
[0041] By using the LPM algorithm to filter out incorrect matches from the preliminary matching results obtained by LoFTR, not only can the comparison between the firing pin marks of homologous samples and non-homologous samples be made more obvious, and it is easier to distinguish homologous samples and non-homologous samples according to the number of matching feature points, but also the accuracy of firing pin mark recognition can be improved.
[0042] The beneficial effects of the present invention are as follows: The present invention proposes an automatic recognition method for firing pin marks based on deep learning features. It migrates the existing LoFTR network model to bullet mark comparison, and draws on the concept of the initial phase angle. Before the input algorithm processing, the reference sample remains unchanged, and the sample to be tested is rotated within the range of [-180, 180] degrees in steps of 3 degrees. This not only solves the problem of not being able to extract a large number of features from the firing pin mark images, but also largely eliminates the influence of rotation on the recognition algorithm. And the LPM method is introduced to filter out false matches in the preliminary matching results, making the comparison between homologous and non-homologous samples of firing pin marks more obvious, and it is easier to distinguish homologous and non-homologous samples according to the number of matching feature points. This method can provide auxiliary evidence for the detection of gun-related cases and the final court judgment. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 FIG. 1 is a full flow chart of firing pin mark matching provided by the present invention.
[0044] FIG. 2(a) is a schematic diagram of the effect of feature matching on homologous samples of firing pin marks before filtering out false matches by LPM.
[0045] FIG. 2(b) is a schematic diagram of the effect of feature matching on non-homologous samples of firing pin marks before filtering out false matches by LPM.
[0046] FIG. 3(a) is a schematic diagram of the effect of feature matching on homologous samples of the same pair of firing pin marks by the automatic recognition algorithm for firing pin marks based on deep learning features of the present invention.
[0047] FIG. 3(b) is a schematic diagram of the effect of feature matching on non-homologous samples of the same pair of firing pin marks by the automatic recognition algorithm for firing pin marks based on deep learning features of the present invention.
[0048] FIG. 4(a) is a schematic diagram of the effect of feature matching on homologous samples of the same pair of firing pin marks using the SuperGlue algorithm.
[0049] FIG. 4(b) is a schematic diagram of the effect of feature matching on non-homologous samples of the same pair of firing pin marks using the SuperGlue algorithm.
[0050] FIG. 5(a) is a schematic diagram of the effect of feature matching on non-homologous samples of the same pair of firing pin marks using the OmniGlue algorithm.
[0051] FIG. 5(b) is a schematic diagram of the effect of feature matching on non-homologous samples of the same pair of firing pin marks using the OmniGlue algorithm.
[0052] Figure 6Schematic diagram of the distribution of feature points of the matching results of the automatic recognition algorithm for firing pin marks based on deep learning features of the present invention for a data set containing 40 firing pin mark samples. Detailed implementation manners
[0053] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0054] An automatic recognition method for firing pin marks based on deep learning features, the specific steps are as follows:
[0055] Step (1): Use a three-dimensional confocal microscope to collect firing pin mark sample data, and perform filtering processing on the collected firing pin mark data to remove unreliable components such as noise, shedding, and outliers to obtain the surface roughness texture features of the firing pin marks, and process to obtain a firing pin mark data set;
[0056] Step (2): For a pair of samples to be matched in the data set, keep the reference firing pin mark sample unchanged, and rotate the firing pin mark sample to be measured within the range of [-180, 180] degrees in steps of 3 degrees;
[0057] Step (3): Import the reference sample and all the samples to be measured obtained by rotation in Step (2) into the Detector-Free Local Feature Matching with Transformers (LoFTR) model for matching respectively;
[0058] Step (4): Take the maximum value of the number of feature points of all sample matches obtained in Step (3) as the preliminary matching result of the reference sample and the sample to be measured in Step (2);
[0059] Step (5): Introduce the Locality Preserving Matching (LPM) technology to filter out incorrect matches for the preliminary matching result obtained in Step (4), improve the matching accuracy, and thus obtain a more reliable matching result.
[0060] The specific steps of sampling and filtering in Step (1) are as follows:
[0061] 1) Use a low-pass area spline filter to remove surface noise, and a regional Gaussian regression filter to obtain the average surface of the firing pin mark, and finally obtain the surface roughness texture features of the firing pin mark;
[0062] 2) Normalize the height values of the surface roughness texture features of the firing pin marks to grayscale values from 0 to 255 for better subsequent image processing operations.
[0063] Further, in step (2): For two samples to be matched in the dataset, keep the reference sample unchanged, and rotate the sample to be measured within the range of [-180, 180] degrees in steps of 3 degrees to obtain the matching combinations of the reference sample and all rotated samples to be measured.
[0064] Further, in step (3): Import all the matching combination samples in step (2) into the Detector-Free Local Feature Matching with Transformers (LoFTR) model for matching respectively. The specific steps of step (3) are as follows:
[0065] 1) Use Transformer to convert the input image data into a series of feature descriptors, which contain the microstructural information of different regions of the image.
[0066] 2) Calculate the inner product between the descriptors and screen out those with relatively high matching probabilities as the initial matching point set M, where the calculation formula of M is as follows:
[0067]
[0068] Among them: P represents the confidence score matrix, Tp represents the matching threshold, and those with scores greater than Tp in the P matrix are screened as the initial matching feature point pairs. The calculation formula of P is as follows:
[0069] P(i,j) = softmax(S(i,·)) j ·softmax(S(·,j)) i
[0070] Among them: S(i,j) represents the inner product between two feature descriptors.
[0071] 3) Draw matching lines between the reference sample and the sample to be measured according to the initial matching feature point pairs calculated in step 2).
[0072] Further, in step (4): Take the maximum value of the number of all matching feature points obtained in step (3) as the preliminary matching result of the pair of reference sample and sample to be measured in step (3).
[0073] Further, in the above step (5): the Locality Preserving Matching (LPM) technology is introduced to filter out the wrong matches in the preliminary matching results obtained in step (4), so as to improve the matching accuracy and obtain more reliable matching results.
[0074] The specific steps of step (5) are as follows:
[0075] 1) Introduce an outlier filtering algorithm LPM to filter out the wrong matches in the results of the initial matching. The LPM method transforms the feature point matching problem into an optimal solution problem of a mathematical model by defining a mathematical model. The mathematical model it defines is as follows:
[0076] I * = argmin C(I, S, λ)
[0077] where: S represents the largest known matching point pairs selected in step (4), I represents the set of unknown inliers, I * represents the optimal solution of I, and the parameter λ is the threshold for judging whether a pair of assumed matches is a correct match.
[0078] 2) The loss function C in step 1) is defined as follows:
[0079]
[0080] where, N represents the number of known matching point pairs, x and y respectively represent the known matching feature point pairs in the reference sample and the sample to be measured, N x and N y respectively represent the neighborhoods of x and y, p i is a binary vector indicating whether the i-th corresponding matching relationship is a correct match, and d(,) represents the Euclidean distance metric.
[0081] 3) To represent this mathematical model more clearly, we combine p i and finally transform the mathematical model into:
[0082]
[0083] where, c i can be expressed as:
[0084]
[0085] 4) Therefore, for the given known matching point pairs, the value of p is calculated as follows:
[0086]
[0087] 5) Therefore, for the known matching point pairs, the optimal solution of the inlier set can be expressed as:
[0088] I * ={i|p i =1, i = 1,..., N}
[0089] By using the LPM algorithm to filter out the incorrect matches from the preliminary matching results obtained by LoFTR, not only can the comparison between the firing pin mark homologous samples and non - homologous samples be made more obvious, and it is easier to distinguish homologous samples and non - homologous samples according to the number of matching feature points, but also the accuracy of firing pin mark recognition can be improved.
[0090] The present invention provides an automatic recognition method for firing pin marks based on deep - learning features, which solves the problems that traditional algorithms cannot extract a large number of features from firing pin marks and the final recognition error rate is relatively high, and improves the stability and accuracy of firing pin mark recognition. The following will be described in detail with examples:
[0091] (1) The specific process of the firing pin mark recognition algorithm of the present invention is as Figure 1 shown. In this example, a data set containing 40 firing pin mark samples is used as the experimental data set. The data set comes from 10 guns with a caliber of 9mm continuously produced by three different gun manufacturers on the same production line. Each pistol fires 4 bullets, resulting in a total of 40 firing pin mark samples, which include pairs of KM samples and pairs of KNM samples. The spline filter mentioned above is used for filtering to obtain the roughness features of the firing pin mark samples;
[0092] (2) Keeping the reference sample unchanged, the sample to be measured is rotated within the range of [- 180, 180] degrees in steps of 3 degrees, and the reference sample and each rotated sample to be measured are respectively matched using the LoFTR algorithm. The maximum value of the number of matching feature points in all matching results is used as the preliminary matching result of this pair of reference sample and sample to be measured. The preliminary matching results are shown in Figures 2(a) and 2(b);
[0093] (3) The outlier filtering algorithm LPM is introduced to filter out the incorrect matches from the results of the initial matching to obtain the final matching results, as shown in Figures 3(a) and 3(b). After the LPM incorrect match filtering, the comparison between the firing pin mark homologous samples and non - homologous samples is more obvious, and it is easier to distinguish homologous samples and non - homologous samples according to the number of matching feature points.
[0094] (4) Use the SuperGlue and OmniGlue algorithms to match the same pair of firing pin mark samples for comparison. The matching results of the SuperGlue algorithm are shown in Figures 4(a) and 4(b), and the matching results of the OmniGlue algorithm are shown in Figures 5(a) and 5(b). By comparing Figures 3 - 5, it can also be obtained that the method provided by the present invention has better recognition effect.
[0095] (5) The distribution of matching feature points of all firing pin mark samples in the dataset is as Figure 6 shown. By Figure 6 it can be obtained that the number of matching feature points of all homologous samples in the dataset is greater than that of non - homologous samples, and there is an obvious separation in the distribution of matching feature points between homologous samples and non - homologous samples.
Claims
1. A method for automatic identification of firing pin marks based on deep learning features, the features of which include: Follow these steps: Step (1): using a three-dimensional confocal microscope to collect firing pin mark sample data, and filtering the collected firing pin mark data to remove noise, dropout and unreliable abnormal value components to obtain the surface roughness texture characteristics of the firing pin mark, and then obtain the firing pin mark data set; Step (2): for a pair of samples to be matched in the data set, keep the reference firing pin mark sample unchanged, and rotate the firing pin mark sample to be tested within the range of [-180, 180] degrees with a step size of 3 degrees; Step (3): Import the reference sample in step (2) and all the rotated samples to be tested into the Detector-Free Local Feature Matching with Transformers (LoFTR) model for matching respectively; Step (4): taking the maximum value of the number of matching feature points of all samples obtained in step (3) as the preliminary matching result between the reference sample and the sample to be tested in step (2); Step (5): Introduce Locality Preserving Matching (LPM) technology to filter out false matches in the preliminary matching results obtained in step (4), improve matching accuracy, and thus obtain more reliable matching results.
2. According to the method for automatic identification of firing pin marks based on deep learning features as described in claim 1, it is characterized in that , the specific steps of step (1) are as follows: 1) Use a low-pass regional spline filter to remove surface noise, and a regional Gaussian regression filter to obtain the average surface of the firing pin mark, and finally obtain the surface roughness texture characteristics of the firing pin mark; 2) The obtained surface roughness texture feature height value of the firing pin mark is normalized to a grayscale value of 0-255 for better use in subsequent image processing operations.
3. The method for automatically identifying firing pin marks based on deep learning features according to claim 1, characterized in that: In the above step (2): for the two samples to be matched in the data set, keep the reference sample unchanged, rotate the sample to be tested within the range of [-180, 180] degrees with a step size of 3 degrees, and obtain a matching combination of the reference sample and all rotated samples to be tested.
4. The method for automatically identifying firing pin marks based on deep learning features according to claim 1, characterized in that: In the above step (3): all matching combination samples in step (2) are imported into the Detector-Free Local Feature Matching with Transformers (LoFTR) model for matching respectively. The specific steps of step (3) are as follows: 1) Use Transformer to convert the input image data into a series of feature descriptors, which contain the microstructure information of different regions of the image; 2) Calculate the inner product between the descriptors and select the ones with higher matching probability as the initial matching point set M, where the calculation formula of M is as follows: Where: P represents the confidence score matrix, Tp represents the matching threshold, and the points with a score greater than Tp in the P matrix are selected as the initial matching feature point pairs. The calculation formula of P is as follows: P(i,j)=softmax(S(i,·)) j ·softmax(S(·,j)) i Where: S(i,j) represents the inner product between the i-th feature descriptor of the reference image and the j-th descriptor of the image to be tested; 3) Based on the initial matching feature point pair calculated in 2), a matching line is drawn between the reference sample and the sample to be tested.
5. The method for automatically identifying firing pin marks based on deep learning features according to claim 1, characterized in that: In the above step (4): the maximum value of the number of all matching feature points obtained in step (3) is used as the preliminary matching result of the pair of reference samples and the sample to be tested.
6. The method for automatically identifying firing pin marks based on deep learning features according to claim 1, characterized in that: In the above step (5): Locality Preserving Matching (LPM) technology is introduced to filter out false matches in the preliminary matching results obtained in step (4), thereby improving the matching accuracy and obtaining a more reliable matching result. The specific steps of step (5) are as follows: 1) An external point filtering algorithm LPM is introduced to filter out the wrong matching results of the initial matching. The LPM method transforms the feature point matching problem into the optimal solution problem of the mathematical model by defining a mathematical model. The mathematical model is defined as follows: I * =argminC(I,S,λ) Where: S represents the largest known matching point pair screened in step (4), I represents the unknown internal point set, I* represents the optimal solution of I, and the parameter λ is the threshold for judging whether a pair of assumed matches is a correct match; 2) The loss function C in 1) is defined as follows: Where N represents the number of known matching point pairs, x and y represent the known matching feature point pairs in the reference sample and the sample to be tested, respectively, Nx and Ny represent the neighborhood of x and y, respectively, pi is a binary vector indicating whether the i-th corresponding matching relationship is a correct match, and d( , ) represents the Euclidean distance metric; 3) In order to express the mathematical model more clearly, we will i After merging, the mathematical model is finally transformed into: Among them, c i It can be expressed as: 4) Therefore, for a given known matching point pair, the value of p is calculated as follows: 5) Therefore, for a known pair of matching points, the optimal solution of its internal point set can be expressed as: I * ={i|p i =1,i=1,...,N} By filtering out false matches in the preliminary matching results obtained by LoFTR through the LPM algorithm, not only can the comparison between homologous and non-homologous samples of firing pin marks be more obvious, it is easier to distinguish homologous and non-homologous samples based on the number of matching feature points, but also the accuracy of firing pin mark recognition can be improved.
Citation Information
Cited By
Shooting cartridge case firing trace automatic inspection method based on deep learning
CN120726345A