Target detection method, device, apparatus and storage medium

By combining color and depth cameras and utilizing 3D point cloud technology, the problem of traditional turnstiles being unable to accurately identify target categories and consuming large amounts of computing resources has been solved, achieving fast and accurate target detection and meeting the real-time requirements of turnstiles.

CN118072078BActive Publication Date: 2026-11-20PCI TECH & SERVICE CO LTD +4
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410112679.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-25
Publication Date
2026-11-20
Estimated Expiration
2044-01-25

AI Technical Summary

Technical Problem

Traditional turnstiles based on infrared beam sensors cannot accurately identify target categories, and 3D vision modules consume a lot of computing resources and have long inference time, making it difficult to meet real-time requirements.

Method used

By combining color and depth cameras, pixel-level bounding boxes and category information of targets are detected through color images, and depth map regions are extracted and converted into 3D point clouds to determine the point cloud bounding boxes of targets, thus reducing computing resources and time consumption.

Benefits of technology

It achieves accurate and rapid target location and category detection, meeting the real-time requirements of turnstiles and saving computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118072078B_ABST
    Figure CN118072078B_ABST
Patent Text Reader

Abstract

A target detection method, device and equipment and storage medium are disclosed. The method comprises the following steps: detecting a first target of a color image to obtain pixel-level detection frame information and category information of the first target; the first target comprises a human body and / or an object; a region corresponding to the first target is cut from a depth map according to the pixel-level detection frame information to obtain a first target depth subgraph; the depth map and the first target depth subgraph are converted into 3D point clouds respectively to obtain a full-image 3D point cloud and a first target 3D point cloud; and point cloud detection frame information of the first target and point cloud detection frame information of a second target are determined based on the first target 3D point cloud and / or the full-image 3D point cloud. The target detection method provided by the embodiment of the present application can determine the point cloud detection frame information of the target passing through the gate by the color image and the depth map, can save the computing resources and time consumption, and can accurately and quickly detect the target position and the target category passing through the gate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visual processing technology, and in particular to a target detection method, apparatus, device and storage medium. Background Technology

[0002] Traditional turnstiles rely on infrared beam sensors to detect passing targets, but this method cannot accurately identify the target category. Visual turnstiles introduce a 3D vision module to obtain the target category and bounding box information based on 3D point clouds. However, processing 3D point cloud data not only consumes a lot of computing resources but also has a long inference time, making it difficult to meet the real-time requirements of turnstiles. Summary of the Invention

[0003] This invention provides a target detection method, apparatus, device, and storage medium that can save computing resources and time, thereby accurately and quickly detecting the location and type of a target passing through a turnstile.

[0004] In a first aspect, embodiments of the present invention provide a target detection method, comprising:

[0005] The color image is used to detect a first target, and pixel-level detection bounding box information and category information of the first target are obtained; wherein, the first target includes a human body and / or an object; the color image is acquired by a color camera installed above the gate;

[0006] The region corresponding to the first target is extracted from the depth map based on the pixel-level detection box information to obtain a first target depth sub-map; wherein, the depth map is acquired by a depth camera installed above the gate.

[0007] The depth map and the first target depth sub-map are converted into 3D point clouds respectively to obtain the full depth map. Figure 3 D-point cloud and the first target 3D point cloud;

[0008] Based on the first target 3D point cloud and / or the full Figure 3 D-point cloud determines the point cloud detection bounding box information of the first target and the point cloud detection bounding box information of the second target; wherein, the second target is a target other than the first target.

[0009] Secondly, embodiments of the present invention also provide a target detection device, characterized in that it comprises:

[0010] The first target detection module is used to detect a first target in the color image and obtain pixel-level detection box information and category information of the first target; wherein, the first target includes a human body and / or an object; the color image is acquired by a color camera installed above the gate;

[0011] The first target depth sub-image acquisition module is used to extract the region corresponding to the first target from the depth map based on the pixel-level detection box information to obtain the first target depth sub-image; wherein, the depth map is acquired by a depth camera installed above the gate.

[0012] The 3D point cloud acquisition module is used to convert the depth map and the first target depth sub-map into 3D point clouds respectively, to obtain the full... Figure 3 D-point cloud and the first target 3D point cloud;

