Shielding detection method, electronic equipment and computer readable storage medium
By acquiring the video stream and performing secondary discrimination using the preset video classification model and target detection model, the problem of low accuracy of camera occlusion detection is solved, high-precision occlusion detection is achieved, and the security and reliability of the monitoring system are improved.
Patent Information
- Application Number
- CN202510704239.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-12
AI Technical Summary
The existing camera occlusion detection method can only recognize textureless images, resulting in low occlusion detection accuracy. In addition, the traditional method has high training costs and the risk of false positives and false negatives.
By obtaining the video stream to be detected, the preset video classification model is used to determine the occlusion probability of multiple frames of images, and combined with the target detection results, the target detection model is used for secondary discrimination to improve the accuracy of occlusion detection.
The false alarm rate and missed alarm rate of occlusion detection are reduced, the accuracy of occlusion detection is improved, and thus the security and reliability of the monitoring system are enhanced.
Smart Images

Figure CN120635541A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to an occlusion detection method, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the widespread application of video surveillance systems in security, transportation, smart home, autonomous driving and other fields, the reliability of cameras and the validity of data have become crucial.
[0003] However, camera images can fail due to various reasons, with human occlusion being a common one. Traditionally, cameras can determine whether the camera is occluded based on the surveillance image. However, this occlusion detection method can only detect textureless occlusions. Specifically, the camera can only detect occlusions when the surveillance image is completely black or white, resulting in low occlusion detection accuracy. Summary of the Invention
[0004] The embodiments of the present application provide an occlusion detection method, device, chip, electronic device and computer-readable storage medium, which can perform occlusion detection on the video stream to be detected in real time, reduce the false alarm rate and missed alarm rate of the occlusion detection results, and improve the accuracy of the occlusion detection results, thereby improving the security and reliability of the monitoring system.
[0005] In the first aspect, the present application provides an occlusion detection method, which is applied to an image acquisition device, and the method includes: obtaining a video stream to be detected, wherein the video stream to be detected includes multiple frames of images to be detected, and the multiple frames of images to be detected are images acquired by the image acquisition device at different times. Based on a preset video classification model, the occlusion probability of the multiple frames of images to be detected is determined, and the occlusion probability is used to characterize whether there is a sudden change in the multiple frames of images to be detected. If the occlusion probability is greater than or equal to a preset probability threshold, the target detection results corresponding to the multiple frames of first acquired images acquired within a first time period are acquired, the end time of the first time period is the current time, and the start time of the first time period is the time before the current time, which differs from the current time by a first preset time interval, and the multiple frames of first acquired images are multiple frames of continuous images acquired by the image acquisition device at a preset image sampling rate. According to the target detection result, the occlusion detection results corresponding to the multiple frames of images to be detected are determined.
[0006] In some embodiments, the target detection results include a first number of detected targets in multiple frames of captured images, a first degree of overlap between the detected targets in the target captured images and the first central area, and a second number of detected targets in the target captured images. The first central area is a preset image range in the target captured image with the center point as the center of the area, and the target captured image is the image corresponding to the current moment in the multiple frames of the first captured images.
[0007] In some embodiments, the occlusion detection result is a suspected occlusion state or a suspected non-occlusion state, and determining the occlusion detection results corresponding to the multiple frames of images to be detected based on the target detection result includes: if the first number is not zero, the second number is less than a preset number threshold, and the first overlap is less than a preset overlap threshold, then determining the current state is a suspected occlusion state. If the first number is not zero, and the second number is greater than or equal to the preset number threshold and / or the first overlap is greater than or equal to the preset overlap threshold, then determining the current state is a suspected non-occlusion state.
[0008] In some embodiments, after determining that the current state is a suspected occlusion state, the method further includes: determining whether the image acquisition device is in an occlusion state; if the image acquisition device is not in an occlusion state, changing the state corresponding to the image acquisition device to an occlusion state.
[0009] In some embodiments, after determining that the current state is a suspected occlusion state, the method further includes: incrementing an occlusion count by one to determine whether the image acquisition device is in an occlusion state; if the image acquisition device is not in an occlusion state and the occlusion count is greater than or equal to an occlusion count threshold, changing the corresponding state of the image acquisition device to an occlusion state.
[0010] In some embodiments, after determining that the current state is a suspected unobstructed state, the method further includes: determining whether the image acquisition device is in an obstructed state; if the image acquisition device is in an obstructed state, changing the state corresponding to the image acquisition device to an unobstructed state.
[0011] In some embodiments, after determining that the current state is a suspected unobstructed state, the method further includes: incrementing an unobstructed count by one. It is determined whether the image acquisition device is in an obstructed state, and if the image acquisition device is in an obstructed state and the unobstructed count is greater than or equal to a unobstructed count threshold, the corresponding state of the image acquisition device is changed to an unobstructed state.
[0012] In some embodiments, after determining the occlusion probability of the plurality of frames of images to be detected, the method further includes: if the occlusion probability is less than a preset probability threshold, incrementing a non-occlusion count by one; and determining whether the image acquisition device is in an occlusion state. If the image acquisition device is in an occlusion state and the non-occlusion count is greater than or equal to the non-occlusion count threshold, changing the corresponding state of the image acquisition device to a non-occlusion state.
[0013] In some implementations, after determining that the current state is a suspected unobstructed state, the method further includes: determining the multiple frames of to-be-detected images as multiple frames of unobstructed images.
[0014] In some embodiments, obtaining a video stream to be detected includes: determining whether an image acquisition device is in an obstructed state. If the image acquisition device is not in an obstructed state, obtaining multiple frames of second acquired images acquired within a second time period, wherein the end time corresponding to the second time period is the current time, and the start time corresponding to the second time period is a time before the current time that is separated from the current time by a second preset time interval. The multiple frames of second acquired images are multiple frames of continuous images acquired by the image acquisition device at a preset image sampling rate. Determining one frame of the multiple frames of sub-acquired images corresponding to a first sub-time period as the first image to be detected, thereby determining the multiple frames of images to be detected, wherein the second time period includes multiple sub-time periods, and the multiple sub-time periods correspond one-to-one to the multiple frames of images to be detected. The first sub-time period is any one of the multiple sub-time periods. The multiple sub-acquired images are images of the multiple frames of second acquired images corresponding to the first sub-time period. The first image to be detected is an image of the multiple frames of images to be detected corresponding to the first sub-time period.
[0015] In some embodiments, after determining whether the image acquisition device is in an obstructed state, the method further includes: if the image acquisition device is in an obstructed state, acquiring multiple frames of second acquired images and multiple frames of unobstructed images, and determining multiple frames of images to be detected based on the multiple frames of the second acquired images and the multiple frames of unobstructed images.
[0016] In a second aspect, the present application provides an occlusion detection device, which may be an image acquisition device. The occlusion detection device includes an acquisition module and a processing module.
[0017] The acquisition module is used to acquire the video stream to be detected, which includes multiple frames of images to be detected. The multiple frames of images to be detected are images collected by the image acquisition device at different times.
[0018] The processing module is used to determine the occlusion probability of multiple frames of images to be detected based on a preset video classification model. The occlusion probability is used to indicate whether there is a sudden change in the multiple frames of images to be detected.
[0019] The acquisition module is also used to obtain target detection results corresponding to multiple frames of first acquired images acquired within a first time period when the occlusion probability is greater than or equal to a preset probability threshold. The end time of the first time period is the current time, and the start time of the first time period is the time before the current time that is different from the current time by a first preset time interval. The multiple frames of first acquired images are multiple frames of continuous images acquired by the image acquisition device at a preset image sampling rate.
[0020] The processing module is further used to determine the occlusion detection results corresponding to the multiple frames of images to be detected based on the target detection results.
[0021] In a third aspect, the present application provides a chip, which is used to execute any method in the first aspect above.
[0022] In a fourth aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the method as described in any one of the first aspects above. Alternatively,
[0023] The electronic device includes the chip according to the third aspect.
[0024] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method as described in any one of the above-mentioned first aspects.
[0025] In the technical solution provided by the present application, an image acquisition device can acquire a video stream to be detected, which includes multiple frames of images to be detected. The multiple frames of images to be detected are images captured by the image acquisition device at different times. Based on a preset video classification model, the device determines the occlusion probability of the multiple frames of images to be detected. The occlusion probability is used to indicate whether there is a sudden change in the multiple frames of images to be detected. If the occlusion probability is greater than or equal to a preset probability threshold, it indicates a high probability of occlusion. To improve the accuracy of occlusion detection, the image acquisition device can also perform secondary discrimination on target detection results corresponding to multiple frames of first captured images captured within a first time period. The first time period ends at the current time and starts at a time before the current time that is separated by a first preset time interval. The multiple frames of first captured images are multiple consecutive frames of images captured by the image acquisition device at a preset image sampling rate. Finally, based on the target detection results, the device determines the occlusion detection results corresponding to the multiple frames of images to be detected. This embodiment of the present application can perform occlusion detection on the video stream to be detected in real time, reducing the false positive and false negative rates of the occlusion detection results, improving the accuracy of the occlusion detection results, and thereby enhancing the security and reliability of the monitoring system. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0027] Figure 1 This is a schematic diagram of a process for obtaining a video stream to be detected in an occlusion detection method provided in an embodiment of the present application;
[0028] Figure 2 This is a schematic diagram of an occlusion detection process of an occlusion detection method provided in an embodiment of the present application;
[0029] Figure 3 is a structural diagram of an occlusion detection device provided in an embodiment of the present application;
[0030] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] In the following description, specific details such as specific system structures and technologies are provided for illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present application with unnecessary details.
[0032] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0033] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0034] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0035] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0036] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0037] With the development of computer vision, artificial intelligence, the Internet of Things, and other technologies, cameras have evolved from simple image acquisition devices into intelligent perception terminals, widely used in security monitoring, autonomous driving, medical imaging, remote communications, smart manufacturing, and other fields. Their reliability and stability have become crucial. However, in actual use, cameras may be obstructed due to the following reasons:
[0038] Physical obstructions: dust, stains, cobwebs, or human obstructions.
[0039] Environmental interference: Strong light reflection, fog, rain, snow, etc. may cause the lens to become blurred or partially ineffective.
[0040] Equipment failure: Poor image quality due to reasons such as lens damage and lens angle.
[0041] Once a camera is blocked, its core functions (monitoring, recognition, environmental perception, etc.) will be seriously affected, resulting in safety risks or economic losses. Therefore, camera occlusion detection technology has become an important technology to ensure the reliability of surveillance systems.
[0042] In traditional technical solutions, image acquisition devices such as cameras typically detect whether the captured image contains a human face and determine whether the image acquisition device is obscured. However, this occlusion detection method is only applicable to images containing close-up faces. When the captured image does not contain a face, it cannot detect occlusion caused by other reasons, resulting in a limited range of application. Furthermore, because a single frame image only covers a short period of time, it can misjudge normal pedestrians, resulting in low occlusion detection accuracy.
[0043] The method of judging whether the collected image is single by the brightness of the collected image, and thus determining whether the collected image has occlusion, is easily affected by changes in lighting and texture, resulting in misjudgment or missed occlusion detection.
[0044] On the other hand, the technical solution for occlusion detection through video classification methods is to convert the video dataset into an image dataset and classify the image dataset to determine whether the image is occluded. In the process of occlusion detection, this type of technical solution needs to train the model twice in succession. The model training steps are cumbersome and the training cost is high. In addition, this type of technical solution first extracts spatial features through CNN (Convolutional Neural Networks) and then extracts temporal features through RNN (Recurrent Neural Network). There is a disadvantage of insufficient coupling. The spatial features extracted by CNN may not fully consider the correlation in the time dimension, and RNN cannot reversely affect the extraction of spatial features when processing temporal features, resulting in limited overall feature expression capabilities. There is also an error accumulation problem in the two model trainings, and the risk of false positives and missed positives in occlusion detection is high.
[0045] In view of this, an occlusion detection method provided in an embodiment of the present application can perform occlusion detection on continuous images consisting of partial video frames within a period of time, reduce the false alarm rate and missed alarm rate of the occlusion detection results, and improve the accuracy of the occlusion detection results, thereby improving the safety and reliability of the monitoring system.
[0046] The technical solution provided in the embodiments of the present application can be applied to image acquisition devices with image acquisition and image recognition functions, such as cameras, video cameras, mobile phones, and tablet computers, and the present application does not limit this.
[0047] Figure 1 A schematic diagram of a process flow for obtaining a video stream to be detected in an occlusion detection method provided in an embodiment of the present application. Figure 1 As shown, the occlusion detection method provided by this application includes the following steps:
[0048] Step S101: Based on a preset image sampling rate, an image acquisition module is used to acquire an image.
[0049] In the embodiment of the present application, after the power-on time of the image acquisition device reaches the preset time requirement, the image acquisition module acquires images according to the preset image sampling rate. The image acquisition module can be a module in the image acquisition device that converts optical signals into image data.
[0050] Illustratively, the image acquisition device may acquire and store images according to a preset image sampling rate 8 seconds after being powered on.
[0051] For example, if the preset image sampling rate is 25 fps, the image acquisition device can acquire 250 frames of images within 8 to 18 seconds after power-on.
[0052] Step S102: Based on the target detection model, determine the number of detection targets in the captured image and the position information of the detection targets in the captured image.
[0053] In an embodiment of the present application, the image acquisition device can use the target detection model to identify in real time the number of detection targets in each frame of the captured image and the position information of the detection targets in the captured image, and store them.
[0054] The detection targets can be human figures, human face areas, and human head areas.
[0055] The target detection model can be a YOLO (You Only Look Once) series model. Before the image acquisition device performs target detection through the target detection model, it can pre-train and verify the YOLO model using a training set and a verification set marked with a human figure, a human facial area, and a human head area. The YOLO model that meets the preset verification conditions after training is used as the target detection model to facilitate the execution of target detection.
[0056] Step S103: Determine whether the image acquisition device is in a blocked state.
[0057] The image acquisition device may include an occlusion state, an unocclusion state, and an initial state (ie, a state where the occlusion detection process is not yet executed after power-on).
[0058] It should be understood that if the image acquisition device is in an occlusion state, then after the occlusion begins, the multiple frames of continuous acquired images acquired by the image acquisition device will generally not have large screen mutations. If the partial acquired images acquired after the occlusion state are used to perform video classification based on the preset video classification model, the accuracy of occlusion detection will be affected. Therefore, if the image acquisition device is not in an occlusion state (in an unoccluded state), the image acquisition device can execute steps S104 to S105, and use the partial acquired images acquired in real time before the current moment as multiple frames of images to be detected. If the image acquisition device is in an occlusion state, the image acquisition device can execute steps S106 to S107, and use the partial images in the acquired images acquired in real time before the current moment and the partial acquired images acquired before the image acquisition device is in the occlusion state as multiple frames of images to be detected.
[0059] Step S104: if the image acquisition device is not in an obstructed state, a plurality of frames of second acquired images acquired within a second time period are acquired.
[0060] In an embodiment of the present application, the end moment corresponding to the second time period is the current moment, the start moment corresponding to the second time period is the moment before the current moment, which is a second preset time interval away from the current moment, and the multiple frames of second acquired images are multiple frames of continuous images acquired by the image acquisition device at a preset image sampling rate.
[0061] After the power-on time reaches a preset time requirement, the image acquisition device can capture images in real time and execute the aforementioned step S102 to detect the number of detection targets corresponding to each frame of the captured image and the location information of the detection targets in the captured image. After the image acquisition time reaches a second preset time interval, the device acquires the video stream to be detected once per second and performs video classification using a preset video classification model to obtain the occlusion probability.
[0062] Exemplarily, the second preset time interval may be 8 seconds.
[0063] Step S105: determining one frame of the multiple frames of sub-collected images corresponding to the first sub-time period as the first image to be detected, so as to determine multiple frames of images to be detected.
[0064] In an embodiment of the present application, the second time period includes multiple sub-time periods, and the multiple sub-time periods correspond one-to-one to multiple frames of images to be detected. The first sub-time period is any one of the multiple sub-time periods, the multiple-frame sub-acquired images are the images in the multiple frames of the second acquired images corresponding to the first sub-time period, and the first image to be detected is the image in the multiple frames of images to be detected corresponding to the first sub-time period.
[0065] The image acquisition device can randomly select a frame of image from the multiple frames of sub-acquired images corresponding to each sub-time period to obtain multiple frames of images to be detected.
[0066] For example, the second preset time interval may be 8 seconds, and the duration of each sub-time period may be 1 second. When the second time period is between 10 seconds and 17 seconds after the image acquisition device is powered on, the image acquisition device may randomly acquire one frame of acquired image per second from the acquired images corresponding to the 10 seconds to 17 seconds, thereby obtaining 8 frames of images to be detected (multiple frames of images to be detected).
[0067] The image acquisition device may also extract multiple frames of images at equal intervals from the multiple frames of second acquired images based on the second time period to obtain multiple frames of images to be detected.
[0068] For example, if the second preset time interval is 8 seconds, and each sub-time period is 1 second long, the second time period is the period between 10 seconds and 17 seconds after the image acquisition device is powered on. The image acquisition device can extract the image captured at the middle of the 10th second as the image to be detected, the image captured at the middle of the 11th second as the image to be detected, the image captured at the middle of the 12th second as the image to be detected, and so on. The image acquisition device can extract the image captured at the middle of the 17th second as the image to be detected, thereby obtaining 8 frames of images to be detected (multiple frames of images to be detected).
[0069] Step S106: If the image acquisition device is in an obstructed state, multiple frames of second acquired images are acquired, and multiple frames of unobstructed images are acquired.
[0070] In the embodiment of the present application, each time the image acquisition device performs occlusion detection, after determining that the current state is a suspected unobstructed state, multiple frames of images to be detected are determined to be multiple frames of unobstructed images (i.e., the unobstructed window is updated).
[0071] Step S107: determining multiple frames of images to be detected according to the multiple frames of second collected images and the multiple frames of unobstructed images.
[0072] For example, if the video stream to be detected includes 8 frames of images, the image acquisition device can determine the last 5 frames of the multiple unobstructed images and the last 3 frames of the second acquired images as the multiple frames of images to be detected. Other combinations can also be used, and this application does not limit them here.
[0073] In the embodiment of the present application, after determining multiple frames of images to be detected, the image acquisition device can execute an image detection process based on the multiple frames of images to be detected. Figure 2 A schematic diagram of an occlusion detection process of an occlusion detection method provided in an embodiment of the present application includes the following steps:
[0074] Step S201: obtaining a video stream to be detected, where the video stream to be detected includes multiple frames of images to be detected, and the multiple frames of images to be detected are images captured by an image capture device at different times.
[0075] In the embodiment of the present application, the method for obtaining the video stream to be detected can refer to the above Figure 1 The method for obtaining the video stream to be detected in the corresponding embodiment is not described in detail in this application.
[0076] Step S202: determining the occlusion probability of the multiple frames of the image to be detected based on a preset video classification model. The occlusion probability is used to indicate whether there is a sudden change in the multiple frames of the image to be detected.
[0077] In an embodiment of the present application, the image acquisition device can train the model to be trained using a video data training set, and test and verify the trained model based on a video data verification set, and use the trained model that meets the test conditions as a preset video classification model. The model to be trained can be an end-to-end model such as TSM (Temporal Shift Module, a real-time video processing model), Uniformer (Unified Transformer for Spatial-Temporal Representation, a multimodal task model), or Swin (Shifted Window Transformer, a high-precision visual task model), which is not limited in this application.
[0078] The preset video classification model can be used to identify whether there are sudden changes in the image frames under test. If there are sudden changes in the image frames under test, the occlusion probability can be output. If there are no sudden changes in the image frames under test, the non-occlusion probability can be output. The sum of the occlusion probability and the non-occlusion probability is 1, which means that the non-occlusion probability can be calculated from the occlusion probability, and vice versa.
[0079] The occlusion probability can be used to characterize the degree of image occlusion. Specifically, a larger occlusion probability indicates a larger area of the image is occluded, and the likelihood of a sudden change in the image is greater. A smaller occlusion probability indicates a smaller area of the image is occluded, and the likelihood of a sudden change in the image is less.
[0080] For example, if the occlusion probability is 0.9, it means that 90% of the area in the picture is occluded.
[0081] The greater the probability of no occlusion, the larger the unobstructed area of the picture, and the smaller the possibility of a sudden change in the picture; the smaller the probability of no occlusion, the larger the obstructed area of the picture, and the greater the possibility of a sudden change in the picture.
[0082] For example, if the non-occlusion probability is 0.7, it means that 70% of the area in the picture is not blocked.
[0083] Step S203: If the occlusion probability is greater than or equal to the preset probability threshold, the target detection results corresponding to the multiple frames of first acquired images acquired within the first time period are obtained, where the end time of the first time period is the current time, and the start time of the first time period is the time before the current time that is different from the current time by a first preset time interval, and the multiple frames of first acquired images are multiple frames of continuous images acquired by the image acquisition device at a preset image sampling rate.
[0084] In the embodiment of the present application, the preset probability threshold may be a value such as 0.5, 0.6, or 0.65, which is not limited in this application. If the occlusion probability is greater than or equal to the preset probability threshold, the image acquisition device may determine that the probability of occlusion is high. To improve the accuracy of occlusion detection, the image acquisition device may perform a secondary judgment using the target detection model.
[0085] Exemplarily, the first preset time interval may be 5 seconds, that is, the multiple frames of first captured images are images captured by the image capture device within a time interval from the current moment to 5 seconds before the current moment.
[0086] The target detection results may include the first number of detected targets in multiple frames of captured images, the first degree of overlap between the detected targets in the target captured image and the first central area, and the second number of detected targets in the target captured image. The first central area is a preset image range in the target captured image with the center point as the center of the area, and the target captured image is the image corresponding to the current moment in the multiple frames of the first captured image.
[0087] In an embodiment of the present application, if the occlusion probability is less than a preset probability threshold, the image acquisition device can determine that the probability that there is no occlusion at present is high. The image acquisition device can add one to the no-occlusion count and determine whether it is currently in an occlusion state. If the image acquisition device is in an occlusion state and the no-occlusion count is greater than the no-occlusion count threshold, the corresponding state of the image acquisition device is changed to an no-occlusion state. The value range of the no-occlusion count threshold can be 3 to 5, or other value ranges, which is not limited in this application. If the image acquisition device is not in an occlusion state, the image acquisition device can directly determine that there is no occlusion, that is, the current state is a no-occlusion state.
[0088] Step S204: Determine the occlusion detection results corresponding to the multiple frames of images to be detected according to the target detection results.
[0089] In the embodiment of the present application, the occlusion detection result may be a suspected occlusion state or a suspected no occlusion state.
[0090] According to the target detection results, a method for determining the occlusion detection results corresponding to the multiple frames of images to be detected may include:
[0091] Step A1: Obtain a preset quantity threshold and a preset overlap threshold.
[0092] In the embodiment of the present application, the preset number threshold can be used to limit the number of detection targets in the target acquisition image, that is, to limit the second number. The preset overlap threshold can be used to limit the degree of intersection between the detection target and the central area in the target acquisition image.
[0093] If the first number is 0, it means that within the second time period (the time period corresponding to multiple frames of images to be detected), the image acquisition device did not detect the detection target (human figure, human facial area and / or human head area), and the current state is likely to be a suspected unobstructed state (the default occlusion behavior is completed by a person), and the image acquisition device can execute steps A6 and A7.
[0094] If the first number is not 0, it indicates that within the second time period (the time period corresponding to multiple frames of images to be detected), the image acquisition device has detected the detection target (human figure, human facial area and / or human head area), and the probability that the current state is a suspected occlusion state is relatively high, and the image acquisition device can execute step A2.
[0095] Step A2: If the first number is not 0, the second number is less than the preset number threshold, and the first overlap is less than the preset overlap threshold, then the current state is determined to be a suspected occlusion state.
[0096] In this embodiment of the present application, if the first number is not 0, it indicates that the image acquisition device has detected the detection target (human figure, human facial region, and / or human head region) within the second time period (the time period corresponding to the multiple frames of images to be detected). The image acquisition device can then use conditions 1 and 2 to assist in determining whether the current state is a suspected occlusion state.
[0097] Condition 1: The second quantity is less than a preset quantity threshold.
[0098] If the second number is greater than or equal to the preset number threshold, it indicates that the number of detected objects in the target captured image is relatively large, that is, the probability that there is no malicious human occlusion is high. If the second number is less than the preset number threshold, it indicates that the number of detected objects in the target captured image is relatively small, and the probability that there is malicious human occlusion is high.
[0099] Condition 2: The first overlap is less than a preset overlap threshold.
[0100] When malicious human occlusion occurs, the detected target in the target acquisition image is typically located at the edge of the image. This means that the first degree of overlap between the detected target in the target acquisition image and the first central region is low, and the first degree of overlap is less than a preset overlap threshold. If the first degree of overlap is greater than or equal to the preset overlap threshold, then there is a high probability that malicious human occlusion does not occur.
[0101] Therefore, when the first number is not 0 and both condition 1 and condition 2 are satisfied, it indicates that the probability that the current state is a suspected occlusion state is high, and it can be determined to be a suspected occlusion state.
[0102] In an embodiment of the present application, when the first number is not 0, after determining that the current state is a suspected occlusion state, the image acquisition device can determine whether the image acquisition device is in an occlusion state. If the image acquisition device is not in an occlusion state, the image acquisition device can change the current state to an occlusion state.
[0103] In some embodiments, when the first number is not 0, after the image acquisition device determines that the current state is a suspected occlusion state, in order to improve the accuracy of occlusion detection, it can also execute steps A3 and A4 to assist in determining whether it is an occlusion state through the occlusion count and whether it is an occlusion state.
[0104] Step A3: Increase the occlusion count by one.
[0105] In an embodiment of the present application, in order to avoid false image recognition results caused by a single recognition error, the image acquisition device can also set an occlusion count. If the image acquisition device is not in an occlusion state, the image acquisition device will increase the occlusion count corresponding to the suspected occlusion state by one each time it detects a suspected occlusion state.
[0106] After determining the occlusion probability for the multiple frames of image data to be detected in step S202, the image acquisition device may also determine whether to reset the occlusion count based on the occlusion probability. Specifically, if the occlusion probability is less than a preset probability threshold, the image acquisition device may reset the occlusion count, i.e., clear the occlusion count to zero. If the occlusion probability is greater than or equal to the preset probability threshold, the image acquisition device does not reset the occlusion count.
[0107] Step A4: If the image acquisition device is not in the blocking state and the blocking count is greater than or equal to the blocking count threshold, the state corresponding to the image acquisition device is changed to the blocking state.
[0108] When the image acquisition device is not in an occlusion state (in an unocclusion state), when the occlusion count reaches an occlusion count threshold, the image acquisition device may change the corresponding state of the image acquisition device to an occlusion state.
[0109] In the embodiment of the present application, if the image acquisition device changes the unobstructed state to the obstructed state, the image acquisition device may also determine that the current state is the obstruction start state.
[0110] Step A5: If the first number is not 0, and the second number is greater than or equal to the preset number threshold and / or the first overlap is greater than or equal to the preset overlap threshold, then determine that the current state is a suspected unobstructed state.
[0111] When the first number is not 0, if condition 1 or condition 2 is not met, or both condition 1 and condition 2 are not met, it indicates that the current state is likely to be a suspected unobstructed state, and it can be determined to be a suspected unobstructed state.
[0112] In an embodiment of the present application, when the first number is not 0, the image acquisition device can determine whether the image acquisition device is in an obstruction state after determining that the current state is a suspected unobstructed state. If the image acquisition device is in an obstruction state, the image acquisition device can change the obstruction state to an unobstructed state.
[0113] In some embodiments, when the first number is not 0, after the image acquisition device determines that the current state is a suspected unobstructed state, in order to improve the accuracy of occlusion detection, it can also execute steps A6 and A7, through unobstructed counting and auxiliary judgment whether the current state is an occlusion state, and whether to change the current state.
[0114] Step A6: Increase the unobstructed count by one.
[0115] In an embodiment of the present application, in order to avoid false image recognition results caused by a single recognition error, the image acquisition device can also set an unobstructed count. If the image acquisition device is in an obstructed state, the image acquisition device will increase the unobstructed count corresponding to the suspected unobstructed state by one each time it detects a suspected unobstructed state.
[0116] After determining the occlusion probabilities of the multiple frames of images to be detected in step S202, the image acquisition device may further determine the non-occlusion probability based on the occlusion probabilities.
[0117] In some embodiments, the image acquisition device may also directly determine the unobstructed probability of multiple frames of images to be detected based on a preset video classification model.
[0118] The image acquisition device may determine whether to reset the non-occlusion count based on the non-occlusion probability. Specifically, if the non-occlusion probability is less than a preset non-occlusion probability threshold, the image acquisition device may reset the non-occlusion count, i.e., clear the non-occlusion count to zero. If the non-occlusion probability is greater than or equal to the preset non-occlusion probability threshold, the image acquisition device does not reset the non-occlusion count.
[0119] The preset unobstructed probability threshold may be a value such as 0.6 or 0.65, which is not limited in this application.
[0120] Step A7: If the image acquisition device is in the blocking state and the non-blocking count is greater than or equal to the non-blocking count threshold, the state corresponding to the image acquisition device is changed to the non-blocking state.
[0121] When the image acquisition device is in an obstruction state, when the unobstruction count reaches the unobstruction count threshold, the image acquisition device may change the corresponding state of the image acquisition device to the unobstruction state.
[0122] In the embodiment of the present application, if the image acquisition device changes the occlusion state to the unocclusion state, the image acquisition device may also determine that the current state is the occlusion end state.
[0123] In the technical solution provided by the embodiments of the present application, an image acquisition device can obtain a video stream to be detected, which includes multiple frames of images to be detected. The multiple frames of images to be detected are images captured by the image acquisition device at different times. Based on a preset video classification model, the occlusion probability of the multiple frames of images to be detected is determined. The occlusion probability is used to characterize whether there is a sudden change in the multiple frames of images to be detected. If the occlusion probability is greater than or equal to a preset probability threshold, it indicates that the probability of occlusion is high. To improve the accuracy of occlusion detection, the image acquisition device can also obtain the target detection results corresponding to the multiple frames of first acquired images acquired within a first time period for secondary discrimination. The end time of the first time period is the current time, and the start time of the first time period is a time before the current time that is different from the current time by a first preset time interval. The multiple frames of first acquired images are multiple frames of continuous images captured by the image acquisition device at a preset image sampling rate. Finally, based on the target detection results, the occlusion detection results corresponding to the multiple frames of images to be detected are determined. The embodiment of the present application can perform occlusion detection on continuous images consisting of partial video frames within a period of time based on a preset video classification model. When the occlusion probability is high, in order to reduce the false alarm rate of the occlusion detection result, a secondary discrimination can be performed, that is, target detection is performed, and the discrimination result of the video classification model is verified according to the target detection result. It effectively integrates the temporal characteristics and spatial characteristics of the video, can reduce the false alarm rate and missed alarm rate of the occlusion detection result, and improve the accuracy of the occlusion detection result, thereby improving the safety and reliability of the monitoring system.
[0124] It should be understood that, provided there is no logical conflict, the above-mentioned embodiments can be combined with each other to meet actual application requirements. The specific embodiments or implementation plans obtained by these combinations still fall within the scope of protection of this application.
[0125] Corresponding to the occlusion detection method in the above embodiment, an embodiment of the present application provides an occlusion detection device, which can be an image acquisition device. The occlusion detection device is implemented by software, hardware or a combination of both to become part or all of a computer device, and is used to execute the steps in the occlusion detection method in the above embodiment.
[0126] Figure 3 A schematic structural diagram of an occlusion detection device 30 provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0127] Reference Figure 3 The device 30 includes an acquisition module 310 and a processing module 320.
[0128] The acquisition module 310 is used to acquire a video stream to be detected. The video stream to be detected includes multiple frames of images to be detected. The multiple frames of images to be detected are images acquired by an image acquisition device at different times.
[0129] The processing module 320 is used to determine the occlusion probability of the multiple frames of images to be detected based on a preset video classification model. The occlusion probability is used to indicate whether there is a sudden change in the multiple frames of images to be detected.
[0130] The acquisition module 310 is also used to obtain target detection results corresponding to multiple frames of first acquired images acquired within a first time period when the occlusion probability is greater than or equal to a preset probability threshold, where the end time of the first time period is the current time, and the start time of the first time period is the time before the current time that is different from the current time by a first preset time interval, and the multiple frames of first acquired images are multiple frames of continuous images acquired by the image acquisition device at a preset image sampling rate.
[0131] The processing module 320 is further configured to determine occlusion detection results corresponding to the multiple frames of images to be detected based on the target detection results.
[0132] In some embodiments, the target detection results include a first number of detected targets in multiple frames of captured images, a first degree of overlap between the detected targets in the target captured images and the first central area, and a second number of detected targets in the target captured images. The first central area is a preset image range in the target captured image with the center point as the center of the area, and the first captured image is an image corresponding to the current moment in the multiple frames of the first captured images.
[0133] In some embodiments, the occlusion detection result is a suspected occlusion state or a suspected non-occlusion state. Based on the target detection result, the processing module 320 is specifically configured to: determine the current state as a suspected occlusion state if the first number is not zero, the second number is less than a preset number threshold, and the first overlap is less than a preset overlap threshold; and determine the current state as a suspected non-occlusion state if the first number is not zero, the second number is greater than or equal to the preset number threshold, and / or the first overlap is greater than or equal to the preset overlap threshold.
[0134] In some embodiments, the processing module 320 is further configured to: determine whether the image acquisition device is in an obstruction state; and if the image acquisition device is not in an obstruction state, change the corresponding state of the image acquisition device to an obstruction state.
[0135] In some embodiments, the processing module 320 is further configured to: increment the occlusion count by one, determine whether the image acquisition device is in an occlusion state, and if the image acquisition device is not in an occlusion state and the occlusion count is greater than or equal to an occlusion count threshold, change the corresponding state of the image acquisition device to an occlusion state.
[0136] In some embodiments, the processing module 320 is further configured to: determine whether the image acquisition device is in an obstruction state; and if the image acquisition device is in an obstruction state, change the corresponding state of the image acquisition device to an unobstructed state.
[0137] In some embodiments, the processing module 320 is further configured to: increment the unobstructed state count corresponding to the suspected unobstructed state by one; determine whether the image acquisition device is in an obstructed state; and if the image acquisition device is in an obstructed state and the unobstructed state count is greater than or equal to a unobstructed state count threshold, change the state of the image acquisition device to an unobstructed state.
[0138] In some embodiments, the processing module 320 is further configured to: if the occlusion probability is less than a preset probability threshold, increment the non-occlusion count by 1. If the image acquisition device is in an occlusion state and the non-occlusion count is greater than the non-occlusion count threshold, change the corresponding state of the image acquisition device to a non-occlusion state.
[0139] In some implementations, the processing module 320 is further configured to determine the multiple frames of images to be detected as multiple frames of unobstructed images.
[0140] In some embodiments, the acquisition module 310 is specifically configured to determine whether the image acquisition device is in an obstructed state. If the image acquisition device is not in an obstructed state, multiple frames of second acquired images acquired within a second time period are acquired, where the end time corresponding to the second time period is the current time, the start time corresponding to the second time period is a time before the current time that is separated from the current time by a second preset time interval, and the multiple frames of second acquired images are multiple frames of continuous images acquired by the image acquisition device at a preset image sampling rate. Determine one frame of the multiple frames of sub-acquired images corresponding to the first sub-time period as the first image to be detected, thereby determining the multiple frames of images to be detected. The second time period includes multiple sub-time periods, each of which corresponds one-to-one to the multiple frames of images to be detected. The first sub-time period is any one of the multiple sub-time periods. The multiple sub-acquired images are images of the multiple frames of second acquired images corresponding to the first sub-time period. The first image to be detected is an image of the multiple frames of images to be detected corresponding to the first sub-time period.
[0141] In some embodiments, the processing module 320 is further configured to: if the image acquisition device is in an obstructed state, acquire multiple frames of second acquired images and multiple frames of unobstructed images, and determine multiple frames of images to be detected based on the multiple frames of second acquired images and the multiple frames of unobstructed images.
[0142] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.
[0143] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0144] Based on the same inventive concept, an embodiment of the present application also provides an electronic device.
[0145] Figure 4 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 4 As shown, the electronic device 4 of this embodiment includes: at least one processor 410 ( Figure 4 Only one is shown), memory 420, and communication module 440, memory 420 stores computer program 430 that may be run on processor 410. When processor 410 executes computer program 430, steps in the above-mentioned embodiment of the occlusion detection method are implemented, such as Figure 2 201 to step 204. When the processor 410 executes the computer program 430, the functions of each module / unit in the above-mentioned device embodiments are realized, such as Figure 3 The functions of modules 310 to 320 are shown, and the communication module 440 can be a separate communication unit for communicating with an external server or terminal device.
[0146] The electronic device 4 may include, but is not limited to: a processor 410 and a memory 420. Those skilled in the art will appreciate that Figure 4 It is only an example of electronic device 4 and does not constitute a limitation of electronic device 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, electronic device 4 may also include an input sending device, a network access device, a bus, etc.
[0147] The processor 410 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 gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0148] In some embodiments, the memory 420 may be an internal storage unit of the electronic device 4, such as a hard disk or memory of the electronic device 4. The memory 420 may also be an external storage device of the electronic device 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash memory card, etc. equipped on the electronic device 4. The memory 420 may also include both an internal storage unit of the electronic device 4 and an external storage device. The memory 420 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program 430. The memory 420 may also be used to temporarily store data that has been sent or is about to be sent.
[0149] In addition, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units in the various embodiments of the present application can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0150] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on an electronic device, the electronic device executes the steps in the above-mentioned method embodiments.
[0151] An embodiment of the present application provides a chip, which includes a processor and a memory. The memory stores a computer program, and when the computer program is executed by the processor, the steps in the above-mentioned method embodiments are implemented.
[0152] An embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the steps in the above-mentioned various method embodiments.
[0153] It should be understood that the processor mentioned in the embodiments of the present application may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0154] It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0155] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0156] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0157] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0158] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0159] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0160] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0161] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program, when executed by the processor, can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include at least: any entity or device capable of carrying the computer program code to a large-screen device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0162] Finally, it should be noted that the above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for detecting occlusion, characterized in that: Applied to an image acquisition device, the method includes: Acquire a video stream to be detected, wherein the video stream to be detected includes multiple frames of images to be detected, and the multiple frames of images to be detected are images captured by the image acquisition device at different times; Determining, based on a preset video classification model, an occlusion probability of the plurality of frames of images to be detected, wherein the occlusion probability is used to indicate whether there is a sudden change in the plurality of frames of images to be detected; If the occlusion probability is greater than or equal to a preset probability threshold, then obtaining target detection results corresponding to multiple frames of first acquired images acquired within a first time period, where the end time of the first time period is the current time, the start time of the first time period is a time before the current time that is different from the current time by a first preset time interval, and the multiple frames of first acquired images are multiple frames of continuous images acquired by the image acquisition device at a preset image sampling rate; Determine, based on the target detection result, the occlusion detection results corresponding to the multiple frames of images to be detected.
2. The occlusion detection method according to claim 1, wherein: The target detection result includes the first number of detected targets in the multiple frames of first acquired images, the first degree of overlap between the detected targets and the first central area in the target acquired image, and the second number of detected targets in the target acquired image. The first central area is a preset image range in the target acquired image with the center point as the center of the area, and the target acquired image is the image corresponding to the current moment in the multiple frames of first acquired images.
3. The occlusion detection method according to claim 2, wherein: The occlusion detection result is a suspected occlusion state or a suspected non-occlusion state, and determining the occlusion detection results corresponding to the multiple frames of images to be detected according to the target detection result includes: If the first number is not 0, the second number is less than a preset number threshold, and the first overlap is less than a preset overlap threshold, determining that the current state is the suspected occlusion state; If the first number is not 0, and the second number is greater than or equal to a preset number threshold and / or the first overlap is greater than or equal to a preset overlap threshold, it is determined that the current state is the suspected unobstructed state.
4. The occlusion detection method according to claim 3, wherein: After the step of determining that the current state is the suspected occlusion state, the method further includes: Determining whether the image acquisition device is in a blocked state; If the image acquisition device is not in the blocking state, the state corresponding to the image acquisition device is changed to the blocking state.
5. The occlusion detection method according to claim 3, wherein: After the step of determining that the current state is the suspected occlusion state, the method further includes: Increase the occlusion count by one; Determining whether the image acquisition device is in a blocked state; If the image acquisition device is not in the occlusion state and the occlusion count is greater than or equal to the occlusion count threshold, the state corresponding to the image acquisition device is changed to the occlusion state.
6. The occlusion detection method according to claim 3, wherein: After the step of determining that the current state is the suspected unobstructed state, the method further includes: Determining whether the image acquisition device is in a blocked state; If the image acquisition device is in the blocking state, the corresponding state of the image acquisition device is changed to an unblocked state.
7. The occlusion detection method according to claim 3, wherein: After the step of determining that the current state is the suspected unobstructed state, the method further includes: Increase the unobstructed count by one; Determining whether the image acquisition device is in a blocked state; If the image acquisition device is in the blocking state and the unblocking count is greater than or equal to the unblocking count threshold, the state corresponding to the image acquisition device is changed to the unblocking state.
8. The occlusion detection method according to claim 7, wherein: After the step of determining the occlusion probability of the multiple frames of images to be detected, the method further includes: If the occlusion probability is less than a preset probability threshold, the non-occlusion count is increased by one; Determining whether the image acquisition device is in the blocking state; If the image acquisition device is in the blocking state and the unblocking count is greater than or equal to the unblocking count threshold, the state corresponding to the image acquisition device is changed to the unblocking state.
9. The occlusion detection method according to claim 3, wherein: After determining that the current state is the suspected unobstructed state, the method further includes: The multiple frames of images to be detected are determined to be multiple frames of unobstructed images.
10. The occlusion detection method according to any one of claims 1 to 9, characterized in that: The step of obtaining the video stream to be detected includes: Determining whether the image acquisition device is in a blocked state; If the image acquisition device is not in an obstructed state, a plurality of frames of second acquired images acquired within a second time period are acquired, where the end moment corresponding to the second time period is the current moment, and the start moment corresponding to the second time period is a moment before the current moment that is separated from the current moment by a second preset time interval, and the plurality of frames of second acquired images are a plurality of continuous frames of images acquired by the image acquisition device at the preset image sampling rate; Determine a frame image in the multiple frames of sub-acquired images corresponding to the first sub-time period as the first image to be detected, so as to determine the multiple frames of images to be detected, the second time period includes multiple sub-time periods, the multiple sub-time periods correspond one-to-one to the multiple frames of images to be detected, the first sub-time period is any one of the multiple sub-time periods, the multiple frames of sub-acquired images are the images in the multiple frames of second acquisition images corresponding to the first sub-time period, and the first image to be detected is the image in the multiple frames of images to be detected corresponding to the first sub-time period.
11. The occlusion detection method according to claim 10, wherein: After the step of determining whether the image acquisition device is in an obstructed state, the method further includes: If the image acquisition device is in an obstructed state, acquiring the plurality of frames of second acquired images and acquiring a plurality of frames of unobstructed images; The multiple frames of images to be detected are determined according to the multiple frames of second acquired images and the multiple frames of unobstructed images.
12. An electronic device, characterized in that: The system comprises a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the occlusion detection method as described in any one of claims 1 to 11.
13. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the occlusion detection method as described in any one of claims 1 to 11 is implemented.