A method and system for identifying bullet holes in targets

Through the improved Yolov5 model and feature pyramid network, combined with frame difference processing and K-means clustering algorithm, the recognition error problem of bullet hole recognition in target shaking, long distance and harsh environments is solved, and the recognition accuracy and accuracy are improved.

CN118762171BActive Publication Date: 2024-12-03XIAMEN LIBING INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411244712.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-12-03
Estimated Expiration
2044-09-06

AI Technical Summary

Technical Problem

The existing bullet hole recognition methods are difficult to guarantee accuracy and accuracy when facing target shaking, long-distance recognition, inclement weather and low-light conditions, resulting in identification errors.

Method used

The improved Yolov5 model is used to combine Res2Net and C3 modules as backbone networks, combined with the progressive feature pyramid network and K-means clustering algorithm, and the model expressiveness and perception ability are enhanced through frame difference processing and multi-scale residual information extraction, and Adjust the weight according to environmental factors and perform superposition processing to improve recognition accuracy.

Benefits of technology

It improves the detection accuracy and accuracy of bullet hole recognition, adapts to different scales and complex backgrounds, reduces the error between the target and the anchor frame, and enhances the recognition ability in harsh environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118762171B_ABST
    Figure CN118762171B_ABST
Patent Text Reader

Abstract

The invention provides a target bullet hole recognition method and system. The first bullet hole contour is obtained in advance through frame difference processing, and the second bullet hole contour recognition under different scales and resolutions is realized based on an improved Yolov5 model. The Yolov5 model is combined with a Res2Net module and a C3 module as a backbone network, so that the model can adapt to the bullet hole contour recognition of different scales, geometries and complex backgrounds, and the detection accuracy of the bullet hole contour recognition is improved; the progressive feature pyramid network is used as a neck network to extract the features of the bullet holes at a longer distance at a deeper level; a 160*160 small target detection layer is added to fuse shallow information, so that the network's perception ability for bullet hole recognition is enhanced, and the bullet hole contour on the target can be accurately recognized in a scene with a large change in target distance, and a K-means clustering algorithm is integrated to adapt to the scene requirements of bullet hole recognition; the weights of the first bullet hole contour and the second bullet hole contour are set according to environmental factors for superposition processing, so as to obtain the actual bullet hole position, and the accuracy of bullet hole recognition is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of target detection, and in particular to a target bullet hole recognition method and system. Background Art

[0002] At present, the automatic target reporting system has been widely used in target shooting. The general process of bullet hole recognition in the target reporting system based on image recognition is as follows: the system inputs an image before and after being hit as a sample to be recognized, and recognizes bullet holes based on image processing technology.

[0003] There are some significant problems in the current bullet hole recognition method. Especially in actual shooting training, because the target is not firmly fixed or is affected by environmental factors such as strong wind, the target surface often shakes violently at the moment of being hit. This shaking will cause the image sequence captured by the target reporting system to be distorted, increasing the difficulty of bullet hole recognition; and when identifying bullet holes for targets at a longer distance, the target occupies a smaller pixel area of ​​the image at a long distance, which will cause errors in bullet hole recognition, and then cause large errors in the target reporting results; when the target is located in bad weather such as rain / snow / fog, or when the light is weak at night, it will also affect the accuracy of bullet hole recognition. Summary of the invention

[0004] In order to solve the technical problems mentioned in the background technology, the present invention proposes a target bullet hole recognition method and system to solve the above technical problems.

[0005] According to one aspect of the present invention, a target bullet hole recognition method is proposed, comprising:

[0006] S1, acquiring an image containing a target position, and morphologically correcting the image containing the target position to an actual target position image to obtain a target surface corrected image;

[0007] S2, performing frame difference processing with different thresholds on the two frames of target surface correction images obtained by morphological correction, and obtaining the first bullet hole contour according to the regional pixel values ​​after the frame difference processing;