[0013] The point cloud detection bounding box information determination module is used to determine the information based on the first target 3D point cloud and / or the full... Figure 3 D-point cloud determines the point cloud detection bounding box information of the first target and the point cloud detection bounding box information of the second target; wherein, the second target is a target other than the first target.

[0014] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising:

[0015] At least one processor; and

[0016] A memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the target detection method described in the embodiments of the present invention.

[0018] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions that are used to cause a processor to execute the target detection method described in the embodiments of the present invention.

[0019] This invention discloses a target detection method, apparatus, device, and storage medium. The method involves detecting a first target in a color image to obtain pixel-level detection bounding box information and category information of the first target; wherein the first target includes a human body and / or an object; the color image is acquired by a color camera positioned above a turnstile; based on the pixel-level detection bounding box information, the region corresponding to the first target is cropped from the depth image to obtain a first target depth sub-image; wherein the depth image is acquired by a depth camera positioned above the turnstile; the depth image and the first target depth sub-image are respectively converted into 3D point clouds to obtain a full... Figure 3 3D point cloud and first target 3D point cloud; based on the first target 3D point cloud and / or the full 3D point cloud; Figure 3The point cloud determines the point cloud detection bounding box information of the first target and the point cloud detection bounding box information of the second target; wherein, the second target is any target other than the first target. The target detection method provided in this embodiment of the invention determines the point cloud detection bounding box information of the target passing through the gate by using a color image and a depth image, which can save computing resources and time, thereby accurately and quickly detecting the target location and target category passing through the gate. Attached Figure Description

[0020] Figure 1 This is a flowchart of a target detection method according to Embodiment 1 of the present invention;

[0021] Figure 2 This is a schematic diagram of a target detection method according to Embodiment 1 of the present invention;

[0022] Figure 3 This is a schematic diagram of the gate area in Embodiment 1 of the present invention;

[0023] Figure 4 This is an example diagram of a point cloud detection frame according to Embodiment 1 of the present invention;

[0024] Figure 5 This is a schematic diagram of the structure of a target detection device according to Embodiment 1 of the present invention;

[0025] Figure 6 This is a schematic diagram of the structure of an electronic device according to Embodiment 1 of the present invention. Detailed Implementation

[0026] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0027] Example 1

[0028] Figure 1 This is a flowchart of a target detection method provided in Embodiment 1 of the present invention. This embodiment is applicable to the detection of targets passing through a turnstile. The method can be executed by a target detection device, which can be implemented in software and / or hardware, optionally through an electronic device, such as a mobile terminal, PC, or server. Specifically, it includes the following steps:

[0029] S110, Detect the first target in the color image and obtain the pixel-level detection box information and category information of the first target.

[0030] The first target includes human bodies and / or objects; the color image is acquired by a color camera positioned above the turnstile, meaning the color image can be understood as a color top-down view of the corresponding area of ​​the turnstile. Pixel-level detection box information can be understood as the detection box information of the first target in the color image, which can be represented by the vertex coordinates of the detection box, or by the coordinates and size of the center point of the detection box.

[0031] In this embodiment, any target detection algorithm (e.g., YOLOv5) can be used to process the color image to obtain pixel-level detection bounding box information and category information of the first target. The category information of the first target can be a pre-labeled category. For example, assuming the first target is a human body, the categories of human bodies can include: ordinary passengers, children, pregnant women, the elderly, and those holding infants, etc. Assuming the first target includes objects, the object categories can include: suitcases, strollers, etc. The category division can be preset and is not limited here.

[0032] S120: Based on the pixel-level detection box information, the region corresponding to the first target is extracted from the depth map to obtain the depth sub-map of the first target.

[0033] The depth map is acquired by a depth camera positioned above the gate; in other words, the depth map can be understood as a top-down view of the depth of the corresponding area of ​​the gate.

[0034] Specifically, the method for extracting the region corresponding to the first target from the depth map based on the pixel-level detection box information can be as follows: First, align the depth map and the color map, and then crop out the region in the depth map that is aligned with the pixel-level detection box in the color map to obtain the region of the first target in the depth map, i.e., the depth sub-map of the first target.

[0035] S130, convert the depth map and the first target depth sub-map into 3D point clouds respectively, to obtain the full... Figure 3 D-point cloud and the first target 3D point cloud.

