Small target face detection method, device and equipment, storage medium and program product

By adaptively determining the slice size and using an image slicing and inference enhancement model, the problems of high computational cost and poor detection results in small target face detection are solved, achieving efficient and accurate small target face detection.

CN121545204BActive Publication Date: 2026-05-19XINHUA NEWS AGENCY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XINHUA NEWS AGENCY
Filing Date
2026-01-16
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies suffer from high computational complexity and low processing efficiency in small target face detection. Furthermore, the fixed segment size cannot flexibly adapt to changes in target scale in different images, resulting in poor detection performance, especially in images that are not small targets.

Method used

By detecting the proportion of face detection boxes in human images, the slice size is adaptively determined, and an image slicing and inference enhancement model is used to detect small target faces, avoiding unnecessary slicing and inference operations on non-small target images.

Benefits of technology

It improves the accuracy and efficiency of small target face detection, saves computing resources, ensures the recognition accuracy of small target faces, and avoids redundant calculations for non-small target images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121545204B_ABST
    Figure CN121545204B_ABST
Patent Text Reader

Abstract

The application discloses a small target face detection method and device, equipment, storage medium and program product, and is applied to the field of image detection. The method comprises the following steps: detecting a face in a person image to obtain a plurality of face detection boxes; for each face detection box, determining a proportion of the face detection box in the person image according to the size of the face detection box and the image size of the person image; determining a minimum proportion in a plurality of proportions; in the case that the minimum proportion is smaller than a preset size proportion threshold, determining a slice size of the person image according to the minimum proportion, the preset size proportion threshold and the image size; and performing small target face detection on the person image according to the slice size, an image slice and an inference enhancement model for small target detection to obtain a small target face detection result. According to the embodiment of the application, the precision and efficiency of small target face detection are improved, and the calculation resources are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of image detection technology, and in particular relates to a method, apparatus, device, computer storage medium and computer program product for small target face detection. Background Technology

[0002] Currently, images involving human figures encompass various shot sizes, including close-ups, medium shots, full shots, and long shots, with significant differences in facial scale. Small-target human images are more common in long-shot portraits and panoramic group photos. Small-target face detection solutions are used in various business operations such as image content review, content understanding, media asset management, and image screening.

[0003] For the problem of small-target face detection, the mainstream technical approach in the industry is image block detection. Image block detection, represented by SAHI (Slicing Aided Hyper Inference), improves the performance of small-target detection without changing the original model structure by dividing the input image into blocks, detecting each block sequentially, and then merging the results. The advantage of this method is its compatibility with existing detection models; it can be directly applied to general object detectors, ensuring detection performance even with small targets. However, its disadvantages are also significant: firstly, the block strategy leads to a substantial increase in computation, severely limiting processing efficiency, especially in large-scale data processing tasks where timeliness requirements are difficult to meet; secondly, the fixed block size cannot flexibly adapt to changes in target scale in different images, easily resulting in insufficient granularity or overly dense segmentation; thirdly, this method cannot distinguish between non-small targets in images, and segmenting such images can lead to the failure to recognize normal faces.

[0004] Therefore, there is an urgent need for a solution that can automatically determine whether to perform small target detection, while taking into account the accuracy of both general face and small target face detection, and controlling computational overhead and ensuring processing efficiency, so as to achieve efficient and reliable large-scale face detection and recognition in actual business. Summary of the Invention

[0005] This application provides a method, apparatus, device, computer storage medium, and computer program product for small target face detection, which can improve the accuracy and efficiency of small target face detection while saving computing resources.

[0006] On one hand, embodiments of this application provide a method for detecting small target faces, the method comprising:

[0007] Detect faces in a person image and obtain multiple face detection boxes;

[0008] For each face detection bounding box, the proportion of the face detection bounding box in the person image is determined based on the size of the face detection bounding box and the image size of the person image;

[0009] Determine the smallest percentage among multiple percentages;

[0010] If the minimum percentage is less than the preset size percentage threshold, the slice size of the person image is determined based on the minimum percentage, the preset size percentage threshold, and the size of the person image.

[0011] Based on the slice size and the image slice and inference enhancement model used for small target detection, small target face detection is performed on the human image to obtain the small target face detection results.

[0012] In some possible implementations, the slice size of the person image is determined based on the minimum proportion, a preset size proportion threshold, and the image size, including:

[0013] Based on the minimum proportion, the preset size proportion threshold, and the size of the person image, the slice size of the person image is determined using the following formula:

[0014]

[0015] in, δ represents the slice size; δ is the base value for the slice size. · This is the floor function. It is a very small constant. To be the minimum percentage, The preset size ratio threshold is used, where W is the width of the image of the person. The height of the figure.

[0016] In some possible implementations, the method also includes:

[0017] Obtain raw image samples;

[0018] The original image samples are scaled by multiple different scaling ratios in order of increasing scaling ratio to obtain multiple scaled image samples.

[0019] For each image sample in the original image sample and each scaled image sample, face detection is performed separately, and the face detection box and its size are obtained in the corresponding image sample.

[0020] For each image sample, the size proportion of the face detection box in the image sample is determined based on the size of the face detection box and the image size of the image sample;

[0021] Calculate the correlation index between each scaled face detection box and the baseline face detection box, where the baseline face detection box is the original face detection box in the original image sample.

[0022] Based on multiple correlation indicators and their corresponding size proportions, the relationship between the correlation indicators and the size proportions is fitted to obtain the fitted curve;

[0023] Identify the abrupt change points of the curve from the fitted curve;

[0024] The size percentage corresponding to the mutation point is determined as the preset size percentage threshold.

[0025] In some possible implementations, the correlation metric is distance, and the correlation metric between each scaled face detection bounding box and the baseline face detection bounding box is calculated separately, including:

[0026] Based on each scaled face detection bounding box, the scaled face region image is cropped from the corresponding scaled image sample;

[0027] Based on each scaled face detection box, extract scaled face features from each scaled face region image;

[0028] Calculate the distance between each scaled face feature and the baseline face feature, which is the face feature extracted from the original face region image in the original image sample based on the original face detection box.

[0029] In some possible implementations, the correlation metric is the intersection-union ratio (IURR), which is calculated for each scaled face detection bounding box and the baseline face detection bounding box, including:

[0030] Calculate the intersection-union ratio (IUU) between each face detection bounding box and the baseline face detection bounding box.

[0031] In some possible implementations, the abrupt change points of the curve are determined from the fitted curve, including:

[0032] In response to the input of a curve, determine the target curve segment in which the curve structure changes;

[0033] Based on the data points corresponding to the target curve segment, determine the search range of data points for the mutation point;

