Target detection method, terminal equipment and storage medium

By adopting dual imaging method and stitching image technology, combined with IOU value calculation, the problem of low portrait detection accuracy in TOF target detection is solved, significantly improving the detection accuracy, especially in children's detection.

CN119723610APending Publication Date: 2025-03-28XIAMEN MILESIGHT IOT CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411663681.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

When existing TOF object detection methods deal with portraits of different heights, they are prone to missed and missed detection problems, especially children with low detection accuracy and difficult to distinguish from background.

Method used

Using the dual imaging method, two depth images are generated by obtaining the installation height and standard height of the depth sensor, and then stitching them for target recognition. The first imaging method uses adult standard height, and the second imaging method uses children standard height, and determines the overlap of the target box through IOU value calculation.

Benefits of technology

Through double filtering, invalid areas are removed, human characteristics are enhanced, detection accuracy is significantly improved, especially in children's detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723610A_ABST
    Figure CN119723610A_ABST
Patent Text Reader

Abstract

The invention relates to a target detection method, terminal equipment and a storage medium. The method comprises the following steps: acquiring an installation height H, an adult standard height and a child standard height; collecting depth images generated by adopting two different imaging methods during each sampling; in the two different imaging methods, the same method comprises the following steps: replacing the measured depth value greater than the installation height H with the installation height H; replacing the measured depth value smaller than H-P with H-P; mapping different depth values in a range from H-P to H to different colors; the difference point is that the standard height P respectively corresponds to an adult and a child; splicing the two kinds of depth images; after a target recognition model is constructed and trained, target recognition is carried out on the spliced image; and determining an output target based on the IOU value between the target frames identified by the two depth images. According to the invention, the detection accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of target detection, and in particular to a target detection method, terminal equipment and storage medium. Background Art

[0002] TOF is a depth sensor used to measure the depth value (i.e., distance value) from the sensor to the real object in the area. In TOF detection, the depth value is usually normalized, an image is generated, and then a neural network model is used for training and detection. There are usually two solutions for depth value normalization: 1) Map the depth value to 0-255 (the range of image values), generate an image, and then use the image to detect the target; 2) Map the depth value to 0-255 (the range of image values), generate an image, and then use the traditional background difference division to calculate the moving object and its shape for target detection. The existing solutions have the following technical defects:

[0003] (1) When mapping depth values ​​into images, the colors of portraits at different heights are different. When detecting targets, it is necessary to be compatible with people of different colors, which can easily lead to missed detections and false detections.

[0004] (2) Due to the low height of children, the imaging effect in many cases is similar to that of chairs, flower beds, etc., so high-precision child detection cannot be achieved. Summary of the invention

[0005] In order to solve the above problems, the present invention proposes a target detection method, a terminal device and a storage medium.

[0006] The specific plan is as follows:

[0007] A target detection method comprises the following steps:

[0008] S1: Obtain the installation height H of the depth sensor, and simultaneously obtain the configured standard height of adults and standard height of children;

[0009] S2: At each sampling, depth images generated by two different imaging methods are collected; in the two different imaging methods, the similarities include: the measured depth value greater than the installation height H is replaced by the installation height H; the measured depth value less than HP is replaced by HP, P represents the standard height; different depth values ​​within the range of HP to H are mapped to different colors; the differences include: in the first imaging method, the standard height P adopts the standard height of adults; in the second imaging method, the standard height P adopts the standard height of children;

[0010] S3: stitching the two acquired depth images;

[0011] S4: After building and training the target recognition model, target recognition is performed on the spliced ​​images;

[0012] S5: Calculate the IOU value between the target frames recognized by the two depth images, set the two target frames whose IOU value is greater than the threshold to correspond to the same target; set the two target frames whose IOU value is less than or equal to the threshold to correspond to different targets, and output all the targets contained in the two depth images.