[0036] The 3D point cloud can be composed of a set of 3D points in a world coordinate system with the center of the gate as the origin. In this embodiment, the process of converting the depth map and the first target depth sub-map into 3D point clouds can be as follows: first, the depth map and the first target depth sub-map are converted to the camera coordinate system according to the intrinsic and extrinsic parameters of the depth camera, and then the camera coordinate system is converted to the world coordinate system with the center of the gate as the origin, thereby obtaining the full depth map. Figure 3 The first target 3D point cloud and the first target depth sub-map corresponding to the D point cloud.

[0037] S140, based on the first target 3D point cloud and / or full... Figure 3 D-point cloud determines the point cloud detection box information of the first target and the point cloud detection box information of the second target.

[0038] The second target is any target other than the first target. The second target can be a target that has not been pre-labeled and can be an object. The point cloud detection box can be understood as the detection box information of the target in the real world. It can be represented by the vertex coordinates of the target detection box in the real world, or by the coordinates and size of the center point of the target detection box in the real world.

[0039] Specifically, based on the first target 3D point cloud and / or full Figure 3 The method for determining the point cloud detection box information of the first target and the second target from the 3D point cloud can be as follows: Perform region segmentation on the 3D point cloud of the first target to obtain the point cloud detection box information of the first target; based on the point cloud detection box information of the first target, then... Figure 3 The first target 3D point cloud is removed from the D point cloud to obtain the second target 3D point cloud; the second target 3D point cloud is segmented into regions to obtain the point cloud detection box information of the second target.

[0040] The process of region segmentation for the first target's 3D point cloud can be understood as determining the point cloud detection bounding box information of the first target from its 3D point cloud. Similarly, the process of region segmentation for the second target's 3D point cloud can be understood as determining the point cloud detection bounding box information of the second target from its 3D point cloud. Based on the point cloud detection bounding box information of the first target, the entire... Figure 3 The method to obtain the second target 3D point cloud by removing the first target 3D point cloud from the D point cloud can be: to remove the entire D point cloud. Figure 3 The 3D point cloud that falls within the detection frame of the first target point cloud in the D point cloud is set to the first set value.

[0041] The first set value can be 0. Setting the 3D point cloud value within the first target point cloud detection frame to 0 indicates that there is no target within the first target point cloud detection frame, meaning the first target is removed from the entire frame. Figure 3 Removed from the D-point cloud.

[0042] For example, Figure 2 This is a schematic diagram illustrating the principle of target detection in this embodiment, as follows: Figure 2 As shown, when detecting the first target, the first target is first detected based on the color image. Then, based on the detection result, a depth sub-image of the first target is extracted from the depth image. Next, the depth sub-image of the first target is converted into a 3D point cloud of the first target. Finally, region segmentation is performed on the 3D point cloud of the first target to obtain the point cloud detection bounding box information of the first target. When detecting the second target, the depth image is first converted into a full-color image. Figure 3 D point cloud, and then based on the point cloud detection box information of the first target, remove the first target from the whole Figure 3 Remove from the D point cloud to obtain the second target 3D point cloud. Finally, perform region segmentation on the second target 3D point cloud to obtain the point cloud detection box information of the second target.

[0043] Specifically, the method for region segmentation of either the first target 3D point cloud or the second target 3D point cloud can be as follows: restrict the 3D point cloud to a region; project the region-restricted 3D point cloud onto a surface along a first direction to obtain a 2D point map; segment the target based on the 2D point map to obtain the point cloud detection box information of the second target.

[0044] The target is either a first target or a second target. In this embodiment, the application scenario is the detection of targets passing through a turnstile channel. Only the 3D point cloud within the corresponding area of ​​the turnstile channel needs to be processed. The method for restricting the 3D point cloud to a specific area can be: extracting the 3D point cloud within the corresponding area of ​​the turnstile channel, filtering out the 3D point cloud outside the corresponding area of ​​the turnstile channel, thereby reducing interference from the background and point clouds outside the turnstile channel area.

[0045] Specifically, the method for restricting the area of ​​a 3D point cloud can be: obtaining the spatial range corresponding to the gate; and restricting the area of ​​the 3D point cloud based on the spatial range.