[0034] Based on the sliding window method and the data points within the search range, multiple progressive datasets are constructed;

[0035] Calculate the mean squared error for each asymptotic dataset, and the relative rate of change of the mean squared error between each pair of adjacent asymptotic datasets.

[0036] The last data point in the asymptotic dataset with the smallest mean squared error was identified as the first candidate mutation point, and the data point with the largest relative rate of change of mean squared error was identified as the second candidate mutation point.

[0037] The mutation point of the curve is determined based on the first candidate mutation point and the second candidate mutation point.

[0038] In some possible implementations, the abrupt change point of the curve is determined based on a first candidate mutation point and a second candidate mutation point, including:

[0039] Determine the proximity of the first and second candidate mutation points;

[0040] If the proximity of the positions is greater than the preset proximity, the first candidate mutation point or the second candidate mutation point will be determined as the mutation point of the curve.

[0041] If the proximity is greater than or equal to a preset proximity, determine two first adjacent progressive datasets that are adjacent to the progressive dataset where the first candidate mutation point is located; and determine two second adjacent progressive datasets that are adjacent to the progressive dataset where the second candidate mutation point is located.

[0042] Linear regression was performed on the data points of the two first adjacent asymptotic datasets to obtain two first linear regression models, and linear regression was performed on the data points of the two second adjacent asymptotic datasets to obtain two second linear regression models.

[0043] Determine the first residual distribution for each of the two first linear regression models, and determine the second residual distribution for each of the two second linear regression models;

[0044] From the first residual distribution and the second residual distribution, identify the target mutation point whose residual distribution before the candidate mutation point is small and random, and whose residual distribution after the candidate mutation point is large and different from the pattern before the candidate mutation point.

[0045] The target mutation point is determined as the mutation point of the curve.

[0046] In some possible implementations, small-object face detection is performed on a person image based on the slice size and the image slices used for small object detection, along with an inference enhancement model, to obtain small-object face detection results, including:

[0047] The image of the person is sliced ​​according to the slice size, the overlap ratio of the slice images, and the image size of the person image to obtain multiple slice images;

[0048] Face detection is performed on each slice image separately to obtain the face detection results for each slice image;

[0049] The face detection results of each slice image are mapped to the coordinates of the person image to obtain the small target face detection results of the person image.

[0050] In some possible implementations, the slice size includes the slice width; the person image is sliced ​​according to the slice size, the overlap ratio of the slice images, and the image size of the person image, resulting in multiple slice images, including:

[0051] The number of slices is determined using the following formula, based on the slice size, the overlap ratio of the slice images, and the image size of the person:

[0052]

[0053] in, W is the number of slices; H is the width of the image; W is the height of the image. To correct the parameters; This is the width of the pre-slice;

[0054] Based on the slice size and number of slices, the image of the person is sliced ​​to obtain multiple slice images.

[0055] On the other hand, embodiments of this application provide a small target face detection device, the device comprising:

[0056] The detection module is used to detect faces in human images and obtain multiple face detection boxes;

[0057] The determination module is used to determine the proportion of each face detection box in the image of the person, based on the size of the face detection box and the image size of the person image.

[0058] The determination module is also used to determine the minimum percentage among multiple percentages;

[0059] The determination module is also used to determine the slice size of the human image based on the minimum percentage, the preset size percentage threshold, and the size of the human image when the minimum percentage is less than the preset size percentage threshold.

[0060] The detection module is also used to perform small target face detection on human images based on the slice size and the image slice and inference enhancement model used for small target detection, and obtain small target face detection results.

[0061] In another aspect, embodiments of this application provide a small target face detection device, which includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the small target face detection method as described above.

[0062] In another aspect, embodiments of this application provide a computer storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, they implement the small target face detection method described above.

[0063] In another aspect, embodiments of this application provide a computer program product in which instructions are executed by the processor of an electronic device, enabling the electronic device to perform the small target face detection method described above.

[0064] The small-target face detection method, apparatus, device, computer storage medium, and computer program product of this application embodiment, when performing small-target face detection on a person image, first detects faces in the person image to obtain multiple face detection boxes; then, for each face detection box, determines the proportion of the face detection box in the person image based on the size of the face detection box and the image size of the person image; then, further determines the minimum proportion among the multiple proportions; then, if the minimum proportion is less than a preset size proportion threshold, determines the slice size of the person image based on the minimum proportion, the preset size proportion threshold, and the person image size; finally, performs small-target face detection on the person image based on the slice size and the image slice and inference enhancement model used for small-target detection to obtain the small-target face detection result. One aspect of this method is the proportion of the face detection box in the person image. The size of the face detection bounding box is determined based on the size of the person image. This method, by quantitatively analyzing the proportion of the face detection bounding box in the person image, ensures that the face target in subsequent image slices is not smaller than the minimum size that the inference enhancement model can effectively recognize, thus guaranteeing the accuracy of small target face detection. On the other hand, this method uses a preset size proportion threshold. Minimum face size in a portrait image By comparing the results, the method can intelligently determine whether to enable the small target face detection process. Furthermore, when using the small target face detection process to detect faces, the optimal slice size of the human image is adaptively determined based on the minimum proportion, the preset size proportion threshold, and the size of the human image. This effectively avoids unnecessary slicing and inference operations on non-small target images (i.e., normal human images) performed by traditional methods such as SAHI (Slicing Aided HyperInference, an image slicing and inference enhancement method for small target detection), thus avoiding redundant calculations and improving face detection efficiency. Therefore, this method saves computational resources while ensuring the accuracy of small target face detection.

[0065] In this application, all actions to acquire signals, information, or data are carried out in compliance with the relevant data protection laws and policies of the country where the location is situated, and with the authorization granted by the owner of the relevant device. Attached Figure Description

[0066] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0067] Figure 1 This is a flowchart illustrating a small-target face detection method provided in one embodiment of this application;

[0068] Figure 2 This is a schematic flowchart of S170 provided in one embodiment of this application;

[0069] Figure 3 This is a schematic diagram of the process for determining a preset size ratio threshold provided in one embodiment of this application;

[0070] Figure 4 This is a schematic diagram illustrating the relationship between the accuracy of a face detection model and the proportion of a face image provided in one embodiment of this application;

[0071] Figure 5 This is a schematic diagram illustrating the relationship between face similarity and the proportion of face images provided in one embodiment of this application;

[0072] Figure 6 This is a flowchart illustrating S250 provided in one embodiment of this application;

[0073] Figure 7 This is a schematic flowchart of S270 provided in one embodiment of this application;

[0074] Figure 8 This is a flowchart illustrating S2706 provided in one embodiment of this application;

[0075] Figure 9 This is a schematic diagram of the structure of a small target face detection device provided in another embodiment of this application;

