A target detection method, device, system and computer readable storage medium
Through the comprehensive judgment of multi-frame video frames and the statistical method of target judgment set, the existing target detection method has solved the problem of high recognition error rate in complex scenarios, improving detection accuracy and reducing the occurrence of false alarms.
Patent Information
- Application Number
- CN202010630638.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-03
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2040-07-03
AI Technical Summary
The existing object detection methods have high recognition error rate and poor robustness in complex scenarios, and are prone to false alarms, especially when the light changes, the recognition accuracy is not high.
Comprehensive judgment is made through the judgment results of multi-frame video frames, count the number of frames with the same judgment results in the continuous video frame sequence, determine the detection result when the preset frame number condition is met, and use the target judgment set to ensure continuity and comprehensiveness Object detection.
It improves the accuracy of target detection, reduces the occurrence of false alarms, enhances the recognition ability in complex scenarios, and avoids misjudgment and misjudgment of single-frame judgments.
Smart Images

Figure CN114092845B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to a target detection method, device, system and computer-readable storage medium. Background Art
[0002] Object detection is a kind of image segmentation based on the geometric and statistical features of the object. It combines the segmentation and recognition of the object into one. Its accuracy and real-time performance are important capabilities of the entire system. Especially in complex scenes, when multiple objects need to be processed in real time, automatic object extraction and recognition are particularly important.
[0003] At present, target detection mostly uses foreground detection algorithms based on traditional image processing methods, including foreground detection algorithms based on background update (Visual Background Extractor, VIBE), Gaussian Mixture Model (Gaussian Mixture Model, GMM) to extract foreground in specific areas. However, such methods are heavily dependent on the accuracy of background modeling, are greatly affected by lighting, have poor robustness, and have a high recognition error rate. In the case of regional target detection alarms, false alarms often occur. Therefore, there is an urgent need for a target detection method with a high recognition accuracy. Summary of the invention
[0004] The present application provides a target detection method, device, system and computer-readable storage medium, aiming to solve the problem of high recognition error rate of existing target detection methods, and provides a target detection method that performs comprehensive judgment through the judgment results of multiple frames of video frames, thereby improving the accuracy of target detection and avoiding the occurrence of false alarms.
[0005] According to one of the embodiments of the present application, a target detection method is provided, and the target detection method includes: obtaining a continuous video frame sequence; judging whether a specific target exists in each video frame in the continuous video frame sequence, and obtaining a judgment result for each video frame; counting the number of video frames with the same judgment result in the continuous video frame sequence; when the number meets a preset frame number condition, determining a detection result of detecting the specific target.
[0006] In some embodiments, counting the number of video frames with the same judgment results in the continuous video frame sequence includes: obtaining a preset target judgment set for counting the number of judgment results; inserting the judgment results of each video frame in the continuous video frame sequence into the target judgment set in sequence to obtain a current target judgment set corresponding to each video frame in the continuous video frame sequence; and counting the number of video frames with the same judgment results based on the current target judgment set.
[0007] In some embodiments, the target judgment set is a fixed set of length K, where K is an integer value greater than 1, and the process of inserting the judgment result of each video frame in the continuous video frame sequence into the target judgment set in sequence to obtain a current target judgment set corresponding to each video frame in the continuous video frame sequence includes: respectively obtaining a frame value of each video frame in the continuous video frame sequence; respectively comparing the frame value of each video frame in the continuous video frame sequence with the length K to obtain a size comparison result; determining a first position information of inserting each video frame in the continuous video frame sequence into the target judgment set based on the size comparison result; and inserting the judgment result of each video frame in the continuous video frame sequence into the target judgment set in sequence based on the first position information to obtain a current target judgment set corresponding to each video frame in the continuous video frame sequence.
[0008] In some embodiments, the target judgment set is a dynamic set with an initial length of L, where L is an integer value greater than or equal to 1, and the number of video frames with the same statistical judgment results based on the current target judgment set includes: comparing the frame value of each video frame in the continuous video frame sequence with the length L to obtain a size comparison result; determining the statistical range of the current target judgment set based on the size comparison result; and calculating the number of video frames with the same statistical judgment results based on the statistical range of the current target judgment set.
[0009] In some embodiments, determining the statistical range of the current target judgment set based on the size comparison result includes: obtaining a preset statistical range threshold j, where j is an integer value greater than 0; for the frame value i of each video frame in the continuous video frame sequence, when the frame value i is greater than L, determining the statistical range of the current target judgment set to be an interval range from i-j+1 to i, where i is an integer value greater than 0; otherwise determining the statistical range of the current target judgment set to be an interval range from 1 to i.
[0010] In some embodiments, the preset frame number condition is that the number is greater than a first threshold.
[0011] In some embodiments, the preset frame number condition is that the number is less than a second threshold.
[0012] On the one hand, according to one of the embodiments of the present application, a target detection device is provided, and the target detection device includes: an acquisition module, the acquisition module is used to acquire a continuous video frame sequence; a judgment module, the judgment module is used to respectively judge whether there is a specific target in each video frame in the continuous video frame sequence, and obtain a judgment result for each video frame; a statistical module, the statistical module is used to count the number of video frames with the same judgment results in the continuous video frame sequence; and a determination module, the determination module is used to determine the detection result of the specific target when the number meets a preset frame number condition.
[0013] On the other hand, the present application also provides a target detection system, the system comprising:
[0014] one or more processors;
[0015] Memory; and
[0016] One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the target detection method.
[0017] On the other hand, the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program is loaded by a processor to execute the steps in the target detection method.
[0018] The present application comprehensively determines whether there is a specific target in the scene through the judgment results of multiple frames of video, thereby improving the accuracy of target detection and avoiding the occurrence of false alarms; at the same time, a target judgment set is used to count the judgment results of multiple frames of video, ensuring the continuity and comprehensive target detection process for each video frame. For example, for a continuous video frame sequence of 100 frames, the target judgment set can save all the judgment results of each video frame in the continuous video frame sequence of 100 frames using a dynamic set or using a fixed set to save them according to the judgment range. The target judgment set can be used to determine whether there is a specific target in a continuous video frame sequence within the range of 1-10 frames. The target judgment set can also be used to determine whether there is a specific target in a continuous video frame sequence within the range of 9-19 frames, thereby avoiding the omission and misjudgment of only a continuous video frame sequence of a dozen frames (for example, 1-10 frames, 11-20 frames) obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 is a schematic diagram of a scenario of an exemplary target detection application system provided in an embodiment of the present application;
[0021] Figure 2 is a schematic diagram of an exemplary target detection method provided in the embodiments of the present application;
[0022] Figure 3 This is a flow chart of an exemplary embodiment of counting the number of video frame judgment results provided in an embodiment of the present application;
[0023] Figure 4 This is a schematic diagram of an exemplary process for determining a current target judgment set provided in an embodiment of the present application;
[0024] Figure 5 It is a flowchart of an exemplary embodiment of the present application for counting the number of video frames with the same judgment result based on the current target judgment set;
[0025] Figure 6 This is a schematic diagram of an exemplary process for counting the number of video frame judgment results provided in an embodiment of the present application;
[0026] Figure 7 is another exemplary process diagram of an exemplary method for counting the number of video frame judgment results provided in an embodiment of the present application;
[0027] Figure 8 is a schematic diagram of the structure of an exemplary target detection device provided in the embodiments of the present application;
[0028] Fig. 9 It is a schematic diagram of the structure of an exemplary target detection system provided in the embodiments of the present application. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0030] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0031] In this application, the word "exemplary" is used to mean "serving as an example, illustration, or illustration." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any person skilled in the art to implement and use the invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the invention can be implemented without using these specific details. In other instances, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in this application.
[0032] The embodiments of the present application provide a target detection method, device, server, and storage medium, which are described in detail below.
[0033] like Figure 1 , which is a schematic diagram of a scenario of an exemplary target detection application system in an embodiment of the present application.
[0034] The target detection application system can be applied to a monitoring system that needs to detect whether a specific target appears in a scene. For example, the target detection application system can be applied to scenarios of security monitoring events such as anti-theft and criminal detection; for another example, the target detection application system can be applied to traffic management to monitor whether the driving vehicle is in violation of traffic rules (such as riding on the line); for another example, the target detection application system can be applied to automatic driving to determine whether there is an obstruction in front of the vehicle. It is worth noting that the above application scenarios of the target detection application system are only illustrative examples. In addition, the target detection application system can also be used to monitor specific targets in various industries such as economy, culture, education, medical care, and public management.
[0035] In some embodiments, the target detection application system may include a server 110, a network 120, a storage device 130, and an image acquisition terminal 140. In some embodiments, the target detection application system may acquire a continuous video frame sequence and monitor online whether a specific target appears in the scene.
[0036] The server 110 can process data and / or information from at least one component of the target detection application system or an external data source (e.g., a storage device 130, an image acquisition terminal 140). For example, the server 110 can determine whether a specific target exists in each frame of a continuous video frame sequence sent by the image acquisition terminal 140. In some embodiments, the server 110 can be a single server or a server group. The server group can be a centralized server group connected to the network 120 via an access point, or a distributed server group connected to the network 120 via at least one access point. In some embodiments, the server 110 can be locally connected to the network 120 or remotely connected to the network 120. For example, the server 110 can access information and / or data stored in the storage device 130 via the network 120. In some embodiments, the server 110 can be implemented on a cloud platform. By way of example only, the cloud platform can include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, a multi-layer cloud, etc., or any combination thereof.
[0037] The network 120 connects the components of the target detection application system so that the components can communicate with each other to promote the exchange of information and / or data. In some embodiments, at least one component in the target detection application system (e.g., server 110, storage device 130, image acquisition terminal 140) can send information and / or data (e.g., continuous video frame sequence) to other components in the target detection application system via the network 120. In some embodiments, the network between the components in the target detection application system can be any one or more of a wired network or a wireless network. For example, the network 120 can include a cable network, a wired network, an optical fiber network, a telecommunications network, an internal network, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), a public switched telephone network (PSTN), a Bluetooth network (Bluetooth), a ZigBee network (ZigBee), a near field communication (NFC), a bus within a device, a line within a device, a cable connection, etc., or any combination thereof. The network connection between each two parts may adopt one of the above methods or multiple methods.
[0038] The storage device 130 can store data and / or instructions. In some embodiments, the storage device 130 can store data obtained from the image acquisition terminal 140. For example, a continuous video frame sequence. For another example, the storage device 130 can store logs related to the image acquisition terminal 140. In some embodiments, the storage device 130 can store data and / or instructions that can be executed by the server 110. In some embodiments, the storage device 130 may include a large-capacity memory, a removable memory, a volatile read-write memory, a read-only memory (ROM), etc. or any combination thereof. Exemplary large-capacity memory may include a disk, an optical disk, a solid-state disk, etc. Exemplary removable memory may include a flash drive, a floppy disk, an optical disk, a memory card, a compressed disk, a magnetic tape, etc. Exemplary volatile read-write memory may include a random access memory (RAM). Exemplary RAM may include Dynamic Random Access Memory (DRAM), Double-Data-Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Static Random Access Memory (SRAM), Thyristor Random Access Memory (T-RAM), Zero Capacitance Random Access Memory (Z-RAM), etc. Exemplary read-only memory may include Masked Read Only Memory (MROM), Programmable Read Only Memory (PROM), Erasable Programmable Read Only Memory (PEROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disk Read-Only Memory, etc. In some embodiments, the storage device 130 may be implemented on a cloud platform. By way of example only, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, a multi-layer cloud, etc., or any combination thereof.
[0039] The image acquisition terminal 140 can acquire a continuous video frame sequence. In some embodiments, the image acquisition terminal 140 can be a device with information receiving and / or sending functions, so as to send it to the server 110 for processing. In some embodiments, the image acquisition terminal 140 can include multiple terminals 141, 142, 143... For example, the image acquisition terminal 140 can include a mobile device 141, a surveillance camera 142, a surveillance drone 143, a vehicle-mounted terminal device 144, etc. or any combination thereof.
[0040] It should be noted that the above description of the target detection application system is only for example and explanation, and does not limit the scope of application of the present application. For those skilled in the art, various modifications and changes can be made to the target detection application system under the guidance of the present application. For example, the target detection application system can also include an alarm device to facilitate alarming after detecting a specific target.
[0041] like Figure 2 As shown, it is a schematic diagram of an embodiment of the target detection method provided in the embodiment of the present application. The target detection method may include steps S201 to S204, which are as follows:
[0042] Step S201, obtaining a continuous video frame sequence.
[0043] A continuous video frame sequence may refer to a continuous static image constituting a video, wherein the continuous static image constituting the video corresponds to each frame in the continuous video frame sequence, and the number of frames corresponding to the continuous video frame sequence may be a set value (e.g., 25 frames). In some embodiments of the present application, a continuous video frame sequence may be a continuous static image in a certain sequence range (e.g., sequence 1 to 1000), that is, a continuous video frame sequence acquired within a period of time (e.g., a preset time period), so as to facilitate detection in subsequent steps of whether a specific target appears in a scene within a period of time. In some other embodiments of the present application, a continuous video frame sequence may be a continuous static image in an infinite sequence range, that is, a continuous video frame sequence acquired continuously, so as to facilitate continuous detection in subsequent steps of whether a specific target appears in a scene.
[0044] Specifically, step S201 may be performed by the acquisition module 801. In some embodiments of the present application, the acquisition module 801 may acquire a continuous video frame sequence by receiving a continuous video frame sequence sent by the image acquisition terminal 140. In some other embodiments of the present application, the acquisition module 801 may acquire a continuous video frame sequence by receiving a historical continuous video frame sequence stored in the storage device 130.
[0045] Step S202 , determining whether a specific target exists in each video frame in the continuous video frame sequence, and obtaining a determination result for each video frame.
[0046] A specific target may refer to an object whose presence needs to be monitored. A specific target may be a person, animal, device or object. For example, in an autonomous driving scenario, a specific target may be a pedestrian, pet, other vehicle, green belt, traffic light, etc. For another example, in intelligent video surveillance, a specific target may be a criminal who commits robbery, theft or other crimes.
[0047] Specifically, step S202 may be performed by the judgment module 802. In some embodiments of the present application, the judgment module 802 determines whether there is a specific target in each video frame in the continuous video frame sequence, which can be implemented by a foreground detection algorithm. In some embodiments, for example, for an embodiment in which the judgment module 802 adopts a foreground algorithm, the foreground detection algorithm may include a foreground detection algorithm based on background update (Visual Background Extractor, VIBE), a Gaussian mixture model (Gaussian Mixture Model, GMM), a background difference method, a frame difference method, an average background method, an optical flow method, etc. or a combination thereof. In some other embodiments of the present application, the judgment module 802 determines whether there is a specific target in each video frame in the continuous video frame sequence, which can be implemented by a target detection algorithm based on deep learning. In some embodiments, for example, for an embodiment in which the judgment module 802 adopts a deep learning target detection algorithm, the deep learning-based target detection algorithm may include region-based convolutional neural networks (Faster Region-Convolutional Neural Networks, Faster R-CNN), region-based fully convolutional networks (RFCN), target detection (You Only Look Once, YOLO), single shot multi-box detector (Single Shot MultiBox Detector, SSD), etc. or a combination thereof.
[0048] The judgment result of the video frame may include the result of the presence of a specific target and the result of the absence of a specific target. In some embodiments of the present application, the judgment result may be embodied in digital form, for example, 0 represents the judgment result of the video frame in which the specific target does not exist, and 1 represents the judgment result of the video frame in which the specific target exists. In some other embodiments of the present application, the judgment result may also be embodied in text form, for example, "target exists" represents the judgment result of the video frame in which the specific target exists, and "target does not exist" represents the judgment result of the video frame in which the specific target does not exist.
[0049] Step S203, counting the number of video frames with the same judgment result in the continuous video frame sequence.
[0050] Specifically, step S203 can be performed by the statistics module 803, which counts the number of video frames with the same judgment results in the continuous video frame sequence, so as to comprehensively judge whether a specific target appears in the continuous video frame sequence, so as to improve the detection accuracy and reduce the false detection rate. In some embodiments of the present application, the number of video frames with the same judgment results counted by the statistics module 803 in the continuous video frame sequence may be the number of video frame judgment results in which the specific target does not exist. In some other embodiments of the present application, the number of video frames with the same judgment results counted by the statistics module 803 in the continuous video frame sequence may be the number of video frame judgment results in which the specific target exists.
[0051] In some specific embodiments, the number of video frames with the same judgment results in the continuous video frame sequence can be counted through a target judgment set, wherein the target judgment set refers to a set that stores the judgment results of each video frame in the order of the continuous video frame sequence, so as to facilitate a continuous and comprehensive target detection process and avoid intermittent judgments and misjudgments. For example, for a continuous video frame sequence of 100 frames, the target judgment set can save all the judgment results of each video frame in the continuous video frame sequence of 100 frames through a dynamic set or save them according to the judgment range through a fixed set, and perform a comprehensive judgment on each frame. For example, the target judgment set can be used to determine whether a specific target exists in a continuous video frame sequence within the range of 1-10 frames. For another example, the target judgment set can also be used to determine whether a specific target exists in a continuous video frame sequence within the range of 9-19 frames, thereby avoiding the situation of missed judgments or misjudgments of only a continuous video frame sequence of a dozen frames (e.g., 1-10 frames, 11-20 frames) obtained. Specifically, for counting the number of video frames with the same judgment results in the continuous video frame sequence based on the target judgment set, please refer to the attached Figure 3 , steps S301-S303.
[0052] In some embodiments of the present application, the target judgment set may be a fixed set of length K, where K is an integer greater than 1. By comparing the sequence value of the video frame with the size of K, and then inserting the judgment result of the video frame into the target judgment set, the number of identical judgment results in the continuous video frame sequence can be obtained by counting. Specifically, for obtaining the number of identical judgment results in the continuous video frame sequence by counting the fixed target judgment set of length K, see the attached Figure 4, steps S401-S404. In some other embodiments of the present application, the target judgment set may be a dynamic set of an initial length L, where L is an integer value greater than or equal to 1, and the number of identical judgment results in a continuous video frame sequence may be obtained by inserting the video frame judgment result into the target judgment set and then counting the video frame judgment results within a certain range of the target judgment set. Specifically, for obtaining the number of identical judgment results in a continuous video frame sequence by counting the dynamic target judgment set of the initial length L, see the attached Figure 5 , steps S501-504.
[0053] Step S204: When the number meets a preset frame number condition, a detection result of detecting the specific target is determined.
[0054] The detection result may include the result of detecting a specific target and the result of not detecting a specific target. In some embodiments of the present application, the detection result may be embodied in digital form, for example, 0 represents the result of not detecting a specific target, and 1 represents the result of detecting a specific target. In some other embodiments of the present application, the detection result may also be embodied in text form, for example, "specific target detected" represents the result of detecting a specific target, and "specific target not detected" represents the result of not detecting a specific target.
[0055] The preset frame number condition may refer to a condition for determining the detection result of the specific target according to the quantity. In some embodiments of the present application, for example, for an embodiment in which the number counted in step S203 is the number of video frame judgment results in which a specific target exists, the preset frame number condition may refer to the number counted in step S203 being greater than a first threshold value, for example, for 10 frames of video frames, the number of video frame judgment results in which the specific target does not exist is greater than or equal to 6, then it can be determined that the detection result of the specific target is detected. In some other embodiments of the present application, the preset frame number condition may refer to the number counted in step S203 being greater than the first threshold value, and the number being less than a certain value, for example, the number is greater than 6 and less than the number of video frames counted 10, and for another example, the number is greater than 6 and less than the target judgment set length K value (for example 8), and for another example, the number is greater than 6 and less than the statistical range threshold j of the target judgment set (for example 9).
[0056] In some embodiments of the present application, for example, in an embodiment where the number counted in step S203 is the number of video frame judgment results in which a specific target does not exist, the preset frame number condition may refer to the number counted in step S203 being less than or equal to the second threshold value, for example, if the number of video frame judgment results in which a specific target does not exist is less than 4 based on statistics of 10 video frames, it can be determined that the detection result of the specific target is detected. In some other embodiments of the present application, the preset frame number condition may refer to the number counted in step S203 being less than the second threshold value, and the number being greater than or equal to a certain value, for example, the number obtained by statistics is less than 4 and greater than or equal to the minimum number 0.
[0057] In some embodiments of the present application, for example, for the preset frame number condition, it refers to an embodiment in which the number counted in step S203 is greater than the first threshold value, the first threshold value may be a system preset value, or may be determined by the system according to other parameter values, for example, the first threshold value is determined to be 4 according to the ratio of 10 video frames to 0.4, and for example, the first threshold value is determined to be 8 according to the ratio of 20 video frames to 0.8. In some other embodiments of the present application, for example, for the preset frame number condition, it refers to an embodiment in which the number counted in step S203 is less than the second threshold value, the second threshold value may be a system preset value, or may be determined by the system according to other parameter values, for example, the second threshold value is determined to be 6 according to the ratio of 10 video frames to 0.6, and for example, the second threshold value is determined to be 10 according to the ratio of 20 video frames to 0.5.
[0058] It is worth noting that the above description of the preset frame number condition is only exemplary. The preset frame number condition can also refer to the comparison of the number counted in step S203 and the total frame number ratio of the continuous video frame sequence. For example, if the ratio of video frames with a specific target is greater than or equal to 0.6, and the ratio of video frames without a specific target is less than 0.3, it can be determined that the detection result of the specific target is detected. The present application comprehensively determines whether there is a specific target in the scene by counting the judgment results of multiple video frames. Compared with the current target detection process of a single video frame, the target detection accuracy is improved and the occurrence of false alarms is avoided.
[0059] like Figure 3 As shown, it is a schematic diagram of an embodiment of the process of counting the number of video frame judgment results provided in an embodiment of the present application, wherein counting the number of video frame judgment results may include steps S301 to S303, which are specifically as follows:
[0060] Step S301, obtaining a preset target judgment set for counting the number of judgment results.
[0061] Among them, the target judgment set may refer to a set of judgment results of each video frame stored in the order of continuous video frame sequence, so as to facilitate a continuous and comprehensive target detection process and avoid intermittent judgment and misjudgment. In some embodiments of the present application, the target judgment set may refer to a List array, an Array array, an arraylist array, a Set array, etc. In some specific embodiments, the target judgment set may be set to a fixed set of length K, for example, the length of the List array is set to K. In some other embodiments of the present application, the target judgment set may also be a database that records the judgment results of video frames in sequence, and the video frame judgment results are recorded in the database, and then retrieved when judgment is made.
[0062] Specifically, step S301 may be performed by the statistics module 803. In some embodiments, the statistics module 803 may obtain the target judgment set in a storage space (eg, memory space).
[0063] Step S302 : inserting the judgment result of each video frame in the continuous video frame sequence into the target judgment set in sequence, and obtaining a current target judgment set corresponding to each video frame in the continuous video frame sequence.
[0064] The current target judgment set may refer to a judgment result set corresponding to each video frame in a continuous video frame sequence, wherein the number of current target judgment sets obtained may be the same as the number of video frames in the continuous video frame sequence, that is, each video frame in the continuous video frame sequence corresponds to a current target judgment set. In some embodiments of the present application, the current target judgment set corresponding to each video frame in the continuous video frame sequence may include the previously inserted video frame judgment results, for example, Figure 6 For example, when the target judgment set is a set with a fixed length of 4, for the 5th video frame, after the judgment result 5 is inserted, the judgment result 1 is removed due to the length limitation. Then the current target judgment set corresponding to the 5th video frame can be a set including judgment result 2, judgment result 3, judgment result 4, and judgment result 5. Then, the number of identical results of judgment result 2, judgment result 3, judgment result 4, and judgment result 5 can be counted to obtain a comprehensive target judgment result for the 5th video frame. For another example, Figure 7 For example, when the target judgment set is a set with an initial length of 4, for the 5th video frame, the judgment result 5 is inserted into the target judgment set in sequence, then the current target judgment set corresponding to the 5th video frame can be a current target judgment set including judgment result 1, judgment result 2, judgment result 3, judgment result 4, and judgment result 5.
[0065] In some embodiments of the present application, for example, embodiments for inserting video frames into a target judgment set such as a List array, an Array array, an arraylist array, a Set array, etc., can be implemented by a programming language, such as JAVA, C++, C#, Python, etc. In some other embodiments of the present application, for example, embodiments for inserting video frames into a database, can be implemented by a database language, such as MySQL, MariaDB, Oracle, Microsoft SQL Server, MongoDB, etc.
[0066] Specifically, step S302 can be performed by the statistics module 803. In some embodiments of the present application, the statistics module 803 inserts the judgment result of each video frame in the continuous video frame sequence into the target judgment set in sequence, which can be after inserting a video frame, and then obtains the current target judgment set corresponding to the video frame, so as to make a timely comprehensive judgment on the video frame according to the current target judgment set. In some other embodiments of the present application, the statistics module 803 inserts the judgment result of each video frame in the continuous video frame sequence into the target judgment set in sequence, which can be after inserting all video frames, and then obtains the current target judgment set corresponding to each video frame in the insertion record in sequence.
[0067] Step S303: Count the number of video frames with the same judgment result based on the current target judgment set.
[0068] The current target judgment set corresponding to each video frame is obtained, and the number of video frames with the same judgment result can be counted based on the current target judgment set, so as to make a comprehensive judgment on the video frame. In some specific embodiments, for example, for embodiments in which the target judgment set is a fixed-length set, the result statistics can be directly performed based on the current target judgment set. Figure 6 For example, the judgment results of the inserted target judgment set include: judgment result 2, judgment result 3, judgment result 4, and judgment result 5, wherein judgment result 2, judgment result 3, and judgment result 4 indicate that the specific target exists, and judgment result 5 indicates that the specific target does not exist, that is, the number of judgment results that the specific target exists can be counted as 3, and the number of judgment results that the specific target does not exist can also be counted as 1. In some specific embodiments, such as an embodiment in which the target judgment set is a dynamic set of an initial length, the statistical range can be determined according to the current target judgment set before the result statistics are performed, so that Figure 7For example, the judgment results of the inserted target judgment set include: judgment result 1, judgment result 2, judgment result 3, judgment result 4, and judgment result 5. The statistical range of the current target judgment set can be determined as judgment result 2, judgment result 3, judgment result 4, and judgment result 5. For details, see the attached Figure 5 , steps S501-S504.
[0069] like Figure 4 As shown, it is a schematic diagram of an exemplary process of determining the current target judgment set provided in an embodiment of the present application. In some embodiments, the target judgment set is a fixed set of length K, and determining the current target judgment set according to the target judgment set of fixed length K may include steps S401 to S404, which are as follows:
[0070] Step S401 , respectively obtaining a frame value of each video frame in the continuous video frame sequence.
[0071] The frame value may refer to the shooting sequence value corresponding to the video frame. In some embodiments of the present application, the frame value of each video frame may be determined according to the order in which the video frames are acquired (video shooting process), for example, the frame value of the first acquired video frame is 1, and the frame values of the subsequently acquired video frames are 2, 3, 4, etc. In some other embodiments of the present application, the frame value of each video frame may be determined according to the shooting time, for example, the frame value of the video frame with a shooting time of 0.008 sec is 1, and the frame value of the video frame with a shooting time of 0.009 sec is 2. Specifically, step S401 may be performed by the statistics module 803, wherein the frame value of each video frame may be a group of data composed of each video frame, so as to facilitate the unified acquisition by the statistics module 803.
[0072] Step S402 , respectively comparing the frame value of each video frame in the continuous video frame sequence with the length K to obtain a size comparison result.
[0073] In some embodiments, for the i-th video frame in the continuous video frame sequence, where the i-th video frame may refer to any video frame in the continuous video frame sequence, i represents the sequence value of any video frame in the continuous video frame sequence, and i is an integer value greater than 0, the sequence value i of any video frame in the continuous video frame sequence may be first compared with the value of K, and then the judgment result of whether the target judgment set of fixed length K has been filled with the video frame may be determined. Specifically, step S402 may be performed by the statistics module 803.
[0074] Step S403 : determining first position information of each video frame in the continuous video frame sequence for inserting into the target judgment set based on the size comparison result.
[0075] After obtaining the size comparison result, the judgment result of the i-th video frame can be determined according to the size comparison result to insert the first position information of the target judgment set. In some embodiments of the present application, when i is greater than K, for example, Figure 6 As shown, for the judgment result 5 corresponding to the 5th video frame, the fixed length K of the target judgment set is 4, then it can be determined that the target judgment set has filled the judgment results of the video frame, including judgment result 1, judgment result 2, judgment result 3, and judgment result 4, so judgment result 1 can be removed, and judgment result 2, judgment result 3, and judgment result 4 can be moved forward by one position, and finally it is determined that the first position of judgment result 5 inserted into the target judgment set is the last position of the target judgment set; when i is less than or equal to k, the target judgment set is not filled with the judgment results of the video frame, so it can be determined that the first position of the judgment result of the i-th video frame inserted into the target judgment set is the i-th position of the target judgment set. Specifically, step S403 can be performed by the statistical module 803.
[0076] Step S404: inserting the judgment result of each video frame in the continuous video frame sequence into the target judgment set in sequence based on the first position information to obtain a current target judgment set corresponding to each video frame in the continuous video frame sequence.
[0077] When the judgment result of each video frame determines the first position information corresponding to the inserted target judgment set, the judgment result of the video frame can be directly inserted into the target judgment set to facilitate the timely specific target judgment process of the continuous video frame sequence. Figure 6 As shown, after the target judgment set is inserted, the judgment results of the target judgment set include: judgment result 2, judgment result 3, judgment result 4, and judgment result 5. In some specific embodiments, after the judgment result of each video frame determines the first position information corresponding to the inserted target judgment set, it is also possible to wait for the first position information of the next video frame or the subsequent video frames to be determined before inserting the target judgment set together, and perform a specific target judgment process of a video frame sequence skipping certain video frames, so as to reduce the amount of calculation of the target detection process.
[0078] like Figure 5 As shown, an exemplary flow chart of an embodiment of the present application is provided based on the current target judgment set statistics of the number of video frames with the same judgment results. In some embodiments, the target judgment set is a dynamic set with an initial length of L, and the number of video frames with the same judgment results according to the target judgment set with an initial length of L may include steps S501 to S504:
[0079] Step S501 , respectively obtaining a frame value of each video frame in the continuous video frame sequence.
[0080] The frame value may refer to a serial number corresponding to a video frame, wherein the frame value of each video frame may be determined according to the order in which the video frames are acquired (video shooting process), for example, the frame value of the first acquired video frame is 1, and the frame values of the subsequently acquired video frames are 2, 3, 4, etc. In some embodiments, the frame value of each video frame may be a group of data composed of each video frame so as to be acquired uniformly. Specifically, step S501 may be performed by the statistics module 803.
[0081] Step S502 , respectively comparing the frame value of each video frame in the continuous video frame sequence with the length L to obtain a size comparison result.
[0082] In some specific embodiments, the size of i and L can be compared to obtain a size comparison result, so as to determine the statistical range of the target judgment set, for example, Figure 7 As shown, the target judgment set statistical range is the proportion or number of specific objects in 4 video frames, and the initial length L of the target judgment set is 4. When i is less than L, it is only necessary to determine that the target judgment set statistical range is the judgment result of the video frames existing in the current target judgment set; when i is 5 and i is greater than L, it can be determined that the target judgment set statistical range is the judgment result of the video frames corresponding to the interval range of 2-5 in the target judgment set. Specifically, step S503 can be performed by the statistical module 803.
[0083] Step S503: determining the statistical range of the current target judgment set based on the size comparison result.
[0084] The statistical range of the current target judgment set may refer to the interval range of the statistical results. In some specific embodiments, determining the statistical range of the current target judgment set based on the size comparison result may include: obtaining a preset statistical range threshold j, where j is an integer value greater than 0; for the frame value i of each video frame in the continuous video frame sequence, when the frame value i is greater than L, determining the statistical range of the current target judgment set to be an interval range from i-j+1 to i, where i is an integer value greater than 0; otherwise determining the statistical range of the current target judgment set to be an interval range from 1 to i, where the statistical range threshold j may refer to a preset length of the statistical range, for example, Figure 7 As shown, the initial length L of the target judgment set is 4, and the statistical range threshold j is 4. When i is less than or equal to L, it is only necessary to determine that the statistical range of the current target judgment set is the judgment result of the video frames existing in the current target judgment set; when i is 5, i is greater than L, it can be determined that the statistical range of the target judgment set is the judgment result of the video frames corresponding to the interval range of 2-5 in the target judgment set. In some embodiments, the statistical range threshold j can be a system setting value, such as a parameter value set in the statistical module 803.
[0085] Step S504: Count the number of video frames with the same judgment result based on the statistical range of the current target judgment set.
[0086] The statistical range of the current target judgment set is determined based on the size comparison result, and then the number of the same judgment results can be counted according to the inserted current target judgment set. Figure 5 For example, the judgment results of the current target judgment set after insertion include: judgment result 1, judgment result 2, judgment result 3, judgment result 4, and judgment result 5. According to the size comparison result, it can be determined that the statistical range includes judgment result 2, judgment result 3, judgment result 4, and judgment result 5, wherein judgment result 2, judgment result 3, and judgment result 4 indicate that a specific target exists, and judgment result 5 indicates that a specific target does not exist, that is, the number of judgment results that the specific target exists can be counted as 3, and the number of judgment results that the specific target does not exist can also be counted as 1. Specifically, step S504 can be performed by the statistical module 803.
[0087] In order to better implement the target detection method in the embodiment of the present application, based on the target detection method, the embodiment of the present application also provides a target detection device, such as Figure 8 As shown, the target detection device 800 includes:
[0088] The acquisition module 801 is used to acquire a continuous video frame sequence. In some embodiments, the acquisition of the continuous video frame sequence can be achieved by receiving a signal from the image acquisition terminal 140. In some embodiments, the acquisition of the continuous video frame sequence is achieved by receiving a historical continuous video frame sequence stored in the storage device 130.
[0089] The judgment module 802 is used to judge whether there is a specific target in each video frame in the continuous video frame sequence, and obtain the judgment result of each video frame. In some embodiments, judging whether there is a specific target in each video frame in the continuous video frame sequence can be achieved by a foreground detection algorithm. In some embodiments, the foreground detection algorithm may include a foreground detection algorithm based on background update (Visual Background Extractor, VIBE), Gaussian Mixture Model (Gaussian Mixture Model, GMM), background difference method, frame difference method, average background method, optical flow method, etc. or a combination thereof. In some embodiments, judging whether there is a specific target in each video frame in the continuous video frame sequence can be achieved by a target detection algorithm based on deep learning. In some embodiments, the target detection algorithm based on deep learning may include a region-based convolutional neural network (Faster Region-Convolutional Neural Networks, Faster R-CNN), a region-based full convolutional network (Region-based Fully Convolutional Network.s, RFCN), target detection (You Only Look Once, YOLO), a single shot multi-box detector (Single Shot MultiBox Detector, SSD), etc. or a combination thereof.
[0090] A statistics module 803, the statistics module 803 is used to count the number of video frames with the same judgment results in the continuous video frame sequence. In some embodiments, counting the number of video frames with the same judgment results in the continuous video frame sequence may be counting the number of video frame judgment results in which a specific target does not exist. In some embodiments, counting the number of video frames with the same judgment results in the continuous video frame sequence may be counting the number of video frame judgment results in which a specific target exists. In some embodiments, the number of video frames with the same judgment results in the continuous video frame sequence may be counted by a target judgment set, wherein the target judgment set refers to a set of judgment results of each video frame stored in the order of the continuous video frame sequence, so as to facilitate a continuous and comprehensive target detection process and avoid intermittent judgments and misjudgments.
[0091] Determination module 804, the determination module 804 is used to determine the detection result of the specific target when the number meets the preset frame number condition. The preset frame number condition may refer to the condition of judging the presence of the specific target in the continuous video frame sequence according to the number. In some embodiments, for example, for an embodiment in which the number counted in step S203 is the number of video frame judgment results in which the specific target does not exist, the preset frame number condition may refer to the number counted in step S203 being greater than a first threshold. In some embodiments, for example, for an embodiment in which the number counted in step S203 is the number of video frame judgment results in which the specific target exists, the preset frame number condition may refer to the number counted in step S203 being less than a second threshold.
[0092] It should be understood that Figure 8 The device and its modules shown can be implemented in various ways. For example, in some embodiments, the device and its modules can be implemented by hardware, software or a combination of software and hardware. Among them, the hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or a dedicated design hardware. Those skilled in the art will understand that the above-mentioned method and system can be implemented using computer executable instructions and / or included in a processor control code, for example, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The system and its modules of the present application can not only be implemented by hardware circuits such as ultra-large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., but can also be implemented by software such as executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software (for example, firmware).
[0093] It should be noted that the above description of the device and its modules is only for convenience of description and does not limit the present application to the scope of the embodiments. It is understandable that, after understanding the principle of the system, those skilled in the art may arbitrarily combine the modules or form a subsystem to connect with other modules without deviating from the principle. For example, Figure 8 The acquisition module 801, judgment module 802, statistics module 803, and determination module 804 disclosed in the system can be different modules in a system, or one module can implement the functions of two or more of the above modules. For example, the acquisition module 801 and the judgment module 802 can be two modules with acquisition and judgment functions respectively, or one module with both acquisition and judgment functions.
[0094] In order to better implement the target detection method in the embodiment of the present application, based on the target detection method, the embodiment of the present application also provides a target detection system, which integrates any target detection device provided in the embodiment of the present application, and the system includes:
[0095] one or more processors;
[0096] Memory; and
[0097] One or more applications, wherein the one or more applications are stored in the memory and are configured so that the processor executes the steps of the target detection method described in any one of the above target detection embodiments.
[0098] like Fig. 9 As shown, it shows a schematic diagram of the structure of the target detection system involved in the embodiment of the present application, specifically:
[0099] The target detection system may include a processor 901 of one or more processing cores and a memory 902 of one or more computer-readable storage media. Those skilled in the art will appreciate that Fig. 9 The structure shown in the figure does not constitute a limitation on the target detection system, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0100] The processor 901 is the control center of the system, which uses various interfaces and lines to connect various parts of the entire system, and executes various functions of the system and processes data by running or executing software programs and / or modules stored in the memory 902, and calling data stored in the memory 902, so as to monitor the system as a whole. Optionally, the processor 901 may include one or more processing cores; the processor 901 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, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Preferably, the processor 901 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 901.
[0101] The memory 902 can be used to store software programs and modules. The processor 901 executes various functional applications and data processing by running the software programs and modules stored in the memory 902. The memory 902 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the target detection system, etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 902 may also include a memory controller to provide the processor 901 with access to the memory 902.
[0102] Although not shown, the target detection system may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 901 in the target detection system will load the executable files corresponding to the processes of one or more application programs into the memory 902 according to the following instructions, and the processor 901 will run the application programs stored in the memory 902, thereby realizing various functions, as follows:
[0103] Get a sequence of continuous video frames;
[0104] Determine whether a specific target exists in each video frame in the continuous video frame sequence, and obtain a determination result for each video frame;
[0105] Counting the number of video frames with the same judgment result in the continuous video frame sequence;
[0106] When the number meets a preset frame number condition, a detection result of detecting the specific target is determined.
[0107] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0108] To this end, an embodiment of the present invention provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any target detection method provided in an embodiment of the present invention. For example, the computer program can be loaded by a processor to execute the following steps:
[0109] Get a sequence of continuous video frames;
[0110] Determine whether a specific target exists in each video frame in the continuous video frame sequence, and obtain a determination result for each video frame;
[0111] Counting the number of video frames with the same judgment result in the continuous video frame sequence;
[0112] When the number meets a preset frame number condition, a detection result of detecting the specific target is determined.
[0113] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.
[0114] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only for example and does not constitute a limitation of the present application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements and amendments to the present application. Such modifications, improvements and amendments are suggested in the present application, so such modifications, improvements and amendments still belong to the spirit and scope of the exemplary embodiments of the present application.
[0115] At the same time, the present application uses specific words to describe the embodiments of the present application. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of the present application. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different positions in this specification does not necessarily refer to the same embodiment. In addition, some features, structures or characteristics in one or more embodiments of the present application can be appropriately combined.
[0116] Accordingly, various aspects of the present application may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as "data blocks", "modules", "engines", "units", "components" or "systems". In addition, various aspects of the present application may be represented as a computer product located in one or more computer-readable media, which includes computer-readable program code.
[0117] A computer storage medium may include a propagated data signal containing computer program code, for example, in baseband or as part of a carrier wave. The propagated signal may be in a variety of forms, including electromagnetic, optical, etc., or a suitable combination. A computer storage medium may be any computer-readable medium other than a computer-readable storage medium, which can be connected to an instruction execution system, device or apparatus to communicate, propagate or transmit the program for use. The program code on the computer storage medium may be transmitted via any suitable medium, including radio, cable, fiber optic cable, RF, or similar media, or any combination of the above media.
[0118] The computer program coding required for the operation of each part of the application can be written in any one or more programming languages, including object-oriented programming languages such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB.NET, Python, etc., conventional procedural programming languages such as C language, Visual Basic, Fortran 2003, Perl, COBOL 2002, PHP, ABAP, dynamic programming languages such as Python, Ruby and Groovy, or other programming languages, etc. The program coding can be run completely on the user's computer, or run on the user's computer as an independent software package, or run partly on the user's computer and partly on the remote computer, or run completely on the remote computer or server. In the latter case, the remote computer can be connected to the user's computer through any network form, such as a local area network (LAN) or a wide area network (WAN), or connected to an external computer (e.g., via the Internet), or in a cloud computing environment, or used as a service such as software as a service (SaaS).
[0119] In addition, unless explicitly stated in the claims, the order of the processing elements and sequences described in this application, the use of alphanumeric characters, or the use of other names are not intended to limit the order of the processes and methods of this application. Although the above disclosure discusses some invention embodiments that are currently considered useful through various examples, it should be understood that such details are only for illustrative purposes, and the attached claims are not limited to the disclosed embodiments. On the contrary, the claims are intended to cover all modifications and equivalent combinations that are consistent with the essence and scope of the embodiments of this application. For example, although the system components described above can be implemented by hardware devices, they can also be implemented only by software solutions, such as installing the described system on an existing server or mobile device.
[0120] Similarly, it should be noted that in order to simplify the description of the disclosure of this application and thus help understand one or more embodiments of the invention, in the above description of the embodiments of this application, multiple features are sometimes combined into one embodiment, figure or description thereof. However, this disclosure method does not mean that the features required by the object of this application are more than the features mentioned in the claims. In fact, the features of the embodiments are less than all the features of the single embodiment disclosed above.
[0121] The above is a detailed introduction to a target detection method provided in an embodiment of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A target detection method, It is characterized in that The method comprises: Get a sequence of continuous video frames; Determine whether a specific target exists in each video frame in the continuous video frame sequence, and obtain a determination result for each video frame; Counting the number of video frames with the same judgment result in the continuous video frame sequence; When the number meets a preset frame number condition, determining a detection result of detecting the specific target; The counting of the number of video frames with the same judgment result in the continuous video frame sequence includes: Obtaining a preset target judgment set for counting the number of judgment results; Inserting the judgment result of each video frame in the continuous video frame sequence into the target judgment set in sequence, respectively, to obtain a current target judgment set corresponding to each video frame in the continuous video frame sequence; The number of video frames with the same judgment result is counted based on the current target judgment set.
2. The method according to claim 1, It is characterized in that The target judgment set is a fixed set of length K, where K is an integer value greater than 1, and the step of inserting the judgment result of each video frame in the continuous video frame sequence into the target judgment set in sequence to obtain a current target judgment set corresponding to each video frame in the continuous video frame sequence includes: Respectively obtain a frame value of each video frame in the continuous video frame sequence; Respectively comparing the frame value of each video frame in the continuous video frame sequence with the length K to obtain a size comparison result; Determine, based on the size comparison result, first position information of each video frame in the continuous video frame sequence inserted into the target judgment set, wherein when the frame value i is greater than K, the first position information is the last position of the target judgment set; when the frame value i is less than or equal to K, the first position information is the i-th position of the target judgment set; Based on the first position information, the judgment result of each video frame in the continuous video frame sequence is sequentially inserted into the target judgment set to obtain a current target judgment set corresponding to each video frame in the continuous video frame sequence.
3. The method according to claim 1, It is characterized in that The target judgment set is a dynamic set with an initial length of L, where L is an integer value greater than or equal to 1, and the number of video frames with the same statistical judgment result based on the current target judgment set includes: Respectively comparing the frame value of each video frame in the continuous video frame sequence with L to obtain a size comparison result; Determine the statistical range of the current target judgment set based on the size comparison result; The number of video frames with the same statistical judgment result based on the statistical range of the current target judgment set.
4. The method according to claim 3, It is characterized in that The determining of the statistical range of the current target judgment set based on the size comparison result includes: Get the preset statistical range threshold j, where j is an integer value greater than 0; For a frame value i of each video frame in the continuous video frame sequence, when the frame value i is greater than L, determining that the statistical range of the current target judgment set is an interval range from i-j+1 to i, where i is an integer value greater than 0; Otherwise, the statistical range of the current target judgment set is determined to be an interval range from 1 to i.
5. The method according to claim 1, It is characterized in that The preset frame number condition is that the number is greater than a first threshold.
6. The method according to claim 1, It is characterized in that The preset frame number condition is that the number is less than a second threshold.
7. A target detection device, It is characterized in that The device comprises: An acquisition module, the acquisition module is used to acquire a continuous video frame sequence; A judgment module, the judgment module is used to judge whether a specific target exists in each video frame in the continuous video frame sequence, and obtain a judgment result for each video frame; A statistical module, the statistical module is used to count the number of video frames with the same judgment result in the continuous video frame sequence; A determination module, the determination module is used to determine the detection result of the specific target when the number meets the preset frame number condition; The counting module counting the number of video frames with the same judgment result in the continuous video frame sequence includes: Obtaining a preset target judgment set for counting the number of judgment results; Inserting the judgment result of each video frame in the continuous video frame sequence into the target judgment set in sequence, respectively, to obtain a current target judgment set corresponding to each video frame in the continuous video frame sequence; The number of video frames with the same judgment result is counted based on the current target judgment set.
8. A target detection system, It is characterized in that The system comprises: one or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the target detection method according to any one of claims 1 to 6.
9. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the target detection method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Target tracking method and device, electronic equipment and readable storage medium
CN110910422A
