Target detection method, system, medium and electronic equipment

By performing point set transformation and clustering on image point sets, key features are extracted, and combined with Transformer Encoder and MLP models, the problem of poor computing resource consumption and small object detection effects in high-resolution images is solved, and efficient object detection is achieved.

CN119723066BActive Publication Date: 2025-08-15SHANGHAI MIDU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510231043.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-08-15
Estimated Expiration
2045-02-28

AI Technical Summary

Technical Problem

The prior art consumes a lot of computing resources in high-resolution image processing and is not effective when detecting small or dense targets in complex scenarios.

Method used

By performing several point set transformations on the point set, normalized position and pixel features are extracted, the clustering algorithm is used to identify the position cluster, and the pixel cluster is formed through similarity calculation. The target point set is obtained based on the index of the center point of the pixel cluster, and finally the object detection results are generated using the Transformer Encoder and MLP models.

Benefits of technology

The data dimension is reduced, the model's ability to identify targets in the image is improved, the accuracy of detection of small and dense targets in complex scenarios is enhanced, and the consumption of computing resources is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723066B_ABST
    Figure CN119723066B_ABST
Patent Text Reader

Abstract

The present application provides a target detection method, system, medium and electronic device. The target detection method includes: performing several point set transformations on a point set to obtain a target point set; processing the target point set to obtain a feature map; obtaining a target detection result according to the feature map; wherein the input point set of the first point set transformation is the image to be detected, the input point set of the remaining point set transformations is the output point set of the previous point set transformation, and the output point set of the last point set transformation is the target point set; the process of the point set transformation includes: obtaining normalized position features and normalized pixel features according to the input point set; clustering the normalized position features to obtain position clusters; performing similarity calculation on the normalized pixel features and the position clusters, and obtaining pixel clusters according to the calculation results; obtaining the output point set according to the index of the center point in the pixel cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer vision technology and relates to a target detection method, system, medium and electronic equipment. Background Art

[0002] Object detection is a computer vision technology that plays a key role in fields such as autonomous driving, video surveillance, image analysis, and robotic navigation. Object detection aims to identify and locate objects of interest in images or videos. This process involves not only detecting the presence of one or more objects in the image, but also determining their precise location. Furthermore, it requires the ability to identify the object's category and accurately depict its location and range within the image. However, existing technologies often consume a large amount of computing resources when processing high-resolution images and perform poorly when detecting small or densely packed objects in complex scenes. Summary of the Invention

[0003] The purpose of this application is to provide a target detection method, system, medium and electronic equipment for improving target detection accuracy.

[0004] In the first aspect, the present application provides a target detection method, which includes: performing several point set transformations on a point set to obtain a target point set; processing the target point set to obtain a feature map; obtaining a target detection result based on the feature map; wherein, the input point set of the first point set transformation is the image to be detected, the input point set of the remaining point set transformations is the output point set of the previous point set transformation, and the output point set of the last point set transformation is the target point set; the point set transformation process includes: obtaining normalized position features and normalized pixel features based on the input point set; clustering the normalized position features to obtain position clusters; performing similarity calculation on the normalized pixel features and the position clusters, and obtaining pixel clusters based on the calculation results; obtaining the output point set based on the index of the center point in the pixel cluster.

[0005] In an implementation of the first aspect, the process of obtaining normalized position features and normalized pixel features based on an input point set includes: obtaining a position point set and a pixel point set based on the input point set; performing feature extraction on the position point set and the pixel point set to obtain position features and pixel features; and normalizing the position features and the pixel features to obtain the normalized position features and the normalized pixel features.

[0006] In an implementation of the first aspect, the process of clustering the normalized location features to obtain location clusters includes: clustering the normalized location features using a kmeans clustering algorithm to obtain the location clusters.