[0013] Furthermore, the method for obtaining the installation height H is: obtaining a depth image collected by the depth sensor in the absence of obstacles, extracting data in an area centered on the center point of the image in the depth image, and taking the average value of the extracted data as the installation height H.

[0014] Furthermore, an area centered on the center point of the image is a square whose center point coincides with the center point of the depth image.

[0015] Furthermore, the standard height for adults is 170 cm and the standard height for children is 120 cm.

[0016] Further, when different depth values ​​in the range of HP to H are mapped to different colors, the depth values ​​in the range of HP to H are mapped to 0-255 and then rendered with colors.

[0017] Furthermore, the threshold is set to 0.3.

[0018] A target detection terminal device comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method in an embodiment of the present invention when executing the computer program.

[0019] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described above in an embodiment of the present invention are implemented.

[0020] The present invention adopts the above technical solution, removes invalid areas through double filtering, enhances human features, and improves detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 Shown is a flow chart of a method according to a first embodiment of the present invention.

[0022] Figure 2 The figure shows a depth image generated by using the first imaging method in this embodiment.

[0023] Figure 3 The figure shows a depth image generated by using the second imaging method in this embodiment.

[0024] Figure 4 Shown is a stitched image generated in this embodiment. DETAILED DESCRIPTION

[0025] To further illustrate various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementations and advantages of the present invention.

[0026] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.

[0027] Embodiment 1:

[0028] The embodiment of the present invention provides a target detection method, such as Figure 1 As shown, the method comprises the following steps:

[0029] S1: Obtain the installation height H of the depth sensor, and simultaneously obtain the configured standard height of an adult and standard height of a child.

[0030] In this embodiment, the depth sensor is TOF, and the method for obtaining the installation height H is as follows: obtain a depth image collected by the depth sensor without obstacles (no people or objects between the depth sensor and the floor), extract data in an area centered on the center point of the image in the depth image, and use the average value of the extracted data as the installation height H. An area centered on the center point of the image can be a square whose center point coincides with the center point of the depth image, such as a 20*20 square. Obtaining the installation height H by the above-mentioned averaging method can obtain more accurate data.

[0031] In this embodiment, considering that the height of an adult is about 160cm-180cm, the average value of the standard height of adults is 170cm, and the standard height of children is set to 120cm, so that there is a large difference between the standard height of adults and the standard height of children.

[0032] S2: At each sampling, depth images generated by two different imaging methods are acquired; in the two different imaging methods, the similarities include: the measured depth value greater than the installation height H is replaced by the installation height H; the measured depth value less than HP is replaced by HP, P represents the standard height; different depth values ​​in the range of HP to H are mapped to different colors; the differences include: in the first imaging method, the standard height P adopts the standard height of adults; in the second imaging method, the standard height P adopts the standard height of children.

[0033] By replacing the measured depth value greater than the installation height H with the installation height H and replacing the measured depth value less than HP with HP, interference of other objects other than the corresponding height of the human target on target recognition can be reduced.

[0034] When mapping different depth values ​​in the range of HP to H to different colors, those skilled in the art can set it according to their needs. In this embodiment, in order to facilitate higher recognition, considering that the distinction between red and blue is relatively large, the depth values ​​in the range of HP to H are mapped to 0-255 and then rendered with colors, so that HP corresponds to red, H corresponds to blue, and the transition between HP and H is red→yellow→blue. Figure 2 The figure shows the depth image generated by the first imaging method. The head of the adult in the upper left corner is red and the feet are blue, which can be easily identified. However, the four children in the lower right corner are mostly blue, which is close to the background color and is difficult to identify. Figure 3 The figure shows a depth image generated by the second imaging method. The adult in the upper left corner has a red head and blue feet, which can still be well identified. The heads of the four children in the lower right corner are also red, making their features more obvious and easier to identify.

[0035] S3: stitching the two acquired depth images.

[0036] In this embodiment, the spliced ​​image is as follows Figure 4 shown.