[0076] Figure 10 This is a schematic diagram of the structure of a small target face detection device provided in another embodiment of this application. Detailed Implementation

[0077] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0078] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0079] Before introducing the embodiments of this application, the terminology involved in the embodiments of this application will be introduced first:

[0080] SAHI: Slicing Aided Hyper Inference, an image slicing and inference enhancement method for small object detection.

[0081] Piece inference involves subdividing a large or high-resolution image into smaller segments (slices), performing object detection on these slices, and then recompiling these slices to reconstruct the object locations on the original image. This technique is invaluable when computational resources are limited or when processing extremely high-resolution images that could lead to memory issues. The advantages of piece inference are as follows: 1. Reduced computational burden: Smaller image slices are processed faster and consume less memory, allowing for smoother operation on lower-end hardware. 2. Maintained detection quality: Because each slice is processed independently, the quality of object detection is not degraded, provided the slice is large enough to capture the object of interest. 3. Enhanced scalability: This technique allows for easier scaling of object detection across images of different sizes and resolutions, making it ideal for a variety of applications, from satellite imagery to medical diagnostics.

[0082] The ratio of the maximum side length of a single face bounding box to the maximum side length of the image is used to measure the relative size of a face in an image.

[0083] All faces in an image The minimum value.

[0084] : Causes facial recognition to fail Critical value.

[0085] The size of the image slice in the SAHI method is determined by the current image size and The calculation yielded the result.

[0086] IoU: Intersection over Union, used to evaluate the degree of overlap between the detected bounding box and the ground truth bounding box.

[0087] ArcFace: An open-source face recognition model based on deep convolutional neural networks.

[0088] Res100: An ArcFace pre-trained face recognition model that uses the Res100 residual network as the backbone network.

[0089] NMS: Non-Maximum Suppression, is an algorithm used in the post-processing stage to filter candidate boxes generated by object detection models. Its core purpose is to eliminate redundant and highly overlapping predicted boxes for the same detected object, ultimately retaining only the most reliable and accurately positioned prediction result for each object.

[0090] The existing SAHI method has the following drawbacks in small target face detection: First, the block segmentation strategy leads to a significant increase in computation, which severely restricts processing efficiency, especially in large-scale data processing tasks where it is difficult to meet timeliness requirements; Second, the fixed block size cannot flexibly adapt to changes in target scale in different images, which can easily result in insufficient segmentation granularity or overly dense segmentation; Third, this method cannot distinguish non-small target images, and if segmentation is performed on them, normal faces will not be recognized.

[0091] To address the problems of the prior art, embodiments of this application provide a method, apparatus, device, computer storage medium, and computer program product for small target face detection. The method for small target face detection provided in this application embodiment will be described first below.

[0092] Figure 1 A flowchart illustrating a small-target face detection method according to an embodiment of this application is shown. Figure 1As shown, the small target face detection method of this application embodiment includes steps S110-S170.

[0093] S110. Detect faces in the image of a person and obtain multiple face detection boxes.

[0094] For example, if an image contains multiple faces, to quickly determine the number of faces, the image can be input into a benchmark face detection model (such as YOLOv7-Face, RetinaFace, etc.) for initial inference. The face detection model outputs the positions of the faces in the image, resulting in multiple face detection boxes. These boxes are typically represented by rectangles, and the position of each box can be determined by the coordinates of its top-left and bottom-right corners. Sure.

[0095] It should be noted that the position of the face detection bounding box is the data basis for subsequent calculation of the proportion of the face detection bounding box to the person image.

[0096] S120. For each face detection bounding box, determine the proportion of the face detection bounding box in the person image based on the size of the face detection bounding box and the image size of the person image.

[0097] For example, for each face detection bounding box, the size of the face detection bounding box can be based on the coordinates of the face detection bounding box output by a preset face detection model. Sure,( () represents the coordinates of the top-left corner of the face detection bounding box. This represents the coordinates of the bottom right corner of the face detection bounding box.

[0098] For example, for each face detection bounding box, the proportion of the face detection bounding box in the image of the person is determined. When the face detection bounding box is at its maximum size, it can be obtained by comparing the maximum side size of the face detection bounding box with the maximum side size of the person image, as shown in the following formula:

[0099]

[0100] in, This indicates the maximum side length of the currently detected face bounding box, ensuring that the face detection box can cover the face. This represents the ratio of the current face size to the current person image, where W represents the width of the person image and H represents the length of the person image. This represents the longest side of the image of the person. The width and length of the image can be represented in pixels.

[0101] For example, it can be obtained from the following formula :

[0102]

[0103] It should be noted that by determining the proportion of the face detection box in the image of a person, a standardized face size ratio that is independent of the size of the image can be obtained. This allows the algorithm to use the same threshold to determine whether a face in an image of different resolution is a "small target".

[0104] S130. Determine the smallest percentage among multiple percentages.

[0105] For example, for multiple faces detected in a person image, the value of each face is calculated. Find the minimum value among the values, and denote it as . :

[0106]

[0107] It should be noted that the accuracy of face detection in human images is often affected by the smallest face. Therefore, it can be... This serves as a key indicator for determining whether to enable the small target detection process.

[0108] S140. Determine whether the minimum percentage is less than the preset size percentage threshold.

[0109] For example, Compared with the threshold determined in advance through experiments Comparison, This is the critical point where the model performance begins to decline sharply. If the minimum proportion is not less than the preset size proportion threshold, execute S150; if the minimum proportion is less than the preset size proportion threshold, execute S160.

[0110] S150, Output face detection results.

[0111] exist > In this case, it indicates that all faces in the image are large enough that the baseline face model can handle face detection effectively. Therefore, the small object detection process in SAHI can be omitted, and the face detection results can be output directly. This filters out non-small object images, saving significant computational resources.

[0112] S160. Determine the slice size of the person image based on the minimum proportion, the preset size proportion threshold, and the size of the person image.

[0113] exist < In this case, enable SAHI's small target detection workflow.

[0114] When small object detection needs to be enabled, in order for faces to appear large enough in the slice sub-image (i.e., their proportion must be at least 10%), ), can be based on Adaptive calculation of optimal slice size .

[0115] As one embodiment, S160 may include:

[0116] Based on the minimum proportion, the preset size proportion threshold, and the size of the person image, the slice size of the person image is determined using the following formula:

[0117]

[0118] in, δ represents the slice size; δ is the base slice size. · This is the floor function. It is a very small constant. To be the minimum percentage, The preset size ratio threshold is used, where W is the width of the image of the person. The height of the figure.