[0046] The spatial range can be composed of coordinate ranges in three directions under the world coordinate system: the X direction, the Y direction, and the Z direction. The X direction can be parallel to the direction of travel, the Y direction can be perpendicular to the direction of travel, and the Z direction can be perpendicular to the ground. For example... Figure 3 This is a schematic diagram of the gate area in this embodiment, as shown below. Figure 3 As shown, assuming the turnstile's coordinates in the world coordinate system are (X1, X2) in the X direction, (Y1, Y2) in the Y direction, and (Z1, Z2) in the Z direction, and the point cloud coordinates are (x, y, z), the point cloud that satisfies the following condition will be retained: X1 <x<X2,Y1<y<Y2,Z1<z<Z2。

[0047] The first direction can be the Z direction. Projecting the 3D point cloud, after region restriction, along the first direction can be understood as projecting the 3D point cloud onto a plane parallel to the ground, thus obtaining a 2D point map. Assuming the point cloud coordinates are (x, y, z), when z = 0, the 3D point cloud is projected onto the plane where z = 0.

[0048] Optionally, the method for segmenting the target based on the 2D point map to obtain the point cloud detection box information of the target can be as follows: clustering the 2D points in the 2D point map to obtain at least one cluster point set; projecting each cluster point set along a second direction and a third direction to obtain a one-dimensional point set in the second direction and a one-dimensional point set in the third direction; and determining the point cloud detection box information of at least one target based on the one-dimensional point set in the second direction and the one-dimensional point set in the third direction.

[0049] In this context, a cluster of points can be understood as points belonging to the same target. The second direction can be the X direction, and the third direction can be the Y direction. Clustering 2D points in a 2D point graph can be done by using a predefined clustering algorithm based on the distances between the 2D points. This predefined clustering algorithm can be any algorithm, without limitation here, such as K-means clustering. Projecting the clustered point set along the second direction can be understood as setting the x-component of each 2D point in the clustered point set to 0, resulting in a one-dimensional point set along the third direction. Similarly, projecting the clustered point set along the third direction can be understood as setting the y-component of each 2D point in the clustered point set to 0, resulting in a one-dimensional point set along the second direction. Assuming the 2D point graph is represented by the function z = f(x,y), when y = 0, z = f(x,0), resulting in a one-dimensional projection along the X direction; when x = 0, z = f(0,y), resulting in a one-dimensional projection along the Y direction.

[0050] In this embodiment, for each clustered point set, the method for determining the target's point cloud detection box information based on the one-dimensional point set in the second direction and the one-dimensional point set in the third direction can be as follows: connect the one-dimensional point sets in the second direction into a line segment along the second direction, connect the one-dimensional point sets in the third direction into a line segment along the third direction, and the line segments along the second direction and the line segments along the third direction enclose the point cloud detection box information of the target corresponding to that clustered point set. In this embodiment, clustering the 2D point map before projection can improve the accuracy of target segmentation.

[0051] Optionally, the method for segmenting the target based on the 2D point map to obtain the target's point cloud detection box information can be as follows: projecting the 2D point map along a third direction to obtain a one-dimensional point set in the second direction; segmenting the point set in the second direction into line segments to obtain at least one line segment along the second direction; segmenting the 2D point map based on the at least one line segment along the second direction to obtain at least one 2D sub-point map; projecting the at least one 2D sub-point map along the second direction to obtain a one-dimensional point set in the third direction corresponding to each 2D sub-point map; and determining the target's point cloud detection box information based on the at least one line segment in the second direction and its corresponding one-dimensional point set in the third direction.

[0052] The second direction is parallel to the direction of travel and is represented by the X direction. The one-dimensional point set of the second direction can be represented as: z = f(x, 0). The process of segmenting the point set of the second direction into line segments can be as follows: first, the point set of the second direction is grouped based on the distance between adjacent points, and then the point sets in each group are connected to form line segments to obtain at least one line segment along the second direction.

[0053] Specifically, the method for segmenting the point set in the second direction to obtain at least one line segment along the second direction can be as follows: obtain the distance between any two adjacent points in the point set in the second direction; take any point among the adjacent points whose distance is greater than a set threshold as the segmentation point; segment the point set in the second direction based on the segmentation point to obtain at least one sub-point set along the second direction; connect the at least one sub-point set along the second direction into line segments to obtain at least one line segment.

