Target detection method, electronic device and computer readable storage medium
By acquiring and processing structured information in the object detection system, building feature maps and matching targets, the problems of high cost and low accuracy of target detection in the prior art are solved, and more efficient target detection is achieved.
Patent Information
- Application Number
- CN202510157869.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-02-13
AI Technical Summary
The prior art is difficult to effectively reduce detection costs and improve accuracy in target detection, especially when multiple devices work together, which can easily lead to target matching errors and increased network bandwidth requirements.
By obtaining the structured information in the target scene sent by the front-end device, and building a feature map in the edge device, using the structured information of the target to be detected and the reference target to be matched, the position of the target in the global coordinate system is determined, which reduces the data transmission cost and improves the detection accuracy.
This method reduces data transmission costs by only obtaining structured information without the need for original images, improves the accuracy of object detection, and supports multi-device collaborative work.
Smart Images

Figure CN119649016B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a target detection method, an electronic device, and a computer-readable storage medium. Background Art
[0002] As the requirements for image processing accuracy continue to increase, how to coordinate multiple devices to complete the detection of full-view targets is a key technology. A real target may need to be associated with targets from multiple perspectives. If there is an error in the matching of multi-perspective targets, it will affect the effect of target fusion, resulting in low target detection accuracy. In addition, the more devices are connected, the higher the requirements for network and bandwidth will become, resulting in higher and higher target detection costs. Therefore, how to reduce the detection cost of target detection and improve the accuracy of target detection has become an urgent problem to be solved. Summary of the invention
[0003] The main technical problem solved by the present application is to provide a target detection method, an electronic device and a computer-readable storage medium, which can reduce the detection cost of target detection and improve the accuracy of target detection.
[0004] To solve the above technical problems, the first aspect of the present application provides a target detection method, which is applied to an edge device in a target detection system, wherein the target detection system includes an edge device and multiple front-end devices, and the method includes: obtaining structured information matching a target in a target scene sent by the front-end device; wherein the structured information is related to the attributes of the target and the position of the target in a global coordinate system, and the global coordinate system corresponds to the target scene; based on the structured information of the target to be detected, obtaining a reference target that meets a preset distance condition with the target to be detected, obtaining reference structured information of the reference target, and constructing a feature map using the structured information to be detected and the reference structured information; wherein each of the front-end devices corresponds to the feature map under its own perspective; obtaining a target feature vector of the target to be detected and a reference feature vector of the reference target in the feature map; and determining the target detection positions of the target to be detected and the reference target in the global coordinate system based on the target feature vector and the reference feature vector.
[0005] To solve the above-mentioned technical problems, the second aspect of the present application provides a target detection method, which is applied to a front-end device in a target detection system, wherein the target detection system includes an edge device and multiple front-end devices, and the method includes: obtaining a target image corresponding to a target scene, determining the attributes and position corresponding to the target in the target image, and converting the position corresponding to the target into a global coordinate system; wherein the global coordinate system corresponds to the target scene; based on the attributes of the target and the position of the target in the global coordinate system, generating structured information matching the target in the target scene, and sending the structured information to the edge device.
[0006] To solve the above technical problems, the third aspect of the present application provides a target detection method, which is applied to a target detection system, wherein the target detection system includes an edge device and multiple front-end devices, and the method includes: the front-end device obtains a target image corresponding to a target scene, determines the attributes and position corresponding to the target in the target image, and converts the position corresponding to the target into a global coordinate system; wherein the global coordinate system corresponds to the target scene; the front-end device generates structured information matching the target in the target scene based on the attributes of the target and the position of the target in the global coordinate system, and sends the structured information to the edge device; the edge device obtains the target sent by the front-end device The edge device obtains structured information that matches the target in the target scene; based on the structured information to be detected of the target to be detected, the edge device obtains a reference target that meets a preset distance condition with the target to be detected, obtains reference structured information of the reference target, and constructs a feature map using the structured information to be detected and the reference structured information; wherein each of the front-end devices corresponds to the feature map under its own perspective; the edge device obtains the target feature vector of the target to be detected and the reference feature vector of the reference target in the feature map; the edge device determines the target detection positions of the target to be detected and the reference target in the global coordinate system based on the target feature vector and the reference feature vector.
[0007] To solve the above technical problems, the fourth aspect of the present application provides an electronic device, comprising a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the method described in the first aspect, the second aspect, or the third aspect.
[0008] In order to solve the above technical problems, the fifth aspect of the present application provides a computer-readable storage medium, storing program instructions that can be executed by a processor, and the program instructions are used to implement the method described in the first aspect, the second aspect or the third aspect.
[0009] The above scheme obtains structured information matched by all targets in the target scene sent by the front-end device, and the structured information is related to the attributes of each target and the position of each target in a unified global coordinate system, and the global coordinate system corresponds to the target scene. Based on the structured information to be detected corresponding to the target to be detected, a reference target that meets a preset distance condition with the target to be detected is obtained, and the reference structured information corresponding to the reference target is obtained. The feature map is constructed using the structured information to be detected corresponding to the target to be detected and the reference structured information corresponding to the reference target. Each front-end device corresponds to a feature map under its own perspective, and a target feature vector corresponding to the target to be detected and a reference feature vector corresponding to the reference target in the feature map are obtained. Based on the target feature vector corresponding to the target to be detected and the reference feature vector corresponding to the reference target, the target detection positions of the target to be detected and the reference target in the global coordinate system are determined. By only obtaining the structured information under the corresponding perspective of each front-end device, there is no need to obtain original information such as images, thereby reducing the data transmission cost between different devices, thereby reducing the detection cost of target detection, and by constructing feature maps and extracting corresponding feature vectors to match targets, the accuracy of target detection is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0011] Figure 1 It is a flowchart of an implementation method of the target detection method of the present application;
[0012] Figure 2 yes Figure 1 Part of the content in step S102 corresponds to a flowchart of an implementation method;
[0013] Figure 3 This application features Figure 1 Schematic diagram of implementation method;
[0014] Figure 4 This is the feature corresponding to the feature point after information enhancement in this application Figure 1 Schematic diagram of implementation method;
[0015] Figure 5 yes Figure 1 Step S104 corresponds to a flowchart of an implementation method;
[0016] Figure 6 It is a flowchart of another implementation method of the target detection method of the present application;
[0017] Figure 7 It is a flowchart of another implementation method of the target detection method of the present application;
[0018] Figure 8 It is a structural schematic diagram of an embodiment of the electronic device of the present application;
[0019] Fig. 9 It is a structural schematic diagram of an implementation method of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments, and different implementation methods can be adaptively combined. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0021] The terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.
[0022] The target detection method provided in the present application is applied to a target detection system, which includes an edge device and multiple front-end devices.
[0023] See also Figure 1 , Figure 1 1 is a flow chart of an implementation method of the target detection method of the present application. The target detection method is applied to an edge device in a target detection system, and the method includes:
[0024] S101: Acquire structured information matching a target in a target scene sent by a front-end device; wherein the structured information is related to the attributes of the target and the position of the target in a global coordinate system, and the global coordinate system corresponds to the target scene.
[0025] Specifically, structured information matching all targets in the target scene sent by the front-end device is obtained, where the structured information is related to the attributes of each target and the position of each target in a unified global coordinate system, and the global coordinate system corresponds to the target scene.
[0026] In one application mode, structured information matching a target in a target scene sent by a front-end device is directly obtained.
[0027] In another application mode, after obtaining structured information matching a target in a target scene sent by a front-end device, the structured information is processed, erroneous structured information is filtered, and the structured information sent by the corresponding front-end device is re-obtained.
[0028] It should be noted that there are many types of front-end devices, such as camera devices that can obtain image information and radar devices that can locate targets, and various types of front-end devices can be used in combination to improve the expansion capabilities of the target detection system. This application does not impose specific restrictions on this.
[0029] It should be noted that this application does not impose any specific restrictions on the number of edge devices.
[0030] In some application scenarios, the attributes corresponding to the target include color, type, etc., which is not limited in this application.
[0031] In some specific application scenarios, the target corresponds to a vehicle, and the attributes are the vehicle color, vehicle type, vehicle size, etc.
[0032] S102: Based on the structured information of the target to be detected, obtain a reference target that meets a preset distance condition with the target to be detected, obtain reference structured information of the reference target, and construct a feature map using the structured information to be detected and the reference structured information; wherein each front-end device corresponds to a feature map under its own perspective.
[0033] Specifically, based on the structured information to be detected corresponding to the target to be detected, a reference target that meets a preset distance condition with the target to be detected is obtained, and the reference structured information corresponding to the reference target is obtained. The structured information to be detected corresponding to the target to be detected and the reference structured information corresponding to the reference target are used to construct a feature map, and each front-end device corresponds to a feature map under its own perspective.
[0034] In one application method, a range is determined with the target to be detected as the center and a preset distance threshold as the radius. The remaining targets that do not meet the preset distance condition are deleted, and a reference target is obtained and the reference structured information corresponding to the reference target is obtained. The feature map is constructed using the structured information to be detected corresponding to the target to be detected and the reference structured information corresponding to the reference target.
[0035] In one application scenario, a range is determined with the target to be detected as the center and a distance threshold of 20 meters as the radius. The targets outside the range are deleted, and reference targets are obtained and the reference structured information of each reference target is acquired. The features of the target to be detected and the reference targets are visualized by using the structured information to be detected corresponding to the target to be detected and the reference structured information corresponding to the reference target to construct a feature map.
[0036] In a specific application scenario, the target scene is a traffic intersection, and the target in the target scene is a vehicle. The center of the intersection is used as the origin and a global coordinate system is established. The coordinates of the center of the intersection are (0, 0, 0), and the coordinates of each vehicle in the global coordinate system are (x, y, z). The vehicle to be detected is the target to be detected, and the reference vehicle is the reference target. With the vehicle to be detected as the center, vehicles within 20 meters around the vehicle to be detected are determined as reference vehicles and the remaining vehicles are deleted. Since the global coordinate system is a 3D coordinate system, the data of each point is three-dimensional, so three layers of features can be obtained according to each dimension, representing the x, y, and z values respectively. For example, the x feature layer is filled with the x value of the vehicle to be detected or the reference vehicle at the corresponding position, and the corresponding attribute features can be added at the corresponding position of each target, so as to visualize the features of the target to be detected and the reference target, and construct a feature map, and each pixel in the feature map represents 0.1 meter.
[0037] In another application method, after obtaining the distance between each target and the target to be detected, the targets that do not meet the preset distance conditions are deleted, the reference target is obtained and the reference structured information corresponding to the reference target is obtained, and the feature map is constructed using the structured information to be detected corresponding to the target to be detected and the reference structured information corresponding to the reference target.
[0038] S103: Obtain a target feature vector of the target to be detected and a reference feature vector of the reference target in the feature map.
[0039] Specifically, a target feature vector corresponding to the target to be detected in the feature map and a reference feature vector corresponding to the reference target are obtained.
[0040] It should be noted that the feature vector is related to the attribute features matched by the attributes of the target and the position features of the target in the feature map.
[0041] In one application, based on the positional relationship between the target to be detected and the origin in the feature map, and combined with the attributes of the target to be detected itself, a corresponding target feature vector is obtained, and based on the positional relationship between the reference target and the origin in the feature map, and combined with the attributes of the reference target itself, a corresponding reference feature vector is obtained.
[0042] In another application method, based on the position information between the target to be detected and the origin and other reference targets in the feature map, and combined with the attributes of the target to be detected itself, a corresponding target feature vector is obtained, and based on the position relationship between the reference target and the origin and other reference targets and the target to be detected in the feature map, and combined with the attributes of the reference target itself, a corresponding reference feature vector is obtained.
[0043] S104: Determine target detection positions of the target to be detected and the reference target in the global coordinate system based on the target feature vector and the reference feature vector.
[0044] Specifically, based on the target feature vector corresponding to the target to be detected and the reference feature vector corresponding to the reference target, the target detection positions corresponding to the target to be detected and the reference target in the global coordinate system are determined.
[0045] In one application method, the target feature vector corresponding to the target to be detected in the feature map corresponding to the perspective of any front-end device and the reference feature vector corresponding to the reference target are combined in pairs with the target feature vector corresponding to the target to be detected in the feature map corresponding to the perspective of other front-end devices and the reference feature vector corresponding to the reference target, and the similarity therebetween is calculated, and the position information corresponding to the target to be detected and the position information corresponding to the reference target under all perspectives are determined based on the calculated similarity results, so as to obtain the target detection position corresponding to the target to be detected in the global coordinate system based on all the position information corresponding to the target to be detected, and obtain the target detection position corresponding to the reference target in the global coordinate system based on all the position information corresponding to the reference target.
[0046] In another application method, the target feature vector corresponding to the target to be detected in the feature map corresponding to the perspective of any front-end device and the reference feature vector corresponding to the reference target, the target feature vector corresponding to the target to be detected in the feature map corresponding to the perspective of other front-end devices, and the reference feature vector corresponding to the reference target are pre-classified according to the attributes corresponding to the targets and then combined in pairs, and the feature difference between them is calculated, and the position information corresponding to the target to be detected under all perspectives and the position information corresponding to the reference target are determined according to the size of the calculated feature difference, so as to obtain the target detection position corresponding to the target to be detected in the global coordinate system based on all the position information corresponding to the target to be detected, and obtain the target detection position corresponding to the reference target in the global coordinate system based on all the position information corresponding to the reference target.
[0047] The above scheme obtains structured information matched by all targets in the target scene sent by the front-end device, and the structured information is related to the attributes of each target and the position of each target in a unified global coordinate system, and the global coordinate system corresponds to the target scene. Based on the structured information to be detected corresponding to the target to be detected, a reference target that meets a preset distance condition with the target to be detected is obtained, and the reference structured information corresponding to the reference target is obtained. The feature map is constructed using the structured information to be detected corresponding to the target to be detected and the reference structured information corresponding to the reference target. Each front-end device corresponds to a feature map under its own perspective, and a target feature vector corresponding to the target to be detected and a reference feature vector corresponding to the reference target in the feature map are obtained. Based on the target feature vector corresponding to the target to be detected and the reference feature vector corresponding to the reference target, the target detection positions of the target to be detected and the reference target in the global coordinate system are determined. By only obtaining the structured information under the corresponding perspective of each front-end device, there is no need to obtain original information such as images, thereby reducing the data transmission cost between different devices, thereby reducing the detection cost of target detection, and by constructing feature maps and extracting corresponding feature vectors to match targets, the accuracy of target detection is improved.
[0048] In one embodiment, see Figure 2 and Figure 3 , Figure 2 yes Figure 1 Part of the content in step S102 corresponds to a flowchart of an implementation method, Figure 3 This application features Figure 1 Schematic diagram of an implementation method. In step S102, the feature map is constructed by using the structured information to be detected and the reference structured information, which specifically includes:
[0049] S201: obtaining target feature points corresponding to the target to be detected based on the structured information to be detected, and obtaining reference feature points corresponding to the reference target based on the reference structured information.
[0050] Specifically, the target feature points corresponding to the target to be detected are marked with square boxes in the feature map, and the rest are reference feature points corresponding to the reference target. The position information in the structured information to be detected is filled in the position corresponding to the target to be detected, and the corresponding attribute information is added for assistance to obtain the target feature points corresponding to the target to be detected. The position information in the reference structured information is filled in the position corresponding to the reference target, and the corresponding attribute information is added for assistance to obtain the reference feature points corresponding to the reference target.
[0051] S202: Obtain a feature map based on the target feature points and the reference feature points.
[0052] Specifically, based on the target feature points and the reference feature points, a feature map is constructed to visualize the features of the target to be detected and the reference target, which facilitates subsequent target matching.
[0053] In one embodiment, see Figure 4 , Figure 4 This is the feature corresponding to the feature point after information enhancement in this application Figure 1 Schematic diagram of an implementation method. Before step S103, the method further includes: enhancing information of the target feature points and the reference feature points to obtain target feature enhancement points corresponding to the target feature points and reference feature enhancement points corresponding to the reference feature points.
[0054] Specifically, since there are limited reference targets around the target to be detected, the information of the feature points is very sparse, so it is necessary to enhance the information of the target feature points and the reference feature points to obtain target feature enhancement points corresponding to the target feature points and reference feature enhancement points corresponding to the reference feature points.
[0055] It should be noted that Figure 4 The target feature points marked with square boxes are the target feature enhancement points corresponding to the target feature points, and the rest are the reference feature enhancement points corresponding to the reference feature points.
[0056] In one implementation scenario, the target to be detected and the reference target have corresponding size information, and the target feature points and the reference feature points are enhanced in information to obtain target feature enhancement points corresponding to the target feature points and reference feature enhancement points corresponding to the reference feature points. The steps specifically include: using the size information to enhance the target feature points and the reference feature points to obtain target feature enhancement points corresponding to the target feature points and reference feature enhancement points corresponding to the reference feature points.
[0057] Specifically, the target feature points are subjected to information-dense enhancement processing using the size information corresponding to the target to be detected, and the target feature enhancement points corresponding to the target feature points are obtained. Also, the target feature points are subjected to information-dense enhancement processing using the size information corresponding to the reference target, and the reference feature enhancement points corresponding to the reference feature points are obtained, thereby restoring the real physical information of the target in the feature map.
[0058] In a specific implementation scenario, the target to be detected and the reference target are vehicles, and the size information corresponds to the length L, width W and height H of the vehicle, and the length L corresponds to the numerical feature of x, the width W corresponds to the numerical feature of y, and the height H corresponds to the numerical feature of z. For example, the length L of the vehicle is used in the feature layer of the x value for information intensive enhancement. The specific process is as follows:
[0059] (1)
[0060] Among them, the index of the target to be detected is (0, 0), and F(0, 0) represents its value in the x feature layer.
[0061] In another implementation scenario, the steps of performing information enhancement on the target feature points and the reference feature points to obtain target feature enhancement points corresponding to the target feature points and reference feature enhancement points corresponding to the reference feature points specifically include: performing Gaussian blur enhancement on the target feature points and the reference feature points using a Gaussian kernel function to obtain target feature enhancement points corresponding to the target feature points and reference feature enhancement points corresponding to the reference feature points.
[0062] Specifically, a Gaussian kernel is superimposed on the target position in each feature layer of the target feature point, thereby performing Gaussian blur enhancement on the target feature point to obtain a target feature enhancement point corresponding to the target feature point, and a Gaussian kernel is superimposed on the target position in each feature layer of the reference feature point, thereby performing Gaussian blur enhancement on the reference feature point to obtain a reference feature enhancement point corresponding to the reference feature point. By performing Gaussian blur enhancement on the feature points, the accuracy and efficiency of subsequent feature vector extraction can be improved.
[0063] In one implementation scenario, step S103 specifically includes: inputting the target feature enhancement point and the reference feature enhancement point into the neural network to obtain the target feature vector and the reference feature vector output by the neural network.
[0064] Specifically, the target feature enhancement points corresponding to the target to be detected are input into the neural network to obtain the target feature vector output by the neural network, and the reference feature enhancement points corresponding to the reference target are input into the neural network to obtain the reference feature vector output by the neural network.
[0065] In a specific implementation scenario, the neural network is a Resnet network, and the target feature enhancement point is input into the Resnet network. The input layer outputs an N-dimensional target feature vector and inputs the reference feature enhancement point into the Resnet network. The input layer outputs an N-dimensional reference feature vector.
[0066] In one embodiment, see Figure 5 , Figure 5 yes Figure 1 Step S104 in the figure corresponds to a flowchart of an implementation method. Step S104 specifically includes:
[0067] S501: Combining a target feature vector and a reference feature vector in a feature map corresponding to any front-end device with target feature vectors and reference feature vectors in feature maps corresponding to other front-end devices, respectively, to obtain a plurality of feature vector combinations.
[0068] Specifically, each front-end device corresponds to a feature map under its own perspective. The target feature vector and reference feature vector in the feature map corresponding to any front-end device are combined with the target feature vector and reference feature vector in the feature map corresponding to other front-end devices in pairs to obtain multiple feature vector combinations.
[0069] S502: Obtain the similarities between feature vectors in all feature vector combinations and sort them. Based on the sorted feature vector combinations, determine the structured information to be matched under all perspectives corresponding to the target to be detected and the structured information to be matched under all perspectives corresponding to the reference target from the structured information sent by all front-end devices.
[0070] Specifically, the similarities between the feature vectors in all feature vector combinations are calculated, and the obtained similarity calculation results are sorted. According to the sorted feature vector combinations, the structured information to be matched under all perspectives corresponding to the target to be detected is determined from the structured information sent by all front-end devices, and the structured information to be matched under all perspectives corresponding to the reference target is determined.
[0071] In one implementation scenario, the feature vector is related to the attribute features matched by the attributes of the target, and the position features of the target in the feature map. Step S502 obtains the similarity between the feature vectors in all feature vector combinations and sorts them, specifically including: based on the attribute features and position features included in the feature vectors in the feature vector combinations, determines the similarity between the feature vectors and sorts all feature vector combinations according to the similarity.
[0072] Specifically, based on the attribute features and position features included in the feature vectors in the feature vector combination, the similarity between the feature vectors is calculated, and all feature vector combinations are sorted according to the calculated similarity. By calculating the similarity and sorting the feature vectors, the accuracy of subsequent matching of the structured information of all targets can be improved.
[0073] Optionally, the similarity between feature vectors may be calculated using cosine distance or Euclidean distance, etc., and this application does not impose any specific limitation on this.
[0074] S503: Based on all the to-be-matched structured information corresponding to the to-be-detected target, obtain the target detection position of the to-be-detected target in the global coordinate system; based on all the to-be-matched structured information corresponding to the reference target, obtain the target detection position of the reference target in the global coordinate system.
[0075] Specifically, based on all the to-be-detected structured information to be matched corresponding to the target to be detected, the target detection position of the target to be detected in the global coordinate system is calculated. Based on all the to-be-matched structured information corresponding to the reference target, the target detection position of the reference target in the global coordinate system is calculated. By matching the structured information of all targets through similarity sorting, the target detection positions of all targets in the global coordinate system can be obtained more accurately, thereby improving the accuracy of target detection.
[0076] In one implementation scenario, step S503 specifically includes: based on the to-be-detected target's structured information to be matched, determining and fusing the position information of the target to be detected at all viewing angles to obtain the target detection position of the target to be detected in the global coordinate system; and, based on the to-be-matched structured information corresponding to the reference target, determining and fusing the position information of the reference target at all viewing angles to obtain the target detection position of the reference target in the global coordinate system.
[0077] Specifically, based on the to-be-detected target's structured information to be matched, the position information of the target to be detected from the perspective of all front-end devices is determined and fused to obtain the target detection position corresponding to the target to be detected in the global coordinate system. Based on the to-be-matched structured information corresponding to the reference target, the position information of the reference target from the perspective of all front-end devices is determined and fused to obtain the target detection position corresponding to the reference target in the global coordinate system. By fusing all position information corresponding to targets from multiple sources, the error caused by a single data source can be reduced, thereby improving the overall target positioning accuracy.
[0078] Optionally, all the position information corresponding to the target may be averaged and fused, or after setting corresponding weights for different feature maps, all the position information corresponding to the target may be weighted averaged and fused. This application does not impose any specific restrictions on this.
[0079] See also Figure 6 , Figure 6 : is a flow chart of another embodiment of the target detection method of the present application. The target detection method is applied to a front-end device in a target detection system, and the method includes:
[0080] S601: Acquire a target image corresponding to a target scene, determine the attributes and position corresponding to a target in the target image, and convert the position corresponding to the target into a global coordinate system; wherein the global coordinate system corresponds to the target scene.
[0081] Specifically, a target image corresponding to the target scene is obtained, the attributes and position corresponding to the target in the target image are determined, and the position corresponding to the target is converted into a unified global coordinate system, wherein the global coordinate system corresponds to the target scene.
[0082] S602: Generate structured information matching the target in the target scene based on the attributes of the target and the position of the target in the global coordinate system, and send the structured information to the edge device.
[0083] Specifically, based on the attributes of each target and the position of each target in the global coordinate system, structured information matching all targets in the target scene is generated, and this structured information is sent to the edge device, so that the edge device only obtains the structured information from the perspective of each front-end device, without the need to obtain original information such as images again, greatly reducing the data transmission cost between different devices, thereby reducing the detection cost of subsequent target detection.
[0084] See also Figure 7 , Figure 7 : is a flow chart of another embodiment of the target detection method of the present application. The target detection method is applied to a target detection system, and the method includes:
[0085] S701: The front-end device obtains a target image corresponding to a target scene, determines the attributes and position corresponding to the target in the target image, and converts the position corresponding to the target into a global coordinate system; wherein the global coordinate system corresponds to the target scene.
[0086] Specifically, each front-end device obtains a target image corresponding to the target scene, determines the attributes and position corresponding to the target in the target image, and converts the position corresponding to the target into a unified global coordinate system, wherein the global coordinate system corresponds to the target scene.
[0087] S702: The front-end device generates structured information matching the target in the target scene based on the attributes of the target and the position of the target in the global coordinate system, and sends the structured information to the edge device.
[0088] Specifically, each front-end device generates structured information matching all targets in the target scene based on the attributes of each target and the position of each target in the global coordinate system, and sends the structured information to the edge device.
[0089] S703: The edge device obtains structured information matching the target in the target scene sent by the front-end device.
[0090] Specifically, the edge device obtains structured information matched by all targets in the target scene sent by the front-end device.
[0091] S704: The edge device obtains a reference target that meets a preset distance condition with the target to be detected based on the structured information to be detected of the target to be detected, obtains reference structured information of the reference target, and constructs a feature map using the structured information to be detected and the reference structured information; wherein each front-end device corresponds to a feature map under its own perspective.
[0092] Specifically, the edge device obtains a reference target that meets a preset distance condition with the target to be detected based on the structured information to be detected corresponding to the target to be detected, obtains reference structured information corresponding to the reference target, and constructs a feature map using the structured information to be detected corresponding to the target to be detected and the reference structured information corresponding to the reference target. Each front-end device corresponds to a feature map under its own perspective.
[0093] S705: The edge device obtains the target feature vector of the target to be detected and the reference feature vector of the reference target in the feature map.
[0094] Specifically, the edge device obtains a target feature vector corresponding to the target to be detected in the feature map and a reference feature vector corresponding to the reference target.
[0095] S706: The edge device determines the target detection positions of the target to be detected and the reference target in the global coordinate system based on the target feature vector and the reference feature vector.
[0096] Specifically, the edge device determines the target detection positions corresponding to the target to be detected and the reference target in the global coordinate system based on the target feature vector corresponding to the target to be detected and the reference feature vector corresponding to the reference target.
[0097] The above scheme adopts front-end device perception combined with edge device fusion processing. The front-end device obtains the location information and attribute information of the target and transmits it to the edge device in a structured manner. The edge device no longer needs to obtain original information such as images, but only obtains the structured information of the target, which greatly reduces the amount of data transmission information. It can effectively increase the number of connected front-end devices and reduce the data transmission cost between different devices, thereby reducing the detection cost of target detection. In addition, by constructing feature maps and extracting corresponding feature vectors to match targets, the accuracy of target detection is improved.
[0098] See also Figure 8 , Figure 8: is a structural diagram of an embodiment of an electronic device of the present application, the electronic device 80 includes a memory 800 and a processor 802 coupled to each other, wherein the memory 800 stores program data (not shown), and the processor 802 calls the program data to implement the method in any of the above embodiments. For the description of the relevant content, please refer to the detailed description of the above method embodiment, which will not be repeated here. Specifically, the electronic device 80 includes but is not limited to: a desktop computer, a laptop computer, a tablet computer, a server, etc., which are not limited here. In addition, the processor 802 can also be called a CPU (Center Processing Unit). The processor 802 may be an integrated circuit chip with signal processing capabilities. The processor 802 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 802 can be implemented by an integrated circuit chip.
[0099] See also Fig. 9 , Fig. 9 It is a structural diagram of an implementation method of a computer-readable storage medium of the present application. The computer-readable storage medium 90 stores program data 900. When the program data 900 is executed by a processor, the method in any of the above embodiments is implemented. For descriptions of related contents, please refer to the detailed description of the above method embodiments, which will not be repeated here.
[0100] It should be noted that the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present implementation scheme.
[0101] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0102] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., and other media that can store program codes.
[0103] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A target detection method, characterized in that: An edge device applied to a target detection system, the target detection system comprising an edge device and a plurality of front-end devices, the method comprising: Acquire structured information matched by a target in a target scene sent by the front-end device; wherein the structured information is related to an attribute of the target and a position of the target in a global coordinate system, and the global coordinate system corresponds to the target scene; Based on the structured information to be detected of the target to be detected, a reference target that meets a preset distance condition with the target to be detected is obtained, reference structured information of the reference target is obtained, and a feature map is constructed using the structured information to be detected and the reference structured information; wherein each of the front-end devices corresponds to the feature map under its own viewing angle; Obtaining a target feature vector of the target to be detected and a reference feature vector of the reference target in the feature map; Based on the target feature vector and the reference feature vector, target detection positions of the target to be detected and the reference target in the global coordinate system are determined.
2. The method according to claim 1, characterized in that The constructing a feature map by using the to-be-detected structured information and the reference structured information includes: Based on the to-be-detected structured information, obtaining target feature points corresponding to the to-be-detected target, and based on the reference structured information, obtaining reference feature points corresponding to the reference target; The feature map is obtained based on the target feature points and the reference feature points.
3. The method according to claim 2, characterized in that Before obtaining the target feature vector of the target to be detected and the reference feature vector of the reference target in the feature map, the method further includes: Performing information enhancement on the target feature point and the reference feature point to obtain a target feature enhancement point corresponding to the target feature point and a reference feature enhancement point corresponding to the reference feature point; The obtaining of the target feature vector of the target to be detected and the reference feature vector of the reference target in the feature map comprises: The target feature enhancement point and the reference feature enhancement point are input into a neural network to obtain the target feature vector and the reference feature vector output by the neural network.
4. The method according to claim 3, characterized in that The target to be detected and the reference target have corresponding size information, and the information enhancement of the target feature points and the reference feature points is performed to obtain target feature enhancement points corresponding to the target feature points and reference feature enhancement points corresponding to the reference feature points, including: The target feature point and the reference feature point are enhanced by using the size information to obtain a target feature enhancement point corresponding to the target feature point and a reference feature enhancement point corresponding to the reference feature point.
5. The method according to claim 3, characterized in that: The step of performing information enhancement on the target feature point and the reference feature point to obtain a target feature enhancement point corresponding to the target feature point and a reference feature enhancement point corresponding to the reference feature point includes: The target feature point and the reference feature point are Gaussian blurred and enhanced by using a Gaussian kernel function to obtain a target feature enhancement point corresponding to the target feature point and a reference feature enhancement point corresponding to the reference feature point.
6. The method according to claim 1, characterized in that The determining, based on the target feature vector and the reference feature vector, target detection positions of the target to be detected and the reference target in the global coordinate system comprises: Combining the target feature vector and the reference feature vector in the feature map corresponding to any one of the front-end devices with the target feature vector and the reference feature vector in the feature map corresponding to other front-end devices in pairs, respectively, to obtain a plurality of feature vector combinations; Obtaining the similarities between the feature vectors in all the feature vector combinations and sorting them, and determining the structured information to be matched under all viewing angles corresponding to the target to be detected and the structured information to be matched under all viewing angles corresponding to the reference target from the structured information sent by all the front-end devices based on the sorted feature vector combinations; Based on all the to-be-matched structured information corresponding to the to-be-detected target, the target detection position of the to-be-detected target in the global coordinate system is obtained; based on all the to-be-matched structured information corresponding to the reference target, the target detection position of the reference target in the global coordinate system is obtained.
7. The method according to claim 6, characterized in that The feature vector is related to the attribute feature matched with the attribute of the target, and the position feature of the target in the feature map; The obtaining and sorting of similarities between feature vectors in all feature vector combinations includes: Based on the attribute features and the position features included in the feature vectors in the feature vector combination, the similarity between the feature vectors is determined and all the feature vector combinations are sorted according to the similarity.
8. The method according to claim 6, characterized in that The step of obtaining the target detection position of the target to be detected in the global coordinate system based on all the to-be-detected structured information corresponding to the target to be detected, and obtaining the target detection position of the reference target in the global coordinate system based on all the to-be-matched structured information corresponding to the reference target, comprises: Based on the to-be-detected target's structured information to be matched corresponding to the target to be detected, determining and fusing the position information of the target to be detected at all viewing angles to obtain the target detection position of the target to be detected in the global coordinate system; and Based on the to-be-matched structured information corresponding to the reference target, the position information of the reference target in all viewing angles is determined and fused to obtain the target detection position of the reference target in the global coordinate system.
9. A target detection method, characterized in that: Applied to a target detection system, the target detection system includes an edge device and a plurality of front-end devices, and the method includes: The front-end device obtains a target image corresponding to the target scene, determines the attributes and position corresponding to the target in the target image, and converts the position corresponding to the target into a global coordinate system; wherein the global coordinate system corresponds to the target scene; The front-end device generates structured information matched by the target in the target scene based on the attributes of the target and the position of the target in the global coordinate system, and sends the structured information to the edge device; The edge device obtains structured information matched by a target in a target scene sent by the front-end device; The edge device obtains a reference target that meets a preset distance condition with the target to be detected based on the structured information to be detected of the target to be detected, obtains reference structured information of the reference target, and constructs a feature map using the structured information to be detected and the reference structured information; wherein each of the front-end devices corresponds to the feature map under its own perspective; The edge device obtains a target feature vector of the target to be detected and a reference feature vector of the reference target in the feature map; The edge device determines target detection positions of the target to be detected and the reference target in the global coordinate system based on the target feature vector and the reference feature vector.
10. An electronic device, characterized in that: The method comprises a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the method according to any one of claims 1 to 8 or 9.
11. A computer-readable storage medium, characterized in that: Program instructions that can be executed by a processor are stored, and the program instructions are used to implement the method described in any one of claims 1-8 or 9.
Citation Information
Patent Citations
Multi-sensor target data fusion method and device, equipment and storage medium
CN116304994A