[0119] It should be noted that δ is the slice size base, which can also be called the window size base. In order to ensure that the slice image of the person image has enough detection space, in this embodiment of the application, as a more specific example, δ can be 80. · The function is a floor function, where ε is a very small constant. As a more concrete example, ε can be 0.0001 to avoid rounding to a value of 1. The slice size obtained in the above manner... This ensures that in the sliced ​​image Approximating, but not less than, the slice image. This effectively avoids the problems of slices being too small (high computational load) and slices being too large (poor detection effect) caused by fixed slice sizes, thus ensuring detection and recognition accuracy, while minimizing the number of slices and saving computational load.

[0120] S170. Based on the slice size and the image slice and inference enhancement model used for small target detection, perform small target face detection on the human image to obtain the small target face detection result.

[0121] For example, after obtaining the optimal slice size Then, based on the slice size, the length and width of the slice are determined, and the SAHI algorithm flow is input to perform subsequent operations such as image slicing, slice image (sub-image) detection, and result fusion to complete the detection process of small target faces.

[0122] On the one hand, the proportion of face detection boxes in the image of a person in this method. The size of the face detection bounding box is determined based on the size of the person image. This method quantitatively analyzes the proportion of the face detection bounding box in the person image to ensure that the face target in subsequent image slices is not smaller than the minimum size that the model can effectively recognize, thus ensuring the accuracy of small target face detection. On the other hand, this method uses a preset size proportion threshold. Minimum face size in a portrait image By comparing the results, the method can intelligently determine whether to enable the small target face detection process. Furthermore, when using the small target face detection process to detect faces, the optimal slice size of the human image is adaptively determined based on the minimum proportion, the preset size proportion threshold, and the size of the human image. This effectively avoids unnecessary slicing and inference operations on non-small target images (i.e., normal human images) performed by traditional methods such as SAHI, fundamentally eliminating redundant calculations and improving face detection efficiency. Therefore, this method achieves the goal of saving computational resources while ensuring the accuracy of small target face detection.

[0123] As one example, such as Figure 2 As shown, S170 may include:

[0124] S1701. Slice the image of the person into multiple slices according to the slice size, the overlap ratio of the slice images, and the image size of the person image.

[0125] For example, the slice size may include the slice width;

[0126] As one embodiment, S1701 may include:

[0127] The number of slices is determined using the following formula, based on the slice size, the overlap ratio of the slice images, and the image size of the person:

[0128]

[0129] in, W is the number of slices; H is the width of the image; W is the height of the image. To correct the parameters; This represents the width of the pre-slice.

[0130] It should be noted that, This parameter, also known as the overlap ratio of the slice image, represents the proportion of overlap that adjacent slices need to have. Its value ranges from 0 to 1; for a more concrete example, it can be 0.2. Setting the overlap ratio of the slice image is primarily to prevent faces from being cut off at slice boundaries, avoiding the situation where a face is divided into different slices, thus ensuring that each complete face can at least appear completely in the central region of a slice.

[0131] After determining the slice size and number of slices, the image of the person is sliced ​​according to the image size of the person, thus obtaining multiple slice images.

[0132] S1702. Perform face detection on each slice image to obtain the face detection result for each slice image.

[0133] After obtaining multiple slice images, each slice image is input into the baseline face detection model for inference. The model outputs the coordinates of the detected face bounding boxes in each slice image, which are relative to the coordinate system of that slice image itself.

[0134] S1703. Map the face detection results of each slice image to the coordinates of the person image to obtain the small target face detection results of the person image.

[0135] Since the face bounding box coordinates in the face detection results of each slice image are local coordinates relative to their respective slice images, it is also necessary to map the face detection results of each slice image to the global coordinates of the person image.

[0136] For example, during coordinate mapping, the coordinates of the face bounding boxes within each slice can be translated based on the starting position (offset_x, offset_y) of each slice in the original image. For instance, the global x-coordinate of the face detection box = the slice's starting x + the x-coordinate of the face detection box within the slice. Then, all the mapped face detection boxes are combined.

[0137] It should be noted that since the same face target may be repeatedly detected by multiple adjacent overlapping slices, multiple highly overlapping detection boxes will be generated in the original image coordinate system. Post-processing algorithms such as non-maximum suppression (NMS) are also required to filter out redundant face detection boxes, so that only the most accurate and highest confidence detection box is retained for each real face.

[0138] To determine the preset size ratio threshold, such as Figure 3 As shown, the method may further include steps S210-S280.

[0139] S210. Obtain the original image sample.

[0140] For example, in order to improve detection accuracy, the original image sample, as the reference image, needs to have a high resolution to ensure that the face in the image is clear enough; the face size should be large, and the face should initially occupy a large proportion of the image to ensure that the face can still be detected with high quality in the initial scaling stage; in order to enhance generalization, the sample should include faces of different genders, ages and skin colors.

[0141] S220. Scale the original image samples by multiple different scaling ratios in order of increasing scaling ratio to obtain multiple scaled image samples.

[0142] For example, image samples can be scaled proportionally, generating a continuous sequence of images with decreasing face size by gradually increasing the scaling ratio (i.e., gradually reducing the relative proportion of the face in the image). As a more concrete example, a proportional edge pixel padding operation can be performed on each image, reducing the proportion of the face image in the overall image by 0.2% after each padding operation, until the proportion of the face image in the overall image drops to approximately 1%. This creates a single variable in the sequence where the only changing element is the size proportion of the face in the image. The clarity of the face and identity information remain unchanged.

[0143] S230. For each image sample in the original image sample and each scaled image sample, perform face detection to obtain the face detection box and its size in the image sample.

[0144] For example, the original image and all scaled images can be input one by one into the face detection model to be calibrated to perform face detection and obtain the coordinates of the face detection bounding boxes output by the model. By collecting the model's output at different scales, a data foundation is provided for subsequent model performance analysis.

[0145] S240. For each image sample, determine the size ratio of the face detection box in the image sample based on the size of the face detection box and the image size of the image sample.

[0146] For each image sample, calculate the size proportion of the face detection box within the image sample based on the size of the face detection box and the image size of the image sample. , The calculation method is the same as the formula above.

[0147] S250. Calculate the correlation index between each scaled face detection box and the baseline face detection box.

[0148] For example, the baseline face detection box is the original face detection box in the original image sample, and the relevance metrics can be distance or Intersection over Union (IoU). IoU measures the degree of overlap between the scaled detection box's position and size and the baseline box; a smaller value indicates less accurate localization. Distance can be feature distance (or Euclidean distance). The face regions cropped from the scaled image and the original image are input into the face recognition model to extract features, and then the distance between the two feature vectors is calculated. A larger distance indicates a higher probability that the recognition model considers these to be two different faces, suggesting that the degraded detection box quality has severely affected recognition.