[0008] S3, based on the pre-trained target detection model, the target surface correction image is detected to obtain the second bullet hole contour; the target detection model is an improved Yolov5 model, and the improved Yolov5 model includes an input end, a backbone network, a neck network and a head network; the input end is used to receive and pre-process the target surface correction image, and the backbone network obtains the multi-scale residual information of the target surface correction image by combining the Res2Net module with the C3 module, including extracting the underlying features of several channels through 1*1 convolution, dividing the feature map into m residual blocks, and connecting 3*3 convolutions except the mth residual block; wherein the input of the 3*3 convolution of each residual block is The network is divided into two branches, a single branch is connected to the next residual block of the corresponding residual block, and the other branch is connected to the corresponding output residual block, and the mth residual block is connected to the corresponding output residual block; the feature information on all output residual blocks is combined through 1*1 convolution to obtain the multi-scale residual information of the target surface correction image; the neck network adopts a progressive feature pyramid network, which integrates low-level features with high-level features through upsampling, downsampling and lateral connection, and dynamically adjusts the feature weights through an adaptive feature fusion method; the head network introduces a 160*160 small target detection layer, and regenerates twelve preset anchor frame sizes for four detection layers through the K-means clustering algorithm;

[0009] S4. According to the location of the target position, the current climate conditions and the current time, the weights of the first bullet hole outline and the second bullet hole outline are set, and the corresponding transparency is set according to the weights of the first bullet hole outline and the second bullet hole outline respectively, and the first bullet hole outline and the second bullet hole outline are superimposed to obtain the actual position of the bullet hole on the target position.

[0010] Through the above technical scheme, the present application obtains the first bullet hole contour in advance through frame difference processing, and then realizes the second bullet hole contour recognition at different scales and resolutions through the improved Yolov5 model. The improved Yolov5 model is combined with the C3 module through the Res2Net module as the backbone network to improve the model expressiveness and ensure the effective transmission of features, so that the model can adapt to the bullet hole contour recognition of different scales, geometries and complex backgrounds, and improve the detection accuracy of bullet hole contour recognition; the progressive feature pyramid network is used as the neck network to extract the features of the bullet holes at a longer distance at a deeper level; by adding a 160*160 small target detection layer, shallower information can be fused to make the position information richer, enhance the network's perception ability of bullet hole recognition, and can more accurately identify the bullet hole contour on the target in the scene where the target distance changes greatly; by adding the K-means clustering algorithm, it can better adapt to the scene requirements of bullet hole recognition, reduce the error between the target and the anchor frame, and improve the accuracy of bullet hole recognition; the place where the first bullet hole contour and the second bullet hole contour overlap is used as the actual bullet hole position, which further improves the accuracy of bullet hole recognition.

[0011] In some specific embodiments, the preprocessing in step S3 includes normalizing, scaling and shearing the target surface correction image.

[0012] In some specific embodiments, when the number of residual blocks is 4, it is expressed as:

[0013]

[0014] in, , represents 3*3 convolution, represents the input residual block, Represents the output residual block.

[0015] In some specific embodiments, the upsampling and downsampling in step S3 are both performed 8 times. The performance of bullet hole detection on a target at a long distance is improved by performing upsampling 8 times and downsampling 8 times.

[0016] In some specific embodiments, the adaptive feature fusion method in step S3 multiplies the feature vectors of different levels by corresponding weight parameters to obtain feature vectors, which are expressed as:

[0017] ;

[0018] in, represents the feature vector, Represents the feature vector of the lth level feature adjusted from the nth level feature to the i,jth position, , , Respectively represent the weight parameters of the corresponding hierarchical feature vectors, and + + =1. Addition is used to make the features of each level upsampled or downsampled, so that the feature has the same size as the features of other levels, and the number of channels is adjusted through convolution so that each level has the same number of feature channels. The features of bullet holes on the target at a long distance can be extracted at a deeper level.