[0007] In an implementation of the first aspect, the process of performing similarity calculation on the normalized pixel features and the position clusters and obtaining pixel clusters based on the calculation results includes: performing cosine similarity calculation on the normalized pixel features and the center points of the position clusters, and clustering the pixel features into multiple pixel clusters based on the calculated cosine similarity.

[0008] In an implementation of the first aspect, the process of obtaining the target point set according to the index of the center point in the pixel cluster includes: selecting points with the same index in the pixel point set as the target point set according to the index of the center point in the pixel cluster.

[0009] In an implementation of the first aspect, the process of processing the target point set to obtain the feature map includes: inputting the target point set into a Transformer Encoder module to obtain the feature map.

[0010] In an implementation of the first aspect, the process of obtaining the target detection result based on the feature map includes: processing the feature map using the MLP model to obtain the rectangular box coordinates and the probability distribution; and obtaining the target detection result based on the rectangular box coordinates and the probability distribution.

[0011] In the second aspect, the present application provides a target detection system, which includes: a point set processing module, which is used to perform several point set transformations on the point set to obtain a target point set; a feature map acquisition module, which is used to process the target point set to obtain a feature map; a target detection result acquisition module, which is used to obtain the target detection result based on the feature map; wherein, the input point set of the first point set transformation is the image to be detected, the input point set of the remaining point set transformations is the output point set of the previous point set transformation, and the output point set of the last point set transformation is the target point set; the process of the point set transformation includes: obtaining normalized position features and normalized pixel features based on the input point set; clustering the normalized position features to obtain position clusters; performing similarity calculation on the normalized pixel features and the position clusters, and obtaining pixel clusters based on the calculation results; obtaining the output point set based on the index of the center point in the pixel cluster.

[0012] In a third aspect, the present application provides an electronic device, comprising: a memory on which a computer program is stored; and a processor, communicatively connected to the memory, for executing the computer program to implement the above-mentioned target detection method.

[0013] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned target detection method when executed by an electronic device.

[0014] As described above, the target detection method, system, medium, and electronic device described in this application have the following beneficial effects:

[0015] (1) Through point set transformation, the model can extract important position and pixel features from the original image and perform normalization, which helps the model better understand and distinguish different visual objects.

[0016] (2) Using clustering algorithms to cluster location features can identify important spatial regions, namely location clusters. This method helps reduce the data dimension and emphasize the most representative features.

[0017] (3) By calculating the similarity between pixel features and the center of the location cluster, the pixel features can be clustered into pixel clusters, which further enhances the model's ability to recognize targets in the image.

[0018] (4) According to the index of the center point of the pixel cluster, a target point set is selected. The target point set contains the most representative points in the image, providing a streamlined and effective data input for subsequent feature map generation and target detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 Shown is a schematic diagram of an application scenario of the target detection method described in an embodiment of the present application.

[0020] Figure 2 Shown is a schematic diagram of the target detection process described in an embodiment of the present application.

[0021] Figure 3 Shown is a schematic diagram of the point set transformation process described in an embodiment of the present application.

[0022] Figure 4 Shown is a schematic diagram of the process of obtaining normalized position features and normalized pixel features as described in an embodiment of the present application.

[0023] Figure 5 Shown is a schematic diagram of the process of obtaining target detection results described in an embodiment of the present application.

[0024] Figure 6 Shown is a structural schematic diagram of the target detection system described in an embodiment of the present application.

[0025] Figure 7 Shown is a structural schematic diagram of an electronic device described in an embodiment of the present application.

[0026] Component number description

[0027] 11. Cell Phone

[0028] 12 tablets

[0029] 13 laptops

[0030] 2 Object Detection System

[0031] Blackjack collection processing module

[0032] 22 Feature Map Acquisition Module

[0033] 23 Target detection result acquisition module

[0034] 3 Electronic devices

[0035] 31 Memory

[0036] 32 processors

[0037] Steps S11~S13

[0038] Steps S21~S24

[0039] Steps S31~S33