[0149] S260. Based on multiple correlation indicators and their respective size proportions, fit the relationship between the correlation indicators and the size proportions to obtain the fitted curve.

[0150] It should be noted that, as Figure 4 As shown, Figure 4 This illustrates the relationship between the accuracy of the face detection model and the proportion of faces in the image, where the horizontal axis represents the size proportion and the vertical axis represents the accuracy metric of the face detection model (such as IoU). From Figure 4 As can be seen, as the proportion of the face gradually decreases, the IoU shows an approximately linear decreasing trend, and the detection accuracy gradually decreases with the decrease in the proportion of the face. This indicates that there is no situation that causes a large fluctuation in recognition accuracy during the detection stage. The reason for the large fluctuation in recognition accuracy may lie in the feature matching stage. Experiments found that as the proportion of the face decreases, the fitting curve of the correlation index (face recognition similarity evaluation index, such as distance L1) shows nonlinear fluctuations and oscillations locally, such as... Figure 5 As shown, Figure 5 This is a schematic diagram of the fitted curve, used to represent the relationship between face similarity and the proportion of the face image, where the horizontal axis represents the size proportion and the vertical axis represents the similarity to the reference face (L1). According to... Figure 5 It can be seen that when When the value is large, the face recognition similarity evaluation index (L1) is small; the smaller the value, the more similar the face recognition model (the region of good face recognition model performance, i.e., the face recognition model has high recognition accuracy); as... As the proportion of faces decreases, within the general range of face proportions, the face recognition similarity (L1) decreases. It decreases and rises gradually, but the L1 distance remains within an acceptable range; however, when When the face size becomes extremely small (at point C), the L1 oscillation exhibits nonlinear fluctuations with increasing amplitude, and the L1 distance continuously exceeds the acceptable range, indicating that the model's recognition ability completely fails under these extreme face-small conditions. Correspondingly, the curve will show an "inflection point (at point C)" or a "cliff-like drop" (a region of rapid performance deterioration). This inflection point C is the critical position where the model's performance changes from quantitative to qualitative change; this "mutation point" is the signal that the model has begun to fail.

[0151] S270. Determine the abrupt change points of the curve from the fitted curve.

[0152] Please continue reading Figure 5 , Figure 5 Point C in the middle is the point of abrupt change in the curve.

[0153] S280. Determine the size percentage corresponding to the mutation point as the preset size percentage threshold.

[0154] Read the value corresponding to the mutation point C on the X-axis (size percentage axis). This value is the preset size percentage threshold. .

