Target detection and statistical method, system, device and storage medium
By detecting the object and mirror detection of the image to be processed, and determining whether the target needs to be screened based on the depth estimate, the problem of high false detection and false alarm rates in the prior art is solved, and higher detection accuracy and lower false alarm rates are achieved.
Patent Information
- Application Number
- CN202111282862.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-01
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2041-11-01
AI Technical Summary
When the prior art determines whether the number of objects exceeds the threshold, it is susceptible to light and temperature, and the false detection rate is high; at the same time, the reflective mirror causes repeated detection of the target, and the false alarm rate is high or the false detection rate is high.
By detecting the object and detecting the reflective mirror on the image to be processed, we judge whether the target is located in the reflective mirror, and judge whether it is a target that needs to be screened based on the depth estimate, and count the number of targets after removing the repeated targets.
It improves the accuracy of target detection and statistics, reduces the false alarm rate and missed detection rate, and can effectively eliminate duplicate targets in the reflective mirror.
Smart Images

Figure CN114005087B_ABST
Abstract
Description
Background Art
[0002] With the rapid development of modern science and technology and the gradual development and improvement of image and video acquisition technology, smart security video surveillance has gradually been well used in people's lives and commercial places. During the epidemic, there are still crowds and high traffic, which seriously affects the difficulty of urban epidemic prevention and control, urban public health, and public safety management, and seriously threatens the safety of life and property of citizens, and even causes irreparable losses in some key places.
[0003] At present, there are three main methods to determine whether the number of objects exceeds the threshold (the above-mentioned crowd gathering and passenger flow statistics). The first is to rely on manual regular inspections of key area cameras to solve the crowd gathering and excessive traffic congestion caused by high traffic. However, this method is not only time-consuming and labor-intensive, but also requires high labor costs. In addition, manual inspections can only be carried out regularly, which is prone to omissions or negligence.
[0004] The second method is to use IoT devices (passive infrared, thermal imaging, etc.) to detect signal changes and regional heat maps to achieve passenger flow statistics. However, this method is easily affected by light and temperature and is prone to false detection. At the same time, IoT devices have a short detection distance and cannot detect a large range or directly display the details of personnel activities.
[0005] The third method is to use a target detection algorithm based on deep learning. The disadvantages of this method are also obvious. When people block or overlap the target, it will lead to missed detection. When glass curtain walls, river surfaces and other reflective mirrors appear, repeated detection of the target will lead to false detection, resulting in a high false alarm rate or high missed detection rate.
[0006] For example, the existing patent CN111832489A proposes a method and system for estimating subway crowd density based on target detection, which uses the target detection algorithm yoloV3 to detect human heads, but cannot detect small targets or situations where human heads block the body. In addition, the ROI area, i.e., the designated area, and the reflective mirror surface used in this solution to solve the problem of occlusion use a mask to directly fill the image with black, which means that the entire picture cannot be detected, which directly leads to the omission of human heads and the passenger flow detection value is smaller than the actual value. Summary of the invention
[0007] In response to the problems in the prior art, the purpose of the present invention is to provide a target detection and statistics method, system, device and storage medium. By detecting the target and the reflective mirror surface and determining whether the target is located within the reflective mirror surface based on the depth, repeated targets within the reflective mirror surface can be effectively eliminated, thereby improving the accuracy of target detection and statistics.
[0008] The embodiment of the present invention provides a target detection and statistics method, comprising the following steps:
[0009] Performing target detection on the image to be processed, taking the detected target as a first candidate target, and determining a position of the first candidate target in the image to be processed;
[0010] Performing reflective mirror detection on the image to be processed to determine the position of the reflective mirror in the image to be processed;
[0011] Determine, according to the position of the first candidate target in the image to be processed and the position of the reflective mirror, whether the position of the first candidate target is within the position range of the reflective mirror, and use the first candidate target within the position range of the reflective mirror as the target to be determined;
[0012] Determining whether the target to be determined is a target to be screened out according to the depth estimation value of the target to be determined and the depth estimation value of the reflective mirror surface;
[0013] After removing the targets to be screened out from the first candidate targets, the remaining first candidate targets are used as second candidate targets;
[0014] Count the number of targets in the image to be processed according to the second candidate targets.
[0015] In some embodiments, the performing of target detection on the image to be processed comprises the following steps:
[0016] The BiseNet self-training network based on semantic segmentation is used to perform target detection on the image to be processed.
[0017] In some embodiments, performing reflective mirror detection on the image to be processed includes the following steps:
[0018] A GDNET network based on deep learning is used to perform reflective mirror detection on the image to be processed.
[0019] In some embodiments, after the image to be processed is subjected to reflective mirror detection, the following steps are also included:
[0020] Determining whether a reflective mirror surface is detected in the image to be processed;
[0021] If yes, determining the position of the reflective mirror surface in the image to be processed;
[0022] If not, count the number of targets in the image to be processed according to the first candidate targets.
[0023] In some embodiments, determining whether the position of the first candidate target is within the position range of the reflective mirror surface according to the position of the first candidate target in the image to be processed and the position of the reflective mirror surface comprises the following steps:
[0024] Based on the position of the first candidate target in the image to be processed and the position of the reflective mirror, a ray method or an IOU intersection-over-union calculation method is used to determine whether the position of the first candidate target is within the position range of the reflective mirror.
[0025] In some embodiments, after determining whether the position of the first candidate target is within the position range of the reflective mirror surface according to the position of the first candidate target in the image to be processed and the position of the reflective mirror surface, the following steps are further included:
[0026] If there is a first candidate target within the position range of the reflective mirror, taking the first candidate target within the position range of the reflective mirror as the target to be determined;
[0027] If there is no first candidate target within the position range of the reflective mirror, the number of targets in the image to be processed is counted according to the first candidate target.
[0028] In some embodiments, judging whether the target to be determined is a target to be screened out according to the depth estimation value of the target to be determined and the depth estimation value of the reflective mirror surface comprises the following steps:
[0029] Obtaining a depth estimation value of the target to be determined;
[0030] Obtaining a depth estimation value of the reflective mirror surface;
[0031] Traversing the targets to be determined in sequence, and comparing the depth estimation value of each target to be determined with the depth estimation value of the reflective mirror surface;
[0032] If the depth estimation value of a target to be determined is greater than or equal to the depth estimation value of the reflective mirror surface, then determining the first candidate target as a target to be screened out;
[0033] If the depth estimation value of a target to be determined is less than the depth estimation value of the reflective mirror surface, the first candidate target is determined as a target that does not need to be screened out.
[0034] In some embodiments, a self-supervised depth prediction network is used to obtain the depth estimation value of the target to be determined and the depth estimation value of the reflective mirror surface.
[0035] In some embodiments, a Monodepth2 network is used to obtain a depth estimation value of the target to be determined and a depth estimation value of the reflective mirror surface.
[0036] The embodiment of the present invention further provides a target detection and statistics system, which is applied to the above target detection and statistics method, and the system includes:
[0037] The target detection module is used to perform target detection on the image to be processed, take the detected target as a first candidate target, and determine the position of the first candidate target in the image to be processed;
[0038] A mirror detection module, used to perform reflective mirror detection on the image to be processed, and determine the position of the reflective mirror in the image to be processed;
[0039] A position determination module, used to determine whether the position of the first candidate target is within the position range of the reflective mirror surface according to the position of the first candidate target in the image to be processed and the position of the reflective mirror surface, and use the first candidate target within the position range of the reflective mirror surface as the target to be determined;
[0040] a target screening module, configured to determine whether the target to be determined is a target to be screened out according to the depth estimation value of the target to be determined and the depth estimation value of the reflective mirror surface, and remove the target to be screened out from the first candidate targets, and use the remaining first candidate targets as second candidate targets;
[0041] A target counting module is used to count the number of targets in the image to be processed based on the second candidate targets.
[0042] The embodiment of the present invention further provides a target detection and statistics device, including:
[0043] processor;
[0044] a memory storing executable instructions of the processor;
[0045] The processor is configured to perform the steps of the target detection and statistical method by executing the executable instructions.
[0046] An embodiment of the present invention also provides a computer-readable storage medium for storing a program, wherein the program implements the steps of the target detection and statistical method when executed by a processor.
[0047] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
[0048] The target detection and statistics method, system, device and storage medium of the present invention have the following beneficial effects:
[0049] The present invention first detects the target and the reflective mirror in the image to be processed, determines the position of the target and the position of the reflective mirror, then judges whether the detected target is within the position range of the reflective mirror according to the position, and then further judges whether the target belongs to the target to be screened out, and then removes the target to be screened out, and obtains the number of targets with high accuracy by counting, which will not miss detection on the one hand, and solves the problem of repeated counting caused by the reflective mirror on the other hand, improves the accuracy of detection, and greatly reduces the false alarm rate. The target detection and statistical method can be applied to the detection and statistics of personnel targets in passenger flow analysis, and can be applied to the basis of the subsequent timely response control of the number of passenger flow personnel. In addition, the target detection and statistical method can also be applied to the detection and statistics of personnel targets in other scenes, such as the detection and statistics of personnel targets in a public place or a factory. Further, the target detection and statistical method can also be applied to the detection and statistics of other objects, such as the detection and statistics of obstacles, the detection and statistics of vehicles, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Other features, objectives and advantages of the present invention will become more apparent from a reading of the detailed description of non-limiting embodiments made with reference to the following accompanying drawings.
[0051] Figure 1 is a flow chart of a target detection and statistics method according to an embodiment of the present invention;
[0052] Figure 2 is a flow chart of detecting a reflective mirror surface according to an embodiment of the present invention;
[0053] Figure 3 is a flow chart of determining whether a first candidate target is within the position range of a reflective mirror surface according to an embodiment of the present invention;
[0054] Figure 4 is a flow chart of determining whether the target to be determined is a target to be screened out according to an embodiment of the present invention;
[0055] Figure 5 is a schematic diagram of the structure of a target detection and statistics system according to an embodiment of the present invention;
[0056] Figure 6 is a schematic diagram of the structure of a target detection and counting device according to an embodiment of the present invention;
[0057] Figure 7 It is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION
[0058] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0059] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0060] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined. Therefore, the actual execution order may be changed according to the actual situation.
[0061] like Figure 1 As shown, an embodiment of the present invention provides a target detection and statistics method, comprising the following steps:
[0062] S100: performing target detection on the image to be processed, taking the detected target as a first candidate target, and determining a position of the first candidate target in the image to be processed, wherein the position of the first candidate target in the image to be processed is a coordinate position, which is represented by a mask;
[0063] In this embodiment, the image to be processed here may be, for example, an image captured in real time by a camera, and the target is a person target. For example, when the method is applied to passenger flow statistics in a key area, the image to be processed is an image captured in real time by a camera in the key area, and the method is used to count people;
[0064] In other implementations, the image to be processed may also be an image stored in a storage device, and the target may also be another type of target, such as a specific type of item, etc.;
[0065] S200: performing reflective mirror detection on the image to be processed to determine the position of the reflective mirror in the image to be processed, where the position of the reflective mirror in the image to be processed is the coordinate position of the reflective mirror in the image to be processed, which is represented by a mask;
[0066] S300: determining, according to the position of the first candidate target in the image to be processed and the position of the reflective mirror, whether the position of the first candidate target is within the position range of the reflective mirror, and taking the first candidate target within the position range of the reflective mirror as the target to be determined;
[0067] S400: judging whether the target to be determined is a target to be screened out according to the depth estimation value of the target to be determined and the depth estimation value of the reflective mirror surface;
[0068] S500: After removing the targets to be screened out from the first candidate targets, the remaining first candidate targets are used as second candidate targets;
[0069] S600: Counting the number of targets in the image to be processed according to the second candidate targets, for example, counting the number of the second candidate targets as the target image in the image to be processed. When there are multiple cameras detecting a certain area, there are multiple images to be processed that may contain duplicate targets, and the areas detected by the multiple cameras may be deduplicated before counting.
[0070] The target detection and statistical method of the present invention first detects the target and the reflective mirror in the image to be processed through the steps S100 and S200 to determine the position of the target and the position of the reflective mirror, and then judges whether the detected target is within the position range of the reflective mirror according to the position through step S300, and then further judges whether the target is a target to be screened out through step S400, and then removes the target to be screened out through step S500, and obtains the number of targets with high accuracy through step S600. On the one hand, there will be no missed detection, and on the other hand, it solves the problem of repeated counting caused by the reflective mirror, improves the accuracy of detection, and greatly reduces the false alarm rate.
[0071] After the number of detected targets is obtained through statistics in step S600, subsequent processing can be performed based on the number of targets according to actual needs. For example, when applied to the passenger flow analysis scenario, it is determined whether the number of detected human targets exceeds a preset threshold. If it does not exceed the preset threshold, it means that the current number of passenger flow personnel has not reached the preset threshold, and no alarm is required. If it exceeds the preset threshold, it means that the current number of passenger flow personnel is too large, and an alarm needs to be issued or the staff needs to be notified to limit the flow.
[0072] In this embodiment, the step S100: performing target detection on the image to be processed includes the following steps:
[0073] The BiseNet self-training network based on semantic segmentation is used to perform target detection on the image to be processed. The BiseNet self-training network can be pre-trained based on different types of detection targets. For example, when used for personnel detection, personnel image samples are used to train the BiseNet self-training network, and when used for object detection, object image samples are used to train the BiseNet self-training network. The BiseNet self-training network of deep learning image semantic segmentation is used in the present invention. Compared with traditional image feature segmentation methods and target detection methods, the detection granularity is finer, which can solve the problem of missed detection caused by personnel occlusion and overlap, and can adapt to various weather changes to the image quality of the camera.
[0074] In this embodiment, in step S200, the reflective mirror detection is performed on the image to be processed, including the following steps:
[0075] The GDNET network based on deep learning is used to detect the reflective mirror surface of the image to be processed. The reflective mirror surface refers to the reflective area such as the glass curtain wall and the river surface. The GDNET network is an image mirror surface detection network based on semantic segmentation. It detects the reflective mirror surfaces such as the glass curtain wall and the river surface based on the features in the image, thereby being able to infer the reflective mirror surfaces such as the glass curtain wall and the river surface that appear in the image.
[0076] like Figure 2 As shown, in this embodiment, in the step S200, S210: after performing reflective mirror detection on the image to be processed, the following steps are also included:
[0077] S220: Determine whether a reflective mirror surface is detected in the image to be processed;
[0078] If yes, then S230: determine the position of the reflective mirror in the image to be processed, and then continue with steps S300 to S600 to count the number of targets in the image to be processed according to the second candidate targets after removing the targets in the reflective mirror;
[0079] If not, then S240: counting the number of targets in the image to be processed according to the first candidate targets, that is, no longer executing steps S300 to S600.
[0080] In this embodiment, the step S300: determining whether the position of the first candidate target is within the position range of the reflective mirror surface according to the position of the first candidate target in the image to be processed and the position of the reflective mirror surface, comprises the following steps:
[0081] Based on the position of the first candidate target in the image to be processed and the position of the reflective mirror, the ray method or IOU intersection over union calculation method is used to determine whether the position of the first candidate target is within the position range of the reflective mirror. The ray method is: regard the position range of the reflective mirror as a polygon, the first candidate target as a point, determine whether the point is in the polygon, start from the judgment point, draw a ray in the horizontal direction to the right (or left), and calculate the number of intersections between the ray and each edge of the polygon. If the number of intersections is an odd number, the point is inside the polygon, and if the number of intersections is an even number, the point is outside the polygon. IOU (Intersection over Union) is a standard for measuring the accuracy of detecting corresponding objects in a specific data set.
[0082] like Figure 3 As shown, in this embodiment, in the step S300, after S310: determining whether the position of the first candidate target is within the position range of the reflective mirror surface according to the position of the first candidate target in the image to be processed and the position of the reflective mirror surface, the following steps are also included:
[0083] S320: Determine whether there is a first candidate target located within the position range of the reflective mirror surface;
[0084] If there is a first candidate target located within the position range of the reflective mirror, S330: taking the first candidate target within the position range of the reflective mirror as the target to be determined, and then continuing with steps S400 to S600;
[0085] If there is no first candidate target within the position range of the reflective mirror, S340: counting the number of targets in the image to be processed according to the first candidate target, that is, steps S400 to S600 are no longer executed.
[0086] like Figure 4 As shown, in this embodiment, the step S400: judging whether the target to be determined is a target to be screened out according to the depth estimation value of the target to be determined and the depth estimation value of the reflective mirror surface, comprises the following steps:
[0087] S410: Obtaining a depth estimation value of the target to be determined;
[0088] S420: Obtaining a depth estimation value of the reflective mirror surface;
[0089] S430: traversing the targets to be determined in sequence, and comparing the depth estimation value of each target to be determined with the depth estimation value of the reflective mirror surface;
[0090] S440: If the depth estimation value of a target to be determined is greater than or equal to the depth estimation value of the reflective mirror surface, it means that the first candidate target is a reflective target or is located in the reflective mirror surface, and the first candidate target is determined to be a target to be screened out;
[0091] S450: If the depth estimation value of a target to be determined is less than the depth estimation value of the reflective mirror surface, determine the first candidate target as a target that does not need to be screened out.
[0092] In this embodiment, a self-supervised depth prediction network is used to obtain the depth estimation value of the target to be determined and the depth estimation value of the reflective mirror. Furthermore, the self-supervised depth prediction network is a Monodepth2 network, that is, the Monodepth2 network is used to obtain the depth estimation value of the target to be determined and the depth estimation value of the reflective mirror. The network is a method for using a combination of depth estimation and posture estimation networks to predict the depth estimation value of the target detected in a single frame image. In this embodiment, the depth of the reflective mirror is used as the reference depth, and the target depth is compared with the reference depth. Those above the reference depth are regarded as reflections or behind the mirror and filtered; those below the reference depth are regarded as normal targets and included in the statistics. Therefore, the present invention uses the deep learning mirror detection GDNet method in conjunction with the MonoDepth2 method based on self-supervision. A single camera is used to estimate and predict the distance between the person and the reflective mirror. The coordinate position and depth distance between the two are used to solve the problem of repeated counting caused by the reflective mirror, which greatly reduces the false alarm rate and improves the detection accuracy.
[0093] In summary, in the target detection and statistical method of this embodiment, the number of people is counted through semantic segmentation, image mirror detection and a self-supervised depth prediction mechanism, and the semantic segmentation algorithm is used to avoid the problem of inaccurate detection caused by occlusion and overlap of people. At the same time, mirror detection is combined with a depth prediction algorithm. First, the reflective mirror in the image is detected through the GDNet network, and then the reflective mirror and the depth estimation of the person are obtained through the Monodepth2 network, excluding people in the mirror area and whose depth is higher than the mirror depth, so as to solve the repeated counting of people caused by mirror reflection.
[0094] like Figure 5 As shown, an embodiment of the present invention provides a target detection and statistics system, which is applied to the above-mentioned target detection and statistics method, and the system includes:
[0095] The target detection module M100 is used to perform target detection on the image to be processed, take the detected target as a first candidate target, and determine the position of the first candidate target in the image to be processed;
[0096] The mirror detection module M200 is used to detect the reflective mirror surface of the image to be processed and determine the position of the reflective mirror surface in the image to be processed;
[0097] A position determination module M300, configured to determine whether the position of the first candidate target is within the position range of the reflective mirror surface according to the position of the first candidate target in the image to be processed and the position of the reflective mirror surface, and to use the first candidate target within the position range of the reflective mirror surface as the target to be determined;
[0098] The target screening module M400 is used to determine whether the target to be determined is a target to be screened out according to the depth estimation value of the target to be determined and the depth estimation value of the reflective mirror surface, and remove the target to be screened out from the first candidate targets, and use the remaining first candidate targets as second candidate targets;
[0099] The target counting module M500 is used to count the number of targets in the image to be processed according to the second candidate targets.
[0100] The target detection and statistics system of the present invention first detects the target and the reflective mirror in the image to be processed through the target detection module M100 and the mirror detection module M200 to determine the position of the target and the position of the reflective mirror, and then determines whether the detected target is within the position range of the reflective mirror according to the position through the position determination module M300, and then further determines whether the target is a target to be screened out through the target screening module M400, and then removes the target to be screened out through step S500, and obtains the number of targets with high accuracy through the target statistics module M500. On the one hand, there will be no missed detection, and on the other hand, it also solves the problem of repeated counting caused by the reflective mirror, thereby improving the accuracy of detection and greatly reducing the false alarm rate.
[0101] The target detection and statistics system can be applied to the detection and statistics of personnel targets in passenger flow analysis, and can communicate with the passenger flow personnel management and control system to transmit the number of personnel counted as the basis for subsequent timely response control of the number of passenger flow personnel. The target detection and statistics system can also communicate with management systems in other scenarios and be applied to the detection and statistics of personnel targets in other scenarios, such as the detection and statistics of personnel targets in a public place or a factory building. Furthermore, the target detection and statistics method can also be applied to the detection and statistics of other objects, such as the detection and statistics of obstacles, the detection and statistics of vehicles, etc.
[0102] An embodiment of the present invention also provides a target detection and statistics device, comprising a processor; a memory, in which executable instructions of the processor are stored; wherein the processor is configured to perform the steps of the target detection and statistics method by executing the executable instructions.
[0103] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits", "modules" or "platforms".
[0104] Refer to the following Figure 6 The electronic device 600 according to this embodiment of the present invention is described. Figure 6 The electronic device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0105] like Figure 6 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.
[0106] The storage unit stores a program code, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps of various exemplary embodiments of the present invention described in the above target detection and statistical method section of this specification. For example, the processing unit 610 can perform the following steps: Figure 1 Follow the steps shown in .
[0107] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0108] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0109] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0110] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0111] In the target detection and statistics device, the program in the memory implements the steps of the target detection and statistics method when executed by the processor. Therefore, the computer storage medium can also obtain the technical effects of the above-mentioned target detection and statistics method.
[0112] The embodiment of the present invention also provides a computer-readable storage medium for storing a program, which implements the steps of the target detection and statistical method when executed by a processor. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is executed on a terminal device, the program code is used to cause the terminal device to perform the steps of various exemplary embodiments of the present invention described in the above target detection and statistical method section of this specification.
[0113] refer to Figure 7 As shown, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be executed on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0114] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0115] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0116] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0117] When the program in the computer storage medium is executed by the processor, the steps of the target detection and statistical method are implemented. Therefore, the computer storage medium can also obtain the technical effects of the above-mentioned target detection and statistical method.
[0118] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A target detection and statistics method, characterized in that: The method comprises: Performing target detection on the image to be processed, taking the detected target as a first candidate target, and determining a position of the first candidate target in the image to be processed; Performing reflective mirror detection on the image to be processed to determine the position of the reflective mirror in the image to be processed; Determine, according to the position of the first candidate target in the image to be processed and the position of the reflective mirror, whether the position of the first candidate target is within the position range of the reflective mirror, and use the first candidate target within the position range of the reflective mirror as the target to be determined; Determining whether the target to be determined is a target to be screened out according to the depth estimation value of the target to be determined and the depth estimation value of the reflective mirror surface; After removing the targets to be screened out from the first candidate targets, the remaining first candidate targets are used as second candidate targets; Count the number of targets in the image to be processed according to the second candidate targets.
2. The target detection and statistical method according to claim 1, characterized in that: The target detection of the image to be processed comprises the following steps: The BiseNet self-training network based on semantic segmentation is used to perform target detection on the image to be processed.
3. The target detection and statistical method according to claim 1, characterized in that: Performing reflective mirror detection on the image to be processed comprises the following steps: A GDNET network based on deep learning is used to perform reflective mirror detection on the image to be processed.
4. The target detection and statistical method according to claim 1, characterized in that: After the image to be processed is subjected to reflective mirror detection, the following steps are also included: Determining whether a reflective mirror surface is detected in the image to be processed; If yes, determining the position of the reflective mirror surface in the image to be processed; If not, count the number of targets in the image to be processed according to the first candidate targets.
5. The target detection and statistical method according to claim 1, characterized in that: Determining whether the position of the first candidate target is within the position range of the reflective mirror surface according to the position of the first candidate target in the image to be processed and the position of the reflective mirror surface comprises the following steps: Based on the position of the first candidate target in the image to be processed and the position of the reflective mirror, a ray method or an IOU intersection-over-union calculation method is used to determine whether the position of the first candidate target is within the position range of the reflective mirror.
6. The target detection and statistical method according to claim 1, characterized in that: After determining whether the position of the first candidate target is within the position range of the reflective mirror surface according to the position of the first candidate target in the image to be processed and the position of the reflective mirror surface, the following steps are also included: If there is a first candidate target within the position range of the reflective mirror, taking the first candidate target within the position range of the reflective mirror as the target to be determined; If there is no first candidate target within the position range of the reflective mirror, the number of targets in the image to be processed is counted according to the first candidate target.
7. The target detection and statistical method according to claim 1, characterized in that: According to the depth estimation value of the target to be determined and the depth estimation value of the reflective mirror surface, judging whether the target to be determined is a target to be screened out comprises the following steps: Obtaining a depth estimation value of the target to be determined; Obtaining a depth estimation value of the reflective mirror surface; Traversing the targets to be determined in sequence, and comparing the depth estimation value of each target to be determined with the depth estimation value of the reflective mirror surface; If the depth estimation value of a target to be determined is greater than or equal to the depth estimation value of the reflective mirror surface, then determining the first candidate target as a target to be screened out; If the depth estimation value of a target to be determined is less than the depth estimation value of the reflective mirror surface, the first candidate target is determined as a target that does not need to be screened out.
8. The target detection and statistical method according to claim 7, characterized in that: A self-supervised depth prediction network is used to obtain a depth estimation value of the target to be determined and a depth estimation value of the reflective mirror surface.
9. The target detection and statistical method according to claim 8, characterized in that: The Monodepth2 network is used to obtain the depth estimation value of the target to be determined and the depth estimation value of the reflective mirror surface.
10. A target detection and statistics system, characterized in that: The target detection and statistical method applied to any one of claims 1 to 9, wherein the system comprises: The target detection module is used to perform target detection on the image to be processed, take the detected target as a first candidate target, and determine the position of the first candidate target in the image to be processed; A mirror detection module, used to perform reflective mirror detection on the image to be processed, and determine the position of the reflective mirror in the image to be processed; A position determination module, used to determine whether the position of the first candidate target is within the position range of the reflective mirror surface according to the position of the first candidate target in the image to be processed and the position of the reflective mirror surface, and use the first candidate target within the position range of the reflective mirror surface as the target to be determined; a target screening module, configured to determine whether the target to be determined is a target to be screened out according to the depth estimation value of the target to be determined and the depth estimation value of the reflective mirror surface, and remove the target to be screened out from the first candidate targets, and use the remaining first candidate targets as second candidate targets; A target counting module is used to count the number of targets in the image to be processed based on the second candidate targets.
11. A target detection and counting device, characterized in that: include: processor; a memory storing executable instructions of the processor; The processor is configured to perform the steps of the target detection and statistical method according to any one of claims 1 to 9 by executing the executable instructions.
12. A computer-readable storage medium, characterized in that: Used to store a program, which, when executed by a processor, implements the steps of the target detection and statistical method described in any one of claims 1 to 9.
Citation Information
Patent Citations
False target identification method and device and computer equipment
CN112926676A
Key frame screening method based on interested target distribution
CN113112519A