[0054] The threshold value can be preset. If the distance between two adjacent points is less than or equal to the threshold value, it indicates that the two adjacent points belong to the same target; if the distance between two adjacent points is greater than the threshold value, it indicates that the two adjacent points do not belong to the same target. In this case, any one of the adjacent points is needed as a split point to obtain at least one split point in the point set in the second direction. After obtaining the split point, the point set in the second direction is divided based on the split point to obtain at least one subset of points along the second direction. Finally, the at least one subset of points along the second direction is connected to form a line segment to obtain at least one line segment.

[0055] In this embodiment, after obtaining at least one line segment along the second direction, the 2D point map is segmented based on the at least one line segment along the second direction to obtain at least one 2D sub-point map. Each 2D sub-point map can correspond to one target. After obtaining at least one 2D sub-point map, the one-dimensional point set corresponding to each 2D sub-point map in a third direction is further segmented.

[0056] Specifically, the method for determining the target's point cloud detection bounding box information based on at least one line segment in the second direction and its corresponding one-dimensional point set in the third direction can be as follows: For each line segment in the second direction, connect the corresponding one-dimensional point set in the third direction to obtain a line segment along the third direction; then, enclose the line segment in the second direction and its corresponding line segment in the third direction into a rectangular frame to obtain the target's point cloud detection bounding box information. For example, Figure 4 This is an example diagram of the point cloud detection box in this embodiment, such as... Figure 4 As shown, two point cloud detection boxes were identified.

[0057] The target detection algorithm in this embodiment can not only accurately distinguish between passengers and objects, but also identify passenger types and detect any object. By using surface projection to reduce 3D point cloud computing to 2D point map computing, and using line projection to reduce the 2D point map to 1D line segment computing, computational resources are reduced, inference speed is improved, and the real-time requirements of visual access control gates for passage detection are met.

[0058] The technical solution of this embodiment involves detecting a first target in a color image to obtain pixel-level detection bounding box information and category information of the first target; wherein, the first target includes a human body and / or an object; the color image is acquired by a color camera mounted above the gate; based on the pixel-level detection bounding box information, the region corresponding to the first target is cropped from the depth image to obtain a first target depth sub-image; wherein, the depth image is acquired by a depth camera mounted above the gate; the depth image and the first target depth sub-image are respectively converted into 3D point clouds to obtain a full... Figure 3 3D point cloud and first target 3D point cloud; based on the first target 3D point cloud and / or the full 3D point cloud; Figure 3 The point cloud determines the point cloud detection bounding box information of the first target and the point cloud detection bounding box information of the second target; wherein, the second target is any target other than the first target. The target detection method provided in this embodiment of the invention determines the point cloud detection bounding box information of the target passing through the gate by using a color image and a depth image, which can save computing resources and time, thereby accurately and quickly detecting the target location and target category passing through the gate.

[0059] Example 2

[0060] Figure 5 This is a schematic diagram of the structure of a target detection device provided in Embodiment 2 of the present invention, as shown below. Figure 5 As shown, the device includes:

[0061] The first target detection module 510 is used to detect a first target in the color image and obtain pixel-level detection box information and category information of the first target; wherein, the first target includes a human body and / or an object; the color image is acquired by a color camera installed above the gate;

[0062] The first target depth sub-image acquisition module 520 is used to extract the region corresponding to the first target from the depth map based on the pixel-level detection box information to obtain the first target depth sub-image; wherein, the depth map is acquired by a depth camera installed above the gate.

[0063] 3D point cloud acquisition module 530 is used to convert the depth map and the first target depth sub-map into 3D point clouds respectively, to obtain a complete point cloud. Figure 3 D-point cloud and the first target 3D point cloud;

[0064] Point cloud detection box information determination module 540, used to determine the information based on the first target 3D point cloud and / or the full... Figure 3 D-point cloud determines the point cloud detection bounding box information of the first target and the point cloud detection bounding box information of the second target; wherein, the second target is a target other than the first target.

[0065] Optionally, the point cloud detection box information determination module 540 is also used for:

[0066] The 3D point cloud of the first target is segmented into regions to obtain the point cloud detection box information of the first target;

[0067] Based on the information from the first target point cloud detection box, the entire... Figure 3 The first target's 3D point cloud is removed from the D point cloud to obtain the second target's 3D point cloud;