[0155] By constructing a quantitative relationship curve between "face size ratio and model performance" and accurately identifying performance mutation points, a preset threshold can be achieved. The determination of the threshold is based on objective data rather than subjective experience, fundamentally ensuring the scientific nature and accuracy of the subsequent adaptive judgment module (whether to enable small object detection), and avoiding misjudgments (failing to enable when it should) or resource waste (enabling when it shouldn't) caused by improper threshold settings. Furthermore, this method fully considers that different face detection models have different performance boundaries due to differences in their structure and training data. Through experimental calibration on specific models currently in actual use, the obtained... The optimal threshold is tailored to the model, thereby maximizing its potential and ensuring that the entire adaptive detection system achieves the best balance between accuracy and efficiency.

[0156] In this embodiment of the application, the relevance index can be distance or intersection-union ratio. When the relevance index is distance, such as... Figure 6 As shown, S250 may include:

[0157] S2501. Based on each scaled face detection box, crop the scaled face region image from the corresponding scaled image sample.

[0158] For each scaled image sample, the detected face bounding box in the image is used as the cropping region. The face portion is cropped from the original image to form individual face images of different sizes.

[0159] S2502. Extract scaled face features from each scaled face region image based on each scaled face detection box.

[0160] Each cropped face image is input into a pre-defined face recognition model (such as ArcFace, FaceNet, etc.). The model outputs a fixed-length, high-dimensional mathematical vector, which is the "facial feature," representing the deep identity information of the person in the image.

[0161] S2503. Calculate the distance between each scaled face feature and the baseline face feature. The baseline face feature is the face feature extracted from the original face region image in the original image sample based on the original face detection box.

[0162] After obtaining each scaled face feature and the baseline face feature, the "distance" between each scaled face feature and the baseline feature is calculated. This distance can be measured using L1 distance, L2 distance (Euclidean distance), or cosine distance, etc. The larger the distance, the greater the difference between the two faces in the model's view.

[0163] By incorporating performance metrics of the face recognition model into the determination of the face detection threshold, and by calculating feature distance, it is possible to assess whether the image content within the detection box is sufficient to support high-precision face recognition, thereby enabling the final determination of the threshold. It can ensure the effectiveness of detection and identification.

[0164] When the correlation metric is the crossover-union ratio, S250 can include:

[0165] Calculate the intersection-union ratio (IoU) between each face detection bounding box and the baseline face detection bounding box. The formula is as follows:

[0166]

[0167] Where A is the bounding box region of the real face, and B is the bounding box region of the model inference. The intersection of the bounding box region representing the real human face and the bounding box region representing the model's inference. The union of the bounding box region representing the real human face and the bounding box region of the model's inference.

[0168] Meanwhile, the detected face regions are input into the face recognition model to extract features, and the Euclidean distance (L1 distance) is calculated with the baseline face features as a face recognition similarity evaluation index.

[0169]

[0170] Where A and B are the N-dimensional facial feature vectors obtained by the face recognition model through inference calculation of the reference baseline image and the image after edge filling, respectively. Used to assess similarity, ranging from 0 to positive infinity, with smaller values ​​indicating greater similarity.

[0171] By directly measuring the degree of overlap between the detection box and the ground truth (reference box), the determined threshold directly corresponds to the critical point at which the model's localization accuracy begins to decline sharply. This allows the system to activate augmented detection in a timely manner at this critical point, thereby ensuring the accuracy of face detection task localization in the most direct and effective way.

[0172] As one example, such as Figure 7 As shown, S270 may include:

[0173] S2701. In response to the input of a curve, determine the target curve segment in which the curve structure changes.

[0174] For example, the target curve segment can be a transition from linear to nonlinear. scope.

[0175] S2702. Determine the search range of data points for the mutation point based on the data points corresponding to the target curve segment.

[0176] The search range for structural transition points is set to the observation points from the Kth to the (K+Nth)th (i.e. (A range from large to small), which encompasses potential transition areas inferred based on graphical analysis.

[0177] S2703. Based on the sliding window method and the data points within the data point search range, construct multiple progressive datasets.

[0178] Use the sliding window method to construct multiple progressive datasets:

[0179] D1: Contains the first K data points ( The largest K points), i.e., D : {(x ,y ), (x ,y ), ...,(xk,yk}

[0180] D2: Contains the first K+1 data points, i.e., D : {(x ,y ), (x ,y ), ..., (xk+1yk+1)}

[0181]

[0182] DN: Contains the first K+N data points, i.e., DN: {(x ,y ), (x ,y ), ..., (xk+Nyk+N)}

[0183] S2704. Calculate the mean squared error for each asymptotic dataset and the relative rate of change of the mean squared error between each pair of adjacent asymptotic datasets.

[0184] For each dataset D Fitting a univariate linear regression model:

[0185]

[0186] in , The parameters are polynomials, and the mean squared error (MSE) is used as the evaluation index for the model fit.

[0187] S2705. The last data point in the asymptotic dataset with the smallest mean square error is determined as the first candidate mutation point, and the data point with the largest relative rate of change of mean square error is determined as the second candidate mutation point.

[0188] Based on the absolute and relative criteria, the two complementary criteria are derived... .

[0189] Absolute criterion: Select the endpoint corresponding to the dataset that minimizes the MSE value (i.e., the smallest MSE value in that dataset). The value is used as a candidate inflection point, i.e., the first candidate mutation point; relative criterion: calculate the relative change rate of MSE of adjacent datasets (i.e., (MSE_{i+1}-MSE_i) / MSE_i), and select the point with the largest change rate as the verification inflection point, i.e., the second candidate mutation point.

[0190] S2706. Determine the mutation point of the curve based on the first candidate mutation point and the second candidate mutation point.

[0191] By employing a series of standardized mathematical operations, including sliding windowing and calculating the mean squared error (MSE) and its relative rate of change, the identification of abrupt change points is transformed into a quantifiable and repeatable automated process. This eliminates the randomness and bias caused by subjective human judgment, greatly improving the accuracy and reliability of threshold determination.

[0192] As one example, such as Figure 8 As shown, S2706 may include:

[0193] Determine the proximity of the first and second candidate mutation points;

[0194] If the proximity of the positions is greater than the preset proximity, the first candidate mutation point or the second candidate mutation point will be determined as the mutation point of the curve.

[0195] If the proximity is no greater than a preset proximity, determine two first adjacent progressive datasets that are adjacent to the progressive dataset where the first candidate mutation point is located; and determine two second adjacent progressive datasets that are adjacent to the progressive dataset where the second candidate mutation point is located.

[0196] Linear regression was performed on the data points of the two first adjacent asymptotic datasets to obtain two first linear regression models, and linear regression was performed on the data points of the two second adjacent asymptotic datasets to obtain two second linear regression models.

[0197] Determine the first residual distribution for each of the two first linear regression models, and determine the second residual distribution for each of the two second linear regression models;

[0198] From the first residual distribution and the second residual distribution, identify the target mutation point whose residual distribution before the candidate mutation point is small and random, and whose residual distribution after the candidate mutation point is large and different from the pattern before the candidate mutation point.

[0199] The target mutation point is determined as the mutation point of the curve.

[0200] For example, when determining the abrupt change point of the curve based on the first candidate abrupt change point and the second candidate abrupt change point, the two candidate abrupt change points are compared. If the similarity in position is greater than a preset similarity, that is, if the two candidate abrupt change points are identical or close, then the first candidate abrupt change point or the second candidate abrupt change point can be determined as the abrupt change point of the curve. .

[0201] If the similarity in location is no greater than a preset similarity, in order to confirm The validity of the calculation results is assessed through residual analysis, comparing the differences in residual distribution patterns before and after the inflection point. Linear regression is performed on the two datasets before and after the inflection point, and the residual distributions are compared. If the residuals before the inflection point are small and random, while the residuals after the inflection point are large and exhibit different patterns, then the inflection point is identified as a point of abrupt change in the curve.

[0202] A two-level decision-making process is constructed by calculating the proximity of the first candidate mutation point (absolute criterion) and the second candidate mutation point (relative criterion). When the two are consistent, confirmation is made quickly; when they are divergent, a more complex residual analysis is initiated. This structured judgment logic enables the method to efficiently process ideal data and handle complex scenarios with gently changing curves and multiple potential mutation points, significantly improving the method's adaptability and robustness.

[0203] The small-target face detection method, apparatus, device, computer storage medium, and computer program product of this application embodiment, when performing small-target face detection on a person image, first detects faces in the person image to obtain multiple face detection boxes; then, for each face detection box, determines the proportion of the face detection box in the person image based on the size of the face detection box and the image size of the person image; then, further determines the minimum proportion among the multiple proportions; then, if the minimum proportion is less than a preset size proportion threshold, determines the slice size of the person image based on the minimum proportion, the preset size proportion threshold, and the person image size; finally, performs small-target face detection on the person image based on the slice size and the image slice and inference enhancement model used for small-target detection to obtain the small-target face detection result. One aspect of this method is the proportion of the face detection box in the person image. The size of the face detection bounding box is determined based on the size of the person image. This method, by quantitatively analyzing the proportion of the face detection bounding box in the person image, ensures that the face target in subsequent image slices is not smaller than the minimum size that the inference enhancement model can effectively recognize, thus guaranteeing the accuracy of small target face detection. On the other hand, this method uses a preset size proportion threshold. Minimum face size in a portrait image By comparing the results, the method can intelligently determine whether to enable the small target face detection process. Furthermore, when using the small target face detection process to detect faces, the optimal slice size of the human image is adaptively determined based on the minimum proportion, the preset size proportion threshold, and the size of the human image. This effectively avoids unnecessary slicing and inference operations on non-small target images (i.e., normal human images) as in traditional methods such as SAHI, thus avoiding redundant calculations and improving face detection efficiency. Therefore, this method saves computational resources while ensuring the accuracy of small target face detection.

[0204] Based on the small target face detection method provided in the above embodiments, this application also provides specific implementation methods of a small target face detection device. Please refer to the following embodiments.

[0205] First see Figure 9 The small target face detection device 900 provided in this application embodiment includes the following modules:

[0206] Detection module 910 is used to detect faces in human images and obtain multiple face detection boxes;

[0207] The determination module 920 is used to determine the proportion of the face detection box in the person image for each face detection box, based on the size of the face detection box and the image size of the person image.

[0208] Module 920 is also used to determine the minimum percentage among multiple percentages;

[0209] The determination module 920 is also used to determine the slice size of the human image based on the minimum percentage, the preset size percentage threshold, and the size of the human image when the minimum percentage is less than the preset size percentage threshold.

[0210] The detection module 910 is also used to perform small target face detection on the human image based on the slice size and the image slice and inference enhancement model used for small target detection, and obtain the small target face detection result.

[0211] In some possible implementations, module 920 is also used for:

[0212] Based on the minimum proportion, the preset size proportion threshold, and the size of the person image, the slice size of the person image is determined using the following formula:

[0213]

[0214] in, δ represents the slice size; δ is the base slice size. · This is the floor function. It is a very small constant. To be the minimum percentage, The preset size ratio threshold is used, where W is the width of the image of the person. The height of the figure.

[0215] In some possible implementations, module 920 is also used for:

[0216] Obtain raw image samples;

[0217] The original image samples are scaled by multiple different scaling ratios in order of increasing scaling ratio to obtain multiple scaled image samples.

[0218] For each image sample in the original image sample and each scaled image sample, face detection is performed separately, and the face detection box and its size are obtained in the corresponding image sample.

[0219] For each image sample, the size proportion of the face detection box in the image sample is determined based on the size of the face detection box and the image size of the image sample;

[0220] Calculate the correlation index between each scaled face detection box and the baseline face detection box, where the baseline face detection box is the original face detection box in the original image sample.

[0221] Based on multiple correlation indicators and their corresponding size proportions, the relationship between the correlation indicators and the size proportions is fitted to obtain the fitted curve;

[0222] Identify the abrupt change points of the curve from the fitted curve;

[0223] The size percentage corresponding to the mutation point is determined as the preset size percentage threshold.

[0224] In some possible implementations, the correlation metric is distance, and the correlation metric between each scaled face detection bounding box and the baseline face detection bounding box is calculated separately, including:

[0225] Based on each scaled face detection bounding box, the scaled face region image is cropped from the corresponding scaled image sample;

[0226] Based on each scaled face detection box, extract scaled face features from each scaled face region image;

[0227] Calculate the distance between each scaled face feature and the baseline face feature, which is the face feature extracted from the original face region image in the original image sample based on the original face detection box.

[0228] In some possible implementations, the correlation metric is the intersection-union ratio (IURR), which is calculated for each scaled face detection bounding box and the baseline face detection bounding box, including:

[0229] Calculate the intersection-union ratio (IUU) between each face detection bounding box and the baseline face detection bounding box.

[0230] In some possible implementations, the abrupt change points of the curve are determined from the fitted curve, including:

[0231] In response to the input of a curve, determine the target curve segment in which the curve structure changes;

[0232] Based on the data points corresponding to the target curve segment, determine the search range of data points for the mutation point;

[0233] Based on the sliding window method and the data points within the search range, multiple progressive datasets are constructed;

[0234] Calculate the mean squared error for each asymptotic dataset, and the relative rate of change of the mean squared error between each pair of adjacent asymptotic datasets.

[0235] The last data point in the asymptotic dataset with the smallest mean squared error was identified as the first candidate mutation point, and the data point with the largest relative rate of change of mean squared error was identified as the second candidate mutation point.

[0236] The mutation point of the curve is determined based on the first candidate mutation point and the second candidate mutation point.

[0237] In some possible implementations, module 920 is also used for:

[0238] Determine the proximity of the first and second candidate mutation points;

[0239] If the proximity of the positions is greater than the preset proximity, the first candidate mutation point or the second candidate mutation point will be determined as the mutation point of the curve.

[0240] If the proximity is greater than or equal to a preset proximity, determine two first adjacent progressive datasets that are adjacent to the progressive dataset where the first candidate mutation point is located; and determine two second adjacent progressive datasets that are adjacent to the progressive dataset where the second candidate mutation point is located.

[0241] Linear regression was performed on the data points of the two first adjacent asymptotic datasets to obtain two first linear regression models, and linear regression was performed on the data points of the two second adjacent asymptotic datasets to obtain two second linear regression models.

[0242] Determine the first residual distribution for each of the two first linear regression models, and determine the second residual distribution for each of the two second linear regression models;

[0243] From the first residual distribution and the second residual distribution, identify the target mutation point whose residual distribution before the candidate mutation point is small and random, and whose residual distribution after the candidate mutation point is large and different from the pattern before the candidate mutation point.

[0244] The target mutation point is determined as the mutation point of the curve.

[0245] In some possible implementations, the detection module 910 is also used for:

[0246] The image of the person is sliced ​​according to the slice size, the overlap ratio of the slice images, and the image size of the person image to obtain multiple slice images;

[0247] Face detection is performed on each slice image separately to obtain the face detection results for each slice image;

[0248] The face detection results of each slice image are mapped to the coordinates of the person image to obtain the small target face detection results of the person image.

[0249] In some possible implementations, the slice size includes the slice width; the person image is sliced ​​according to the slice size, the overlap ratio of the slice images, and the image size of the person image, resulting in multiple slice images, including:

[0250] The number of slices is determined using the following formula, based on the slice size, the overlap ratio of the slice images, and the image size of the person:

[0251]

[0252] in, W is the number of slices; H is the width of the image; W is the height of the image. To correct the parameters; This is the width of the pre-slice;

[0253] Based on the slice size and number of slices, the image of the person is sliced ​​to obtain multiple slice images.

[0254] The various modules of the small target face detection device provided in this application embodiment can achieve Figure 1 The functions of each step in the provided small target face detection method, and the corresponding technical effects, will not be elaborated here for the sake of brevity.

[0255] Figure 10 A schematic diagram of the hardware structure of the small target face detection device provided in an embodiment of this application is shown.

[0256] The small target face detection device may include a processor 1001 and a memory 1002 storing computer program instructions.

[0257] Specifically, the processor 1001 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0258] Memory 1002 may include mass storage for data or instructions. For example, and not limitingly, memory 1002 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 1002 may include removable or non-removable (or fixed) media. Where appropriate, memory 1002 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 1002 is non-volatile solid-state memory.

[0259] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the methods according to one aspect of this disclosure.

[0260] The processor 1001 reads and executes computer program instructions stored in the memory 1002 to implement any of the small target face detection methods in the above embodiments.

[0261] In one example, the small target face detection device may further include a communication interface 1003 and a bus 1010. For example, Figure 10 As shown, the processor 1001, memory 1002, and communication interface 1003 are connected through bus 1010 and complete communication with each other.

[0262] The communication interface 1003 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0263] Bus 1010 includes hardware, software, or both, that couples components of a device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 1010 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.

[0264] Furthermore, in conjunction with the small target face detection method in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the small target face detection methods in the above embodiments.

[0265] This application also provides a computer program product, including a computer program that, when executed, implements any of the small target face detection methods described in the above embodiments.

[0266] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0267] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0268] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0269] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0270] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A method for detecting small-target faces, characterized in that, include: Detect faces in a person image and obtain multiple face detection boxes; For each face detection bounding box, the proportion of the face detection bounding box in the person image is determined based on the size of the face detection bounding box and the image size of the person image; Determine the smallest percentage among the multiple stated percentages; If the minimum proportion is less than a preset size proportion threshold, the slice size of the person image is determined based on the minimum proportion, the preset size proportion threshold, and the size of the person image. Based on the slice size and the image slice and inference enhancement model used for small target detection, small target face detection is performed on the person image to obtain small target face detection results; Determining the slice size of the person image based on the minimum proportion, the preset size proportion threshold, and the person image size includes: Based on the minimum proportion, the preset size proportion threshold, and the size of the person image, the slice size of the person image is determined using the following formula: in, δ represents the slice size; δ is the base value for the slice size. · This is the floor function. It is a very small constant. To be the minimum percentage, Where W is the width of the image of the person, and W is the preset size ratio threshold. The height of the image of the person is given.

