CN-122023764-A - Target detection and attribute identification method based on multipath parallelism
Abstract
The invention discloses a target detection and attribute identification method based on multipath parallelism, which comprises the steps of acquiring acquired data from a binocular depth camera, preprocessing to obtain an RGB image and a depth image, carrying out target detection on the RGB image and generating an RGB detection result, carrying out target detection on the depth image and generating a depth detection result, carrying out fusion processing on the RGB detection result and the depth detection result and generating a fused detection result, carrying out target management according to the fused detection result and generating an attribute identification task for each target, carrying out attribute identification polling, updating the attribute identification result to the corresponding target, carrying out event judgment according to the updated target, outputting event records, and carrying out data release. The method adopts a two-way parallel detection superposition attribute identification polling mechanism, and greatly improves the identification efficiency.
Inventors
- XUE CHAOBIN
- WU YUELONG
Assignees
- 厦门星纵物联科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251230
Claims (10)
- 1. The utility model provides a target detection and attribute identification method based on multichannel parallel, adopts binocular depth camera to gather data, its characterized in that, the method includes: acquiring acquired data from a binocular depth camera, and preprocessing to obtain an RGB image and a depth image; performing target detection on the RGB image and generating an RGB detection result; performing target detection on the depth map and generating a depth detection result; carrying out fusion processing on the RGB detection result and the depth detection result, and generating a fused detection result; Performing target management according to the fused detection result, and generating an attribute identification task for each target; performing attribute identification polling, and updating an attribute identification result to a corresponding target; Judging the event according to the updated target, and outputting an event record; Data release is performed.
- 2. The method for detecting and identifying the target based on the multipath parallelism according to claim 1, wherein the acquiring the collected data from the binocular depth camera, through preprocessing, obtains an RGB image and a depth image, includes: acquiring one frame of data from a hardware interface, wherein the one frame of data comprises an RGB image, a depth image and 16-bit depth data; Constructing an RGB Data object and a depth Data object; Pushing the RGB Data object Data and the depth Data object Data to an RGB image queue and a depth image queue respectively; and if the queue data is full, removing the data with the oldest time stamp in the queue, and ensuring that the data with the same time stamp in the RGB image queue and the depth image queue are removed.
- 3. The method for detecting targets and identifying attributes based on multiple paths of parallelism according to claim 2, wherein the steps of performing target detection on the RGB map and generating RGB detection results include: fetching RGB image data from the RGB image queue; performing target detection on the RGB image; And generating an RGB detection result.
- 4. The method for multi-path parallel based object detection and attribute recognition according to claim 3, wherein the performing object detection on the depth map and generating a depth detection result comprises: Retrieving depth image data from the depth image queue; Performing target detection by using the depth information; And generating a depth detection result.
- 5. The method for multi-path parallel based object detection and attribute recognition according to claim 4, wherein the fusing the RGB detection result and the depth detection result and generating the fused detection result includes: receiving the RGB detection result and the depth detection result, and aligning through a time stamp; and fusing the RGB detection result and the depth detection result, wherein the fusion comprises, but is not limited to, ioU matching algorithm, and generating a fused detection result.
- 6. The method for multi-path parallel object detection and attribute identification according to claim 5, wherein the performing object management according to the fused detection result and generating an attribute identification task for each object includes: receiving the fused detection result; Associating with the currently tracked target, including updating the target track or creating a new target using, but not limited to, ioU matching algorithms; Generating attribute identification tasks for each target every preset frame number, wherein the attribute identification tasks comprise but are not limited to gender, staff and sight; And distributing the attribute identification task to a corresponding attribute identification queue, wherein the attribute identification queue comprises but is not limited to a gender identification queue, an employee identification queue and a sight line identification queue.
- 7. The method for multi-path parallel object detection and attribute identification according to claim 6, wherein the performing the attribute identification poll and updating the attribute identification result to the corresponding object comprises: Taking out the attribute identification task from the respective attribute identification queue; Intercepting a target area from original data according to attribute identification task requirements, wherein the original data is an RGB image and a depth image; Operating an attribute identification algorithm, and carrying out attribute identification polling to obtain a result; And updating the result to the corresponding target.
- 8. The multi-path parallel based object detection and attribute identification method of claim 7 wherein the attribute identification poll comprises: Cutting head and shoulder areas from RGB images according to bbox coordinates for each detected target, and storing the head and shoulder areas into a buffer area of a key value pair of a target ID-head and shoulder image, wherein the buffer validity period of the buffer area is bound with a target tracking life cycle, and the buffer area is automatically cleared after the target disappears; carrying out polling task scheduling, and distributing attribute tasks according to the system frame sequence number and counting from the first occurrence frame of the target; The system comprises a sex identification task when a frame number is 1, an employee identification task when the frame number is 2, a sight line identification task when the frame number is 3, and a cycle distribution attribute task of the frame number according to the numbers 1,2 and 3; When the subsequent frame executes the attribute task, the target ID-head shoulder diagram of the buffer area is directly read, and the cutting step is skipped; And distributing threads according to the 'object ID', wherein each thread independently executes the polling flow of a single object, and the polling tasks of different objects are processed in parallel.
- 9. The method for multi-path parallel based object detection and attribute recognition according to claim 7, wherein the performing event judgment according to the updated object and outputting an event record comprises: judging an event according to the updated target track, wherein the target track contains attributes and positions; wherein the event judgment comprises a crossing warning line event and a stay overtime event; An event record is generated and output.
- 10. The method for multi-path parallel based object detection and attribute identification according to claim 9, wherein the performing data release includes: Managing data using intelligent pointers; When the data is not used by any task any more, the reference count of the intelligent pointer is reset to zero, a release function is automatically called, and the data memory is returned to hardware.
Description
Target detection and attribute identification method based on multipath parallelism Technical Field The application belongs to the technical field of personnel detection, and particularly relates to a target detection and attribute identification method based on multipath parallelism. Background In the analysis of passenger flow statistics and sex preference of large-scale chain commercial supercustomers, traditional commercial supercustomers rely on a single-mode camera, and the problems that low light (such as fresh areas and underground supermarkets) has high omission rate (more than or equal to 8 percent), the timeliness is insufficient due to the fact that single frame processing takes more than 34ms, and data delay is caused by the fact that customer sex identification and passenger flow statistics are serially processed, and the like are solved, and real-time shelf adjustment and sales promotion personnel scheduling cannot be supported. The existing binocular depth target detection technology mostly adopts a serial processing mode, firstly RGB image detection and then depth image detection are adopted, or otherwise hardware parallel computing power is not fully utilized, overall processing time delay is high, single frame reaches 34ms, the scheme in the prior art carries out multi-attribute identification (sex, staff and sight) on the same target or single frame in series, or target images are repeatedly cut every frame, so that 10 target attribute identification time consumption reaches 41ms, and computing power waste exists in repeated cutting. Meanwhile, the design of multiplexing the first frame cut image and distributing the attribute task according to frame polling is lacking, when the same target multi-attribute is identified, the accumulated time delay is high, or the calculation is repeated (repeated cutting) and the efficiency and the calculation force cannot be balanced, the calculation force of the ARM Linux architecture (CPU+NPU heterogeneous architecture) is not combined with the polling strategy scheduling, and the marginal time consumption of single target attribute identification is difficult to further reduce. Disclosure of Invention In order to overcome the defects of the prior art, the application provides the target detection and attribute identification method based on multipath parallelism, and the identification efficiency is greatly improved by adopting a two-path parallel detection superposition attribute identification polling mechanism. The invention provides a target detection and attribute identification method based on multipath parallelism, which adopts a binocular depth camera to collect data, and comprises the following steps: acquiring acquired data from a binocular depth camera, and preprocessing to obtain an RGB image and a depth image; performing target detection on the RGB image and generating an RGB detection result; performing target detection on the depth map and generating a depth detection result; carrying out fusion processing on the RGB detection result and the depth detection result, and generating a fused detection result; Performing target management according to the fused detection result, and generating an attribute identification task for each target; performing attribute identification polling, and updating an attribute identification result to a corresponding target; Judging the event according to the updated target, and outputting an event record; Data release is performed. Further, according to the target detection and attribute identification method based on multipath parallelism provided by the application, the acquired data is acquired from the binocular depth camera, and the RGB image and the depth image are obtained through preprocessing, comprising: acquiring one frame of data from a hardware interface, wherein the one frame of data comprises an RGB image, a depth image and 16-bit depth data; Constructing an RGB Data object and a depth Data object; Pushing the RGB Data object Data and the depth Data object Data to an RGB image queue and a depth image queue respectively; and if the queue data is full, removing the data with the oldest time stamp in the queue, and ensuring that the data with the same time stamp in the RGB image queue and the depth image queue are removed. Further, according to the method for detecting targets and identifying attributes based on multiple paths of parallelism provided by the application, the method for detecting targets and generating RGB detection results on the RGB map comprises the following steps: fetching RGB image data from the RGB image queue; performing target detection on the RGB image; And generating an RGB detection result. Further, according to the method for detecting targets and identifying attributes based on multiple paths of parallelism provided by the application, the steps of performing target detection on the depth map and generating a depth detection result include: Retrieving depth image