Camera shelter detection method and device, computer equipment, readable storage medium and program product
Through multi-model comprehensive judgment and Prompt technology, the accuracy of camera occlusion detection is improved, the problem of low detection accuracy in the prior art is solved, and the detection ability of camera occlusion is enhanced.
Patent Information
- Application Number
- CN202411099937.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-26
AI Technical Summary
In the prior art, the accuracy of camera occlusion detection is low. Especially when the scene changes greatly, the detection accuracy of the single-model machine learning method is insufficient, making it difficult to detect camera occlusion in time.
Multiple trained occlusion detection models are used to detect the video stream captured by the camera. The model is guided through boot files and Prompt technology, and the model weight preset value is adjusted to comprehensively determine whether there is occlusion in front of the camera, so as to improve the detection accuracy.
It effectively improves the accuracy of camera occlusion detection, avoids errors caused by misjudgment of a single model, and enhances the detection ability of camera occlusion.
Smart Images

Figure CN119027386A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for detecting camera obstructions. Background Technology
[0002] With the widespread adoption of security monitoring systems, numerous security monitoring devices, such as surveillance cameras, have been installed in public places like communities, nursing homes, hospitals, office buildings, factories, and hotels. However, because these cameras are often exposed and unmaintained, they can be obstructed by objects such as small insects, branches, leaves, and cables, preventing the security monitoring equipment from capturing images properly. Therefore, obstruction detection is an indispensable step in the normal operation of security monitoring equipment.
[0003] In traditional technologies, it is possible to check whether a surveillance camera is obstructed by manual inspection, or to use a single-model machine learning method to perform image recognition on the images captured by the camera to determine whether the camera is obstructed.
[0004] However, manual inspections are difficult to detect when cameras are obstructed, and single-model machine learning methods have poor scene adaptability, resulting in low detection accuracy when the scene changes significantly. Summary of the Invention
[0005] Therefore, it is necessary to provide a camera occlusion detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the accuracy of camera occlusion detection in response to the above-mentioned technical problems.
[0006] Firstly, this application provides a method for detecting camera obstructions, including:
[0007] The image to be detected is obtained based on the video stream captured by the camera to be detected;
[0008] Obtain the boot file used to guide the occlusion detection process;
[0009] The image to be detected and the guidance file are respectively input into multiple trained occlusion detection models to obtain the single-model detection results output by each trained occlusion detection model.
[0010] Based on the single-model detection results of each trained occlusion detection model, the preset weight values of each trained occlusion detection model are adjusted to obtain the actual weight values of each trained occlusion detection model. The calculated weight values are obtained based on the actual weight values, and the occlusion detection results of the camera to be detected are determined based on the calculated weight values.
[0011] In one embodiment, obtaining a guidance file for guiding the occlusion detection process includes:
[0012] Based on the preset occlusion type and preset occlusion ratio to be detected, obtain detection guidance text; the detection guidance text is used to guide the trained occlusion detection model to detect whether there are occlusions of the preset occlusion type in the image to be detected, as well as the size relationship between the occlusion ratio of the existing occlusion and the preset occlusion ratio, and output the single model detection result based on the corresponding detection result.
[0013] Based on the detected guide text, a Prompt structure is constructed to obtain the corresponding Prompt, which serves as the guide file.
[0014] In one embodiment, the training process of the occlusion detection model includes:
[0015] Obtain the training set; the training set includes multiple training samples, each training sample includes a sample image, sample annotation data, and a sample guidance file; the sample annotation data is used to characterize the location and type of occluders in the sample image; the sample guidance file includes the type of occluder and the occlusion ratio of the sample, which is used to guide the occlusion detection model to detect whether there are occluders of the sample type in the sample image, as well as the relationship between the occlusion ratio of the existing occluders and the sample occlusion ratio, and output the training detection results based on the corresponding detection results;
[0016] Obtain the occlusion detection model of the target architecture or target algorithm, input a training sample into the occlusion detection model, and obtain the training detection result output by the occlusion detection model;
[0017] Based on the training detection results and the corresponding sample annotation data, adjust the model parameters of the occlusion detection model to complete one training cycle;
[0018] The occlusion detection model was trained multiple times using the training set to obtain the trained occlusion detection model.
[0019] In one embodiment, the method for obtaining the preset weight values of each trained occlusion detection model includes:
[0020] Obtain the validation set from the training set;
[0021] The detection performance of each trained occlusion detection model is tested using the validation set to obtain the detection accuracy of each trained occlusion detection model.
[0022] Based on the detection accuracy, a preset weight value is determined for each trained occlusion detection model; the preset weight value is positively correlated with the detection accuracy.
[0023] In one embodiment, the single-model detection results are divided into occluded and unoccluded, and the preset weight values are all positive. Based on the single-model detection results of each trained occluded object detection model, the preset weight values of each trained occluded object detection model are adjusted to obtain the actual weight values of each trained occluded object detection model. The calculated weight values are obtained based on the actual weight values, including:
[0024] The preset weight values of models whose single-model detection results are occluded are used as the actual weight values of the corresponding models, and the negative of the preset weight values of models whose single-model detection results are unoccluded are used as the actual weight values of the corresponding models.
[0025] The actual weight values of each trained occlusion detection model are summed to obtain the calculated weight value.
[0026] In one embodiment, the occlusion detection result of the camera to be detected is determined based on the weighted calculation value, including:
[0027] If the weight calculation value is not less than the weight threshold, the occlusion detection result of the camera to be detected is that there is occlusion;
[0028] If the weight calculation value is less than the weight threshold, the occlusion detection result of the camera to be detected is no occlusion.
[0029] Secondly, this application also provides a camera obstruction detection device, comprising:
[0030] The acquisition module is used to acquire the image to be detected based on the video stream captured by the camera to be detected;
[0031] The guidance module is used to obtain the guidance file used to guide the occlusion detection process;
[0032] The processing module is used to input the image to be detected and the guidance file into multiple trained occlusion detection models respectively, and obtain the single-model detection result output by each trained occlusion detection model.
[0033] The detection module is used to adjust the preset weight values of each trained occlusion detection model based on the single-model detection results of each trained occlusion detection model, obtain the actual weight values of each trained occlusion detection model, obtain the weight calculation values based on the actual weight values, and determine the occlusion detection results of the camera to be detected based on the weight calculation values.
[0034] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0035] The image to be detected is obtained based on the video stream captured by the camera to be detected;
[0036] Obtain the boot file used to guide the occlusion detection process;
[0037] The image to be detected and the guidance file are respectively input into multiple trained occlusion detection models to obtain the single-model detection results output by each trained occlusion detection model.
[0038] Based on the single-model detection results of each trained occlusion detection model, the preset weight values of each trained occlusion detection model are adjusted to obtain the actual weight values of each trained occlusion detection model. The calculated weight values are obtained based on the actual weight values, and the occlusion detection results of the camera to be detected are determined based on the calculated weight values.
[0039] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0040] The image to be detected is obtained based on the video stream captured by the camera to be detected;
[0041] Obtain the boot file used to guide the occlusion detection process;
[0042] The image to be detected and the guidance file are respectively input into multiple trained occlusion detection models to obtain the single-model detection results output by each trained occlusion detection model.
[0043] Based on the single-model detection results of each trained occlusion detection model, the preset weight values of each trained occlusion detection model are adjusted to obtain the actual weight values of each trained occlusion detection model. The calculated weight values are obtained based on the actual weight values, and the occlusion detection results of the camera to be detected are determined based on the calculated weight values.
[0044] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0045] The image to be detected is obtained based on the video stream captured by the camera to be detected;
[0046] Obtain the boot file used to guide the occlusion detection process;
[0047] The image to be detected and the guidance file are respectively input into multiple trained occlusion detection models to obtain the single-model detection results output by each trained occlusion detection model.
[0048] Based on the single-model detection results of each trained occlusion detection model, the preset weight values of each trained occlusion detection model are adjusted to obtain the actual weight values of each trained occlusion detection model. The calculated weight values are obtained based on the actual weight values, and the occlusion detection results of the camera to be detected are determined based on the calculated weight values.
[0049] The aforementioned camera occlusion detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product acquire an image to be detected from the video stream captured by the camera to be detected; acquire a guidance file to guide the occlusion detection process; input the image to be detected and the guidance file into multiple trained occlusion detection models respectively, and obtain the single-model detection result output by each trained occlusion detection model; adjust the preset weight values of each trained occlusion detection model based on the single-model detection results of each trained occlusion detection model, obtain the actual weight values of each trained occlusion detection model, obtain the calculated weight values based on the actual weight values, and determine the occlusion detection result of the camera to be detected based on the calculated weight values. By using multiple models to detect occlusions in the image captured by the camera, and based on the preset weights of each model during training and the detection results of each model, a comprehensive judgment is made on whether there are occlusions in front of the camera. This effectively detects occlusions in front of the camera, avoids occlusion detection errors caused by misjudgment by a single model, and improves the detection accuracy of occlusions in front of the camera. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is an application environment diagram of the camera obstruction detection method in one embodiment;
[0052] Figure 2 This is a flowchart illustrating a camera obstruction detection method in one embodiment;
[0053] Figure 3 This is a schematic diagram of the detection results of the first type of obstruction in one embodiment;
[0054] Figure 4 This is a schematic diagram of the detection results of the second type of obstruction in one embodiment;
[0055] Figure 5 This is a schematic diagram of the data processing flow of a camera obstruction detection method in one embodiment;
[0056] Figure 6 This is a structural block diagram of a camera obstruction detection device in one embodiment;
[0057] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0058] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0059] When cameras are initially installed, they are positioned for the optimal viewing angle. However, in real-world scenarios, many cameras encounter obstructions in front of them after installation, such as billboards, promotional materials, trees, metal frames, and walls. These objects did not initially present any obstruction; they have gradually evolved over time, such as promotional materials installed for events, trees growing taller, or buildings being expanded. The presence of these obstructions interferes with the camera's operation and affects its viewing angle.
[0060] The video surveillance field relies on video stream data transmitted by cameras. If the camera is obstructed, the collected data loses its monitoring significance. While there have been attempts in industry to identify camera occlusion using a single neural network, single-model capabilities are limited and cannot fully utilize the positional and semantic information of the image. Therefore, using a single neural network for camera occlusion detection suffers from low accuracy.
[0061] The camera obstruction detection method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, computer device 102 communicates with camera 104 via a network. A data storage system can store the data that computer device 102 needs to process. The data storage system can be integrated into computer device 102 or placed in the cloud or on other network servers. Electronic device 102 includes terminals and servers. Terminals can be, but are not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing cloud computing services.
[0062] In one exemplary embodiment, such as Figure 2 As shown, a method for detecting camera obstructions is provided, which can be applied to... Figure 1 Taking computer device 102 as an example, the explanation includes the following steps 202 to 208. Wherein:
[0063] Step 202: Obtain the image to be detected based on the video stream captured by the camera to be detected.
[0064] Optionally, the computer equipment acquires the video stream from the camera device being inspected, automatically processes screenshots of the camera video stream in batches, and uses the screenshots as the images to be inspected. The screenshots are taken after the video stream has played normally for a certain period of time to avoid missing crucial information from the image.
[0065] In one feasible implementation, the computer device can use each frame of the video stream as the image to be detected, or it can extract frames from the video stream at preset frame intervals as the image to be detected, or it can extract one frame from the video stream as the image to be detected at a preset period.
[0066] Step 204: Obtain the guide file used to guide the occlusion detection process.
[0067] The guiding file can be, but is not limited to, a Prompt. In the field of artificial intelligence, a Prompt is a very important concept. It refers to a given text or statement used to initiate and guide a machine learning model to generate output of a specific type, topic, or format. A Prompt can be understood as a way to start a machine learning model; it is a text or statement used to instruct the machine learning model to generate output of a specific type, topic, or format. In natural language processing, a Prompt typically consists of a problem or task description, such as "Write me an article about artificial intelligence" or "Translate this English sentence into French." In image recognition, a Prompt can be an image description, label, or classification information.
[0068] Unlike traditional supervised training, training with a prompt does not require labeling every sample. Instead, the model is guided to generate the corresponding output by providing a prompt. This approach significantly reduces the workload of data labeling and allows for better control over the quality and diversity of the model's output.
[0069] Optionally, the computer device acquires a user-preset Prompt, which serves as an instruction or prompt to trigger the AI model to perform a specific task or generate a specific output.
[0070] For example, a Prompt could include the following text: "The attached image is a view from the camera. Please help me analyze whether there are any physical obstructions in front of the camera, such as billboards, promotional materials, trees, flowers, metal frames, wooden frames, walls, etc., that obstruct 15% or more of the image? Please answer with true or false." The attached image in the above text refers to the image to be detected.
[0071] Step 206: Input the image to be detected and the guidance file into multiple trained occlusion detection models respectively, and obtain the single-model detection result output by each trained occlusion detection model.
[0072] Multiple trained object detection models can be implemented using a multimodal LLM (Large Language Model). For example, multiple trained object detection models can be placed in the middle layer of a multimodal LLM.
[0073] Optionally, the computer device uses the image to be detected and the guide file as input data, and inputs the input data into each trained occlusion detection model. Each trained occlusion detection model performs a series of processes on the image, including preprocessing, feature extraction, object detection, and occlusion recognition, and outputs its own single-model detection result. The single-model detection result is the result of a single occlusion detection model detecting occlusions in the image to be detected.
[0074] Taking the input guidance file as an example, "The attached image is a view from the camera. Please help me analyze whether there are any physical obstructions in front of the camera, such as billboards, promotional materials, trees, flowers, iron frames, wooden frames, walls, etc., that obstruct 15% or more of the image? Please answer with true or false," if the occlusion detection model determines that the specified occlusion exists in the image to be detected and obstructs 15% or more of the image, the single model detection result is true. If the occlusion detection model determines that the specified occlusion does not exist in the image to be detected, the single model detection result is false. If the occlusion detection model determines that the specified occlusion exists in the image to be detected and obstructs less than 15% of the image, the single model detection result is false.
[0075] Step 208: Based on the single-model detection results of each trained occlusion detection model, adjust the preset weight values of each trained occlusion detection model to obtain the actual weight values of each trained occlusion detection model. Obtain the calculated weight values based on the actual weight values and determine the occlusion detection results of the camera to be detected based on the calculated weight values.
[0076] Optionally, during the training phase of each occlusion detection model, a preset weight value is set for each occlusion detection model based on its test performance. After the computer device obtains the single-model detection results output by each trained occlusion detection model, it sets the preset weight value of each model to a positive or negative number based on the single-model detection results. Then, the preset weight values are added together to obtain the calculated weight value. The occlusion detection result of the camera to be detected is determined based on the magnitude of the calculated weight value.
[0077] Continuing the previous example, the preset weight values for occlusion detection models with a single-model detection result of true are set to positive numbers, and the preset weight values for occlusion detection models with a single-model detection result of false are set to negative numbers. If the final calculated weight value is greater than or equal to the preset weight threshold, the occlusion detection result of the camera under test is true, indicating that a specified occlusion exists in the image under test and occludes 15% or more of the image. If the final calculated weight value is less than the preset weight threshold, the occlusion detection result of the camera under test is false, indicating that a specified occlusion does not exist in the image under test, or that a specified occlusion exists in the image under test but occludes less than 15% of the image. Figure 3 and Figure 4 As shown, the final output of the occlusion detection result is either true or false.
[0078] In one feasible implementation, the computer device can also generate a detailed occlusion detection report based on the image to be detected, the text information in the guidance file, the single-model detection results of each trained occlusion detection model, and the final occlusion detection results.
[0079] In the aforementioned camera occlusion detection method, the following steps are taken: First, an image to be detected is obtained from the video stream captured by the camera to be detected. Second, a guidance file is obtained to guide the occlusion detection process. Third, the image to be detected and the guidance file are input into multiple trained occlusion detection models to obtain the single-model detection result output by each trained occlusion detection model. Fourth, based on the single-model detection result of each trained occlusion detection model, the preset weight values of each trained occlusion detection model are adjusted to obtain the actual weight values of each trained occlusion detection model. Fifth, the calculated weight values are obtained based on the actual weight values. Sixth, the occlusion detection result of the camera to be detected is determined based on the calculated weight values. By using multiple models to detect occlusions in the image captured by the camera, and based on the preset weights of each model during training and the detection results of each model, a comprehensive judgment is made on whether there are occlusions in front of the camera. This method can effectively detect occlusions in front of the camera, avoid errors caused by misjudgments from a single model, and improve the accuracy of occlusion detection in front of the camera.
[0080] In one embodiment, obtaining a guidance file for guiding the occlusion detection process includes: obtaining detection guidance text based on the preset occlusion type and preset occlusion ratio to be detected; the detection guidance text is used to guide the trained occlusion detection model to detect whether there are occlusions of the preset occlusion type in the image to be detected, and the relationship between the occlusion ratio of the existing occlusion and the preset occlusion ratio, and outputting single-model detection results based on the corresponding detection results; constructing a Prompt structure based on the detection guidance text to obtain the corresponding Prompt, which serves as the guidance file.
[0081] The preset types of objects to be covered can include, but are not limited to, billboards, promotional materials, trees and flowers, iron frames, wooden frames, walls, etc., and the preset coverage ratio can be, but is not limited to, 15%.
[0082] Prompt technology has wide applications in fields such as natural language processing and image recognition.
[0083] In text generation tasks, a prompt can be viewed as a description or topic, such as "Write an article about why dogs are man's best friend" or "Write me a poem about love." Given such a prompt, a machine learning model can generate text that meets the requirements, ensuring that the output is relevant to the prompt.
[0084] In question-answering systems, a Prompt can be viewed as a question or task description, such as "Answer the following question: Why do humans need to sleep?" or "Translate the following sentence into English: I like to eat fruit." Given such a Prompt, a machine learning model can generate the corresponding answer or translation.
[0085] In image generation tasks, a prompt can be viewed as an image description, label, or classification information, such as a task description like "Generate a picture of a cat" or "Convert this portrait into a cartoon style." Given such a prompt, a machine learning model can generate an image that meets the requirements, ensuring that the output is relevant to the prompt.
[0086] In image classification tasks, a prompt can be viewed as category or label information, such as "classify the image below into one of the following categories: animal, plant, building, etc." Given such a prompt, a machine learning model can classify the input image accordingly and output the corresponding category information.
[0087] In this embodiment, Prompt is used to guide the trained occlusion detection model to output a single-model detection result of "occlusion present" when it detects an occlusion of a preset type in the image to be detected, and the occlusion ratio of the occlusion is not less than a preset occlusion ratio; or, Prompt is used to guide the trained occlusion detection model to output a single-model detection result of "no occlusion" when it detects no occlusion of the preset type in the image to be detected; or, Prompt is used to guide the trained occlusion detection model to output a single-model detection result of "no occlusion" when it detects an occlusion of a preset type in the image to be detected, and the occlusion ratio of the occlusion is less than a preset occlusion ratio.
[0088] In one embodiment, the training process of the occlusion detection model includes: acquiring a training set; the training set includes multiple training samples, each training sample including a sample image, sample annotation data, and a sample guidance file; the sample annotation data is used to characterize the location and type of occlusion in the sample image; the sample guidance file includes the type of occlusion and the occlusion ratio, used to guide the occlusion detection model to detect whether there are occlusions of the sample occlusion type in the sample image, and the relationship between the occlusion ratio of the existing occlusion and the sample occlusion ratio, and outputting training detection results based on the corresponding detection results; acquiring the occlusion detection model of the target architecture or target algorithm, inputting a training sample into the occlusion detection model, and obtaining the training detection results output by the occlusion detection model; adjusting the model parameters of the occlusion detection model according to the training detection results and the corresponding sample annotation data to complete one training cycle; and training the occlusion detection model multiple times using the training set to obtain the trained occlusion detection model.
[0089] Optionally, a large amount of image data with occlusions needs to be collected first. This data should include various types of occlusions, such as leaves, billboards, trees, flowers, metal frames, wooden frames, buildings, etc., as well as images with different degrees of occlusion. The collected image data should be labeled to clearly indicate the location and type of occlusions in the images. This labeling information will be used as a supervisory signal when training the model. Design an effective prompt that should guide the model to notice occlusions in the image. For example: The image is a camera view; please analyze whether there are physical occlusions in front of the camera, such as billboards, promotional materials, trees, flowers, metal frames, wooden frames, walls, etc., that obscure 15% or more of the image? Please answer with true or false. Use this prompt as the sample guidance file for each training sample. Select several different image recognition models (such as GPT, Vertex, AWS, etc.). These models can be based on different algorithms (such as CNN, RNN, Transformer, etc.) or different architectures (such as ResNet, VGG, Inception, etc.). Each model is trained using a pre-designed prompt and labeled data as training samples, with model parameters adjusted during training. Each model is trained independently using the same training dataset. Appropriate data augmentation and regularization techniques should be applied to each model to improve its generalization ability. Model performance can be evaluated periodically during training to ensure the model can effectively recognize different types of occlusions. Based on the evaluation results, the prompt and model can be iteratively optimized. Adjustments to the prompt's wording, or tweaks to the model's structure and parameters, may be necessary to improve accuracy and robustness. The model can also be tested on real-world camera devices to observe its performance in real-world environments and further optimize based on feedback.
[0090] In one feasible implementation, the occlusion detection results of each camera to be detected are added to the training set as the latest training samples for further training and optimization of the model.
[0091] In this embodiment, multiple image recognition models with different algorithms and architectures are trained using a training set carrying a prompt, resulting in multiple occlusion detection models. These multiple models are used to detect occlusions in the images captured by the camera. Based on the detection results of each model, a comprehensive judgment is made as to whether there are occlusions in front of the camera. This effectively detects occlusions in front of the camera, avoiding errors in occlusion detection caused by misjudgment by a single model, and improving the accuracy of occlusion detection in front of the camera.
[0092] In one embodiment, the method for obtaining the preset weight value of each trained occlusion detection model includes: obtaining a validation set based on the training set; testing the occlusion detection effect of each trained occlusion detection model using the validation set to obtain the detection accuracy of each trained occlusion detection model; determining the preset weight value of each trained occlusion detection model based on the detection accuracy; the preset weight value is positively correlated with the detection accuracy.
[0093] Optionally, a new set of images, labeled data, and guidance files can be acquired using the same method as for the training set, serving as a validation set. The performance of each model is evaluated on the validation set to ensure they all achieve a certain level of accuracy and robustness. The images in the validation set can be captured from different cameras. For each camera's captured images, all models independently perform recognition and provide results. The recognition results of each model are analyzed, and the frequency with which each model identifies occluded objects is statistically analyzed. Preset weight values are assigned to each model based on their recognition results. These preset weight values are all positive numbers. The weights of different models may vary depending on their performance on the validation set. For example, based on the recognition results of each model, the detection accuracy of each model is calculated, and models with higher detection accuracy are assigned larger preset weight values.
[0094] In one feasible implementation, during the validation of each model using a validation set, if the recognition result of a certain model differs significantly from that of other models, further checks may be necessary to determine whether there are any abnormalities or errors in the model's algorithm.
[0095] In this embodiment, a preset weight value is set for each occlusion detection model based on its detection accuracy. Multiple models perform occlusion detection on the image to be detected captured by the camera. Based on the preset weight value of each model and the detection result of each model, a comprehensive judgment is made on whether there is an occlusion in front of the camera. This can effectively detect occlusions in front of the camera, avoid occlusion detection errors caused by misjudgment by a single model, and improve the detection accuracy of occlusions in front of the camera.
[0096] In one embodiment, single-model detection results are categorized as occluded and unoccluded, with preset weight values for both being positive. Based on the single-model detection results of each trained occluded object detection model, the preset weight values for each trained occluded object detection model are adjusted to obtain the actual weight values for each trained occluded object detection model. Calculated weight values are obtained based on these actual weight values. The occlusion detection result of the camera to be detected is determined based on these calculated weight values, including: using the preset weight values of models whose single-model detection results indicate occlusion as the actual weight values for the corresponding models, and using the negative of the preset weight values of models whose single-model detection results indicate unoccluded objects as the actual weight values for the corresponding models. The actual weight values of each trained occluded object detection model are summed to obtain the calculated weight value. If the calculated weight value is not less than a weight threshold, the occlusion detection result of the camera to be detected is occluded; if the calculated weight value is less than the weight threshold, the occlusion detection result of the camera to be detected is unoccluded.
[0097] Optionally, a weight threshold is preset based on the magnitude of the preset weight values for each model. Since the preset weight values for each model are all positive, when a model outputs a single-model detection result indicating occlusion, the preset weight value of that model can be directly used as the actual weight value. When a model outputs a single-model detection result indicating no occlusion, the negative of the preset weight value of that model can be used as the actual weight value. That is, the actual weight value of the output model with occlusion is positive, and the actual weight value of the output model without occlusion is negative. The actual weight values of each model are added together to obtain the calculated weight value. Only when the calculated weight value is greater than or equal to the weight threshold is the final output result indicating occlusion; when the calculated weight value is less than the weight threshold, the final output result indicating no occlusion is.
[0098] In this embodiment, multiple models are used to detect occlusions in the images captured by the camera. Based on the weights preset during training of each model and the detection results of each model, a comprehensive judgment is made on whether there are occlusions in front of the camera. This can effectively detect occlusions in front of the camera, avoid the situation of occlusion detection errors caused by misjudgment by a single model, and improve the detection accuracy of occlusions in front of the camera.
[0099] In one embodiment, a multi-model training and weight calculation method includes:
[0100] Obtain the training set; the training set includes multiple training samples, each training sample includes a sample image, sample annotation data, and a sample guidance file; the sample annotation data is used to characterize the location and type of occlusion in the sample image; the sample guidance file includes the type of occlusion and the occlusion ratio, which is used to guide the occlusion detection model to detect whether there are occlusions of the sample type in the sample image, and the relationship between the occlusion ratio of the existing occlusions and the sample occlusion ratio, and output the training detection results based on the corresponding detection results.
[0101] Obtain the occlusion detection model of the target architecture or algorithm, input a training sample into the occlusion detection model, and obtain the training detection result output by the occlusion detection model; adjust the model parameters of the occlusion detection model according to the training detection result and the corresponding sample annotation data to complete one training; train the occlusion detection model multiple times using the training set to obtain the trained occlusion detection model.
[0102] Multiple occlusion detection models with different architectures or algorithms are trained using the training set to obtain multiple trained occlusion detection models.
[0103] Obtain the validation set from the training set.
[0104] The detection performance of each trained occlusion detection model is tested using a validation set to obtain the detection accuracy of each model.
[0105] Based on the detection accuracy, the preset weight values for each trained occlusion detection model are determined; all preset weight values are positive numbers, and the preset weight values are positively correlated with the detection accuracy.
[0106] In one embodiment, a camera obstruction detection method, such as Figure 5 As shown, it includes:
[0107] Keyframes are extracted from the video stream captured by the camera to be inspected to obtain the image to be inspected.
[0108] Based on the preset occlusion type and preset occlusion ratio to be detected, detection guidance text is obtained. This guidance text guides the trained occlusion detection model to detect whether there are occlusions of the preset type in the image to be detected, and the relationship between the occlusion ratio of existing occlusions and the preset occlusion ratio. Based on the corresponding detection results, a single-model detection result is output. A Prompt structure is constructed based on the detection guidance text to obtain the corresponding Prompt file. Single-model detection results are categorized as occluded and unoccluded.
[0109] The image to be detected and the guidance file are respectively input into multiple trained occlusion detection models to obtain the single-model detection results output by each trained occlusion detection model.
[0110] The preset weight values of models whose single-model detection results indicate occlusion are used as the actual weight values of the corresponding models, and the negative of the preset weight values of models whose single-model detection results indicate no occlusion are used as the actual weight values of the corresponding models. The actual weight values of each trained occlusion detection model are summed to obtain the calculated weight value.
[0111] If the calculated weight value is not less than the weight threshold, the occlusion detection result of the camera to be detected is "occluded"; if the calculated weight value is less than the weight threshold, the occlusion detection result of the camera to be detected is "unoccluded".
[0112] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0113] Based on the same inventive concept, this application also provides a camera occupant detection device for implementing the camera occupant detection method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more camera occupant detection device embodiments provided below can be found in the limitations of the camera occupant detection method described above, and will not be repeated here.
[0114] In one exemplary embodiment, such as Figure 6 As shown, a camera obstruction detection device 600 is provided, including: an acquisition module 601, a guidance module 602, a processing module 603, and a detection module 604, wherein:
[0115] The acquisition module 601 is used to acquire the image to be detected based on the video stream captured by the camera to be detected.
[0116] The guidance module 602 is used to obtain the guidance file used to guide the occlusion detection process.
[0117] The processing module 603 is used to input the image to be detected and the guidance file into multiple trained occlusion detection models respectively, and obtain the single-model detection result output by each trained occlusion detection model.
[0118] The detection module 604 is used to adjust the preset weight value of each trained occlusion detection model according to the single model detection result of each trained occlusion detection model, obtain the actual weight value of each trained occlusion detection model, obtain the weight calculation value according to the actual weight value, and determine the occlusion detection result of the camera to be detected according to the weight calculation value.
[0119] In one embodiment, the guidance module 602 is further configured to obtain detection guidance text based on the preset occlusion type and preset occlusion ratio to be detected; the detection guidance text is used to guide the trained occlusion detection model to detect whether there is an occlusion of the preset occlusion type in the image to be detected, and the relationship between the occlusion ratio of the existing occlusion and the preset occlusion ratio, and output the single model detection result based on the corresponding detection result; and construct a Prompt structure based on the detection guidance text to obtain the corresponding Prompt, which serves as the guidance file.
[0120] In one embodiment, the processing module 603 is further configured to acquire a training set; the training set includes multiple training samples, each training sample including a sample image, sample annotation data, and a sample guidance file; the sample annotation data is used to characterize the location and type of occluders in the sample image; the sample guidance file includes the type of occluder and the occlusion ratio, used to guide the occlusion detection model to detect whether there are occluders of the sample occluder type in the sample image, and the relationship between the occlusion ratio of the existing occluders and the sample occlusion ratio, and output training detection results based on the corresponding detection results; acquire the occlusion detection model of the target architecture or target algorithm, input a training sample into the occlusion detection model, and obtain the training detection results output by the occlusion detection model; adjust the model parameters of the occlusion detection model according to the training detection results and the corresponding sample annotation data to complete one training; and train the occlusion detection model multiple times using the training set to obtain the trained occlusion detection model.
[0121] In one embodiment, the processing module 603 is further configured to obtain a validation set based on the training set; test the occlusion detection effect of each trained occlusion detection model using the validation set to obtain the detection accuracy of each trained occlusion detection model; and determine the preset weight value of each trained occlusion detection model based on the detection accuracy; the preset weight value is positively correlated with the magnitude of the detection accuracy.
[0122] In one embodiment, the single-model detection results are divided into occluded and unoccluded, and the preset weight values are all positive numbers; the detection module 604 is also used to take the preset weight value of the model whose single-model detection result is occluded as the actual weight value of the corresponding model, and take the negative number of the preset weight value of the model whose single-model detection result is unoccluded as the actual weight value of the corresponding model; and add the actual weight values of each trained occluded object detection model to obtain the weight calculation value.
[0123] In one embodiment, the detection module 604 is further configured to determine that the occlusion detection result of the camera to be detected is occluded when the weight calculation value is not less than the weight threshold, and to determine that the occlusion detection result of the camera to be detected is unoccluded when the weight calculation value is less than the weight threshold.
[0124] Each module in the aforementioned camera obstruction detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0125] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores image data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a camera obstruction detection method.
[0126] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0127] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring an image to be detected based on a video stream captured by a camera to be detected; acquiring a guidance file for guiding the occlusion detection process; inputting the image to be detected and the guidance file into multiple trained occlusion detection models respectively, and obtaining a single-model detection result output by each trained occlusion detection model; adjusting the preset weight value of each trained occlusion detection model based on the single-model detection result of each trained occlusion detection model, obtaining the actual weight value of each trained occlusion detection model; obtaining a weight calculation value based on the actual weight value; and determining the occlusion detection result of the camera to be detected based on the weight calculation value.
[0128] In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining detection guidance text based on the preset occlusion type and preset occlusion ratio to be detected; the detection guidance text is used to guide the trained occlusion detection model to detect whether there is an occlusion of the preset occlusion type in the image to be detected, and the size relationship between the occlusion ratio of the existing occlusion and the preset occlusion ratio, and outputs the single model detection result based on the corresponding detection result; and constructing a Prompt structure based on the detection guidance text to obtain the corresponding Prompt as a guidance file.
[0129] In one embodiment, when the processor executes the computer program, it further implements the following steps: acquiring a training set; the training set includes multiple training samples, each training sample including a sample image, sample annotation data, and a sample guidance file; the sample annotation data is used to characterize the location and type of occlusion in the sample image; the sample guidance file includes the type of occlusion and the occlusion ratio, used to guide the occlusion detection model to detect whether there are occlusions of the sample occlusion type in the sample image, and the relationship between the occlusion ratio of the existing occlusion and the sample occlusion ratio, and output training detection results based on the corresponding detection results; acquiring the occlusion detection model of the target architecture or target algorithm, inputting a training sample into the occlusion detection model, and obtaining the training detection results output by the occlusion detection model; adjusting the model parameters of the occlusion detection model according to the training detection results and the corresponding sample annotation data to complete one training; and training the occlusion detection model multiple times using the training set to obtain the trained occlusion detection model.
[0130] In one embodiment, when the processor executes the computer program, it further performs the following steps: obtaining a validation set based on the training set; using the validation set, testing the occlusion detection performance of each trained occlusion detection model to obtain the detection accuracy of each trained occlusion detection model; determining a preset weight value for each trained occlusion detection model based on the detection accuracy; the preset weight value is positively correlated with the detection accuracy.
[0131] In one embodiment, the single-model detection results are divided into occluded and unoccluded, and the preset weight values are all positive numbers. When the processor executes the computer program, it also implements the following steps: taking the preset weight value of the model whose single-model detection result is occluded as the actual weight value of the corresponding model, and taking the negative number of the preset weight value of the model whose single-model detection result is unoccluded as the actual weight value of the corresponding model; and adding the actual weight values of each trained occluded object detection model to obtain the weight calculation value.
[0132] In one embodiment, when the processor executes the computer program, it further implements the following steps: when the weight calculation value is not less than the weight threshold, the occlusion detection result of the camera to be detected is occluded; when the weight calculation value is less than the weight threshold, the occlusion detection result of the camera to be detected is unoccluded.
[0133] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When executed by a processor, the computer program performs the following steps: acquiring an image to be detected based on a video stream captured by a camera to be detected; acquiring a guidance file for guiding the occlusion detection process; inputting the image to be detected and the guidance file into multiple trained occlusion detection models respectively, and obtaining a single-model detection result output by each trained occlusion detection model; adjusting the preset weight value of each trained occlusion detection model based on the single-model detection result of each trained occlusion detection model, obtaining the actual weight value of each trained occlusion detection model; obtaining a weight calculation value based on the actual weight value; and determining the occlusion detection result of the camera to be detected based on the weight calculation value.
[0134] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining detection guidance text based on the preset occlusion type and preset occlusion ratio to be detected; the detection guidance text is used to guide the trained occlusion detection model to detect whether there is an occlusion of the preset occlusion type in the image to be detected, and the relationship between the occlusion ratio of the existing occlusion and the preset occlusion ratio, and outputs the single model detection result based on the corresponding detection result; and constructing a Prompt structure based on the detection guidance text to obtain the corresponding Prompt as a guidance file.
[0135] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: acquiring a training set; the training set includes multiple training samples, each training sample including a sample image, sample annotation data, and a sample guidance file; the sample annotation data is used to characterize the location and type of occlusion in the sample image; the sample guidance file includes the type of occlusion and the occlusion ratio, used to guide the occlusion detection model to detect whether there are occlusions of the sample occlusion type in the sample image, and the relationship between the occlusion ratio of the existing occlusion and the sample occlusion ratio, and output training detection results based on the corresponding detection results; acquiring the occlusion detection model of the target architecture or target algorithm, inputting a training sample into the occlusion detection model, and obtaining the training detection results output by the occlusion detection model; adjusting the model parameters of the occlusion detection model according to the training detection results and the corresponding sample annotation data to complete one training; and training the occlusion detection model multiple times using the training set to obtain the trained occlusion detection model.
[0136] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining a validation set based on the training set; testing the occlusion detection performance of each trained occlusion detection model using the validation set to obtain the detection accuracy of each trained occlusion detection model; determining a preset weight value for each trained occlusion detection model based on the detection accuracy; the preset weight value is positively correlated with the detection accuracy.
[0137] In one embodiment, the single-model detection results are divided into occluded and unoccluded, and the preset weight values are all positive numbers. When the computer program is executed by the processor, it also performs the following steps: taking the preset weight value of the model whose single-model detection result is occluded as the actual weight value of the corresponding model, and taking the negative number of the preset weight value of the model whose single-model detection result is unoccluded as the actual weight value of the corresponding model; and adding the actual weight values of each trained occluded object detection model to obtain the weight calculation value.
[0138] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: when the weight calculation value is not less than the weight threshold, the occlusion detection result of the camera to be detected is occluded; when the weight calculation value is less than the weight threshold, the occlusion detection result of the camera to be detected is unoccluded.
[0139] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps: acquiring an image to be detected based on a video stream captured by a camera to be detected; acquiring a guidance file for guiding the occlusion detection process; inputting the image to be detected and the guidance file into multiple trained occlusion detection models respectively, and obtaining a single-model detection result output by each trained occlusion detection model; adjusting the preset weight values of each trained occlusion detection model based on the single-model detection results of each trained occlusion detection model, obtaining the actual weight values of each trained occlusion detection model; obtaining calculated weight values based on the actual weight values; and determining the occlusion detection result of the camera to be detected based on the calculated weight values.
[0140] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining detection guidance text based on the preset occlusion type and preset occlusion ratio to be detected; the detection guidance text is used to guide the trained occlusion detection model to detect whether there is an occlusion of the preset occlusion type in the image to be detected, and the relationship between the occlusion ratio of the existing occlusion and the preset occlusion ratio, and outputs the single model detection result based on the corresponding detection result; and constructing a Prompt structure based on the detection guidance text to obtain the corresponding Prompt as a guidance file.
[0141] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: acquiring a training set; the training set includes multiple training samples, each training sample including a sample image, sample annotation data, and a sample guidance file; the sample annotation data is used to characterize the location and type of occlusion in the sample image; the sample guidance file includes the type of occlusion and the occlusion ratio, used to guide the occlusion detection model to detect whether there are occlusions of the sample occlusion type in the sample image, and the relationship between the occlusion ratio of the existing occlusion and the sample occlusion ratio, and output training detection results based on the corresponding detection results; acquiring the occlusion detection model of the target architecture or target algorithm, inputting a training sample into the occlusion detection model, and obtaining the training detection results output by the occlusion detection model; adjusting the model parameters of the occlusion detection model according to the training detection results and the corresponding sample annotation data to complete one training; and training the occlusion detection model multiple times using the training set to obtain the trained occlusion detection model.
[0142] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: obtaining a validation set based on the training set; testing the occlusion detection performance of each trained occlusion detection model using the validation set to obtain the detection accuracy of each trained occlusion detection model; determining a preset weight value for each trained occlusion detection model based on the detection accuracy; the preset weight value is positively correlated with the detection accuracy.
[0143] In one embodiment, the single-model detection results are divided into occluded and unoccluded, and the preset weight values are all positive numbers. When the computer program is executed by the processor, it also performs the following steps: taking the preset weight value of the model whose single-model detection result is occluded as the actual weight value of the corresponding model, and taking the negative number of the preset weight value of the model whose single-model detection result is unoccluded as the actual weight value of the corresponding model; and adding the actual weight values of each trained occluded object detection model to obtain the weight calculation value.
[0144] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: when the weight calculation value is not less than the weight threshold, the occlusion detection result of the camera to be detected is occluded; when the weight calculation value is less than the weight threshold, the occlusion detection result of the camera to be detected is unoccluded.
[0145] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0146] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0147] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0148] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A camera obstruction detection method, characterized in that: The method comprises: Obtain the image to be detected according to the video stream captured by the camera to be detected; Obtain a guide file for guiding the occlusion detection process; Inputting the image to be detected and the guide file into a plurality of trained occlusion detection models respectively, and obtaining a single model detection result output by each trained occlusion detection model; According to the single model detection results of each trained occlusion detection model, the preset weight value of each trained occlusion detection model is adjusted to obtain the actual weight value of each trained occlusion detection model, and the weight calculation value is obtained according to the actual weight value. According to the weight calculation value, the occlusion detection result of the camera to be detected is determined.
2. The method according to claim 1, characterized in that: The step of obtaining a guide file for guiding the occlusion detection process includes: According to the preset occluder type and preset occlusion ratio to be detected, a detection guide text is obtained; the detection guide text is used to guide the trained occluder detection model to detect whether there is an occluder of the preset occluder type in the image to be detected, and the size relationship between the occlusion ratio of the existing occluder and the preset occlusion ratio, and output a single model detection result based on the corresponding detection result; A Prompt structure is constructed based on the detection guide text to obtain a corresponding Prompt as the guide file.
3. The method according to claim 1, characterized in that: The training process of the occlusion detection model includes: Acquire a training set; the training set includes a plurality of training samples, each training sample includes a sample image, sample annotation data and a sample guide file; the sample annotation data is used to characterize the position of the occluder in the sample image and the sample occluder type; the sample guide file includes the sample occluder type and the sample occlusion ratio, which are used to guide the occluder detection model to detect whether there is an occluder of the sample occluder type in the sample image, and the size relationship between the occlusion ratio of the existing occluder and the sample occlusion ratio, and output the training detection result based on the corresponding detection result; Obtain an occlusion detection model of a target architecture or a target algorithm, input a training sample into the occlusion detection model, and obtain a training detection result output by the occlusion detection model; According to the training test results and the corresponding sample annotation data, the model parameters of the occlusion detection model are adjusted to complete one training; The training set is used to train the occlusion detection model multiple times to obtain a trained occlusion detection model.
4. The method according to claim 3, characterized in that The method for obtaining the preset weight value of each trained occlusion detection model includes: Obtain a validation set based on the training set; Using the validation set, testing the occlusion detection effect of each trained occlusion detection model to obtain the detection accuracy of each trained occlusion detection model; According to the detection accuracy, the weight preset value of each trained occlusion detection model is determined; the weight preset value is positively correlated with the detection accuracy.
5. The method according to claim 1, characterized in that The single model detection results are divided into occlusion and no occlusion, and the weight preset values are all positive numbers; the weight preset value of each trained occlusion detection model is adjusted according to the single model detection result of each trained occlusion detection model, and the actual weight value of each trained occlusion detection model is obtained, and the weight calculation value is obtained according to each weight actual value, including: The preset weight value of the model with occlusion detected by the single model is used as the actual weight value of the corresponding model, and the opposite number of the preset weight value of the model with no occlusion detected by the single model is used as the actual weight value of the corresponding model; The actual weight values of each trained occluder detection model are added together to obtain the weight calculation value.
6. The method according to claim 5, characterized in that The determining, according to the weight calculation value, the obstruction detection result of the camera to be detected includes: When the weight calculation value is not less than the weight threshold, the occlusion detection result of the camera to be detected is occlusion; When the weight calculation value is less than the weight threshold, the obstruction detection result of the camera to be detected is no obstruction.
7. A camera obstruction detection device, characterized in that: The device comprises: An acquisition module is used to acquire the image to be detected based on the video stream captured by the camera to be detected; A guiding module, used for obtaining a guiding file for guiding the occlusion detection process; A processing module, used for inputting the image to be detected and the guide file into a plurality of trained occlusion detection models respectively, and obtaining a single model detection result output by each trained occlusion detection model; The detection module is used to adjust the preset weight value of each trained occlusion detection model according to the single model detection result of each trained occlusion detection model, obtain the actual weight value of each trained occlusion detection model, obtain the weight calculation value according to each actual weight value, and determine the occlusion detection result of the camera to be detected according to the weight calculation value.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Camera detection method, device, electronic equipment and system
CN111476124A
Occluded image detection method and device and medium
CN112200040A
Camera working state detection method and related equipment and system
CN112381054A
Shielding detection method and detection device for monitoring device and storage medium
CN113487532A
Method for constructing AI integrated model and reasoning method and device of AI integrated model
CN115964632A