[0040] Steps S41~S42 DETAILED DESCRIPTION

[0041] The following describes the embodiments of the present application through specific examples. Those skilled in the art can easily understand the other advantages and effects of the present application from the content disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.

[0042] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. Therefore, the illustrations only show components related to the present application and are not drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.

[0043] Object detection is a computer vision technology that plays a key role in fields such as autonomous driving, video surveillance, image analysis, and robotic navigation. Object detection aims to identify and locate objects of interest in images or videos. This process involves not only detecting the presence of one or more objects in the image, but also determining their precise location. Furthermore, it requires the ability to identify the object's category and accurately depict its location and range within the image. However, existing technologies often consume a large amount of computing resources when processing high-resolution images and perform poorly when detecting small or densely packed objects in complex scenes.

[0044] At least to address the above problems, the following embodiments of the present application provide a target detection method that can be applied to Figure 1 Electronic devices shown.

[0045] The electronic devices described in this application may include mobile phones 11, tablet computers 12, laptop computers 13, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc. with wireless charging function. The embodiments of this application do not impose any restrictions on the specific types of electronic devices.

[0046] For example, the electronic device may be a station (STAION, ST) in a WLAN with a wireless charging function, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a personal digital assistant (PDA) device, a handheld device with a wireless charging function, a computing device or other processing device, a computer, a laptop computer, a handheld communication device, a handheld computing device, and / or other devices for communicating on a wireless system and a next-generation communication system, such as a mobile terminal in a 5G network, a mobile terminal in a future-evolved public land mobile network (PLMN), or a mobile terminal in a future-evolved non-terrestrial network (NTN).

[0047] For example, the electronic device can communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS can include Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), Beidou Navigation Satellite System (BDS), Quasi-Zenith Satellite System (QZSS) and / or Satellite Based Augmentation Systems (SBAS).

[0048] The technical solutions in the embodiments of the present application will be described in detail below with reference to the accompanying drawings in the embodiments of the present application.

[0049] Figure 2 The following is a schematic diagram of the target detection process in one embodiment of the present application. Figure 2 As shown, the target detection method includes:

[0050] S11, perform several point set transformations on the point set to obtain a target point set. The point set is input into the point set transformation module, and multiple point set transformations are performed on the point set using the input cluster to obtain the target point set. The input point set of the first point set transformation is the image to be detected, the input point set of the subsequent point set transformations is the output point set of the previous point set transformation, and the output point set of the last point set transformation is the target point set.

[0051] Specifically, the image to be detected is cropped to a height multiplied by a width of 224 * 224, i.e., the image point set includes 224 * 224 points. The number of input clusters is ( (h / / 2), (w / / 2) ) = 112 * 112 = 12544. Here, / / represents division and rounding. The number of point set transformations is, for example, three, but this application is not limited to this. The number of input clusters changes with each point set transformation. The number of points in the point set is the same as the number of input clusters.

[0052] For example, the image to be detected can be treated as a pixel set and subjected to three point set transformations to obtain a target point set. The image to be detected, with an (h, w) value of (224, 224), is input to the first point set transformation module. This is combined with a first input cluster of ((h / / 2), (w / / 2)) for point set processing, resulting in a first output point set. The first output point set is used as the input point set for the second point set transformation and input to the second point set transformation module. This is combined with a second input cluster of ((h / / 4), (w / / 4)) for point set processing, resulting in a second output point set. The second output point set is used as the input point set for the third point set transformation and input to the third point set transformation module. This is combined with a third input cluster of ((h / / 16), (w / / 16)) for point set processing, resulting in a third output point set, which is used as the target point set. Each point set transformation module reduces the number of input clusters by half, enabling feature aggregation and reducing computational complexity.

[0053] S12: Process the target point set to obtain a feature map.

[0054] S13: Obtain target detection results according to the feature map.

[0055] Figure 3 The diagram shows the process of point set transformation in one embodiment of the present application. Figure 3 As shown, the process of point set transformation includes:

[0056] S21, obtaining normalized position features and normalized pixel features according to the input point set.

[0057] S22: Clustering the normalized location features to obtain location clusters.

[0058] S23, performing similarity calculation on the normalized pixel features and the position cluster, and obtaining a pixel cluster according to the calculation result.

[0059] S24: Obtain an output point set according to the index of the center point in the pixel cluster.

[0060] According to the above description, the target detection method provided by the embodiment of the present application can extract important positions and pixel features from the original image according to the point set transformation, perform normalization processing, and use a clustering algorithm to cluster the position features, thereby identifying important spatial regions, namely position clusters, which helps to reduce the data dimension and emphasize the most representative features. By calculating the similarity between the pixel features and the center of the position cluster, the pixel features can be clustered into pixel clusters, which further enhances the model's ability to recognize targets in the image. According to the index of the center point of the pixel cluster, a target point set is selected, and the target point set contains the most representative points in the image, thereby improving the accuracy of target detection.

[0061] Figure 4 The diagram shows a process of obtaining normalized position features and normalized pixel features in an embodiment of the present application. Figure 4 As shown in FIG, the process of obtaining normalized position features and normalized pixel features based on the input point set includes:

[0062] S31: Obtain a position point set and a pixel point set based on the input point set. Split the input point set into a position point set and a pixel point set. The position point set consists of h * w vectors, each with two elements (one for the X-axis relative position coordinate and the other for the Y-axis relative position coordinate). When the image height h and width w are both 4, the position point set consists of 4 * 4 = 16 vectors, where the X-axis position = X-axis index / / width, and the Y-axis position value = Y-axis index / / height. The pixel point set consists of h * w vectors, each with three elements (RGB values).

[0063] Exemplarily, the input point set (h * w) is split to obtain a position point set (h * w, 2) and a pixel point set (h * w, 3).

[0064] S32: Perform feature extraction on the position point set and the pixel point set to obtain position features and pixel features.

[0065] S33 , performing normalization processing on the position feature and the pixel feature to obtain the normalized position feature and the normalized pixel feature.

[0066] For example, a transformer encoder block is used to extract features from a set of position points to obtain position features, and the position features are normalized using a sigmoid function to obtain normalized position features. The shape of the normalized position features is (h * w, D), where D represents the dimension of the feature.

[0067] The process of extracting positional features from a set of positional points using the Transformer Encoder module involves position encoding the input for each position in the set and calculating attention weights between different positions using a self-attention mechanism. This self-attention mechanism captures the associations between different positions in the image point set, and the neural network within the Transformer Encoder applies nonlinear transformations to each position in the image point set. The multiple encoding layers within the Transformer Encoder enable in-depth feature extraction from the image point set. The sigmoid function is an activation function that processes positional features individually, mapping the original positional feature values to a range between 0 and 1.

[0068] The transformer encoder block is used to extract pixel features from a set of pixels. These features are then normalized using the L2 norm to produce normalized pixel features. The shape of the normalized pixel features is (h*w, D). The L2 norm is a measure of the feature vector, expressed as the square root of the sum of the squares of the elements of the feature vector. Each pixel feature is normalized using the L2 norm, normalizing its length to 1, ensuring uniform scaling across different pixel features.

[0069] In one embodiment of the present application, clustering the normalized location features to obtain location clusters includes: clustering the normalized location features to obtain the location clusters. Based on N input clusters, clustering the normalized location features using a kmeans clustering algorithm to obtain N location clusters. Each input cluster includes a number of points.

[0070] Exemplarily, during the first point set transformation, the normalized position feature with a shape of (h*w, D) and N input clusters are clustered using the kmeans clustering algorithm to obtain N position clusters with a shape of (N, 2).