[0068] The 3D point cloud of the second target is segmented into regions to obtain the point cloud detection bounding box information of the second target.

[0069] Optionally, the point cloud detection box information determination module 540 is also used for:

[0070] The 3D point cloud is restricted to a specific region;

[0071] The 3D point cloud with the region restricted is projected onto a surface along the first direction to obtain a 2D point map.

[0072] The target is segmented based on the 2D point map to obtain the point cloud detection box information of the target; wherein the target is a first target or a second target.

[0073] Optionally, the point cloud detection box information determination module 540 is also used for:

[0074] Obtain the spatial range corresponding to the gate;

[0075] The 3D point cloud is regionally restricted based on the spatial range.

[0076] Optionally, the point cloud detection box information determination module 540 is also used for:

[0077] Cluster the 2D points in the 2D point graph to obtain at least one cluster point set;

[0078] For each cluster point set, a line projection is performed along the second direction and the third direction respectively to obtain a one-dimensional point set in the second direction and a one-dimensional point set in the third direction;

[0079] Based on the one-dimensional point set in the second direction and the one-dimensional point set in the third direction, point cloud detection box information for at least one target is determined.

[0080] Optionally, the point cloud detection box information determination module 540 is also used for:

[0081] Projecting the 2D point map along a third direction yields a one-dimensional point set in the second direction;

[0082] The point set in the second direction is segmented into line segments to obtain at least one line segment along the second direction;

[0083] The 2D point map is segmented based on at least one line segment along the second direction to obtain at least one 2D sub-point map;

[0084] Project the at least one 2D sub-point map along the second direction to obtain a one-dimensional point set in the third direction corresponding to each 2D sub-point map;

[0085] The point cloud detection box information of the target is determined based on at least one line segment in the second direction and its corresponding one-dimensional point set in the third direction.

[0086] Optionally, the point cloud detection box information determination module 540 is also used for:

[0087] Obtain the distance between any two adjacent points in the point set in the second direction;

[0088] Use any point among adjacent points whose distance is greater than a set threshold as the dividing point;

[0089] The point set in the second direction is divided based on the dividing point to obtain at least one sub-point set along the second direction;

[0090] Connect the at least one subset of points along the second direction to form a line segment, thereby obtaining at least one line segment.

[0091] Optionally, the point cloud detection box information determination module 540 is also used for:

[0092] The entire Figure 3 The 3D point cloud that falls within the detection frame of the first target point cloud in the D point cloud is set to the first set value.

[0093] The above-described apparatus can execute the methods provided in all the foregoing embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the above methods. Technical details not described in detail in this embodiment can be found in the methods provided in all the foregoing embodiments of the present invention.

[0094] Example 3

[0095] Figure 6 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0096] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0097] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0098] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as object detection methods.

[0099] In some embodiments, the target detection method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the target detection method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the target detection method by any other suitable means (e.g., by means of firmware).

[0100] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0101] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0102] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0103] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0104] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0105] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0106] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0107] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A target detection method, characterized in that, include: The color image is used to detect a first target, and pixel-level detection bounding box information and category information of the first target are obtained; wherein, the first target includes a human body and / or an object; the color image is acquired by a color camera installed above the gate; The region corresponding to the first target is extracted from the depth map based on the pixel-level detection box information to obtain a first target depth sub-map; wherein, the depth map is acquired by a depth camera installed above the gate. The depth map and the first target depth sub-map are converted into 3D point clouds respectively to obtain the full map 3D point cloud and the first target 3D point cloud; The point cloud detection box information of the first target and the point cloud detection box information of the second target are determined based on the 3D point cloud of the first target and the 3D point cloud of the whole image; wherein, the second target is a target other than the first target; Based on the 3D point cloud of the first target and the 3D point cloud of the entire image, the point cloud detection bounding box information of the first target and the point cloud detection bounding box information of the second target are determined, including: The 3D point cloud of the first target is segmented into regions to obtain the point cloud detection box information of the first target; Based on the first target point cloud detection box information, the 3D point cloud of the first target in the full 3D point cloud is removed to obtain the 3D point cloud of the second target; The 3D point cloud of the second target is segmented into regions to obtain the point cloud detection box information of the second target; The method for region segmentation for any one of the 3D point clouds of the first target or the second target is as follows: The 3D point cloud is restricted to a specific region; The 3D point cloud with the region restricted is projected onto a surface along the first direction to obtain a 2D point map. The target is segmented based on the 2D point map to obtain the point cloud detection box information of the target; wherein the target is a first target or a second target; Based on the 2D point map, the target is segmented to obtain the target's point cloud detection bounding box information, including: Cluster the 2D points in the 2D point graph to obtain at least one cluster point set; For each cluster point set, a line projection is performed along the second direction and the third direction respectively to obtain a one-dimensional point set in the second direction and a one-dimensional point set in the third direction; Based on the one-dimensional point set in the second direction and the one-dimensional point set in the third direction, point cloud detection box information for at least one target is determined.