[0019] In some specific embodiments, the neck network in step S3 also includes a combination of a feature pyramid network and a path aggregation network structure, wherein the feature pyramid network is used to extract feature information of different scales through top-down path links, and the path aggregation network is used to aggregate feature information of different scales through bottom-up path links.

[0020] In some specific embodiments, the step S4 of setting the weights of the first bullet hole profile and the second bullet hole profile according to the location of the target position, the current climate conditions and the current time includes:

[0021] In response to determining that the target position is located within a preset distance, increasing the weight of the first bullet hole contour to exceed the weight value of the second bullet hole contour;

[0022] In response to determining that the current weather condition is rain / snow / fog, the current time is nighttime, or the target position is located beyond a preset distance, the weight of the second bullet hole outline is increased to exceed the weight value of the first bullet hole outline. The weather condition, time condition, and distance condition that affect the target surface bullet hole recognition are obtained according to the sensor set at the target target site, and the transparency is set according to the weight to superimpose the first bullet hole outline and the second bullet hole outline, thereby enhancing the accuracy of bullet hole recognition and reducing the influence of the weather condition, time condition, and distance condition.

[0023] According to a second aspect of the present invention, a target bullet hole recognition system is proposed, the system comprising:

[0024] An image preprocessing module is configured to acquire an image containing a target position, and morphologically correct the image containing the target position to an actual target position image to obtain a target surface corrected image;

[0025] The frame difference processing module is configured to perform frame difference processing with different thresholds on the two frames of target surface correction images obtained by morphological correction, and obtain the first bullet hole contour according to the regional pixel value after the frame difference processing;

[0026] The target detection module is configured to detect the target surface correction image based on a pre-trained target detection model to obtain a second bullet hole contour; the target detection model is an improved Yolov5 model, and the improved Yolov5 model includes an input end, a backbone network, a neck network and a head network; the input end is used to receive and pre-process the target surface correction image, and the backbone network obtains multi-scale residual information of the target surface correction image by combining a Res2Net module with a C3 module, including extracting the underlying features of several channels through a 1*1 convolution, dividing the feature map into m residual blocks, and connecting 3*3 convolutions to all but the mth residual block; wherein the 3* The output of the 3 convolution is divided into two branches, a single branch is connected to the next residual block of the corresponding residual block, the other branch is connected to the corresponding output residual block, and the mth residual block is connected to the corresponding output residual block; the feature information on all output residual blocks is combined through 1*1 convolution to obtain the multi-scale residual information of the target surface correction image; the neck network adopts a progressive feature pyramid network, which integrates low-level features with high-level features through upsampling, downsampling and lateral connection, and dynamically adjusts the feature weights through an adaptive feature fusion method; the head network introduces a 160*160 small target detection layer, and regenerates twelve preset anchor frame sizes for four detection layers through the K-means clustering algorithm;

[0027] The superposition processing module is configured to set the weights of the first bullet hole outline and the second bullet hole outline according to the location of the target position, the current climate conditions and the current time, set the corresponding transparency according to the weights of the first bullet hole outline and the second bullet hole outline, and superimpose the first bullet hole outline and the second bullet hole outline to obtain the actual position of the bullet hole on the target position.

[0028] According to the third aspect of the present invention, an electronic device is proposed, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.