[0071] In one embodiment of the present application, the process of performing similarity calculation on the normalized pixel features and the position clusters and obtaining pixel clusters based on the calculation results includes: performing cosine similarity calculation on the normalized pixel features and the center points of the position clusters, and clustering the pixel features into multiple pixel clusters based on the calculated cosine similarity.

[0072] For example, during the first point set transformation, cosine similarity is calculated based on the normalized pixel features of shape (h*w, D) and N position clusters of shape (N, 2), to obtain N pixel clusters of shape (N, 3). Each pixel cluster includes a number of points.

[0073] In one embodiment of the present application, the process of obtaining the target point set according to the index of the center point in the pixel cluster includes: selecting points with the same index in the pixel point set as the target point set according to the index of the center point in the pixel cluster.

[0074] For example, each pixel in the pixel set is associated with a unique position index (for example, the pixel index in the first point set transformation module is 0 to h * w), and this index remains unchanged during the processing. During the clustering process, each cluster is composed of multiple pixel features, but the center point feature of each cluster is unique. Through the index of this center point, we can retrieve the corresponding pixel point from the original pixel set, thereby constructing a new point set containing the same number of pixels as the number of center points, that is, N center points correspond to N pixels. By referencing the index of the center point of the pixel cluster, we can filter out the corresponding pixel points from the pixel set to form a new set as the target point set. This process ensures that the structure of the output point set is consistent with the input cluster structure. Each cluster center point represents the feature of a pixel point, realizing the aggregation and abstraction of features.

[0075] In one embodiment of the present application, the process of processing the target point set to obtain the feature map includes: inputting the target point set into a Transformer Encoder module to obtain the feature map.

[0076] Exemplarily, the target point set is processed using the Transformer Encoder block to obtain a feature map with a shape of ((h / / 16) * (w / / 16), D).

[0077] Figure 5 The following is a schematic diagram of the process of obtaining target detection results in one embodiment of the present application. Figure 5 As shown, the process of obtaining the target detection result according to the feature map includes:

[0078] S41, using an MLP (Multilayer Perceptron) model to process the feature map to obtain rectangular frame coordinates and probability distribution.

[0079] For example, each point in the feature map may correspond to an object in the image to be tested. Two different MLP models are used to process the feature map to obtain the box and class. Among them, the first MLP is used to predict the parameters of the bounding box corresponding to these points, usually including the center position, width, height and possible rotation angle of the bounding box. The output of the MLP will undergo some necessary post-processing steps, such as decoding and non-maximum suppression (NMS), to generate the final bounding box prediction result. Box can be expressed as [x-axis upper left corner coordinate, y-axis upper left corner coordinate, x-axis lower right corner coordinate, y-axis lower right corner coordinate]. The second MLP is used to predict the category of the object in each bounding box, and the output is a vector, each element of which corresponds to a different category, and the value of the element represents the probability of belonging to the category.

[0080] S42, obtaining the target detection result based on the rectangular frame coordinates and the probability distribution. By applying a softmax function to the output vector, it can be converted into a probability distribution, thereby selecting the category with the highest probability as the prediction result.

[0081] For example, if the probability distribution of the target category is [0.5, 0.3, 0.1], the index with the largest probability value is selected as the target detection result.

[0082] In summary, the target detection method provided by this application can view an image as a collection of points, use the Transformer Encoder module to learn the feature representation between pixels, cluster similar pixel features through the kmeans clustering algorithm, and transition from the original pixel points to the center point after clustering, thereby reducing the dimension and number of points of the data and improving the processing efficiency of high-resolution images. And through the MLP model, the targets in the image are more accurately located and classified, realizing the recognition and detection of small targets and dense targets in complex scenes. Through this method, the model can improve the detection accuracy of small targets and dense targets in complex scenes while reducing the consumption of computing resources, especially in high-resolution images. And according to different application scenarios and needs, by adjusting the number and parameters of the point set transformation, it can flexibly adapt to various target detection tasks.

