Small target detection method based on deep learning
By dividing the target space into basic space and segmented space and performing quantitative verification methods, the problem of low accuracy of small and medium-sized target recognition in the prior art is solved, and higher accuracy and stability are achieved.
Patent Information
- Application Number
- CN202411877889.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, smaller targets cannot be determined, and the confirmed targets cannot be determined as accurate targets, resulting in low accuracy of small target recognition.
By dividing the target space into several basic spaces according to the standard size, and generating a partitioned space according to the detection granularity, fuzzyly identify each partitioned space and generate a gaze area, forming a detection area corresponding to the gaze area, and performing quantitative verification to determine the actual target.
It effectively improves the accuracy and accuracy of small target recognition, and iteratively recognizes smaller targets and reviews, improving the stability of small target detection.
Smart Images

Figure CN119810414A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a small target detection method based on deep learning. Background Art
[0002] Small targets have considerable growth potential and important practical significance in the field of target recognition. The problem of missed detection and false detection in small target detection has always been a complex research topic.
[0003] How to identify small targets and confirm whether they are misidentified has always been an urgent problem to be solved in small target detection.
[0004] China Patent Authorization Announcement No.: CN112990317B discloses a method for detecting small and weak targets. The single-stage detector YOLO is used. The input image is first downsampled by 2 times, and then downsampled at a low rate through a high-resolution backbone network. The obtained feature maps are subjected to feature fusion, and then respectively input into the detection head for detection; at the same time, the downsampled feature maps are connected to the attention module for processing, and the output feature maps are subjected to feature fusion prediction again to obtain the final prediction result. It meets the actual needs of small and weak target detection, improves the detection effect of small and weak targets, and has a certain improvement in the accuracy of small and weak target detection. The invention adopts a method of retaining small-size target detection combined with a high-resolution backbone network and an attention mechanism, which can achieve fast and effective detection of small and weak targets, and can also identify some categories.
[0005] However, the above method has the following problems: smaller targets cannot be determined, and the confirmed target cannot be determined to be an accurate target. Summary of the invention
[0006] To this end, the present invention provides a small target detection method based on deep learning to overcome the problem in the prior art that smaller targets cannot be identified and confirmed targets cannot be determined to be accurate targets, resulting in low accuracy of small targets.
[0007] To achieve the above object, the present invention provides a small target detection method based on deep learning, which is characterized by comprising:
[0008] Divide the target space into standard sizes and form several basic spaces;
[0009] Setting the detection granularity, and dividing the basic space into a number of space particles of the same size and the same number as the detection granularity;
[0010] Generating a plurality of segmented spaces according to the detection granularity, and expanding each segmented space to a corresponding size of the target space;
[0011] Fuzzy identify each segmented space and generate a fixation area for each segmented space;
[0012] According to the corresponding position of the gaze area in the target space, forming a detection area corresponding to the gaze area;
[0013] Selecting several basic spaces corresponding to the detection area, generating detection targets corresponding to each detection area, performing quantity verification, and accumulating the number of verifications;
[0014] In response to the quantity verification, an actual target of the target space is determined;
[0015] If the response fails the quantity verification, a new detection granularity is generated and the corresponding quantity verification is performed;
[0016] When the response quantity check reaches the check times threshold, it is determined that the corresponding monitoring target is not the actual target.
[0017] In response to determining the actual target, or the non-actual target, the inspection is stopped.
[0018] Furthermore, the step of generating the segmented space includes:
[0019] According to the position of each spatial particle in the corresponding basic space, the spatial particles with the same position are divided into the same segmentation group;
[0020] Determining a segmentation position of each spatial particle in the corresponding target space according to the position of the basic space in the target space;
[0021] A number of segmentation spaces having the same number as the detection granularity are generated according to the segmentation groups and the segmentation positions.
[0022] Furthermore, the quantity verification is that the detected target corresponds to no less than a preset number of gaze areas, and the detected target is determined to be the actual target;
[0023] The preset number does not exceed the number of divided spaces and is not less than 2.
[0024] Furthermore, the detection granularity is set as a standard sequence. For a single verification, the corresponding next detection granularity is the next detection granularity of the detection granularity corresponding to the verification in the standard sequence;
[0025] Among them, for a single verification, if the detection granularity corresponding to the verification is the last one in the standard sequence, the verification is determined to be the final verification, and the inspection is stopped after the verification.
[0026] Further, if the actual target is not generated, it is determined to increase the detection granularity to a next detection granularity;
[0027] If the detection granularity reaches the maximum detection granularity threshold, it is determined to stop the detection;
[0028] The maximum detection granularity threshold is related to the maximum resolution of the detection device and is positively correlated with the maximum resolution.
[0029] Furthermore, the spatial particle occupies at least one pixel in the plane projection, and for a single pixel, its corresponding actual size is related to the resolution of the device for collecting the target space;
[0030] The basic space occupies at least 4 pixels on the plane projection.
[0031] Furthermore, when determining the gaze area, determining abnormal spatial particles according to transitional color differences on each spatial particle in a single segmented space includes:
[0032] Determine the average color of each of the spatial particles;
[0033] According to the average color of the particles in each space, a plurality of color change curves of the divided space in the longitudinal and transverse directions are drawn;
[0034] The breakpoints in each color change curve and / or the spatial particles exceeding the preset slope are recorded as abnormal spatial particles.
[0035] Furthermore, the step of determining the actual target includes:
[0036] The abnormal space particles of each divided space are placed at a corresponding position of the target space to form a focus area corresponding to the divided space.
[0037] Furthermore, for the fixation area of a single segmented space,
[0038] If the fixation area of any segmented space includes an overlapping portion with the fixation area, determining that the overlapping portion includes the actual target;
[0039] If the gaze area is connected to the gaze area of any segmented space, it is determined that the actual target exists, and the next verification is performed.
[0040] Furthermore, for a single spatial particle, if the actual target ranges verified for two consecutive times both include the spatial particle, it is determined that the spatial particle belongs to the actual target.
[0041] Compared with the prior art, the beneficial effect of the present invention lies in that, by dividing a picture or a space into several groups, a picture is cut to form several sub-pictures that can highlight various parts of the picture, and each of the more prominent parts is formed, and the prominent parts are specifically identified to determine small targets. While effectively improving the accuracy of small target recognition, smaller targets are identified and reviewed in an iterative manner, thereby effectively improving the accuracy of small target recognition.
[0042] Furthermore, the space is divided into several spatial particles, and small targets are determined according to the relationship between the spatial particles. In the next cycle, the spatial particles are divided in a different way and the small targets are reviewed. This can effectively improve the accuracy of small target detection and verify the small targets, thereby improving the stability of small target detection.
[0043] Furthermore, by setting the transition color difference, the pixels where the small target is located are identified through the characteristics of the image, which reduces the complexity of small target detection and performs fuzzy analysis on the image, thereby further improving the stability of small target detection.
[0044] Furthermore, by cross-validating small targets, different segmentation spaces and segmentation spaces with different resolutions are used to confirm whether a single small target exists. When the area where the small target is located can be confirmed, the small target is set as the actual target. This effectively reduces the probability of misidentification of small target detection and effectively improves the accuracy of small target recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is a flow chart of a small target detection method based on deep learning of the present invention;
[0046] Figure 2 This is a schematic diagram of basic space division according to an embodiment of the present invention;
[0047] Figure 3 This is a schematic diagram of the locations of abnormal space particles according to an embodiment of the present invention;
[0048] Figure 4 This is a schematic diagram of target recognition of the SSD framework according to an embodiment of the present invention;
[0049] Among them: 1, space particles; 2, divided space; 3, abnormal space particles. DETAILED DESCRIPTION
[0050] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0051] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0052] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0053] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0054] See also Figure 1 As shown, it is a flow chart of the small target detection method based on deep learning of the present invention, including:
[0055] Step S1, dividing the target space into standard sizes and forming a number of basic spaces;
[0056] Step S2, setting the detection granularity, and dividing the basic space into a number of space particles of the same size and the same number as the detection granularity;
[0057] Step S3, generating a number of segmented spaces according to the detection granularity, and expanding each segmented space to a corresponding size of the target space;
[0058] Step S4, fuzzy identifying each segmented space and generating a fixation area of each segmented space;
[0059] Step S5, forming a detection area corresponding to the gaze area according to the corresponding position of the gaze area in the target space;
[0060] Step S6, selecting a number of basic spaces corresponding to the detection area, generating detection targets corresponding to each detection area, performing quantity verification, and accumulating the number of verifications;
[0061] The response is verified by quantity to determine the actual target of the target space;
[0062] If the response fails the quantity verification, a new detection granularity is generated and the corresponding quantity verification is performed;
[0063] The response quantity check reaches the check number threshold, and the corresponding monitoring target is determined to be not the actual target;
[0064] The response is to determine the actual target, or not the actual target, and stop the inspection.
[0065] Compared with the prior art, the beneficial effect of the present invention lies in that, by dividing a picture or a space into several groups, a picture is cut to form several sub-pictures that can highlight various parts of the picture, and each of the more prominent parts is formed, and the prominent parts are specifically identified to determine small targets. While effectively improving the accuracy of small target recognition, smaller targets are identified and reviewed in an iterative manner, thereby effectively improving the accuracy of small target recognition.
[0066] In implementation, take the traffic monitoring system as an example:
[0067] Step S1: Divide the area covered by the surveillance camera into several basic spaces according to a standard size (for example, each area is 16x16 pixels).
[0068] Step S2: Set the detection granularity (for example, each 4x4 pixels is a detection unit) to divide the basic space into smaller spatial particles.
[0069] Step S3: Generate segmented spaces according to the detection granularity and expand them to the corresponding size of the monitoring area.
[0070] Step S4: Perform fuzzy recognition on each segmented space to generate a fixation area, for example, to identify the possible location of the vehicle.
[0071] Step S5: forming a detection area corresponding to the gaze area according to the position of the gaze area in the monitoring area.
[0072] Step S6: Select the basic space corresponding to the detection area, generate the detection target (for example, vehicle), perform quantity verification, and accumulate the number of verifications.
[0073] According to the result obtained in the above manner: if the number of vehicles passes the verification (for example, the number of detected vehicles matches the actual number of vehicles), it is determined that the actual target in the target space is a vehicle.
[0074] If the calibration fails, adjust the detection granularity and re-calibrate.
[0075] If the number of checks reaches the threshold, it is determined that there is no vehicle in the monitoring area.
[0076] If it is confirmed that there is a vehicle, or if it is determined that there is no vehicle, stop the inspection.
[0077] Take industrial automation testing as an example:
[0078] Step S1: Divide the product conveyor belt on the production line into several basic spaces according to standard sizes (for example, each area is 1 meter x 1 meter).
[0079] Step S2: Set the detection granularity (for example, every 0.1 m x 0.1 m is a detection unit) to divide the basic space into smaller space particles.
[0080] Step S3: Generate segmented spaces according to the detection granularity and expand them to the corresponding size of the conveyor belt.
[0081] Step S4: Perform fuzzy recognition on each segmented space to generate a fixation area, for example, to identify possible defect locations of the product.
[0082] Step S5: According to the position of the gaze area on the conveyor belt, a detection area corresponding to the gaze area is formed.
[0083] Step S6: Select the basic space corresponding to the detection area, generate the detection target (for example, product defects), perform quantity verification, and accumulate the number of verifications.
[0084] In the results obtained according to the above method: if the number of defects passes the verification (for example, the number of defects detected is consistent with the actual number of defects), it is determined that the actual target of the target space is a defect.
[0085] If the calibration fails, adjust the detection granularity and re-calibrate.
[0086] If the number of inspections reaches the threshold, the product on the conveyor is determined to be free of defects.
[0087] If a defect is determined, or if it is determined to be non-defective, stop the inspection.
[0088] Take medical image analysis as an example:
[0089] Step S1: Divide a medical image (such as CT or MRI) into several basic spaces according to a standard size (for example, each area is 256x256 pixels).
[0090] Step S2: Set the detection granularity (for example, each 8x8 pixels is a detection unit) to divide the basic space into smaller spatial particles.
[0091] Step S3: Generate segmentation spaces according to the detection granularity and expand them to the corresponding size of the image.
[0092] Step S4: Perform fuzzy recognition on each segmented space to generate a fixation area, for example, identify a possible lesion area.
[0093] Step S5: forming a detection area corresponding to the gaze area according to the position of the gaze area in the image.
[0094] Step S6: Select the basic space corresponding to the detection area, generate the detection target (for example, lesion), perform quantity verification, and accumulate the number of verifications.
[0095] According to the results obtained in the above manner: if the number of lesions passes the verification (for example, the number of lesions detected is consistent with the actual number of lesions), it is determined that the actual target in the target space is the lesion.
[0096] If the calibration fails, adjust the detection granularity and re-calibrate.
[0097] If the number of verifications reaches the threshold, it is determined that there is no lesion in the image.
[0098] If a lesion is confirmed, or if it is determined that there is no lesion, the test is stopped.
[0099] Specifically, the steps of generating the segmentation space include:
[0100] According to the position of each spatial particle in the corresponding basic space, the spatial particles with the same position are divided into the same segmentation group;
[0101] According to the position of the basic space in the target space, the segmentation position of each space particle in the corresponding target space is determined;
[0102] A number of segmentation spaces having the same number as the detection granularity are generated according to the segmentation groups and segmentation positions.
[0103] See also Figure 2 As shown, it is a schematic diagram of basic space division of an embodiment of the present invention. In the figure,
[0104] The basic space is divided into four divided spaces 2. The space particles 1 in each divided space 2 are located at the corresponding position of the basic space in the figure. At the same time, the four divided spaces 2 are superimposed in the area of the basic space to form a complete basic space.
[0105] Different from the traditional two-stage target detection algorithm, the single-stage algorithm directly predicts the target category and location from the input image, omitting the generation and screening process of candidate regions, thereby significantly improving the detection speed while maintaining relatively high detection accuracy.
[0106] Specifically, the quantity verification is that the detection target corresponds to no less than a preset number of fixation areas, and the detection target is determined to be an actual target;
[0107] The preset number shall not exceed the number of partitioned spaces and shall not be less than 2.
[0108] Specifically, the detection granularity is set as a standard sequence. For a single verification, the corresponding next detection granularity is the next detection granularity of the detection granularity corresponding to the verification in the standard sequence;
[0109] Among them, for a single verification, if the detection granularity corresponding to the verification is the last one in the standard sequence, the verification is determined to be the final verification, and the inspection is stopped after the verification.
[0110] The space is divided into several spatial particles, and small targets are determined according to the relationship between the spatial particles. In the next cycle, the spatial particles are divided in a different way and the small targets are reviewed. This can effectively improve the accuracy of small target detection and verify the small targets, thereby improving the stability of small target detection.
[0111] Take wildlife protection area monitoring as an example:
[0112] Scenario description: In a wildlife sanctuary, use cameras to monitor a specific area to identify and count specific animals (such as elephants).
[0113] Step S1: Divide the monitoring area into several basic spaces according to standard sizes (for example, each area is 10x10 meters).
[0114] Step S2: Set the detection granularity (standard sequence: 10x10 meters, 5x5 meters, 2x2 meters), and divide the basic space into smaller spatial particles.
[0115] Step S3: Generate segmented spaces according to the detection granularity and expand them to the corresponding size of the monitoring area.
[0116] Step S4: Perform fuzzy recognition on each segmented space to generate a fixation area, for example, identify the possible location of the elephant.
[0117] Step S5: forming a detection area corresponding to the gaze area according to the position of the gaze area in the monitoring area.
[0118] Step S6: Select the basic space corresponding to the detection area, generate the detection target (elephant), perform quantity verification, and accumulate the number of verifications.
[0119] Preset number: at least 2 fixation areas corresponding to elephants.
[0120] Verification: If the number of detected elephants is not less than the preset number, the detected target is determined to be an actual target.
[0121] Adjustment of detection granularity: If the calibration fails, adjust to the next detection granularity (5x5 meters) and re-calibrate.
[0122] Final verification: If the current detection granularity is the last one in the standard sequence (2x2 meters) and fails the verification, the verification is determined to be the final verification and the verification is stopped.
[0123] Take factory product quality control as an example: Scenario description: On the factory assembly line, a machine vision system is used to detect specific defects on products.
[0124] Step S1: Divide the products on the assembly line into several basic spaces according to standard sizes (for example, each area is 50x50 cm).
[0125] Step S2: Set the detection granularity (standard sequence: 50x50 cm, 25x25 cm, 10x10 cm), and divide the basic space into smaller space particles.
[0126] Step S3: Generate segmentation spaces according to the detection granularity and expand them to the corresponding size of the pipeline.
[0127] Step S4: Perform fuzzy recognition on each segmented space to generate a fixation area, for example, to identify defects on a product.
[0128] Step S5: forming a detection area corresponding to the gaze area according to the position of the gaze area on the production line.
[0129] Step S6: Select the basic space corresponding to the inspection area, generate the inspection target (defect), perform quantity verification, and accumulate the number of verifications.
[0130] Preset number: at least 2 fixation areas corresponding to defects.
[0131] Verification: If the number of defects detected is not less than the preset number, the inspection target is determined to be the actual target.
[0132] Adjustment of detection size: If the calibration fails, adjust to the next detection size (25x25 cm) and re-calibrate.
[0133] Final verification: If the current detection particle size is the last one in the standard sequence (10x10 cm) and fails the verification, the verification is determined to be the final verification and the verification is stopped.
[0134] Take urban security monitoring as an example: Scenario description: In a city square, high-definition cameras are used to monitor crowd gatherings to identify and count specific events (such as rallies).
[0135] Step S1: Divide the square area into several basic spaces according to standard sizes (for example, each area is 20x20 meters).
[0136] Step S2: Set the detection granularity (standard sequence: 20x20 meters, 10x10 meters, 5x5 meters), and divide the basic space into smaller spatial particles.
[0137] Step S3: Generate segmented spaces according to the detection granularity and expand them to the corresponding size of the square.
[0138] Step S4: Perform fuzzy recognition on each segmented space to generate a fixation area, for example, identify an area where a crowd gathers.
[0139] Step S5: According to the position of the gaze area on the square, a detection area corresponding to the gaze area is formed.
[0140] Step S6: Select the basic space corresponding to the detection area, generate the detection target (crowd gathering), perform quantity verification, and accumulate the number of verifications.
[0141] Preset number: at least 2 gaze areas corresponding to crowd gatherings.
[0142] Verification: If the number of people gathered detected is not less than the preset number, the detected target is determined to be the actual target.
[0143] Adjustment of detection granularity: If the calibration fails, adjust to the next detection granularity (10x10 meters) and re-calibrate.
[0144] Final verification: If the current detection granularity is the last one in the standard sequence (5x5 meters) and fails the verification, the verification is determined to be the final verification and the verification is stopped.
[0145] Specifically, if no actual target is generated, it is determined that the detection granularity is increased to the next detection granularity;
[0146] If the detection granularity reaches the maximum detection granularity threshold, it is determined to stop the detection;
[0147] Among them, the maximum detection granularity threshold is related to the maximum resolution of the detection equipment and is positively correlated with the maximum resolution.
[0148] See also Figure 4 As shown, it is a schematic diagram of the location of abnormal space particles in an embodiment of the present invention.
[0149] In the figure, the spatial particles 1 are arranged in the segmented space 2 according to the position of the target space. In the figure, it can be clearly seen that there are two spatial particles 1 with abnormal colors. These two spatial particles 1 are recorded as abnormal spatial particles 3.
[0150] A spatial particle occupies at least one pixel on a plane projection. For a single pixel, its corresponding actual size is related to the device resolution of the target space.
[0151] The base space occupies at least 4 pixels on the plane of projection.
[0152] It is understandable that ensuring that each spatial particle occupies at least 1 pixel can improve the resolution of the detection system, so that even very small targets can be identified. The basic space occupies at least 4 pixels, which can provide enough information to identify and distinguish targets and reduce false detections and missed detections. In image processing, a single pixel may be misjudged due to noise or interference. By setting the minimum number of pixels, the impact of such random errors can be reduced and the robustness of the system can be improved. The basic space occupies enough pixels to ensure that there is enough data during image processing and analysis, thereby improving the clarity and quality of the image. By setting the number of pixels, the algorithm can be adapted to acquisition devices with different resolutions. Whether it is a high-resolution or low-resolution device, it can be adapted by adjusting the number of pixels. By setting the minimum number of pixels, it is possible to avoid analyzing too small features during image processing, reduce unnecessary calculations, and improve processing efficiency. By setting the number of pixels, the algorithm can be better generalized to different scenes and targets, not limited to a specific resolution or size. When performing subsequent processing such as image segmentation and feature extraction, there are enough pixels to ensure the accuracy and reliability of the processing results.
[0153] By setting the number of pixels reasonably, the storage and transmission efficiency of image data can be optimized, the amount of unnecessary data can be reduced, and storage space and bandwidth can be saved.
[0154] In the user interface, sufficient pixels can ensure that users can clearly see and identify the objects in the image, improving the user experience.
[0155] Specifically, when determining the gaze area, the abnormal spatial particles are determined according to the transition color difference on each spatial particle in a single segmented space, including:
[0156] Determine the average color of each spatial particle;
[0157] According to the average color of each space particle, draw several color change curves of the segmented space in the vertical and horizontal directions;
[0158] The breakpoints in each color change curve and / or the spatial particles exceeding the preset slope are recorded as abnormal spatial particles.
[0159] By setting the transition color difference, the pixels where the small target is located are identified through the characteristics of the image. While reducing the complexity of small target detection, the image is fuzzy analyzed, thereby further improving the stability of small target detection.
[0160] Specifically, the steps to determine realistic goals include:
[0161] The abnormal space particles of each divided space are placed at the corresponding position of the target space to form a focus area corresponding to the divided space.
[0162] Specifically, for a single segmented space fixation area,
[0163] If the fixation area of any segmented space includes an overlapping portion with the fixation area, it is determined that the overlapping portion contains the actual target;
[0164] If the gaze area is connected to the gaze area of any segmented space, it is determined that the actual target exists and the next verification is performed.
[0165] Specifically, for a single spatial particle, if the actual target range of two consecutive verifications includes the spatial particle, it is determined that the spatial particle belongs to the actual target.
[0166] By cross-validating small targets, different segmentation spaces and segmentation spaces with different resolutions are used to confirm whether a single small target exists. When the area where the small target is located can be confirmed, the small target is set as the actual target. This effectively reduces the probability of misidentification of small targets and effectively improves the accuracy of small target recognition.
[0167] See also Figure 4 As shown, it is a schematic diagram of target recognition of the SSD framework according to an embodiment of the present invention. In the figure,
[0168] The SSD (Single Shot MultiBox Detector) algorithm directly predicts the position and category probability of the bounding box by using multiple convolution filters on feature maps of multiple scales, and adjusts these default boxes to better match the shape of the real object. While improving the detection speed, the algorithm also balances the detection accuracy. However, due to its use of multi-scale detection methods, the accuracy of small target detection is slightly lower.
[0169] This method requires input of images and ground truth boxes for each object during training. Next, SSD sets default bounding boxes (anchor boxes) of different sizes on feature maps of various scales (such as 8×8 and 4×4 in the figure). For each default box, we get the coordinates, confidence, and category information of the predicted boxes of all objects. During training, these default boxes are first matched with the ground truth boxes, and the model loss is the weighted sum of localization loss and confidence loss.
[0170] Based on the YOLOv7 network, we made three modifications to obtain an improved model (hereinafter referred to as ACG-YOLOv7):
[0171] (1) A P2 detection layer dedicated to detecting small target features is integrated in the network head. The detection layer is also connected to the backbone structure to ensure the consistency of the small target detection map in terms of feature extraction and fusion;
[0172] (2) The convolutional layer in the original backbone structure is replaced by the improved ACmixBlock structure based on the ACmix module. This replacement improves the drawback of missing small target features in the feature extraction link and achieves more accurate detection of small targets;
[0173] (3) By introducing the global convolutional attention module (GAM) to extract features from the global perspective, the network's feature extraction capability for small targets is effectively improved.
[0174] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
[0175] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A small target detection method based on deep learning, characterized in that: include: Divide the target space into standard sizes and form several basic spaces; Setting the detection granularity, and dividing the basic space into a number of space particles of the same size and the same number as the detection granularity; Generating a plurality of segmented spaces according to the detection granularity, and expanding each segmented space to a corresponding size of the target space; Fuzzy identify each segmented space and generate a fixation area for each segmented space; According to the corresponding position of the gaze area in the target space, forming a detection area corresponding to the gaze area; Selecting several basic spaces corresponding to the detection area, generating detection targets corresponding to each detection area, performing quantity verification, and accumulating the number of verifications; In response to the quantity verification, an actual target of the target space is determined; If the response fails the quantity verification, a new detection granularity is generated and the corresponding quantity verification is performed; The response quantity check reaches the check number threshold, and the corresponding monitoring target is determined to be not the actual target; In response to determining the actual target, or the non-actual target, the inspection is stopped.
2. The small target detection method based on deep learning according to claim 1, characterized in that: The step of generating the segmented space comprises: According to the position of each spatial particle in the corresponding basic space, the spatial particles with the same position are divided into the same segmentation group; Determining a segmentation position of each spatial particle in the corresponding target space according to the position of the basic space in the target space; A number of segmentation spaces having the same number as the detection granularity are generated according to the segmentation groups and the segmentation positions.
3. The small target detection method based on deep learning according to claim 2, characterized in that: The quantity verification is that the detected target corresponds to no less than a preset number of gaze areas, and the detected target is determined to be the actual target; The preset number does not exceed the number of divided spaces and is not less than 2.
4. The small target detection method based on deep learning according to claim 2, characterized in that: The detection granularity is set as a standard sequence. For a single verification, the corresponding next detection granularity is the next detection granularity of the detection granularity corresponding to the verification in the standard sequence; Among them, for a single verification, if the detection granularity corresponding to the verification is the last one in the standard sequence, the verification is determined to be the final verification, and the inspection is stopped after the verification.
5. The small target detection method based on deep learning according to claim 4, characterized in that: If the actual target is not generated, determining to increase the detection granularity to the next detection granularity; If the detection granularity reaches the maximum detection granularity threshold, it is determined to stop the detection; The maximum detection granularity threshold is related to the maximum resolution of the detection device and is positively correlated with the maximum resolution.
6. The small target detection method based on deep learning according to any one of claims 3 or 5, characterized in that: The spatial particle occupies at least one pixel in the plane projection. For a single pixel, its corresponding actual size is related to the device resolution of the target space. The basic space occupies at least 4 pixels on the plane projection.
7. The small target detection method based on deep learning according to claim 6, characterized in that: When determining the gaze area, determining abnormal spatial particles according to the transition color difference on each spatial particle in a single segmented space includes: Determine the average color of each of the spatial particles; According to the average color of the particles in each space, a plurality of color change curves of the divided space in the longitudinal and transverse directions are drawn; The breakpoints in each color change curve and / or the spatial particles exceeding the preset slope are recorded as abnormal spatial particles.
8. The small target detection method based on deep learning according to claim 7, characterized in that: The steps of determining the actual target include: The abnormal space particles of each divided space are placed at a corresponding position of the target space to form a focus area corresponding to the divided space.
9. The small target detection method based on deep learning according to claim 8, characterized in that: For a single segmented space fixation region, If the fixation area of any segmented space includes an overlapping portion with the fixation area, determining that the overlapping portion includes the actual target; If the gaze area is connected to the gaze area of any segmented space, it is determined that the actual target exists, and the next verification is performed.
10. The small target detection method based on deep learning according to claim 9, characterized in that: For a single spatial particle, if the actual target ranges verified for two consecutive times both include the spatial particle, it is determined that the spatial particle belongs to the actual target.
Citation Information
Patent Citations
A method for detecting weak targets
CN112990317B