[0029] According to the method of the present application, the first bullet hole contour is pre-acquired through frame difference processing, and then the second bullet hole contour recognition under different scales and resolutions is realized through the improved Yolov5 model. The improved Yolov5 model is combined with the C3 module through the Res2Net module as a backbone network to improve the model expressiveness and ensure the effective transmission of features, so that the model can adapt to the bullet hole contour recognition of different scales, geometries and complex backgrounds, and improve the detection accuracy of bullet hole contour recognition; the progressive feature pyramid network is used as the neck network to extract the features of bullet holes at a longer distance at a deeper level; by adding a 160*160 small target detection layer, shallower information can be fused to make the position information richer, and the network's perception ability for bullet hole recognition is enhanced, and the bullet hole contour on the target can be more accurately recognized in a scene with a large change in target distance; by adding the K-means clustering algorithm, the scene requirements of bullet hole recognition can be better adapted, the error between the target and the anchor frame can be reduced, and the accuracy of bullet hole recognition can be improved; the weights of the first bullet hole contour and the second bullet hole contour are set according to environmental factors for superposition processing to obtain the actual bullet hole position, and the accuracy of bullet hole recognition is further improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated into and constitute a part of this specification. The accompanying drawings illustrate the embodiments and together with the description are used to explain the principles of the present invention. Other embodiments and many expected advantages of the embodiments will be readily appreciated as they become better understood by reference to the following detailed description. Other features, objects and advantages of the present application will become more apparent by reading the detailed description of the non-limiting embodiments made with reference to the following drawings:

[0031] Figure 1 is a flow chart of a target bullet hole identification method according to an embodiment of the present application;

[0032] Figure 2 It is a structural diagram of an improved Yolov5 model backbone network of an embodiment of the present application;

[0033] Figure 3 is a structural diagram of the improved Yolov5 model neck network of an embodiment of the present application;

[0034] Figure 4 is a framework diagram of a target bullet hole identification system according to an embodiment of the present application;

[0035] Figure 5 It is a structural diagram of a computer system suitable for implementing an electronic device of an embodiment of the present application. DETAILED DESCRIPTION

[0036] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0037] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0038] According to a target bullet hole identification method according to an embodiment of the present application, Figure 1 FIG. 1 is a flow chart of a target bullet hole identification method according to an embodiment of the present application. Figure 1 As shown, the method includes:

[0039] S1, acquiring an image containing a target position, and morphologically correcting the image containing the target position to an actual target position image to obtain a target surface corrected image;

[0040] Specifically, step S1 includes:

[0041] S11, obtaining vertex coordinates of the area to be corrected in the image containing the target position and vertex coordinates of the target image, and calculating a correction matrix based on morphological processing technology;

[0042] S12, mapping the image containing the target position to the target image through the correction matrix to obtain a target mapping image;

[0043] S13, smoothing the target mapping image to obtain a target surface correction image.

[0044] S2, performing frame difference processing with different thresholds on the two frames of target surface correction images obtained by morphological correction, and obtaining the first bullet hole contour according to the regional pixel values ​​after the frame difference processing;

[0045] Specifically, step S2 includes:

[0046] S21, using a grayscale statistical method to respectively filter out the grayscale ranges of the green area and the white area under the two frames of target surface correction images obtained by morphological correction;

[0047] S22, adaptively generating a corresponding frame difference threshold according to the grayscale range;

[0048] S23, calculating the frame difference between the two frames of target surface correction images, setting the pixel value of the corresponding area according to the frame difference, and obtaining the first bullet hole contour.

[0049] Specifically, setting the pixel value of the corresponding area according to the frame difference includes: setting the pixel value of the area greater than the preset frame difference to 255, and setting the pixel value of the area less than the preset frame difference to 0.

[0050] S3, based on the pre-trained target detection model, the target surface correction image is detected to obtain a second bullet hole contour; the target detection model is an improved Yolov5 model, and the improved Yolov5 model includes an input end, a backbone network, a neck network and a head network; the input end is used to receive the target surface correction image and pre-process it, such as Figure 2 As shown, the backbone network obtains the multi-scale residual information of the target surface correction image through the combination of the Res2Net module and the C3 module, including extracting the underlying features of several channels through 1*1 convolution, dividing the feature map into m residual blocks, and connecting 3*3 convolutions to all residual blocks except the m-th residual block; wherein the output of the 3*3 convolution of each residual block is divided into two branches, a single branch is connected to the next residual block of the corresponding residual block, and the other branch is connected to the corresponding output residual block, and the m-th residual block is connected to the corresponding output residual block; the feature information on all output residual blocks is combined through 1*1 convolution to obtain the multi-scale residual information of the target surface correction image; as shown Figure 3 As shown in the figure, the neck network adopts a progressive feature pyramid network, which fuses low-level features with high-level features through upsampling, downsampling and lateral connection, and dynamically adjusts feature weights through an adaptive feature fusion method; the head network introduces a 160*160 small target detection layer, and regenerates twelve preset anchor frame sizes for four detection layers through the K-means clustering algorithm;