2. The method according to claim 1, characterized in that, Region restriction is applied to the 3D point cloud, including: Obtain the spatial range corresponding to the gate; The 3D point cloud is regionally restricted based on the spatial range.

3. The method according to claim 1, characterized in that, Based on the 2D point map, the target is segmented to obtain the target's point cloud detection bounding box information, including: Projecting the 2D point map along a third direction yields a one-dimensional point set in the second direction; The point set in the second direction is segmented into line segments to obtain at least one line segment along the second direction; The 2D point map is segmented based on at least one line segment along the second direction to obtain at least one 2D sub-point map; Project the at least one 2D sub-point map along the second direction to obtain a one-dimensional point set in the third direction corresponding to each 2D sub-point map; The point cloud detection box information of the target is determined based on at least one line segment in the second direction and its corresponding one-dimensional point set in the third direction.

4. The method according to claim 3, characterized in that, Divide the point set in the second direction into line segments to obtain at least one line segment along the second direction, including: Obtain the distance between any two adjacent points in the point set in the second direction; Use any point among adjacent points whose distance is greater than a set threshold as the dividing point; The point set in the second direction is divided based on the dividing point to obtain at least one sub-point set along the second direction; Connect the at least one subset of points along the second direction into line segments to obtain at least one line segment.

5. The method according to claim 1, characterized in that, Based on the first target point cloud detection box information, the first target 3D point cloud is removed from the full-image 3D point cloud to obtain the second target 3D point cloud, including: Set the 3D point cloud in the full-image 3D point cloud that falls within the detection frame of the first target point cloud to the first set value.

6. A target detection device, characterized in that, include: The first target detection module is used to detect a first target in the color image and obtain pixel-level detection box information and category information of the first target; wherein, the first target includes a human body and / or an object; the color image is acquired by a color camera installed above the gate; The first target depth sub-image acquisition module is used to extract the region corresponding to the first target from the depth map based on the pixel-level detection box information to obtain the first target depth sub-image; wherein, the depth map is acquired by a depth camera installed above the gate. The 3D point cloud acquisition module is used to convert the depth map and the first target depth sub-map into 3D point clouds respectively, so as to obtain the full map 3D point cloud and the first target 3D point cloud; The point cloud detection box information determination module is used to determine the point cloud detection box information of the first target and the point cloud detection box information of the second target based on the first target 3D point cloud and the full image 3D point cloud; wherein, the second target is a target other than the first target; The point cloud detection box information determination module is further configured to: The first target 3D point cloud is segmented into regions to obtain the point cloud detection box information of the first target; based on the first target point cloud detection box information, the 3D point cloud of the first target in the full image 3D point cloud is removed to obtain the second target 3D point cloud; The 3D point cloud of the second target is segmented into regions to obtain the point cloud detection box information of the second target; The point cloud detection box information determination module is also used for: The 3D point cloud is restricted to a specific region; The 3D point cloud with the region restricted is projected onto a surface along the first direction to obtain a 2D point map. The target is segmented based on the 2D point map to obtain the point cloud detection box information of the target; wherein the target is a first target or a second target; Cluster the 2D points in the 2D point graph to obtain at least one cluster point set; For each cluster point set, a line projection is performed along the second direction and the third direction respectively to obtain a one-dimensional point set in the second direction and a one-dimensional point set in the third direction; Based on the one-dimensional point set in the second direction and the one-dimensional point set in the third direction, point cloud detection box information for at least one target is determined.

7. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the target detection method according to any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the target detection method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Semantic map construction method based on target candidate box in any direction

    CN113984037A