Screen anti-peeping and anti-secret-shooting automatic detection method and system based on camera
Through the automatic detection method of anti-voyeurism and anti-snatching on the screen based on the camera, the YOLOv8 model and feature fusion module are used to identify the faces and shooting equipment in front of the screen, and dynamically adjust the threshold, solving the problem of insufficient real-time detection of strangers' voyeurism in the prior art, and achieving an efficient anti-snatching effect on screen.
Patent Information
- Application Number
- CN202510490828.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-08-15
AI Technical Summary
Existing screen anti-voyeurism technology cannot effectively detect and prevent strangers or unauthorized personnel from peeping sensitive information on the screen in real time, especially in dynamic scenarios, lack of response to stranger invasions.
The camera-based automatic detection method for screen anti-peeping and anti-snatching is adopted. The image acquisition device is used to collect images in front of the screen, and pre-process and detect them through the YOLOv8 model. Combined with SPP-CSPC, Dysample and SCAM modules, illegal screen shooting behavior and faces are identified, thresholds are dynamically adjusted, and corresponding protective measures are activated.
Real-time detection and prevention of voyeurism by strangers or unauthorized personnel in front of the screen is realized, and the real-time and accuracy of data protection is improved, and sensitive information is prevented from leaking.
Smart Images

Figure CN120495974A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data security and information protection, and in particular relates to a camera-based automatic detection method for screen anti-peeping and anti-secret-photographing and a system thereof. Background Art
[0002] With the rapid development of information technology, computer screens have become an essential medium for displaying and managing sensitive data. This data often involves critical information such as core technologies, user information, and financial status. In many high-security environments, ensuring the security of this information is particularly important. This is especially true when strangers or unauthorized individuals are in close proximity to computer screens, potentially exposing this sensitive information to potential censorship or leakage. Therefore, effectively preventing unauthorized access through electronic devices or visual means is crucial to protecting data security.
[0003] Current screen anti-sneak photography technologies primarily rely on active photoelectric detection and camera-based detection. Active photoelectric detection uses infrared signals to detect surreptitious photography, but this approach is costly and subject to environmental interference, such as surrounding glass objects that can affect detection. While this approach can monitor surreptitious photography, it cannot effectively address visual voyeurism.
[0004] Furthermore, existing camera-based behavior detection methods typically analyze video streams to determine whether there is inappropriate behavior, such as identifying the location of skeletal points of a target object through video. However, existing technologies lack adequate protection against strangers approaching or observing the screen. When strangers approach, the system cannot determine whether they are authorized personnel, potentially exposing data to surveillance.
[0005] To improve data security, some existing technologies have adopted facial recognition technology for personal authentication. However, this method is typically used for relatively static identity authentication and is insufficient for detecting intrusions in dynamic scenarios. This is particularly true in the environment surrounding the screen, where it is difficult to determine in real time whether strangers or unauthorized individuals are inadvertently viewing the screen content. Existing anti-peeping systems mostly rely on pre-defined protection mechanisms, such as file encryption or area protection, while neglecting the dynamic monitoring of real-time facial recognition in front of the screen.
[0006] Therefore, how to solve the problem of automatically detecting whether there are strangers or unauthorized persons in front of the screen, identifying potential peeping behaviors, and taking real-time alarms or other processing measures, thereby effectively preventing strangers from peeping at sensitive information on the screen and enhancing the real-time and accuracy of data protection is the technical problem that the present invention aims to solve. Summary of the Invention
[0007] The purpose of the present invention is to provide a camera-based screen anti-peeping and anti-secret photography automatic detection method and system thereof to solve the problems raised in the above background technology.
[0008] The object of the present invention is achieved by: a camera-based screen anti-peeping and anti-secret photography automatic detection method, characterized in that the method comprises the following steps:
[0009] Step S1: using an image acquisition device to capture an image in front of the screen and preprocessing the image;
[0010] Step S2: Build an image detection and classification model to detect and classify the preprocessed image;
[0011] Step S3: Determine whether the image contains any camera or human face involved in illegal screen capture behavior;
[0012] Step S3-1: Count the number of consecutive frames without faces in the video stream of the image. If the number of consecutive frames without faces is greater than a first threshold, start the off-duty lock screen program;
[0013] Step S3-2: If the classified image contains a face, the face in the image is recognized and processed, and the number of frames of stranger faces that appear continuously in the video stream is counted;
[0014] Step S3-3: If the classified image contains a camera, count the number of consecutive frames of the camera containing the illegal screen capture behavior in the image video stream;
[0015] Step S4: Start the processing method according to the judgment result to complete the image detection.
[0016] Preferably, the step S1 of preprocessing the image includes denoising and enhancing the image, wherein the denoising adopts a wavelet transform method, specifically:
[0017] I_denoised=DWT_inverse(DWT(I_frame));
[0018] Among them, DWT is wavelet transform, DWT_inverse is inverse wavelet transform;
[0019] The enhancement process improves the image contrast by using the local histogram equalization method, and the formula is:
[0020] I_enhanced=CLAHE(I_denoised,grid_size,contrast_limit);
[0021] Among them, CLAHE is the contrast limited adaptive histogram equalization function, grid_size is the grid size, and contrast_limit is the contrast limit.
[0022] Preferably, in step S2, an image classification algorithm is constructed, and the image classification algorithm adopts a YOLOv8 model;
[0023] The YOLOv8 model consists of a Backbone part and a Head module part. The Backbone part is built based on the improved CSPDarknet architecture and adopts a staged feature extraction strategy.
[0024] The Backbone part includes multiple first convolution blocks, multiple C2f modules and SPP-CSPC modules. The first convolution block uses a 6×6 convolution kernel. Each C2f module includes a second convolution block, a Bottleneck module, a downsampling layer and batch normalization processing. The second convolution block uses a 3×3 convolution kernel.
[0025] The Head module adopts a multi-scale detection architecture to achieve target detection tasks. The Head module includes multiple third convolution blocks, multiple C2f modules, Dysample modules, SCAM modules and detection head Detect;
[0026] The detection head Detect adopts a decoupled design to separate the classification and regression tasks.
[0027] Preferably, the SPP-CSPC module integrates the cross-stage partial connection CSP based on the SPP spatial pyramid pooling structure, and realizes efficient feature fusion through parallel multi-branch processing;
[0028] The SPP-CSPC module includes 5 1×1 convolution blocks, 2 3×1 convolution blocks, 3 parallel 5×5 maximum pooling layers and 2 Concat modules, the 5 1×1 convolution blocks include the first 1×1 convolution block, the second 1×1 convolution block, the third 1×1 convolution block, the fourth 1×1 convolution block and the fifth 1×1 convolution block, the 2 3×1 convolution blocks include the first 3×1 convolution block and the second three 3×1 convolution blocks, and the 2 Concat modules include the first Concat module and the second Concat module;
[0029] The first 1×1 convolution block performs channel compression, and then the first 3×1 convolution block is used to enhance spatial features. The second 1×1 convolution block receives the information after spatial feature enhancement of the first 3×1 convolution block and splices the first Concat module with three parallel 5×5 maximum pooling layers; the third 1×1 convolution block receives the information of the first Concat module and outputs it to the second and second three 3×1 convolution blocks; the fourth 1×1 convolution block is used to splice the original input features with the second Concat module, and the channel dimension feature integration is completed through the fifth 1×1 convolution block.
[0030] Preferably, the operation process of the Dysample module is as follows:
[0031] First, the input feature map X undergoes a linear transformation to generate a dynamic offset, which is added to the original grid G to obtain a new sampling position.
[0032] Secondly, a dynamic range factor σ is generated using the Sigmoid function and multiplied by a scaling factor of 0.5 to ensure that the offset is not too large;
[0033] Finally, the feature map corresponding to the sampling position is upsampled using the pixel resampling operation to generate a higher resolution output feature map S;
[0034] The operation process of the SCAM module is as follows:
[0035] First, the input image is processed through two different convolution operations to generate spatial and channel feature maps respectively;
[0036] Secondly, the feature map is processed by Softmax to calculate the spatial and channel attention weights respectively, and then these weights are combined through multiplication to generate weighted features;
[0037] Finally, these weighted features are integrated through convolution operations to output the optimized image feature map.
[0038] Preferably, the detection and classification of the pre-processed image in step S2 is specifically performed as follows:
[0039] Step S2-1: Input preprocessing and Backbone initialization: The preprocessed 640×640×3 image first enters the improved Backbone network for feature extraction. In the initial stage, a 6×6 convolutional layer with a stride of 2 is used for fast downsampling, reducing the image size to 320×320. At the same time, the number of channels is expanded to 64×w, where w is the network width coefficient, completing initial feature compression and dimensionality improvement.
[0040] Step S2-2: Multi-level feature extraction and module collaborative processing: Image features are processed progressively in four stages: each stage is first down-sampled with a stride of 2 through a 3×3 convolutional layer, and then fed into the C2f module for deep feature extraction;
[0041] The C2f module splits the input features into a residual path and a skip connection. The residual path extracts high-order semantic features through multiple Bottleneck blocks, while the skip connection retains the original features to maintain position details. Finally, the two parts of features are fused through the Concat operation.
[0042] At the end of the Backbone, the features are further input into the SPP-CSPC module, which implements multi-scale feature fusion through parallel multi-branch 5×5 maximum pooling and cross-stage connection CSP;
[0043] Step S2-3: Dynamic upsampling and cross-scale feature fusion: The fused feature information is dynamically upsampled to the deep features through the innovative DySample module. The upsampled features are then cross-scale fused with the shallow high-resolution features through the Concat operation, achieving complementary advantages between semantic information and position information.
[0044] Step S2-4: Dual-dimensional attention optimization and feature enhancement: The SCAM module is introduced to process both spatial and channel dimensions in parallel. The spatial attention branch enhances the response of the target area by modeling the spatial relationship of the feature map. The channel attention branch highlights the feature channels that are important for hidden camera detection by using the dependencies between channels. The weights of the two branches are normalized by Softmax and then weighted fused. Finally, the optimized feature map is output through convolution integration.
[0045] Step S2-5: Decoupled detection head multi-task prediction: The detection head Detect completes the target detection task: the classification branch predicts the probability of each anchor point belonging to the "hidden camera device" or "normal" category through 1×1 convolution; the regression branch predicts the precise bounding box coordinates (x, y, w, h) of the target;
[0046] Step S2-6: Post-processing and result output: All prediction results are processed by non-maximum suppression (NMS), and overlapping redundant detection boxes are filtered out based on the confidence threshold and IoU threshold. Finally, the detection results with classification labels, confidence scores, and bounding box coordinates are output.
[0047] Preferably, the face recognition process in the image in step S3-2 includes: determining whether the face image is the face of the owner of the machine and determining whether the face image is a living face;
[0048] Determine whether the face image is the owner's face, specifically:
[0049] Perform face alignment based on the facial calibrator to eliminate the interference of different postures and expressions on the recognition results;
[0050] The convolutional neural network is used to extract facial features, generate high-dimensional feature vectors, and compare them with the registered machine owner's face database:
[0051] The comparison formula is:
[0052] Where, F1=(F 11 ,F 12 ,…,F 1n) and F2=(F 21 ,F 22 ,…,F 2n ) are the feature vectors of two faces, F 1i and F 2i are the i-th dimension vectors of feature vectors F1 and F2 respectively, and d(F1, F2) is the Euclidean distance between the two facial features; if the distance is greater than the set threshold, it is considered that a non-host face is detected;
[0053] Determine whether a face image is a living face, specifically:
[0054] Convert the image to the frequency domain and calculate the Fourier spectrum. The formula is:
[0055]
[0056] Among them, F(u,v) is the Fourier spectrum of the image, f(x,y) is the pixel value of the input image, u and v are the horizontal frequency variable and vertical frequency variable respectively.
[0057] Preferably, in step S4, starting a processing method according to the judgment result includes:
[0058] When the number of frames of stranger faces appearing continuously exceeds the preset second threshold, the system immediately starts the peeping lock screen program;
[0059] If the number of consecutive frames of the camera device that illegally records the screen exceeds the preset third threshold, the system will immediately start the hidden camera lock screen program;
[0060] The first threshold is the maximum number of times a face is not detected in consecutive frames. When the number of times the camera fails to detect a face exceeds the threshold, the system considers that a person is off-duty and triggers corresponding protective measures.
[0061] The second threshold is the maximum number of times a stranger's face is detected in consecutive frames. When the number of strangers' faces exceeds this threshold, the system immediately activates the peeping lock screen program to prevent the screen content from being viewed by unauthorized personnel;
[0062] The third threshold is the maximum number of times a hidden camera device is detected in consecutive frames. When the number of times the camera continuously captures the screen exceeds this threshold, the system will start the hidden camera lock screen program to prevent others from secretly capturing information on the screen.
[0063] A detection system generated by a camera-based automatic detection method for screen anti-peeping and anti-secret photography, characterized in that: the detection system includes an image detection module, an image classification module, a leave-station lock screen module, a secret photography screen lock screen module, a face recognition module, a liveness detection module, an alarm module, a storage module, a multi-scale prediction module, a frequency domain analysis module, and a dynamic threshold adjustment module. The image detection module detects images captured by an image acquisition device on the screen;
[0064] The image classification module classifies the detected image to determine whether the image contains a camera that is illegally capturing the screen;
[0065] The leaving workstation lock screen module counts the number of consecutive frames without faces in the video stream of the image, and activates the lock screen program if the number of consecutive frames without faces is greater than a first threshold;
[0066] The secretly filming and locking screen module counts the number of consecutive frames of the shooting device containing the illegal screen filming behavior in the video stream of the image, and starts the lock screen program if the number of consecutive frames of the shooting device containing the illegal screen filming behavior is greater than a second threshold;
[0067] The face recognition module detects, aligns and extracts features of faces in the image and compares them with the host face database;
[0068] The liveness detection module performs liveness detection on the detected face, and the alarm module generates an alarm signal when a security risk is detected;
[0069] After detecting the peeping or secretly photographing behavior, the storage module automatically stores the abnormal frame and its preceding and following images to preserve relevant evidence;
[0070] The multi-scale prediction module performs target detection through feature maps at different levels. Low-level features are used for small object detection, and high-level features are used for large object detection, thereby improving the detection accuracy of cameras of different sizes.
[0071] The frequency domain analysis module converts the image into the frequency domain, analyzes the frequency domain features in the image through the Fourier spectrum, and assists the living body detection module in determining whether the face is real and living;
[0072] The dynamic threshold adjustment module dynamically adjusts the thresholds for face recognition, liveness detection, and camera detection based on ambient lighting and background complexity factors.
[0073] Compared with the prior art, the present invention has the following improvements and advantages:
[0074] 1. By adding three new modules, SPP-CSPC, Dysample, and SCAM, to the YOLOv8 model, features from different stages are connected, the vanishing gradient problem is reduced, and accurate recognition of objects in complex postures and angles is improved. This effectively enhances the model's sensitivity to the spatial location of these objects in the image, preventing strangers from peeping at sensitive information on the screen and enhancing the real-time and accuracy of data protection.
[0075] 2. Through the comprehensive application of image processing and artificial intelligence algorithms, it can effectively detect and prevent electronic device photography and peeping behaviors. While being able to perform object detection tasks, it can also perform object classification to ensure accurate identification of objects of different categories, further improve information security, and prevent the leakage of sensitive data. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 1 is an overall flow chart of the method of the present invention.
[0077] Figure 2 This is the YOLOv8 structure diagram.
[0078] Figure 3 This is the C2f module structure diagram.
[0079] Figure 4 This is the SPP-CSPC module structure diagram.
[0080] Figure 5 This is the Dysample module structure diagram.
[0081] Figure 6 This is the SCAM module structure diagram. DETAILED DESCRIPTION
[0082] The present invention is further summarized below with reference to the accompanying drawings.
[0083] like Figure 1 As shown, a camera-based automatic detection method for screen anti-peeping and anti-secret photography includes the following steps:
[0084] Step S1: Use an image acquisition device to capture the image in front of the screen and pre-process the image, specifically:
[0085] A camera is used as an image acquisition device to collect image data in front of the screen. The image is preprocessed, including denoising and enhancement. The denoising method uses the wavelet transform method, specifically:
[0086] I_denoised=DWT_inverse(DWT(I_frame));
[0087] Among them, DWT is wavelet transform, DWT_inverse is inverse wavelet transform;
[0088] Enhancement processing improves image contrast through local histogram equalization method, the formula is:
[0089] I_enhanced=CLAHE(I_denoised,grid_size,contrast_limit);
[0090] Among them, CLAHE is the contrast limited adaptive histogram equalization function, grid_size is the grid size, and contrast_limit is the contrast limit.
[0091] Use the preset image acquisition device to capture the image in front of the predetermined screen, and perform detection on the captured image to determine whether there is a shooting device that is illegally shooting the screen, and at the same time identify whether the image contains any shooting device or facial information that is not illegally shooting the screen.
[0092] Step S2: Build an image detection and classification model to detect and classify the preprocessed image;
[0093] The image classification algorithm uses the YOLOv8 model, such as Figure 2 As shown in the figure, the YOLOv8 model consists of a Backbone part and a Head module part. The Backbone part is built based on the improved CSPDarknet architecture and adopts a staged feature extraction strategy.
[0094] The backbone part includes multiple first convolution blocks, multiple C2f modules and SPP-CSPC modules. The first convolution block uses a 6×6 convolution kernel; Figure 3 As shown in the figure, each C2f module includes a second convolution block, a Bottleneck module, a downsampling layer, and a batch normalization process. The second convolution block uses a 3×3 convolution kernel.
[0095] The Head module adopts a multi-scale detection architecture to achieve target detection tasks. The Head module includes multiple third convolution blocks, multiple C2f modules, Dysample modules, SCAM modules and detection head Detect;
[0096] The detection head Detect adopts a decoupled design to separate the classification and regression tasks.
[0097] like Figure 4 As shown in Figure 2, the SPP-CSPC module integrates the cross-stage partial connection CSP based on the SPP spatial pyramid pooling structure, and achieves efficient feature fusion through parallel multi-branch processing;
[0098] The SPP-CSPC module includes 5 1×1 convolution blocks, 2 3×1 convolution blocks, 3 parallel 5×5 maximum pooling layers and 2 Concat modules. The 5 1×1 convolution blocks include the first 1×1 convolution block, the second 1×1 convolution block, the third 1×1 convolution block, the fourth 1×1 convolution block and the fifth 1×1 convolution block. The 2 3×1 convolution blocks include the first 3×1 convolution block and the second three 3×1 convolution blocks. The 2 Concat modules include the first Concat module and the second Concat module.
[0099] The first 1×1 convolution block performs channel compression, and then the first 3×1 convolution block is used to enhance spatial features. The second 1×1 convolution block receives the information after spatial feature enhancement of the first 3×1 convolution block and splices the first Concat module with three parallel 5×5 maximum pooling layers; the third 1×1 convolution block receives the information of the first Concat module and outputs it to the second and second three 3×1 convolution blocks; the fourth 1×1 convolution block is used to splice the original input features with the second Concat module, and the channel dimension feature integration is completed through the fifth 1×1 convolution block.
[0100] like Figure 5 As shown, the operation process of the Dysample module is as follows:
[0101] First, the input feature map X undergoes a linear transformation to generate a dynamic offset, which is added to the original grid G to obtain a new sampling position.
[0102] Secondly, a dynamic range factor σ is generated using the Sigmoid function and multiplied by a scaling factor of 0.5 to ensure that the offset is not too large;
[0103] Finally, the feature map corresponding to the sampling position is upsampled using the pixel resampling operation to generate a higher resolution output feature map S;
[0104] like Figure 6 As shown, the operation process of the SCAM module is as follows:
[0105] First, the input image is processed through two different convolution operations to generate spatial and channel feature maps respectively;
[0106] Secondly, the feature map is processed by Softmax to calculate the spatial and channel attention weights respectively, and then these weights are combined through multiplication to generate weighted features;
[0107] Finally, these weighted features are integrated through convolution operations to output the optimized image feature map.
[0108] Detect and classify the preprocessed image. The specific operations are as follows:
[0109] Step S2-1: Input preprocessing and Backbone initialization: The preprocessed 640×640×3 image first enters the improved Backbone network for feature extraction. In the initial stage, a 6×6 convolutional layer with a stride of 2 is used for fast downsampling, reducing the image size to 320×320. At the same time, the number of channels is expanded to 64×w, where w is the network width coefficient, completing initial feature compression and dimensionality improvement.
[0110] Step S2-2: Multi-level feature extraction and module collaborative processing: Image features are processed progressively in four stages: each stage is first down-sampled with a stride of 2 through a 3×3 convolutional layer, and then fed into the C2f module for deep feature extraction;
[0111] The C2f module splits the input features into a residual path and a skip connection. The residual path extracts high-order semantic features through multiple Bottleneck blocks, while the skip connection retains the original features to maintain position details. Finally, the two parts of features are fused through the Concat operation.
[0112] At the end of the Backbone, the features are further input into the SPP-CSPC module, which implements multi-scale feature fusion through parallel multi-branch 5×5 maximum pooling and cross-stage connection CSP;
[0113] Step S2-3: Dynamic upsampling and cross-scale feature fusion: The fused feature information is dynamically upsampled to the deep features through the innovative DySample module. The upsampled features are then cross-scale fused with the shallow high-resolution features through the Concat operation, achieving complementary advantages between semantic information and position information.
[0114] Step S2-4: Dual-dimensional attention optimization and feature enhancement: The SCAM module is introduced to process both spatial and channel dimensions in parallel. The spatial attention branch enhances the response of the target area by modeling the spatial relationship of the feature map. The channel attention branch highlights the feature channels that are important for hidden camera detection by using the dependencies between channels. The weights of the two branches are normalized by Softmax and then weighted fused. Finally, the optimized feature map is output through convolution integration.
[0115] Step S2-5: Decoupled detection head multi-task prediction: The detection head Detect completes the target detection task: the classification branch predicts the probability of each anchor point belonging to the "hidden camera device" or "normal" category through 1×1 convolution; the regression branch predicts the precise bounding box coordinates (x, y, w, h) of the target;
[0116] Step S2-6: Post-processing and result output: All prediction results are processed by non-maximum suppression (NMS), and overlapping redundant detection boxes are filtered out based on the confidence threshold and IoU threshold. Finally, the detection results with classification labels, confidence scores, and bounding box coordinates are output.
[0117] YOLOv8 is an efficient object detection model that can not only detect objects but also classify them. To implement an anti-peeping and anti-sneak camera system using YOLOv8, you first need to collect and prepare relevant image data. The dataset should include both normal usage scenarios and potential threat scenarios, such as normal users in front of the screen, suspicious individuals, and hidden camera devices.
[0118] These images are annotated with the object category and its location in the image. This annotated data will be used to train the YOLOv8 model, enabling it to recognize and classify different objects, such as "normal users," "suspicious persons," and "hidden camera devices."
[0119] The SPP-CSPC, Dysample, and SCAM modules are three new modules added to the YOLOv8 model. The SPP-CSPC module combines the techniques of spatial pyramid pooling (SPP) and cross-stage partial connection (CSPC). Spatial pyramid pooling can enhance the model's perception of multi-scale objects by pooling features at different scales, especially when the scales of objects vary greatly, such as people and mobile phone hidden cameras. In this module, the SPP part captures spatial information at different levels by pooling images at multiple scales, thereby improving the model's detection capabilities for small objects (such as mobile phones) and large objects (such as people). The CSPC module reduces the problem of vanishing gradients by connecting features at different stages, allowing the network to better transmit information, which helps to improve the overall performance of the model.
[0120] The primary purpose of the Dysample module is to dynamically sample the input feature map to accommodate objects of varying sizes and shapes. Dynamic sampling helps the model extract information from the input image more efficiently, particularly when dealing with complex backgrounds or irregular objects (such as handheld phones and occlusions), improving the model's ability to recognize small objects. In the detection of people and hidden cameras, the Dysample module can improve the accuracy of object recognition in complex poses and angles by optimizing the feature extraction process.
[0121] The SCAM module is a spatial context-based attention mechanism. It provides the model with spatial information to weight feature maps of different regions, thereby strengthening its focus on regions of interest (such as a person's face, a phone's camera), as well as areas where potential hidden cameras may be present. When detecting people and hidden cameras, the SCAM module effectively enhances the model's sensitivity to the spatial location of these objects in the image, resulting in higher detection accuracy. This is particularly true in environments with significant influences such as lighting, angle, and occlusion, enabling more accurate detection of potential threats.
[0122] Step S3: Determine whether the image contains any camera or human face involved in illegal screen capture behavior;
[0123] Step S3-1: Count the number of consecutive frames without faces in the video stream of the image. If the number of consecutive frames without faces is greater than a first threshold, start the off-duty lock screen program;
[0124] Step S3-2: If the classified image contains a face, the face in the image is recognized and processed, and the number of frames of stranger faces that appear continuously in the video stream is counted;
[0125] Recognize the face in the image, including: determining whether the face image is the face of the owner of the machine and whether the face image is a living face;
[0126] Determine whether the face image is the owner's face, specifically:
[0127] Perform face alignment based on the facial calibrator to eliminate the interference of different postures and expressions on the recognition results;
[0128] The convolutional neural network is used to extract facial features, generate high-dimensional feature vectors, and compare them with the registered machine owner's face database:
[0129] The comparison formula is:
[0130] Where, F1=(F 11 ,F 12 ,…,F 1n ) and F2=(F 21 ,F 22 ,…,F 2n ) are the feature vectors of two faces, F 1i and F 2i are the i-th dimension vectors of feature vectors F1 and F2 respectively, and d(F1, F2) is the Euclidean distance between the two facial features; if the distance is greater than the set threshold, it is considered that a non-host face is detected;
[0131] Determine whether a face image is a living face, specifically:
[0132] Convert the image to the frequency domain and calculate the Fourier spectrum. The formula is:
[0133]
[0134] Among them, F(u,v) is the Fourier spectrum of the image, f(x,y) is the pixel value of the input image, u and v are the horizontal frequency variable and vertical frequency variable respectively.
[0135] Step S3-3: If the classified image contains a camera, count the number of consecutive frames of the camera containing the illegal screen capture behavior in the image video stream;
[0136] Step S4: Start the processing method according to the judgment result to complete the image detection.
[0137] When the number of frames of stranger faces appearing continuously exceeds the preset second threshold, the system immediately starts the peeping lock screen program;
[0138] If the number of consecutive frames of the camera device that illegally records the screen exceeds the preset third threshold, the system will immediately start the hidden camera lock screen program;
[0139] The first threshold is the maximum number of times a face is not detected in consecutive frames. When the number of times the camera fails to detect a face exceeds this threshold, the system considers that a person is away from their post and triggers corresponding protective measures.
[0140] The second threshold is the maximum number of times a stranger's face is detected in consecutive frames. When the number of strangers' faces exceeds this threshold, the system immediately activates the peeping lock screen program to prevent the screen content from being viewed by unauthorized personnel;
[0141] The third threshold is the maximum number of times a hidden camera device is detected in consecutive frames. When the number of times the camera continuously captures the screen exceeds this threshold, the system will start the hidden camera lock screen program to prevent others from secretly capturing information on the screen.
[0142] The video stream captured by the camera is fed into the model, which analyzes each frame in real time, identifying suspicious objects and their categories. The model output includes not only the object category but also its location within the image and its detection confidence. To ensure the validity of the detection results, the system can set a threshold. Only when the confidence level exceeds the set threshold is the detection considered a valid threat. For example, an alarm will only be triggered if the confidence level of a "suspicious person" or "hidden camera device" exceeds 80%.
[0143] Furthermore, the anti-voyeurism and anti-sneak camera system can be configured with various protection measures based on actual needs. When the system detects potential threats, such as suspicious individuals or hidden camera devices, it can trigger an alarm, lock the screen, or initiate other security measures. These measures can effectively prevent inappropriate behavior and ensure user privacy.
[0144] A camera-based automatic screen anti-peeping and anti-sneak photography detection system includes an image detection module, an image classification module, a leave-station lock screen module, a sneak photography screen lock screen module, a face recognition module, a liveness detection module, an alarm module, a storage module, a multi-scale prediction module, a frequency domain analysis module, and a dynamic threshold adjustment module. The image detection module detects the image in front of the screen captured by the image acquisition device;
[0145] The image classification module classifies the detected images to determine whether the images contain any camera that is illegally capturing the screen.
[0146] The leaving workstation lock screen module counts the number of consecutive frames without faces in the video stream of the image, and activates the lock screen program if the number of consecutive frames without faces is greater than a first threshold;
[0147] The secretly photographing screen lock screen module counts the number of consecutive frames of the camera device containing the illegal screen photographing behavior in the video stream of the image, and if the number of consecutive frames of the camera device containing the illegal screen photographing behavior is greater than a second threshold, the lock screen program is activated;
[0148] The face recognition module detects, aligns and extracts features of faces in images and compares them with the host face database;
[0149] The liveness detection module performs liveness detection on the detected face, and the alarm module generates an alarm signal when a security risk is detected;
[0150] After detecting peeping or secretly photographing behavior, the storage module automatically stores the abnormal frame and its preceding and following images to preserve relevant evidence;
[0151] The multi-scale prediction module performs target detection through feature maps at different levels. Low-level features are used for small object detection, while high-level features are used for large object detection, improving the detection accuracy for cameras of different sizes.
[0152] The frequency domain analysis module converts the image into the frequency domain and analyzes the frequency domain features in the image through the Fourier spectrum diagram to assist the liveness detection module in determining whether the face is truly alive.
[0153] The dynamic threshold adjustment module dynamically adjusts the thresholds for face recognition, liveness detection, and camera detection based on ambient lighting and background complexity.
[0154] In order to evaluate the contribution of the three modules SPP-CSPC, Dysample and SCAM to the performance of the YOLOv8 model, we conducted experiments to verify the results. The following table shows:
[0155] mAP (human) mAP(face) mAP (hidden camera device) yolov8n 0.958 0.96 0.86 yolov8n+SPP-CSPC 0.961 0.963 0.88 yolov8n+Dysample 0.952 0.975 0.859 yolov8n+SCAM 0.983 0.983 0.87 yolov8n+all 0.986 0.987 0.892
[0156] As shown in the table above, yolov8n+all achieves the best results, enabling real-time and high-precision scanning and detection of faces and potential hidden cameras (such as mobile phones and cameras) in each input image frame.
[0157] The foregoing is merely an embodiment of the present invention and is not intended to limit the present invention. It will be apparent to those skilled in the art that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.
Claims
1. A camera-based automatic detection method for screen anti-peeping and anti-secret photography, characterized by: The method comprises the following steps: Step S1: using an image acquisition device to capture an image in front of the screen and preprocessing the image; Step S2: Build an image detection and classification model to detect and classify the preprocessed image; Step S3: Determine whether the image contains any camera or human face involved in illegal screen capture behavior; Step S3-1: Count the number of consecutive frames without faces in the video stream of the image. If the number of consecutive frames without faces is greater than a first threshold, start the off-duty lock screen program; Step S3-2: If the classified image contains a face, the face in the image is recognized and processed, and the number of frames of stranger faces that appear continuously in the video stream is counted; Step S3-3: If the classified image contains a camera, count the number of consecutive frames of the camera containing the illegal screen capture behavior in the image video stream; Step S4: Start the processing method according to the judgment result to complete the image detection.
2. The camera-based automatic detection method for screen anti-peeping and anti-secret photography according to claim 1, characterized in that: The step S1 pre-processes the image, including denoising and enhancing the image. The denoising method adopts the wavelet transform method, specifically: I_denoised=DWT_inverse(DWT(I_frame)); Among them, DWT is wavelet transform, DWT_inverse is inverse wavelet transform; The enhancement process improves the image contrast by using the local histogram equalization method, and the formula is: I_enhanced=CLAHE(I_denoised,grid_size,contrast_limit); Among them, CLAHE is the contrast limited adaptive histogram equalization function, grid_size is the grid size, and contrast_limit is the contrast limit.
3. The camera-based automatic detection method for screen anti-peeping and anti-secret photography according to claim 1, characterized in that: In step S2, an image classification algorithm is constructed, and the image classification algorithm adopts a YOLOv8 model; The YOLOv8 model consists of a Backbone part and a Head module part. The Backbone part is built based on the improved CSPDarknet architecture and adopts a staged feature extraction strategy. The Backbone part includes multiple first convolution blocks, multiple C2f modules and SPP-CSPC modules. The first convolution block uses a 6×6 convolution kernel. Each C2f module includes a second convolution block, a Bottleneck module, a downsampling layer and batch normalization processing. The second convolution block uses a 3×3 convolution kernel. The Head module adopts a multi-scale detection architecture to achieve target detection tasks. The Head module includes multiple third convolution blocks, multiple C2f modules, Dysample modules, SCAM modules and detection head Detect; The detection head Detect adopts a decoupled design to separate the classification and regression tasks.
4. The camera-based automatic detection method for screen anti-peeping and anti-secret photography according to claim 3, characterized in that: The SPP-CSPC module integrates the cross-stage partial connection CSP based on the SPP spatial pyramid pooling structure, and achieves efficient feature fusion through parallel multi-branch processing; The SPP-CSPC module includes 5 1×1 convolution blocks, 2 3×1 convolution blocks, 3 parallel 5×5 maximum pooling layers and 2 Concat modules, the 5 1×1 convolution blocks include the first 1×1 convolution block, the second 1×1 convolution block, the third 1×1 convolution block, the fourth 1×1 convolution block and the fifth 1×1 convolution block, the 2 3×1 convolution blocks include the first 3×1 convolution block and the second three 3×1 convolution blocks, and the 2 Concat modules include the first Concat module and the second Concat module; The first 1×1 convolution block performs channel compression, and then the first 3×1 convolution block is used to enhance spatial features. The second 1×1 convolution block receives the information after spatial feature enhancement of the first 3×1 convolution block and splices the first Concat module with three parallel 5×5 maximum pooling layers; the third 1×1 convolution block receives the information of the first Concat module and outputs it to the second and second three 3×1 convolution blocks; the fourth 1×1 convolution block is used to splice the original input features with the second Concat module, and the channel dimension feature integration is completed through the fifth 1×1 convolution block.
5. The camera-based automatic detection method for screen anti-peeping and anti-secret-photography according to claim 3, characterized in that: The operation process of the Dysample module is as follows: First, the input feature map X undergoes a linear transformation to generate a dynamic offset, which is added to the original grid G to obtain a new sampling position. Secondly, a dynamic range factor σ is generated using the Sigmoid function and multiplied by a scaling factor of 0.5 to ensure that the offset is not too large; Finally, the feature map corresponding to the sampling position is upsampled using the pixel resampling operation to generate a higher resolution output feature map S; The operation process of the SCAM module is as follows: First, the input image is processed through two different convolution operations to generate spatial and channel feature maps respectively; Secondly, the feature map is processed by Softmax to calculate the spatial and channel attention weights respectively, and then these weights are combined through multiplication to generate weighted features; Finally, these weighted features are integrated through convolution operations to output the optimized image feature map.
6. The camera-based automatic detection method for screen anti-peeping and anti-secret photography according to claim 1, characterized in that: In step S2, the pre-processed image is detected and classified, and the specific operations are as follows: Step S2-1: Input preprocessing and Backbone initialization: The preprocessed 640×640×3 image first enters the improved Backbone network for feature extraction. In the initial stage, a 6×6 convolutional layer with a stride of 2 is used for fast downsampling, reducing the image size to 320×320. At the same time, the number of channels is expanded to 64×w, where w is the network width coefficient, completing initial feature compression and dimensionality improvement. Step S2-2: Multi-level feature extraction and module collaborative processing: Image features are processed progressively in four stages: each stage is first down-sampled with a stride of 2 through a 3×3 convolutional layer, and then fed into the C2f module for deep feature extraction; The C2f module splits the input features into a residual path and a skip connection. The residual path extracts high-order semantic features through multiple Bottleneck blocks, while the skip connection retains the original features to maintain position details. Finally, the two parts of features are fused through the Concat operation. At the end of the Backbone, the features are further input into the SPP-CSPC module, which implements multi-scale feature fusion through parallel multi-branch 5×5 maximum pooling and cross-stage connection CSP; Step S2-3: Dynamic upsampling and cross-scale feature fusion: The fused feature information is dynamically upsampled to the deep features through the innovative DySample module. The upsampled features are then cross-scale fused with the shallow high-resolution features through the Concat operation, achieving complementary advantages between semantic information and position information. Step S2-4: Dual-dimensional attention optimization and feature enhancement: The SCAM module is introduced to process both spatial and channel dimensions in parallel. The spatial attention branch enhances the response of the target area by modeling the spatial relationship of the feature map; the channel attention branch highlights the feature channels that are important for hidden camera detection by leveraging the dependencies between channels. The weights of the two branches are normalized by Softmax and then weighted fused, and finally the optimized feature map is output through convolution integration; Step S2-5: Decoupled detection head multi-task prediction: The detection head Detect completes the target detection task: the classification branch predicts the probability of each anchor point belonging to the "hidden camera device" or "normal" category through 1×1 convolution; the regression branch predicts the precise bounding box coordinates (x, y, w, h) of the target; Step S2-6: Post-processing and result output: All prediction results are processed by non-maximum suppression (NMS), and overlapping redundant detection boxes are filtered out based on the confidence threshold and IoU threshold. Finally, the detection results with classification labels, confidence scores, and bounding box coordinates are output.
7. The camera-based automatic detection method for screen anti-peeping and anti-secret-photographing according to claim 1, characterized in that: The step S3-2 includes performing face recognition processing on the face in the image, including: determining whether the face image is the face of the owner of the machine and determining whether the face image is a living face; Determine whether the face image is the owner's face, specifically: Perform face alignment based on the facial calibrator to eliminate the interference of different postures and expressions on the recognition results; The convolutional neural network is used to extract facial features, generate high-dimensional feature vectors, and compare them with the registered machine owner's face database: The comparison formula is: Where, F1=(F 11 ,F 12 ,…,F 1n ) and F2=(F 21 ,F 22 ,…,F 2n ) are the feature vectors of two faces, F 1i and F 2i are the i-th dimension vectors of feature vectors F1 and F2 respectively, and d(F1, F2) is the Euclidean distance between the two facial features; if the distance is greater than the set threshold, it is considered that a non-host face is detected; Determine whether a face image is a living face, specifically: Convert the image to the frequency domain and calculate the Fourier spectrum. The formula is: Among them, F(u,v) is the Fourier spectrum of the image, f(x,y) is the pixel value of the input image, u and v are the horizontal frequency variable and vertical frequency variable respectively.
8. The camera-based automatic detection method for screen anti-peeping and anti-secret-photography according to claim 1, characterized in that: In step S4, the processing method is started according to the judgment result, including: When the number of frames of stranger faces appearing continuously exceeds the preset second threshold, the system immediately starts the peeping lock screen program; If the number of consecutive frames of the camera device that illegally records the screen exceeds the preset third threshold, the system will immediately start the hidden camera lock screen program; The first threshold is the maximum number of times a face is not detected in consecutive frames. When the number of times the camera fails to detect a face exceeds the threshold, the system considers that a person is off-duty and triggers corresponding protective measures. The second threshold is the maximum number of times a stranger's face is detected in consecutive frames. When the number of strangers' faces exceeds this threshold, the system immediately activates the peeping lock screen program to prevent the screen content from being viewed by unauthorized personnel; The third threshold is the maximum number of times a hidden camera device is detected in consecutive frames. When the number of times the camera continuously captures the screen exceeds this threshold, the system will start the hidden camera lock screen program to prevent others from secretly capturing information on the screen.
9. A detection system generated by a camera-based screen anti-peeping and anti-secret-photography automatic detection method according to any one of claims 1 to 8, characterized in that: The detection system includes an image detection module, an image classification module, a workstation lock screen module, a hidden camera lock screen module, a face recognition module, a liveness detection module, an alarm module, a storage module, a multi-scale prediction module, a frequency domain analysis module, and a dynamic threshold adjustment module. The image detection module detects the image in front of the image acquisition device’s capture screen; The image classification module classifies the detected image to determine whether the image contains a camera that is illegally capturing the screen; The leaving workstation lock screen module counts the number of consecutive frames without faces in the video stream of the image, and activates the lock screen program if the number of consecutive frames without faces is greater than a first threshold; The secretly filming and locking screen module counts the number of consecutive frames of the shooting device containing the illegal screen filming behavior in the video stream of the image, and starts the lock screen program if the number of consecutive frames of the shooting device containing the illegal screen filming behavior is greater than a second threshold; The face recognition module detects, aligns and extracts features of faces in the image and compares them with the host face database; The liveness detection module performs liveness detection on the detected face, and the alarm module generates an alarm signal when a security risk is detected; After detecting the peeping or secretly photographing behavior, the storage module automatically stores the abnormal frame and its preceding and following images to preserve relevant evidence; The multi-scale prediction module performs target detection through feature maps at different levels. Low-level features are used for small object detection, and high-level features are used for large object detection, thereby improving the detection accuracy of cameras of different sizes. The frequency domain analysis module converts the image into the frequency domain, analyzes the frequency domain features in the image through the Fourier spectrum, and assists the living body detection module in determining whether the face is real and living; The dynamic threshold adjustment module dynamically adjusts the thresholds for face recognition, liveness detection, and camera detection based on ambient lighting and background complexity factors.
Citation Information
Patent Citations
Privacy protection method and device based on image recognition, equipment and storage medium
CN110955912A
Privacy protection method and device and storage medium
CN116049868A
Screen candid photographing prevention automatic detection method and system based on camera
CN117371060A
Screen secret photography prevention method and system based on visual identification
CN117953574A