[0083] The protection scope of the target detection method described in the embodiment of the present application is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the existing technology based on the principles of the present application are included in the protection scope of the present application.

[0084] An embodiment of the present application also provides a target detection system, which can implement the target detection method described in the present application. However, the implementation device of the target detection method described in the present application includes but is not limited to the structure of the target detection system listed in this embodiment. All structural deformations and replacements of the existing technology made according to the principles of the present application are included in the protection scope of the present application.

[0085] Figure 6 Shown is a schematic diagram of the structure of the target detection system in one embodiment of the present application. Figure 6 As shown, the target detection system 2 includes: a point set processing module 21, a feature map acquisition module 22, and a target detection result acquisition module 23. The point set processing module 21 is used to perform several point set transformations on the point set to obtain a target point set. The feature map acquisition module 22 is used to process the target point set to obtain a feature map. The target detection result acquisition module 23 is used to obtain a target detection result based on the feature map. The input point set of the first point set transformation is the image to be detected, the input point set of the remaining point set transformations is the output point set of the previous point set transformation, and the output point set of the last point set transformation is the target point set. The process of the point set transformation includes: obtaining normalized position features and normalized pixel features based on the input point set; clustering the normalized position features to obtain position clusters; performing similarity calculation on the normalized pixel features and the position clusters, and obtaining pixel clusters based on the calculation results; and obtaining the output point set based on the index of the center point in the pixel cluster.

[0086] It should be noted that Figure 6 The modules in the target detection system 2 are shown in FIG. Figure 2 The steps in the target detection method correspond to each other and are not described in detail here.

[0087] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices or methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules / units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules or units, which can be electrical, mechanical or other forms.

[0088] The modules / units described as separate components may or may not be physically separate, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present application. For example, the functional modules / units in the various embodiments of the present application may be integrated into a processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into a single module / unit.

[0089] Those skilled in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0090] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements the target detection method provided by the present invention. Those skilled in the art will appreciate that all or part of the steps in implementing the method of the above embodiment can be performed by instructing the processor through a program. The program can be stored in a computer-readable storage medium, which is a non-transitory medium, such as random access memory, read-only memory, flash memory, a hard disk, a solid-state drive, magnetic tape, a floppy disk, an optical disc, or any combination thereof. The storage medium can be any available medium accessible by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0091] An embodiment of the present application may also provide an electronic device. Figure 7 The diagram shows the structure of the electronic device 3 in one embodiment of the present application. Figure 7 As shown, in this embodiment, the electronic device 3 includes a memory 31 and a processor 32.

[0092] The memory 31 is used to store computer programs. In some possible implementations, the memory 31 may include various media that can store program codes, such as ROM, RAM, a magnetic disk, a USB flash drive, a memory card, or an optical disk.

[0093] In the embodiments of the present application, the memory 31 may include computer-readable media in the form of volatile memory, such as RAM and / or cache memory. The electronic device 3 may further include other removable / non-removable, volatile / non-volatile computer system storage media. The memory 31 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the various embodiments of the present application.

[0094] The processor 32 is connected to the memory 31 and is used to execute the computer program stored in the memory 31 so that the electronic device 3 performs the target detection method.

[0095] Illustratively, the processor 32 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. In other embodiments, the processor 22 may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0096] The descriptions of the processes or structures corresponding to the above figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0097] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by one of ordinary skill in the art without departing from the spirit and technical concepts disclosed in this application shall be covered by the claims of this application.

Claims