[0051] Specifically, the preprocessing in step S3 includes normalizing, scaling and shearing the target surface correction image.

[0052] Specifically, Figure 2 As shown, the backbone network in step S3 improves the expressiveness of the model by combining the Res2Net module with the C3 module, gradually improving the resolution and introducing a multi-branch structure, so that the network can better handle bullet hole features at different scales and resolutions, while also ensuring the effective transmission of features. When there are 4 residual blocks, it is expressed as:

[0053]

[0054] in, , represents 3*3 convolution, represents the input residual block, Represents the output residual block. Figure 2X1, X2, X3 and X4 are residual blocks, Y1, Y2, Y3 and Y4 are output residual blocks, and K1, K2 and K3 are 3*3 convolutions.

[0055] Specifically, the upsampling and downsampling in step S3 are both performed 8 times. The performance of bullet hole detection on a target at a long distance is improved by performing upsampling 8 times and downsampling 8 times.

[0056] Specifically, the adaptive feature fusion method in step S3 multiplies the feature vectors of different levels by the corresponding weight parameters to obtain feature vectors, which are expressed as:

[0057] ;

[0058] in, represents the feature vector, Represents the feature vector of the lth level feature adjusted from the nth level feature to the i,jth position, , , Respectively represent the weight parameters of the corresponding hierarchical feature vectors, and + + =1. Addition is used to make the features of each level upsampled or downsampled, so that the feature has the same size as the features of other levels, and the number of channels is adjusted through convolution so that each level has the same number of feature channels. The features of bullet holes on the target at a long distance can be extracted at a deeper level.

[0059] Specifically, the neck network in step S3 also includes a combination of a feature pyramid network and a path aggregation network structure, wherein the feature pyramid network is used to extract feature information of different scales through top-down path links, and the path aggregation network is used to aggregate feature information of different scales through bottom-up path links.

[0060] S4. According to the location of the target position, the current climate conditions and the current time, the weights of the first bullet hole outline and the second bullet hole outline are set, and the corresponding transparency is set according to the weights of the first bullet hole outline and the second bullet hole outline respectively, and the first bullet hole outline and the second bullet hole outline are superimposed to obtain the actual position of the bullet hole on the target position.

[0061] Specifically, the step S4 sets the weights of the first bullet hole profile and the second bullet hole profile according to the target position, the current climate conditions and the current time, including:

[0062] In response to determining that the target position is located within a preset distance, increasing the weight of the first bullet hole contour to exceed the weight value of the second bullet hole contour;

[0063] In response to determining that the current weather condition is rain / snow / fog, the current time is nighttime, or the target position is located beyond a preset distance, the weight of the second bullet hole outline is increased to exceed the weight value of the first bullet hole outline. The weather condition, time condition, and distance condition that affect the target surface bullet hole recognition are obtained according to the sensor set at the target target site, and the transparency is set according to the weight to superimpose the first bullet hole outline and the second bullet hole outline, thereby enhancing the accuracy of bullet hole recognition and reducing the influence of the weather condition, time condition, and distance condition.

[0064] Optionally, the current climate condition includes but is not limited to rain / snow / fog. When facing severe weather such as dust, the weight of the first bullet hole profile is also increased to exceed the weight value of the second bullet hole profile to reduce the impact of the current climate condition.

