A small target detection processing method and system for high-resolution images
By optimizing small target detection in high-resolution images through dynamic block division and reverse compensation mechanisms, the problems of high computational cost and inaccurate small target detection in large-scale images are solved, achieving efficient and accurate target recognition and real-time detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANG ZHOU CHINA SHIPPING TELECOMM CO LTD
- Filing Date
- 2025-11-11
- Publication Date
- 2026-07-03
Smart Images

Figure CN121280913B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method and system for small target detection processing in high-resolution images. Background Technology
[0002] With the rapid development of technology, image acquisition devices such as drones and high-definition cameras have been widely used in many fields, generating a large amount of high-resolution image data. In the field of security supervision, such as drone aerial monitoring and ship deck security inspections, it is necessary to accurately identify and label key targets from these large-scale images to achieve effective security monitoring and management. Currently, target detection technology has made significant progress, among which the YOLO (You Only Look Once) series of target detection models has received widespread attention for its efficiency and accuracy. The YOLO model can treat the target detection task as a regression problem, predicting the bounding box and class probability of the target simultaneously through a single forward propagation, greatly improving the detection speed. However, when faced with large-scale images, directly inputting the entire image into the YOLO model for detection presents some problems.
[0003] On the one hand, large-scale images typically have extremely high resolution, and directly inputting them into the model would result in a huge computational load, high hardware resource requirements, and a significant impact on detection speed, making it difficult to meet the real-time requirements of security monitoring applications. On the other hand, for small targets in images, since they occupy fewer pixels in the entire image, their feature information is relatively inconspicuous, and direct detection is prone to missed detections or false detections, reducing the accuracy of detection.
[0004] To address the challenge of large-scale image detection, several traditional image segmentation methods have been proposed. A common approach is to divide the image into blocks with a fixed number of rows and columns, then sequentially input these sub-images into an object detection model. However, this method has significant limitations. The fixed number of rows and columns cannot adaptively adjust to the actual size of the input image, potentially leading to unreasonable segmentation. Some sub-images may fail to effectively cover important regions of the image, or too many unnecessary sub-images may be generated, increasing computational load. Furthermore, during image segmentation, due to the mismatch between the image size and the block size, edge regions often cannot form sub-images of the same size as their internal sub-regions. Directly processing these edge regions irregularly results in inconsistent sub-image sizes input to the object detection model. Since most pre-trained object detection models have specific requirements for input image size, inconsistently sized sub-images may prevent proper input for detection or negatively impact the model's detection performance.
[0005] Therefore, there is a need to provide a method and system for small target detection processing in high-resolution images to improve the efficiency and accuracy of target detection. Summary of the Invention
[0006] This invention provides a method for small target detection processing of high-resolution images, comprising: acquiring the image to be detected and the type of the target to be detected; extracting the size features and pixel features of the image to be detected; determining the optimal number of rows and columns in the image to be detected and the sliding window overlap parameters based on the size features, pixel features, and target type of the image to be detected; dividing the image to be detected into multiple initial sub-images based on the optimal number of rows and columns in the image and the sliding window overlap parameters; performing inverse compensation on the edge sub-regions in the multiple initial sub-region images to generate multiple sub-images, wherein any two sub-images have the same size; for each sub-image, using a pre-trained YOLO target detection model to perform target recognition and annotation on the sub-image to generate the target detection result of the sub-image; and generating a global target detection result map based on the image position coordinates of each sub-image and the target detection result.
[0007] Furthermore, the pixel features of the image to be detected are extracted, including: extracting the image coordinates and RGB values of each pixel of the image to be detected; and clustering the pixels of the image to be detected based on the image coordinates and RGB values of each pixel of the image to be detected to generate multiple clustering regions, wherein the pixel features of the image to be detected include multiple clustering regions.
[0008] Furthermore, based on the size and pixel features of the image to be detected, as well as the type of the target being detected, the optimal number of rows and columns in the image to be detected and the sliding window overlap parameters are determined, including: determining the region weight of each cluster region based on the type of the target being detected; determining the range of values for the number of rows and columns in the image to be detected based on the size features of the image to be detected; determining the optimal number of rows and columns in the image to be detected based on the region weight of each cluster region and the range of values for the number of rows and columns in the image to be detected; and determining the sliding window overlap parameters of the image to be detected based on the optimal number of rows and columns in the image to be detected.
[0009] Furthermore, based on the target type of the image to be detected, the region weight of each cluster region is determined, including: obtaining a sample image set corresponding to the image to be detected based on the size features and target type of the image to be detected; determining the region size features and RGB features corresponding to the target type based on the target detection results of the sample image set and the target detection results of the sample image set; for each cluster region, determining the matching degree between the cluster region and the target type based on the number of pixels and RGB of the cluster region and the region size features and RGB features corresponding to the target type; and determining the region weight of the cluster region based on the matching degree between the cluster region and the target type.
[0010] Furthermore, based on the region weight of each cluster region and the range of row and column numbers of the image to be detected, the optimal number of rows and columns for the image to be detected is determined, including: determining the cluster region of interest based on the matching degree between the cluster region and the detection target type; sampling the number of rows and columns for the image to be detected from the range of row and column numbers; for each group of sampled rows and columns, segmenting the image to be detected based on the sampled rows and columns to generate segmentation results; determining the number of sub-images corresponding to each cluster region based on the segmentation results; determining the priority value of the sampled number of rows and columns based on the number of sub-images corresponding to each cluster region and the region weight of the cluster region; and determining the optimal number of rows and columns for the image to be detected based on the priority value of the sampled number of rows and columns.
[0011] Furthermore, based on the optimal number of rows and columns in the image to be detected, the sliding window overlap parameters of the image to be detected are determined, including: sampling the sliding window overlap parameters from a preset set of sliding window overlap parameters; segmenting the image to be detected based on the optimal number of rows and columns in the image and the sampled sliding window overlap parameters to generate a segmentation result corresponding to the sampled sliding window overlap parameters; determining the initial number of sub-images, the number of sub-images corresponding to each cluster region, and the overlapping redundancy area based on the segmentation result corresponding to the sampled sliding window overlap parameters; and determining the sliding window overlap parameters of the image to be detected based on the initial number of sub-images, the number of sub-images corresponding to each cluster region, the region weight, and the overlapping redundancy area.
[0012] Furthermore, based on the number of sub-images, region weights, and overlapping redundancy areas corresponding to each clustered region of the sampled sliding window overlap parameters, the sliding window overlap parameters of the image to be detected are determined, including: using the particle swarm optimization algorithm, based on the initial number of sub-images, the number of sub-images, region weights, and overlapping redundancy areas corresponding to the sampled sliding window overlap parameters, the sliding window overlap parameters of the image to be detected are determined.
[0013] Furthermore, reverse compensation is performed on the edge sub-regions in multiple initial sub-region images to generate multiple sub-region images, including: determining the reverse compensation method for the edge sub-regions in multiple initial sub-region images based on multiple clustered regions; and performing reverse compensation on the edge sub-regions in multiple initial sub-region images based on the reverse compensation method to generate multiple sub-region images.
[0014] Furthermore, based on multiple clustering regions, the reverse compensation method for edge sub-regions in multiple initial sub-region images is determined, including: based on multiple clustering regions, determining the association value between the edge sub-region and the adjacent initial sub-region; and based on the association value between the edge sub-region and the adjacent initial sub-region, determining the reverse compensation method, wherein the reverse compensation method is copy padding or zero padding.
[0015] This invention provides a small target detection processing system for high-resolution images, applying the aforementioned method for small target detection processing of high-resolution images, comprising: a data acquisition module for acquiring the image to be detected and the type of the target to be detected; a feature extraction module for extracting the size features and pixel features of the image to be detected; a parameter determination module for determining the optimal number of rows and columns in the image to be detected and the sliding window overlap parameter based on the size features, pixel features, and target type of the image to be detected; an image segmentation module for dividing the image to be detected into multiple initial sub-images based on the optimal number of rows and columns in the image to be detected and the sliding window overlap parameter; the image segmentation module is further used to perform reverse compensation on the edge sub-regions in the multiple initial sub-region images to generate multiple sub-images, wherein any two sub-images have the same size; a target detection module for performing target recognition and annotation on each sub-image using a pre-trained YOLO target detection model to generate the target detection result of the sub-image; the target detection module is further used to generate a global target detection result map based on the image position coordinates of each sub-image and the target detection result.
[0016] Compared to existing technologies, the small target detection processing method and system for high-resolution images provided in this specification have at least the following advantages:
[0017] 1. By combining the size features, pixel features, and target type of the image to be detected, the optimal number of rows and columns in the block and the overlapping parameters of the sliding window are dynamically determined, overcoming the limitations of traditional fixed-block methods for small target detection. Dynamic block segmentation can adaptively adjust the size of sub-images according to image content (such as target distribution density and size differences), ensuring that small targets fall completely within a single or a few sub-images, avoiding the loss of target information due to segmentation. Simultaneously, a semantically related reverse compensation mechanism optimizes edge sub-regions through copy filling or zero filling, further completing cross-boundary targets and improving target integrity. Experiments show that this strategy can improve the recall rate of small target detection by 15%-20%, and is particularly suitable for the accurate identification of densely packed small targets in large-scale scenes such as drone aerial photography and ship decks.
[0018] 2. To address the batch processing difficulties caused by inconsistent sizes of edge sub-regions in traditional block-based methods, a reverse compensation mechanism unifies all sub-graphs to the same size (e.g., 256×256), simplifying the subsequent parallel inference process of the YOLO model. The reverse compensation mechanism intelligently determines the semantic correlation between edge regions and adjacent sub-graphs through cluster analysis, copying and filling only edge regions belonging to the same target to avoid unnecessary computational redundancy; irrelevant regions are zero-filled to reduce background interference. This design, while ensuring consistent sub-graph sizes, concentrates computational resources on high-value target regions, improving model inference speed by over 30%, and enabling real-time detection (>30FPS) with GPU acceleration, meeting the high-time-sensitivity requirements of industrial inspection, security monitoring, and other scenarios.
[0019] 3. By employing sub-image location coordinate mapping and global result map generation techniques, a two-tiered output system of "local sub-image detection + global target fusion" is constructed. Local sub-images preserve original image details, supporting fine-grained analysis of individual targets; the global detection map, through coordinate transformation and NMS deduplication, intuitively displays the spatial distribution and category information of all targets in the original image. This design not only solves the problem of duplicate detection caused by targets crossing sub-images in large-scale scenes but also enables traceable tracking from global to local levels through sub-image indexing. For example, in ship deck inspection, users can quickly locate abnormal targets in the global image and trace back to the original area through sub-image coordinates for secondary verification, significantly improving the efficiency of anomaly analysis and the reliability of decision-making in safety supervision scenarios. Attached Figure Description
[0020] This specification will be further described by way of exemplary embodiments, which will be described in detail with reference to the accompanying drawings. These embodiments are not limiting; in these embodiments, the same reference numerals denote the same structures, wherein:
[0021] Figure 1 This is a flowchart illustrating a small target detection processing method for high-resolution images in one embodiment of this application;
[0022] Figure 2 This is a flowchart illustrating, in one embodiment of this application, the determination of the optimal number of rows and columns in the block and the overlapping parameters of the sliding window for the image to be detected;
[0023] Figure 3 This is a block diagram of a small target detection and processing system for high-resolution images, as shown in one embodiment of this application. Detailed Implementation
[0024] To more clearly illustrate the technical solutions of the embodiments in this specification, the accompanying drawings used in the description of the embodiments will be briefly introduced below.
[0025] Figure 1 This is a flowchart illustrating a small target detection processing method for high-resolution images in one embodiment of this application. This method for small target detection processing of high-resolution images belongs to the field of image processing technology. Figure 1 As shown, a method for small target detection processing in high-resolution images may include the following steps.
[0026] Step 110: Obtain the image to be detected and the type of the target to be detected.
[0027] Specifically, target type detection refers to the category of objects with specific characteristics or attributes identified and located from an image. These targets can be concrete physical entities, abstract behavioral states, or risk factors in the environment. For example, in a drone aerial monitoring scenario, target types could include hull cracks, rust, and obstacles on the water surface. In a ship safety monitoring scenario, target types could include other ships or reefs.
[0028] Step 120: Extract the size features and pixel features of the image to be detected.
[0029] Specifically, it includes:
[0030] Extract the image coordinates and RGB values of each pixel in the image to be detected;
[0031] Based on the image coordinates and RGB values of each pixel in the image to be detected, the pixels of the image to be detected are clustered to generate multiple clustering regions. The pixel features of the image to be detected include multiple clustering regions.
[0032] Specifically, the image coordinates (x, y) of each pixel represent its spatial position in the image. The RGB values of a pixel represent the intensity of its red, green, and blue channels (0-255), reflecting its color characteristics.
[0033] Each pixel is represented as a 5-dimensional feature vector (coordinates + color): [x,y,R,G,B]. Using clustering algorithms (such as K-Means clustering, DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering, the pixels of the image to be detected are clustered based on the 5-dimensional feature vector of each pixel, generating multiple clustered regions.
[0034] Step 130: Based on the size and pixel features of the image to be detected and the type of the target to be detected, determine the optimal number of rows and columns in the blocks and the sliding window overlap parameters of the image to be detected.
[0035] Figure 2This is a flowchart illustrating, in one embodiment of this application, the determination of the optimal number of rows and columns in the image to be detected and the overlapping parameters of the sliding window, as shown below. Figure 2 As shown, in some embodiments, based on the size and pixel features of the image to be detected and the type of the target to be detected, the optimal number of rows and columns in the blocks and the sliding window overlap parameters of the image to be detected are determined, including:
[0036] Based on the type of target to be detected in the image, the region weight of each cluster region is determined;
[0037] Based on the size features of the image to be detected, the range of the number of rows and columns of the image to be detected is determined. For example, based on the size features of the image to be detected and the type of the target to be detected, historical images with the same size features and target types are identified. Based on the segmentation results of the historical images, the range of the number of rows and columns of the image to be detected is determined. For another example, the range of the number of rows and columns corresponding to different size features and target types is preset, and the preset range of the number of rows and columns corresponding to the size features and target types of the image to be detected is directly retrieved as the range of the number of rows and columns of the image to be detected.
[0038] Based on the region weight of each cluster region and the range of the number of rows and columns of the image to be detected, the optimal number of rows and columns of the image to be detected is determined.
[0039] The sliding window overlap parameters of the image to be detected are determined based on the optimal number of rows and columns in the block.
[0040] In some embodiments, the region weight of each cluster region is determined based on the type of target to be detected in the image to be detected, including:
[0041] Based on the size features of the image to be detected and the type of the target to be detected, obtain the sample image set corresponding to the image to be detected;
[0042] Based on the sample image set corresponding to the image to be detected and the target detection results of the sample image set corresponding to the image to be detected, the region size features and RGB features corresponding to the type of detected target are determined.
[0043] For each cluster region, the matching degree between the cluster region and the target detection type is determined based on the number of pixels and RGB values included in the cluster region, as well as the region size features and RGB features corresponding to the target detection type. Based on the matching degree between the cluster region and the target detection type, the region weight of the cluster region is determined.
[0044] Specifically, the sample image set corresponding to the image to be detected includes multiple sample images, and the size features and detection target type of the sample images are consistent with those of the image to be detected.
[0045] For each sample image in the sample image set corresponding to the image to be detected, based on the target detection results of the sample image, the pixel regions in the sample image that belong to the target type are determined, and the region size features (e.g., length, width, total number of pixels, etc.) and RGB features (e.g., pixel RGB mean, pixel RGB variance, histogram, etc.) of the pixel regions that belong to the target type are determined.
[0046] The mean value of the region size features and RGB features of the pixel regions belonging to the target type in each sample image of the sample image set corresponding to the image to be detected is calculated to obtain the region size features and RGB features corresponding to the target type.
[0047] For each clustered region, based on the pixels included in the clustered region, the region size feature and RGB feature of the clustered region are determined. The cosine similarity between the region size of the clustered region and the region size feature corresponding to the detected target type (denoted as size similarity) and the cosine similarity between the RGB features of the clustered region and the RGB features corresponding to the detected target type (denoted as RGB similarity) are calculated. The size similarity and RGB similarity are weighted and summed to obtain the matching degree between the clustered region and the detected target type.
[0048] The weights of size similarity and RGB similarity can be calculated using the following process:
[0049] S11. For any two sample images included in the sample image set corresponding to the image to be detected, calculate the Euclidean distance of the region size features of the pixel regions belonging to the detection target type in the two sample images, and use it as the size Euclidean distance between the two sample images. Calculate the Euclidean distance of the RGB features of the pixel regions belonging to the detection target type in the two sample images, and use it as the RGB Euclidean distance between the two sample images.
[0050] S12. Calculate the standard deviation of the Euclidean distance between any two sample images in the sample image set corresponding to the image to be detected, and use it as the size standard deviation.
[0051] S13. Calculate the standard deviation of the RGB Euclidean distance between any two sample images in the sample image set corresponding to the image to be detected, and use it as the size standard deviation.
[0052] S14, Weight of size similarity = ;
[0053] S15, Weight of RGB Similarity = .
[0054] Based on the size and target type of the image to be detected, a similar sample set is selected. Size and RGB features of the target region in the samples are extracted, and their mean is calculated as the baseline feature for the target type. Subsequently, for each clustered region, the cosine similarity between its size and RGB features and the baseline feature is calculated. The key innovation lies in dynamically allocating weights based on the standard deviation of the size / RGB Euclidean distance between any two samples in the sample set: if the size feature fluctuates significantly between samples, the size similarity weight is reduced; conversely, the RGB weight is strengthened. This weight allocation mechanism based on the degree of data dispersion effectively solves the problem of insufficient adaptability of fixed weights to changes in target type. Weight adaptation is achieved through statistical learning, avoiding the subjectivity of manual parameter tuning. The standard deviation is used to quantify feature stability, enhancing the algorithm's robustness to noise and changes. The computation is lightweight and efficient, requiring only the statistical measure of the distance between samples, making it suitable for real-time detection scenarios.
[0055] In some embodiments, the optimal number of rows and columns for the image to be detected is determined based on the region weight of each cluster region and the range of the number of rows and columns in the image to be detected, including:
[0056] Based on the matching degree between the clustered regions and the detection target type, the clustered regions of interest are determined. For example, clustered regions with a matching degree greater than a matching degree threshold (e.g., 0.5, etc.) are selected as the clustered regions of interest.
[0057] The number of rows and columns of the block is sampled from the range of values for the number of rows and columns of the image to be detected (e.g., (3, 10) etc.);
[0058] For each group of sampling blocks, the image to be detected is segmented based on the number of sampling blocks, and segmentation results are generated. Based on the segmentation results, the number of sub-images corresponding to each cluster region is determined. Based on the number of sub-images corresponding to each cluster region and the regional weight of the cluster region, the priority value of the number of sampling blocks is determined. The larger the number of sub-images and the larger the regional weight of the cluster region, the more sub-images the cluster region corresponds to, and the smaller the priority value of the number of sampling blocks.
[0059] The optimal number of rows and columns for the image to be detected is determined based on the priority value of the number of rows and columns in each sampled block.
[0060] For example, the priority value of the number of rows and columns in the sampling block can be calculated using the following formula:
[0061]
[0062] in, The priority value for the number of rows and columns in the sampling block. Given the number of rows and columns in the sampled block, this represents the total number of sub-images obtained after segmenting the image to be detected. Let m be the region weight of the m-th cluster of interest. Let m be the number of subgraphs corresponding to the m-th cluster region of interest. This represents the total number of clusters of interest.
[0063] The formula optimizes block partitioning through a double penalty mechanism: the first term To penalize partitioning schemes with an excessive number of subgraphs and avoid over-segmentation, the second term... This penalizes cases where high-weight regions are divided into too many subgraphs, protecting the integrity of critical targets. For example, if a high-weight region is split into multiple subgraphs due to block partitioning, This will increase, causing P to decrease and lowering the priority of the partitioning scheme.
[0064] The optimal number of rows and columns for the sampled block with the highest priority value can be used as the optimal number of rows and columns for the image to be detected.
[0065] The block quality is quantified by weighting and subgraph distribution, avoiding subjective settings; high-weight regions are prioritized for protection, improving detection accuracy; only the sampling block scheme needs to be traversed and the number of subgraphs counted, making it suitable for real-time scenarios. Essentially, this process achieves a balance between block efficiency and target retention by minimizing the impact of block fragmentation on key regions.
[0066] In some embodiments, the sliding window overlap parameters of the image to be detected are determined based on the optimal number of rows and columns in the image to be detected, including:
[0067] From a pre-defined set of sliding window overlap parameters, sliding window overlap parameters are sampled. This set is a predefined group of overlap ratio parameters that can be used for sliding window segmentation. These parameters determine the size of the overlap area between adjacent windows during the sliding window's movement. Essentially, it controls the redundancy between sub-images during segmentation: a larger overlap ratio results in more information redundancy between adjacent sub-images, reducing target information loss due to window boundary cutting, but increasing computational load; a smaller overlap ratio results in stronger independence between sub-images, but may damage target integrity due to cutting. The setting of this set must balance the accuracy and efficiency of target detection, and a reasonable range should be determined based on experience or experimentation.
[0068] The image to be detected is segmented based on the optimal number of rows and columns in the block and the sampling sliding window overlap parameters, generating the segmentation result corresponding to the sampling sliding window overlap parameters.
[0069] Based on the segmentation results corresponding to the sampling sliding window overlap parameters, determine the initial number of subgraphs corresponding to the sampling sliding window overlap parameters, the number of subgraphs corresponding to each cluster region, and the overlapping redundancy area.
[0070] The sliding window overlap parameters of the image to be detected are determined based on the initial number of sub-images corresponding to the sampling sliding window overlap parameters, the number of sub-images corresponding to each cluster region, the region weight, and the overlapping redundancy area.
[0071] Specifically, the inputs are the image to be detected, the optimal number of rows and columns in the block (e.g., 4×4), and the sampling sliding window overlap parameters (e.g., horizontal overlap rate). Vertical overlap rate The base window size is determined based on the optimal number of rows and columns in the block (e.g., for an image size of 1000×1000, the window size is 250×250 under a 4×4 block). The window movement step size is calculated in conjunction with the overlap parameter, for example:
[0072] Horizontal step size = window width × (1 - ) = 250 × 0.7 = 175 pixels;
[0073] Vertical step size = window height × (1 - =250×0.7=175 pixels.
[0074] Slide the window by step size to generate a set of subgraphs that cover the entire graph. For example, the initial number of subgraphs in a 4×4 block is 16, but overlap may increase the actual number of subgraphs.
[0075] For each overlapping area, determine whether the overlapping area belongs to the cluster region of interest. If it does, the overlapping area is not an overlapping redundant area; otherwise, the overlapping area is an overlapping redundant area.
[0076] In some embodiments, the sliding window overlap parameters of the image to be detected are determined based on the number of sub-images, region weights, and overlapping redundancy areas corresponding to each clustered region of the sampled sliding window overlap parameters, including:
[0077] The particle swarm optimization (PSO) algorithm determines the sliding window overlap parameters of the image to be detected based on the number of initial sub-images corresponding to the sampled sliding window overlap parameters, the number of sub-images corresponding to each cluster region, the region weights, and the overlap redundancy area. The fitness function of the PSO algorithm is related to the number of initial sub-images corresponding to the sampled sliding window overlap parameters, the number of sub-images corresponding to each cluster region, the region weights, and the overlap redundancy area. A lower number of initial sub-images, fewer sub-images corresponding to cluster regions with larger region weights, and a smaller overlap redundancy area result in a higher fitness function value for the sampled sliding window overlap parameters.
[0078] Compared to traditional methods with fixed overlap rates or manual parameter tuning, this method offers stronger dynamic adaptability. It can adaptively select overlap strategies based on image content (such as target distribution density and size differences), avoiding the loss of information due to cutting high-value targets. The computational efficiency is controllable, and redundant area constraints limit ineffective computations, reducing resource consumption while ensuring detection accuracy. The global search capability of the particle swarm optimization algorithm can avoid local optima traps, making it particularly suitable for complex scenarios and improving robustness.
[0079] Step 140: Based on the optimal number of rows and columns in the block and the sliding window overlap parameters, the image to be detected is divided into multiple initial sub-images.
[0080] Step 150: Perform reverse compensation on the edge sub-regions in the multiple initial sub-region images to generate multiple sub-images, wherein any two sub-images have the same size.
[0081] Specifically, it includes:
[0082] Based on multiple clustering regions, the reverse compensation method for edge sub-regions in multiple initial sub-region images is determined;
[0083] Based on the reverse compensation method, the edge sub-regions in multiple initial sub-region images are reverse compensated to generate multiple sub-region images.
[0084] In some embodiments, based on multiple clustering regions, determining the inverse compensation method for edge sub-regions in multiple initial sub-region images includes:
[0085] Based on multiple clustering regions, the association value between the edge sub-region and the adjacent initial sub-region is determined. Specifically, whether the edge pixels of the edge sub-region and the edge pixels of the adjacent initial sub-region belong to the same clustering region of interest is determined. If so, the association value between the edge sub-region and the adjacent initial sub-region is 1; otherwise, it is 0.
[0086] Based on the association value between the edge sub-region and the adjacent initial sub-region, the reverse compensation method is determined. The reverse compensation method is either copy fill or zero fill. For example, if the association value is 1, the reverse compensation method is copy fill. The copy fill method copies the pixel content of the corresponding position of the adjacent sub-region to the extended area of the edge sub-region, thereby completing the cut target and maintaining the consistency of the sub-image size. Otherwise, zero fill is used, and blank pixels are used to fill the extended area to maintain the consistency of the sub-image size and avoid introducing interference information.
[0087] Step 160: For each sub-graph, use the pre-trained YOLO object detection model to perform object recognition and annotation on the sub-graph, and generate the object detection results for the sub-graph.
[0088] Specifically, the sub-image is first input into the feature extraction network of the YOLO model (such as Darknet or CSPDarknet), and multi-scale feature maps are generated through convolution and downsampling operations. Then, the path aggregation network (PANet) or feature pyramid network (FPN) is used to fuse features at different levels to enhance the detection capability of small targets. Next, the detection head predicts the offset of multiple anchor boxes, class confidence, and target presence probability at each grid point of the feature map. Finally, redundant boxes are filtered through non-maximum suppression (NMS) to output the final detection result, which includes the target class, bounding box coordinates (x, y, w, h), and confidence score.
[0089] Step 170: Generate a global target detection result map based on the image location coordinates and target detection results of each sub-map.
[0090] Specifically, through spatial coordinate mapping and result fusion technology, the scattered sub-graph detection results are integrated into a global target detection result map. Specifically, firstly, a sub-image spatial index table is established based on the original position coordinates during sub-image segmentation (such as the row and column number of the top-left pixel in the global image) to record the relative position of each sub-image in the global image. Then, the target information (category, bounding box coordinates, confidence score) detected in each sub-image is extracted, and its bounding box coordinates are converted from the sub-image local coordinate system to the global coordinate system. For example, the bounding box coordinates (x', y', w', h') are translated and corrected by the offset (Δx, Δy) of the top-left corner of the sub-image to obtain the global coordinates (x=x'+Δx, y=y'+Δy). Next, an extended algorithm of non-maximum suppression (NMS) is used to globally deduplicate detection boxes that cross the sub-image boundaries, prioritizing the retention of high-confidence boxes. Finally, all retained target boxes are drawn on a blank canvas of the original image size to generate a global detection result image. Each target box in the image is labeled with a category label and confidence score, while the sub-image boundary lines are retained as traceable segmentation markers. This process ensures global consistency in target localization, avoiding target fragmentation or duplicate detection issues caused by factor graph segmentation. It is particularly suitable for the complete identification of cross-subgraph targets in large-scale scenarios such as drone aerial photography. The generated global graph with location markers and segmented subgraphs can be output simultaneously, providing both a macroscopic overview of the overall detection and support for quickly locating local details through subgraph indexing. This forms a two-level traceable detection report of "global-local," significantly improving the efficiency of target tracking and anomaly analysis in security monitoring scenarios.
[0091] Figure 3 This is a block diagram of a small target detection processing system for high-resolution images, as shown in one embodiment of this application. Figure 3As shown, a small target detection and processing system for high-resolution images may include a data acquisition module, a feature extraction module, a parameter determination module, an image segmentation module, and a target detection module.
[0092] The data acquisition module is used to acquire the image to be detected and the type of the target to be detected;
[0093] The feature extraction module is used to extract the size and pixel features of the image to be detected;
[0094] The parameter determination module is used to determine the optimal number of rows and columns in the block and the sliding window overlap parameters of the image to be detected based on the size and pixel features of the image to be detected and the type of the target to be detected.
[0095] The image segmentation module is used to divide the image to be detected into multiple initial sub-images based on the optimal number of rows and columns in the block and the sliding window overlap parameters.
[0096] The image segmentation module is also used to perform reverse compensation on edge sub-regions in multiple initial sub-region images to generate multiple sub-images, wherein any two sub-images have the same size;
[0097] The object detection module is used to identify and label objects in each sub-graph using a pre-trained YOLO object detection model, and generate object detection results for the sub-graph.
[0098] The object detection module is also used to generate a global object detection result map based on the image location coordinates and object detection results of each sub-map.
[0099] A small target detection processing system for high-resolution images can be used to perform a small target detection processing method for high-resolution images, which will not be elaborated here.
[0100] Finally, it should be understood that the embodiments described in this specification are merely illustrative of the principles of the embodiments described herein. Other variations may also fall within the scope of this specification. Therefore, alternative configurations of the embodiments described herein are intended to be illustrative rather than limiting, and should be considered consistent with the teachings of this specification. Accordingly, the embodiments described herein are not limited to those explicitly introduced and described herein.
Claims
1. A method for small target detection processing in high-resolution images, characterized in that, include: Obtain the image to be detected and the type of the target object; Extracting the size and pixel features of the image to be detected includes: clustering the pixels of the image to be detected based on the image coordinates and RGB values of each pixel, generating multiple clustering regions, wherein the pixel features of the image to be detected include multiple clustering regions; Based on the size and pixel features of the image to be detected and the type of the target to be detected, the optimal number of rows and columns in the blocks and the sliding window overlap parameters of the image to be detected are determined. Based on the optimal number of rows and columns in the block and the sliding window overlap parameters, the image to be detected is divided into multiple initial sub-images; Inverse compensation is performed on the edge sub-regions in multiple initial sub-region images to generate multiple sub-images, wherein any two sub-images have the same size; For each subgraph, a pre-trained YOLO object detection model is used to identify and label objects in the subgraph, generating object detection results for the subgraph. Based on the image location coordinates and target detection results of each sub-image, a global target detection result map is generated. Based on the size and pixel features of the image to be detected and the type of the detected target, the optimal number of rows and columns for each block of the image to be detected is determined, including: Based on the matching degree between cluster regions and detection target types, determine the cluster regions of interest; The number of rows and columns of the image to be detected is sampled from the range of values for the number of rows and columns. For each group of sampling blocks, the image to be detected is segmented based on the number of sampling blocks, and segmentation results are generated. Based on the segmentation results, the number of sub-images corresponding to each cluster region is determined. Based on the number of sub-images corresponding to each cluster region and the regional weight of the cluster region, the priority value of the number of sampling blocks is determined. The optimal number of rows and columns for the image to be detected is determined based on the priority value of the number of rows and columns in each sampled block. The priority value for the number of rows and columns in the sampling block is calculated using the following formula: in, The priority value for the number of rows and columns in the sampling block. Given the number of rows and columns in the sampled block, this represents the total number of sub-images obtained after segmenting the image to be detected. Let m be the region weight of the m-th cluster of interest. Let m be the number of subgraphs corresponding to the m-th cluster region of interest. This represents the total number of clusters of interest.
2. The method for small target detection processing in high-resolution images according to claim 1, characterized in that, Based on the size and pixel features of the image to be detected, as well as the type of the target object, the optimal number of rows and columns in the image to be detected and the sliding window overlap parameters are determined, including: Based on the type of target to be detected in the image, the region weight of each cluster region is determined; Based on the size characteristics of the image to be detected, the range of values for the number of rows and columns of the image to be detected is determined; Based on the region weight of each cluster region and the range of the number of rows and columns of the image to be detected, the optimal number of rows and columns of the image to be detected is determined. The sliding window overlap parameters of the image to be detected are determined based on the optimal number of rows and columns in the block.
3. The method for small target detection processing in high-resolution images according to claim 2, characterized in that, Based on the target type of the image to be detected, the region weight of each cluster region is determined, including: Based on the size features of the image to be detected and the type of the target to be detected, obtain the sample image set corresponding to the image to be detected; Based on the sample image set corresponding to the image to be detected and the target detection results of the sample image set corresponding to the image to be detected, the region size features and RGB features corresponding to the type of detected target are determined. For each cluster region, the matching degree between the cluster region and the target detection type is determined based on the number of pixels and RGB values included in the cluster region, as well as the region size features and RGB features corresponding to the target detection type. Based on the matching degree between the cluster region and the target detection type, the region weight of the cluster region is determined.
4. The method for small target detection processing in high-resolution images according to claim 3, characterized in that, Based on the optimal number of rows and columns in the image to be detected, the sliding window overlap parameters of the image to be detected are determined, including: Sample the sliding window overlap parameters from the preset set of sliding window overlap parameters; The image to be detected is segmented based on the optimal number of rows and columns in the block and the sampling sliding window overlap parameters, generating the segmentation result corresponding to the sampling sliding window overlap parameters. Based on the segmentation results corresponding to the sampling sliding window overlap parameters, determine the initial number of subgraphs corresponding to the sampling sliding window overlap parameters, the number of subgraphs corresponding to each cluster region, and the overlapping redundancy area. The sliding window overlap parameters of the image to be detected are determined based on the initial number of sub-images corresponding to the sampling sliding window overlap parameters, the number of sub-images corresponding to each cluster region, the region weight, and the overlapping redundancy area.
5. The method for small target detection processing in high-resolution images according to claim 4, characterized in that, Based on the number of sub-images, region weights, and overlapping redundancy area corresponding to each clustered region of the sampled sliding window overlap parameters, the sliding window overlap parameters of the image to be detected are determined, including: The particle swarm optimization algorithm is used to determine the sliding window overlap parameters of the image to be detected based on the number of initial sub-images corresponding to the sampling sliding window overlap parameters, the number of sub-images corresponding to each cluster region, the region weight, and the overlapping redundancy area.
6. A method for small target detection processing in high-resolution images according to any one of claims 2-5, characterized in that, Inverse compensation is performed on edge sub-regions in multiple initial sub-region images to generate multiple sub-region images, including: Based on multiple clustering regions, the reverse compensation method for edge sub-regions in multiple initial sub-region images is determined; Based on the reverse compensation method, the edge sub-regions in multiple initial sub-region images are reverse compensated to generate multiple sub-region images.
7. The method for small target detection processing in high-resolution images according to claim 6, characterized in that, Based on multiple clustering regions, the inverse compensation method for edge sub-regions in multiple initial sub-region images is determined, including: Based on multiple clustered regions, determine the association values between edge sub-regions and adjacent initial sub-regions; Based on the association value between the edge sub-region and the adjacent initial sub-region, the reverse compensation method is determined, wherein the reverse compensation method is either copy filling or zero filling.
8. A small target detection and processing system for high-resolution images, characterized in that, The method for small target detection in high-resolution images according to claim 1 includes: The data acquisition module is used to acquire the image to be detected and the type of the target to be detected; The feature extraction module is used to extract the size and pixel features of the image to be detected; The parameter determination module is used to determine the optimal number of rows and columns in the block and the sliding window overlap parameters of the image to be detected based on the size and pixel features of the image to be detected and the type of the target to be detected. The image segmentation module is used to divide the image to be detected into multiple initial sub-images based on the optimal number of rows and columns in the block and the sliding window overlap parameters. The image segmentation module is also used to perform reverse compensation on the edge sub-regions in multiple initial sub-region images to generate multiple sub-images, wherein any two sub-images have the same size. The object detection module is used to identify and label objects in each sub-graph using a pre-trained YOLO object detection model, and generate object detection results for the sub-graph. The target detection module is also used to generate a global target detection result map based on the image position coordinates of each sub-map and the target detection result.