2. The small target face detection method according to claim 1, characterized in that, The method further includes: Obtain raw image samples; The original image samples are scaled by multiple different scaling ratios in ascending order of scaling ratio to obtain multiple scaled image samples. For each image sample in the original image sample and each of the scaled image samples, face detection is performed to obtain the face detection box and its size in the image sample. For each image sample, the size proportion of the face detection box in the image sample is determined based on the size of the face detection box and the image size of the image sample; Calculate the correlation index between each scaled face detection box and the baseline face detection box, where the baseline face detection box is the original face detection box in the original image sample. Based on the multiple correlation indicators and their respective size proportions, the relationship between the correlation indicators and the size proportions is fitted to obtain the fitted curve; Determine the abrupt change points of the curve from the fitted curve; The size percentage corresponding to the mutation point is determined as a preset size percentage threshold.

3. The method for small target face detection according to claim 2, characterized in that, The correlation index is distance. The calculation of the correlation index between each scaled face detection bounding box and the baseline face detection bounding box includes: Based on each scaled face detection bounding box, the scaled face region image is cropped from the corresponding scaled image sample; Based on each of the scaled face detection boxes, scaled face features are extracted from each of the scaled face region images; Calculate the distance between each scaled face feature and the baseline face feature, which is the face feature extracted from the original face region image in the original image sample based on the original face detection box.