[0065] Figure 4 is a framework diagram of a target bullet hole identification system according to an embodiment of the present application. Figure 4As shown, the system includes: an image preprocessing module 401, configured to obtain an image containing a target position, morphologically correct the image containing the target position to an actual target position image, and obtain a target surface correction image; a frame difference processing module 402, configured to perform frame difference processing with different thresholds on the two frames of target surface correction images obtained by morphological correction, and obtain the first bullet hole contour according to the regional pixel value after the frame difference processing; a target detection module 403, configured to detect the target surface correction image based on a pre-trained target detection model, and obtain to the second bullet hole contour; the target detection model is an improved Yolov5 model, and the improved Yolov5 model includes an input end, a backbone network, a neck network and a head network; the input end is used to receive and pre-process the target surface correction image, and the backbone network obtains the multi-scale residual information of the target surface correction image by combining the Res2Net module with the C3 module, including extracting the underlying features of several channels through 1*1 convolution, dividing the feature map into m residual blocks, and connecting 3*3 convolutions except the mth residual block; wherein, each The output of the 3*3 convolution of the residual block is divided into two branches, a single branch is connected to the next residual block of the corresponding residual block, the other branch is connected to the corresponding output residual block, and the mth residual block is connected to the corresponding output residual block; the feature information on all the output residual blocks is combined through 1*1 convolution to obtain the multi-scale residual information of the target surface correction image; the neck network adopts a progressive feature pyramid network, and integrates low-level features with high-level features through upsampling, downsampling and lateral connection, and dynamically adjusts the feature weight through an adaptive feature fusion method; the head network introduces a 160*160 small target detection layer, and regenerates twelve preset anchor frame sizes for four detection layers through a K-means clustering algorithm; the superposition processing module 404 is configured to set the weights of the first bullet hole contour and the second bullet hole contour according to the position of the target position, the current climate conditions and the current time, set the corresponding transparency according to the weights of the first bullet hole contour and the second bullet hole contour, and superimpose the first bullet hole contour and the second bullet hole contour to obtain the actual position of the bullet hole on the target position.

[0066] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 suitable for implementing an electronic device of an embodiment of the present application. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0067] like Figure 5As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0068] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0069] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above functions defined in the method of the present application are executed. It should be noted that the computer-readable storage medium of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus, or a device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, an apparatus, or a device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wireless, wireline, optical cable, RF, etc., or any suitable combination of the foregoing.

[0070] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0071] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0072] The modules involved in the embodiments of the present application may be implemented by software or by hardware.

[0073] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A target bullet hole identification method, characterized in that: include: S1, acquiring an image containing a target position, and morphologically correcting the image containing the target position to an actual target position image to obtain a target surface corrected image; S2, performing frame difference processing with different thresholds on the two frames of target surface correction images obtained by morphological correction, and obtaining the first bullet hole contour according to the regional pixel values ​​after the frame difference processing; S3, based on the pre-trained target detection model, the target surface correction image is detected to obtain the second bullet hole contour; the target detection model is an improved Yolov5 model, and the improved Yolov5 model includes an input end, a backbone network, a neck network and a head network; the input end is used to receive and pre-process the target surface correction image, and the backbone network obtains the multi-scale residual information of the target surface correction image by combining the Res2Net module with the C3 module, including extracting the underlying features of several channels through 1*1 convolution, dividing the feature map into m residual blocks, and connecting 3*3 convolutions except the mth residual block; wherein the input of the 3*3 convolution of each residual block is The network is divided into two branches, a single branch is connected to the next residual block of the corresponding residual block, and the other branch is connected to the corresponding output residual block, and the mth residual block is connected to the corresponding output residual block; the feature information on all output residual blocks is combined through 1*1 convolution to obtain the multi-scale residual information of the target surface correction image; the neck network adopts a progressive feature pyramid network, which integrates low-level features with high-level features through upsampling, downsampling and lateral connection, and dynamically adjusts the feature weights through an adaptive feature fusion method; the head network introduces a 160*160 small target detection layer, and regenerates twelve preset anchor frame sizes for four detection layers through the K-means clustering algorithm; S4. In response to determining that the position of the target position does not exceed the preset distance, the weight of the first bullet hole contour is increased to exceed the weight value of the second bullet hole contour; in response to determining that the current weather condition is rain / snow / fog, the current time is nighttime, or the position of the target position exceeds the preset distance, the weight of the second bullet hole contour is increased to exceed the weight value of the first bullet hole contour, and the corresponding transparency is set according to the weights of the first bullet hole contour and the second bullet hole contour, and the first bullet hole contour and the second bullet hole contour are superimposed to obtain the actual position of the bullet hole on the target position.