[0037] S4: After building and training the target recognition model, target recognition is performed on the spliced ​​images.

[0038] The target recognition model may adopt a conventional model, but when training the model, the training set is composed of the spliced ​​images obtained through steps S2 and S3, and the targets contained in each depth image are annotated in the spliced ​​images.

[0039] S5: Calculate the IOU (intersection-over-union) value between the target frames identified by the two depth images, set the two target frames with an IOU value greater than a threshold to correspond to the same target; set the two target frames with an IOU value less than or equal to a threshold to correspond to different targets, and output all targets contained in the two depth images.

[0040] In this embodiment, the threshold is set to 0.3. When performing IOU calculation, the two depth images are overlapped, and then the overlap degree of the two target frames is obtained based on the IOU value between the target frames. When the IOU value is greater than the threshold, it means that the overlap degree is high and the same target can be considered; otherwise, different targets are considered.

[0041] The embodiment of the present invention can obtain a stable person feature at any height, greatly improving the accuracy of adult and child target detection.

[0042] Embodiment 2:

[0043] The present invention also provides a target detection terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the above-mentioned method embodiment of the first embodiment of the present invention when executing the computer program.

[0044] Further, as an executable solution, the target detection terminal device can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The target detection terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the composition structure of the target detection terminal device described above is merely an example of the target detection terminal device and does not constitute a limitation on the target detection terminal device. It may include more or less components than the above, or a combination of certain components, or different components. For example, the target detection terminal device may also include input and output devices, network access devices, buses, etc., which are not limited in the embodiments of the present invention.

[0045] Further, as an executable solution, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the target detection terminal device, and uses various interfaces and lines to connect various parts of the entire target detection terminal device.

[0046] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the target detection terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0047] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method in the embodiment of the present invention are implemented.

[0048] If the module / unit integrated in the target detection terminal device 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 present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory) and software distribution medium, etc.

[0049] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.

Claims

1. A target detection method, characterized in that: The following steps are involved: S1: Obtain the installation height H of the depth sensor, and simultaneously obtain the configured standard height of adults and standard height of children; S2: At each sampling, depth images generated by two different imaging methods are collected; in the two different imaging methods, the similarities include: the measured depth value greater than the installation height H is replaced by the installation height H; the measured depth value less than HP is replaced by HP, P represents the standard height; different depth values ​​within the range of HP to H are mapped to different colors; the differences include: in the first imaging method, the standard height P adopts the standard height of adults; in the second imaging method, the standard height P adopts the standard height of children; S3: stitching the two acquired depth images; S4: After building and training the target recognition model, target recognition is performed on the spliced ​​images; S5: Calculate the IOU value between the target frames recognized by the two depth images, set the two target frames whose IOU value is greater than the threshold to correspond to the same target; set the two target frames whose IOU value is less than or equal to the threshold to correspond to different targets, and output all the targets contained in the two depth images.

2. The target detection method according to claim 1, characterized in that: The method for obtaining the installation height H is as follows: obtain a depth image collected by the depth sensor in the absence of obstacles, extract data in an area centered on the center point of the image in the depth image, and use the average value of the extracted data as the installation height H.

3. The target detection method according to claim 2, characterized in that: An area centered on the center point of the image is a square whose center point coincides with the center point of the depth image.

4. The target detection method according to claim 1, characterized in that: The standard height for adults is 170 cm and the standard height for children is 120 cm.

5. The target detection method according to claim 1, characterized in that: When mapping different depth values ​​in the range of HP to H to different colors, the depth values ​​in the range of HP to H are mapped to 0-255 and then rendered with colors.

6. The target detection method according to claim 1, characterized in that: The threshold is set to 0.

3.

7. A target detection terminal device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when executing the computer program.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Shopping cart overflow rate detection method and device based on depth image

    CN121661576A

  • A shopping cart overfill rate detection method and device based on depth images

    CN121661576B

  • Identification method and device based on binocular depth image

    CN121686517A