4. The method for detecting small target faces according to claim 2, characterized in that, The correlation metric is the intersection-union ratio (IURR). The calculation of the correlation metric between each scaled face detection bounding box and the baseline face detection bounding box includes: Calculate the intersection-union ratio (IUU) between each face detection bounding box and the baseline face detection bounding box.

5. The method for detecting small target faces according to claim 2, characterized in that, Determining the abrupt change points of the curve from the fitted curve includes: In response to the input of the curve, the target curve segment in which the curve structure changes is determined; Based on the data points corresponding to the target curve segment, determine the search range of data points for the mutation point; Based on the sliding window method and the data points within the search range of the data points, multiple progressive datasets are constructed; Calculate the mean squared error for each of the progressive datasets, and the relative rate of change of the mean squared error between each pair of adjacent progressive datasets; The last data point in the asymptotic dataset with the smallest mean square error is determined as the first candidate mutation point, and the data point with the largest relative rate of change of mean square error is determined as the second candidate mutation point. Based on the first candidate mutation point and the second candidate mutation point, the mutation point of the curve is determined.

6. The method for detecting small target faces according to claim 5, characterized in that, The step of determining the abrupt change point of the curve based on the first candidate abrupt change point and the second candidate abrupt change point includes: Determine the similarity in location between the first candidate mutation point and the second candidate mutation point; If the positional similarity is greater than a preset similarity, the first candidate mutation point or the second candidate mutation point is determined as the mutation point of the curve; If the proximity of the locations is not greater than a preset proximity, two first adjacent progressive datasets are determined that are adjacent to the progressive dataset where the first candidate mutation point is located; and two second adjacent progressive datasets are determined that are adjacent to the progressive dataset where the second candidate mutation point is located. Linear regression was performed on the data points of the two first adjacent asymptotic datasets to obtain two first linear regression models, and linear regression was performed on the data points of the two second adjacent asymptotic datasets to obtain two second linear regression models. Determine the first residual distribution for each of the two first linear regression models, and determine the second residual distribution for each of the two second linear regression models; From the first residual distribution and the second residual distribution, determine the target mutation point whose residual distribution before the candidate mutation point is small and random, and whose residual distribution after the candidate mutation point is large and different from the pattern before the candidate mutation point; The target mutation point is determined as the mutation point of the curve.

7. The method for small target face detection according to any one of claims 1-6, characterized in that, The step of performing small target face detection on the person image based on the slice size and the image slice and inference enhancement model used for small target detection, to obtain small target face detection results, includes: The image of the person is sliced ​​according to the slice size, the overlap ratio of the slice images, and the image size of the person image to obtain multiple slice images; Face detection is performed on each of the slice images to obtain the face detection result for each slice image; The face detection results of each slice image are mapped to the coordinates of the person image to obtain the small target face detection results of the person image.

8. The method for detecting small target faces according to claim 7, characterized in that, The slice size includes the slice width; the process of slicing the person image according to the slice size, the overlap ratio of the slice images, and the image size of the person image to obtain multiple slice images includes: The number of slices is determined according to the following formula, based on the slice size, the overlap ratio of the slice images, and the image size of the person image: in, W is the number of slices; H is the width of the image; W is the height of the image. To correct the parameters; This is the width of the pre-slice; Based on the slice size and number of slices, the image of the person is sliced ​​to obtain multiple slice images.

9. A small target face detection device, characterized in that, include: The detection module is used to detect faces in human images and obtain multiple face detection boxes; The determination module is used to determine the proportion of each face detection box in the image of the person, based on the size of the face detection box and the image size of the person image. The determining module is also used to determine the minimum percentage among the plurality of said percentages; The determining module is further configured to determine the slice size of the person image based on the minimum percentage, the preset size percentage threshold, and the person image size when the minimum percentage is less than the preset size percentage threshold. The detection module is also used to perform small target face detection on the person image based on the slice size and the image slice and inference enhancement model for small target detection, and obtain small target face detection results; The determination module is also used for: Based on the minimum proportion, the preset size proportion threshold, and the size of the person image, the slice size of the person image is determined using the following formula: in, δ represents the slice size; δ is the base value for the slice size. · This is the floor function. It is a very small constant. To be the minimum percentage, Where W is the width of the image of the person, and W is the preset size ratio threshold. The height of the image of the person is given.

10. A small-target face detection device, characterized in that, The device includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the small target face detection method as described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the small target face detection method as described in any one of claims 1-8.

12. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device is able to perform the small target face detection method as described in any one of claims 1-8.