2. A target bullet hole identification method according to claim 1, characterized in that: The preprocessing in step S3 includes normalizing, scaling and shearing the target surface correction image.

3. A target bullet hole identification method according to claim 2, characterized in that: When the number of residual blocks is 4, it is expressed as: in, , represents 3*3 convolution, represents the input residual block, Represents the output residual block.

4. A target bullet hole identification method according to claim 1, characterized in that: The number of upsampling and downsampling in step S3 is 8 times.

5. A target bullet hole identification method according to claim 1, characterized in that: The adaptive feature fusion method in step S3 multiplies the feature vectors of different levels by the corresponding weight parameters to obtain feature vectors, which are expressed as: ; in, represents the feature vector, Represents the feature vector of the lth level feature adjusted from the nth level feature to the i,jth position, n=1, 2, 3, , , Respectively represent the weight parameters of the corresponding hierarchical feature vectors, and + + =1.

6. A target bullet hole identification method according to claim 1, characterized in that: The neck network in step S3 also includes a combination of a feature pyramid network and a path aggregation network structure, wherein the feature pyramid network is used to extract feature information of different scales through top-down path links, and the path aggregation network is used to aggregate feature information of different scales through bottom-up path links.

7. A bullet hole identification system, characterized in that: The system comprises: An image preprocessing module is configured to acquire an image containing a target position, and morphologically correct the image containing the target position to an actual target position image to obtain a target surface corrected image; The frame difference processing module is configured to perform frame difference processing with different thresholds on the two frames of target surface correction images obtained by morphological correction, and obtain the first bullet hole contour according to the regional pixel value after the frame difference processing; The target detection module is configured to detect the target surface correction image based on a pre-trained target detection model to obtain a second bullet hole contour; the target detection model is an improved Yolov5 model, and the improved Yolov5 model includes an input end, a backbone network, a neck network and a head network; the input end is used to receive and pre-process the target surface correction image, and the backbone network obtains multi-scale residual information of the target surface correction image by combining a Res2Net module with a C3 module, including extracting the underlying features of several channels through a 1*1 convolution, dividing the feature map into m residual blocks, and connecting 3*3 convolutions to all but the mth residual block; wherein the 3* The output of the 3 convolution is divided into two branches, a single branch is connected to the next residual block of the corresponding residual block, the other branch is connected to the corresponding output residual block, and the mth residual block is connected to the corresponding output residual block; the feature information on all output residual blocks is combined through 1*1 convolution to obtain the multi-scale residual information of the target surface correction image; the neck network adopts a progressive feature pyramid network, which integrates low-level features with high-level features through upsampling, downsampling and lateral connection, and dynamically adjusts the feature weights through an adaptive feature fusion method; the head network introduces a 160*160 small target detection layer, and regenerates twelve preset anchor frame sizes for four detection layers through the K-means clustering algorithm; The superposition processing module is configured to, in response to determining that the position of the target position does not exceed the preset distance, increase the weight of the first bullet hole outline to exceed the weight value of the second bullet hole outline; in response to determining that the current weather condition is rain / snow / fog, the current time is night time or the position of the target position exceeds the preset distance, increase the weight of the second bullet hole outline to exceed the weight value of the first bullet hole outline, set corresponding transparency according to the weights of the first bullet hole outline and the second bullet hole outline, superimpose the first bullet hole outline and the second bullet hole outline to obtain the actual position of the bullet hole on the target position.

8. An electronic device comprising: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.