1. A target detection method, characterized in that: The target detection method comprises: Perform several point set transformations on the point set to obtain the target point set; Processing the target point set to obtain a feature map; Obtaining a target detection result according to the feature map; The input point set of the first point set transformation is the image to be detected, the input point set of the remaining point set transformations is the output point set of the previous point set transformation, and the output point set of the last point set transformation is the target point set. The process of point set transformation includes: Split the input point set (h*w) to obtain the position point set (h*w,2) and the pixel point set (h*w,3); where h is the height of the image to be detected and w is the width of the image to be detected; the position point set (h*w,2) means that the position point set consists of h*w vectors, each vector has 2 elements, one is the relative position coordinate on the X axis, and the other is the relative position coordinate on the Y axis; the pixel point set (h*w,3) means that the pixel point set consists of h*w vectors, each vector has 3 elements - RGB values; Perform feature extraction on the position point set (h*w,2) and the pixel point set (h*w,3) to obtain position features and pixel features; Normalizing the position feature and the pixel feature to obtain a normalized position feature with a shape of (h*w, D) and a normalized pixel feature with a shape of (h*w, D); wherein D represents the dimension of the feature; Clustering the normalized location features to obtain location clusters; Performing similarity calculation on the normalized pixel features and the position cluster, and obtaining a pixel cluster according to the calculation result; According to the index of the center point in the pixel cluster, the output point set is obtained.

2. The target detection method according to claim 1, wherein: The process of clustering the normalized location features to obtain location clusters includes: clustering the normalized location features using a kmeans clustering algorithm to obtain the location clusters.

3. The target detection method according to claim 1, wherein: The process of performing similarity calculation on the normalized pixel features and the position clusters and obtaining pixel clusters based on the calculation results includes: performing cosine similarity calculation on the normalized pixel features and the center points of the position clusters, and clustering the pixel features into multiple pixel clusters based on the calculated cosine similarity.

4. The target detection method according to claim 1, wherein: The process of obtaining the target point set according to the index of the center point in the pixel cluster includes: selecting points with the same index as the target point set according to the index of the center point in the pixel cluster.

5. The target detection method according to claim 1, wherein: The process of processing the target point set to obtain the feature map includes: inputting the target point set into a Transformer Encoder module to obtain the feature map.

6. The target detection method according to claim 1, wherein: The process of obtaining the target detection result according to the feature map includes: Processing the feature map using the MLP model to obtain rectangular frame coordinates and probability distribution; The target detection result is obtained according to the rectangular frame coordinates and the probability distribution.

7. A target detection system, characterized in that: The target detection system comprises: A point set processing module is used to perform several point set transformations on the point set to obtain a target point set; A feature map acquisition module, configured to process the target point set to obtain a feature map; A target detection result acquisition module, configured to acquire a target detection result based on the feature map; The input point set of the first point set transformation is the image to be detected, the input point set of the remaining point set transformations is the output point set of the previous point set transformation, and the output point set of the last point set transformation is the target point set. The process of point set transformation includes: Split the input point set (h*w) to obtain the position point set (h*w,2) and the pixel point set (h*w,3); where h is the height of the image to be detected and w is the width of the image to be detected; the position point set (h*w,2) means that the position point set consists of h*w vectors, each vector has 2 elements, one is the relative position coordinate on the X axis, and the other is the relative position coordinate on the Y axis; the pixel point set (h*w,3) means that the pixel point set consists of h*w vectors, each vector has 3 elements - RGB values; Perform feature extraction on the position point set (h*w,2) and the pixel point set (h*w,3) to obtain position features and pixel features; Normalizing the position features and the pixel features to obtain a normalized position feature with a shape of (h*w, D) and a normalized pixel feature with a shape of (h*w, D); wherein D represents the dimension of the feature; clustering the normalized position features to obtain a position cluster; Performing similarity calculation on the normalized pixel features and the position cluster, and obtaining a pixel cluster according to the calculation result; According to the index of the center point in the pixel cluster, the output point set is obtained.

8. An electronic device, characterized in that: The electronic device comprises: a memory having a computer program stored thereon; A processor is communicatively connected to the memory, and is used to execute the computer program to implement the target detection method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by an electronic device, the target detection method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Neural network training method for target detection and target detection method and device

    CN112446396A

  • Target tracking method and system, medium and electronic equipment

    CN118587624A